|
|
"use strict";
|
|
|
(self["webpackChunk"] = self["webpackChunk"] || []).push([[34541],{
|
|
|
|
|
|
/***/ 34541:
|
|
|
/*!**************************************************************************************************************!*\
|
|
|
!*** ./node_modules/_@ant-design_pro-form@2.31.7@@ant-design/pro-form/es/BaseForm/BaseForm.js + 101 modules ***!
|
|
|
\**************************************************************************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
|
|
// EXPORTS
|
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
|
I: function() { return /* binding */ BaseForm; }
|
|
|
});
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.27.0@@babel/runtime/helpers/esm/slicedToArray.js + 1 modules
|
|
|
var slicedToArray = __webpack_require__(52487);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.27.0@@babel/runtime/helpers/esm/defineProperty.js
|
|
|
var defineProperty = __webpack_require__(49618);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.27.0@@babel/runtime/helpers/esm/objectSpread2.js
|
|
|
var objectSpread2 = __webpack_require__(77321);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.27.0@@babel/runtime/helpers/esm/regeneratorRuntime.js
|
|
|
var regeneratorRuntime = __webpack_require__(65736);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.27.0@@babel/runtime/helpers/esm/asyncToGenerator.js
|
|
|
var asyncToGenerator = __webpack_require__(72633);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.27.0@@babel/runtime/helpers/esm/toConsumableArray.js + 2 modules
|
|
|
var toConsumableArray = __webpack_require__(80702);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.27.0@@babel/runtime/helpers/esm/objectWithoutProperties.js
|
|
|
var objectWithoutProperties = __webpack_require__(74416);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_pro-provider@2.15.4@@ant-design/pro-provider/es/index.js + 2 modules
|
|
|
var es = __webpack_require__(68053);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_pro-utils@2.17.0@@ant-design/pro-utils/es/runFunction/index.js
|
|
|
var runFunction = __webpack_require__(51059);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_pro-utils@2.17.0@@ant-design/pro-utils/es/hooks/useRefFunction/index.js
|
|
|
var useRefFunction = __webpack_require__(61472);
|
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
|
|
|
var _react_17_0_2_react = __webpack_require__(59301);
|
|
|
;// CONCATENATED MODULE: ./node_modules/_@ant-design_pro-utils@2.17.0@@ant-design/pro-utils/es/hooks/usePrevious/index.js
|
|
|
|
|
|
var usePrevious = function usePrevious(state) {
|
|
|
var ref = (0,_react_17_0_2_react.useRef)();
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
ref.current = state;
|
|
|
});
|
|
|
return ref.current;
|
|
|
};
|
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_pro-utils@2.17.0@@ant-design/pro-utils/es/isDeepEqualReact/index.js + 1 modules
|
|
|
var isDeepEqualReact = __webpack_require__(59522);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_pro-utils@2.17.0@@ant-design/pro-utils/es/components/ProFormContext/index.js
|
|
|
var ProFormContext = __webpack_require__(83871);
|
|
|
// EXTERNAL MODULE: ./node_modules/_rc-util@5.44.4@rc-util/es/hooks/useMergedState.js
|
|
|
var useMergedState = __webpack_require__(18929);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_pro-utils@2.17.0@@ant-design/pro-utils/es/nanoid/index.js
|
|
|
var nanoid = __webpack_require__(1500);
|
|
|
// EXTERNAL MODULE: ./node_modules/_swr@2.3.3@swr/dist/index/index.mjs
|
|
|
var index = __webpack_require__(58030);
|
|
|
;// CONCATENATED MODULE: ./node_modules/_@ant-design_pro-utils@2.17.0@@ant-design/pro-utils/es/hooks/useFetchData/index.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var testId = 0;
|
|
|
function useFetchData(props) {
|
|
|
var abortRef = (0,_react_17_0_2_react.useRef)(null);
|
|
|
/** Key 是用来缓存请求的,如果不在是有问题 */
|
|
|
var _useState = (0,_react_17_0_2_react.useState)(function () {
|
|
|
if (props.proFieldKey) {
|
|
|
return props.proFieldKey.toString();
|
|
|
}
|
|
|
testId += 1;
|
|
|
return testId.toString();
|
|
|
}),
|
|
|
_useState2 = (0,slicedToArray/* default */.Z)(_useState, 1),
|
|
|
cacheKey = _useState2[0];
|
|
|
var proFieldKeyRef = (0,_react_17_0_2_react.useRef)(cacheKey);
|
|
|
var fetchData = /*#__PURE__*/function () {
|
|
|
var _ref = (0,asyncToGenerator/* default */.Z)( /*#__PURE__*/(0,regeneratorRuntime/* default */.Z)().mark(function _callee() {
|
|
|
var _abortRef$current, _props$request;
|
|
|
var abort, loadData;
|
|
|
return (0,regeneratorRuntime/* default */.Z)().wrap(function _callee$(_context) {
|
|
|
while (1) switch (_context.prev = _context.next) {
|
|
|
case 0:
|
|
|
(_abortRef$current = abortRef.current) === null || _abortRef$current === void 0 || _abortRef$current.abort();
|
|
|
abort = new AbortController();
|
|
|
abortRef.current = abort;
|
|
|
_context.next = 5;
|
|
|
return Promise.race([(_props$request = props.request) === null || _props$request === void 0 ? void 0 : _props$request.call(props, props.params, props), new Promise(function (_, reject) {
|
|
|
var _abortRef$current2;
|
|
|
(_abortRef$current2 = abortRef.current) === null || _abortRef$current2 === void 0 || (_abortRef$current2 = _abortRef$current2.signal) === null || _abortRef$current2 === void 0 || _abortRef$current2.addEventListener('abort', function () {
|
|
|
reject(new Error('aborted'));
|
|
|
});
|
|
|
})]);
|
|
|
case 5:
|
|
|
loadData = _context.sent;
|
|
|
return _context.abrupt("return", loadData);
|
|
|
case 7:
|
|
|
case "end":
|
|
|
return _context.stop();
|
|
|
}
|
|
|
}, _callee);
|
|
|
}));
|
|
|
return function fetchData() {
|
|
|
return _ref.apply(this, arguments);
|
|
|
};
|
|
|
}();
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
return function () {
|
|
|
testId += 1;
|
|
|
};
|
|
|
}, []);
|
|
|
var _useSWR = (0,index/* default */.ZP)([proFieldKeyRef.current, props.params], fetchData, {
|
|
|
revalidateOnFocus: false,
|
|
|
shouldRetryOnError: false,
|
|
|
revalidateOnReconnect: false
|
|
|
}),
|
|
|
data = _useSWR.data,
|
|
|
error = _useSWR.error;
|
|
|
return [data || error];
|
|
|
}
|
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_pro-provider@2.15.4@@ant-design/pro-provider/es/useStyle/index.js
|
|
|
var useStyle = __webpack_require__(38058);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.27.0@@babel/runtime/helpers/esm/typeof.js
|
|
|
var esm_typeof = __webpack_require__(62853);
|
|
|
;// CONCATENATED MODULE: ./node_modules/_lodash-es@4.17.21@lodash-es/_listCacheClear.js
|
|
|
/**
|
|
|
* Removes all key-value entries from the list cache.
|
|
|
*
|
|
|
* @private
|
|
|
* @name clear
|
|
|
* @memberOf ListCache
|
|
|
*/
|
|
|
function listCacheClear() {
|
|
|
this.__data__ = [];
|
|
|
this.size = 0;
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ var _listCacheClear = (listCacheClear);
|
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/_lodash-es@4.17.21@lodash-es/eq.js
|
|
|
/**
|
|
|
* Performs a
|
|
|
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
|
|
* comparison between two values to determine if they are equivalent.
|
|
|
*
|
|
|
* @static
|
|
|
* @memberOf _
|
|
|
* @since 4.0.0
|
|
|
* @category Lang
|
|
|
* @param {*} value The value to compare.
|
|
|
* @param {*} other The other value to compare.
|
|
|
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
|
|
|
* @example
|
|
|
*
|
|
|
* var object = { 'a': 1 };
|
|
|
* var other = { 'a': 1 };
|
|
|
*
|
|
|
* _.eq(object, object);
|
|
|
* // => true
|
|
|
*
|
|
|
* _.eq(object, other);
|
|
|
* // => false
|
|
|
*
|
|
|
* _.eq('a', 'a');
|
|
|
* // => true
|
|
|
*
|
|
|
* _.eq('a', Object('a'));
|
|
|
* // => false
|
|
|
*
|
|
|
* _.eq(NaN, NaN);
|
|
|
* // => true
|
|
|
*/
|
|
|
function eq(value, other) {
|
|
|
return value === other || (value !== value && other !== other);
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ var _lodash_es_4_17_21_lodash_es_eq = (eq);
|
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/_lodash-es@4.17.21@lodash-es/_assocIndexOf.js
|
|
|
|
|
|
|
|
|
/**
|
|
|
* Gets the index at which the `key` is found in `array` of key-value pairs.
|
|
|
*
|
|
|
* @private
|
|
|
* @param {Array} array The array to inspect.
|
|
|
* @param {*} key The key to search for.
|
|
|
* @returns {number} Returns the index of the matched value, else `-1`.
|
|
|
*/
|
|
|
function assocIndexOf(array, key) {
|
|
|
var length = array.length;
|
|
|
while (length--) {
|
|
|
if (_lodash_es_4_17_21_lodash_es_eq(array[length][0], key)) {
|
|
|
return length;
|
|
|
}
|
|
|
}
|
|
|
return -1;
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ var _assocIndexOf = (assocIndexOf);
|
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/_lodash-es@4.17.21@lodash-es/_listCacheDelete.js
|
|
|
|
|
|
|
|
|
/** Used for built-in method references. */
|
|
|
var arrayProto = Array.prototype;
|
|
|
|
|
|
/** Built-in value references. */
|
|
|
var splice = arrayProto.splice;
|
|
|
|
|
|
/**
|
|
|
* Removes `key` and its value from the list cache.
|
|
|
*
|
|
|
* @private
|
|
|
* @name delete
|
|
|
* @memberOf ListCache
|
|
|
* @param {string} key The key of the value to remove.
|
|
|
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
|
*/
|
|
|
function listCacheDelete(key) {
|
|
|
var data = this.__data__,
|
|
|
index = _assocIndexOf(data, key);
|
|
|
|
|
|
if (index < 0) {
|
|
|
return false;
|
|
|
}
|
|
|
var lastIndex = data.length - 1;
|
|
|
if (index == lastIndex) {
|
|
|
data.pop();
|
|
|
} else {
|
|
|
splice.call(data, index, 1);
|
|
|
}
|
|
|
--this.size;
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ var _listCacheDelete = (listCacheDelete);
|
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/_lodash-es@4.17.21@lodash-es/_listCacheGet.js
|
|
|
|
|
|
|
|
|
/**
|
|
|
* Gets the list cache value for `key`.
|
|
|
*
|
|
|
* @private
|
|
|
* @name get
|
|
|
* @memberOf ListCache
|
|
|
* @param {string} key The key of the value to get.
|
|
|
* @returns {*} Returns the entry value.
|
|
|
*/
|
|
|
function listCacheGet(key) {
|
|
|
var data = this.__data__,
|
|
|
index = _assocIndexOf(data, key);
|
|
|
|
|
|
return index < 0 ? undefined : data[index][1];
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ var _listCacheGet = (listCacheGet);
|
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/_lodash-es@4.17.21@lodash-es/_listCacheHas.js
|
|
|
|
|
|
|
|
|
/**
|
|
|
* Checks if a list cache value for `key` exists.
|
|
|
*
|
|
|
* @private
|
|
|
* @name has
|
|
|
* @memberOf ListCache
|
|
|
* @param {string} key The key of the entry to check.
|
|
|
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
|
*/
|
|
|
function listCacheHas(key) {
|
|
|
return _assocIndexOf(this.__data__, key) > -1;
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ var _listCacheHas = (listCacheHas);
|
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/_lodash-es@4.17.21@lodash-es/_listCacheSet.js
|
|
|
|
|
|
|
|
|
/**
|
|
|
* Sets the list cache `key` to `value`.
|
|
|
*
|
|
|
* @private
|
|
|
* @name set
|
|
|
* @memberOf ListCache
|
|
|
* @param {string} key The key of the value to set.
|
|
|
* @param {*} value The value to set.
|
|
|
* @returns {Object} Returns the list cache instance.
|
|
|
*/
|
|
|
function listCacheSet(key, value) {
|
|
|
var data = this.__data__,
|
|
|
index = _assocIndexOf(data, key);
|
|
|
|
|
|
if (index < 0) {
|
|
|
++this.size;
|
|
|
data.push([key, value]);
|
|
|
} else {
|
|
|
data[index][1] = value;
|
|
|
}
|
|
|
return this;
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ var _listCacheSet = (listCacheSet);
|
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/_lodash-es@4.17.21@lodash-es/_ListCache.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
* Creates an list cache object.
|
|
|
*
|
|
|
* @private
|
|
|
* @constructor
|
|
|
* @param {Array} [entries] The key-value pairs to cache.
|
|
|
*/
|
|
|
function ListCache(entries) {
|
|
|
var index = -1,
|
|
|
length = entries == null ? 0 : entries.length;
|
|
|
|
|
|
this.clear();
|
|
|
while (++index < length) {
|
|
|
var entry = entries[index];
|
|
|
this.set(entry[0], entry[1]);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
// Add methods to `ListCache`.
|
|
|
ListCache.prototype.clear = _listCacheClear;
|
|
|
ListCache.prototype['delete'] = _listCacheDelete;
|
|
|
ListCache.prototype.get = _listCacheGet;
|
|
|
ListCache.prototype.has = _listCacheHas;
|
|
|
ListCache.prototype.set = _listCacheSet;
|
|
|
|
|
|
/* harmony default export */ var _ListCache = (ListCache);
|
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/_lodash-es@4.17.21@lodash-es/_stackClear.js
|
|
|
|
|
|
|
|
|
/**
|
|
|
* Removes all key-value entries from the stack.
|
|
|
*
|
|
|
* @private
|
|
|
* @name clear
|
|
|
* @memberOf Stack
|
|
|
*/
|
|
|
function stackClear() {
|
|
|
this.__data__ = new _ListCache;
|
|
|
this.size = 0;
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ var _stackClear = (stackClear);
|
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/_lodash-es@4.17.21@lodash-es/_stackDelete.js
|
|
|
/**
|
|
|
* Removes `key` and its value from the stack.
|
|
|
*
|
|
|
* @private
|
|
|
* @name delete
|
|
|
* @memberOf Stack
|
|
|
* @param {string} key The key of the value to remove.
|
|
|
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
|
*/
|
|
|
function stackDelete(key) {
|
|
|
var data = this.__data__,
|
|
|
result = data['delete'](key);
|
|
|
|
|
|
this.size = data.size;
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ var _stackDelete = (stackDelete);
|
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/_lodash-es@4.17.21@lodash-es/_stackGet.js
|
|
|
/**
|
|
|
* Gets the stack value for `key`.
|
|
|
*
|
|
|
* @private
|
|
|
* @name get
|
|
|
* @memberOf Stack
|
|
|
* @param {string} key The key of the value to get.
|
|
|
* @returns {*} Returns the entry value.
|
|
|
*/
|
|
|
function stackGet(key) {
|
|
|
return this.__data__.get(key);
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ var _stackGet = (stackGet);
|
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/_lodash-es@4.17.21@lodash-es/_stackHas.js
|
|
|
/**
|
|
|
* Checks if a stack value for `key` exists.
|
|
|
*
|
|
|
* @private
|
|
|
* @name has
|
|
|
* @memberOf Stack
|
|
|
* @param {string} key The key of the entry to check.
|
|
|
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
|
*/
|
|
|
function stackHas(key) {
|
|
|
return this.__data__.has(key);
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ var _stackHas = (stackHas);
|
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/_lodash-es@4.17.21@lodash-es/_freeGlobal.js
|
|
|
/** Detect free variable `global` from Node.js. */
|
|
|
var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
|
|
|
|
|
|
/* harmony default export */ var _freeGlobal = (freeGlobal);
|
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/_lodash-es@4.17.21@lodash-es/_root.js
|
|
|
|
|
|
|
|
|
/** Detect free variable `self`. */
|
|
|
var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
|
|
|
|
|
|
/** Used as a reference to the global object. */
|
|
|
var root = _freeGlobal || freeSelf || Function('return this')();
|
|
|
|
|
|
/* harmony default export */ var _root = (root);
|
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/_lodash-es@4.17.21@lodash-es/_Symbol.js
|
|
|
|
|
|
|
|
|
/** Built-in value references. */
|
|
|
var Symbol = _root.Symbol;
|
|
|
|
|
|
/* harmony default export */ var _Symbol = (Symbol);
|
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/_lodash-es@4.17.21@lodash-es/_getRawTag.js
|
|
|
|
|
|
|
|
|
/** Used for built-in method references. */
|
|
|
var objectProto = Object.prototype;
|
|
|
|
|
|
/** Used to check objects for own properties. */
|
|
|
var _getRawTag_hasOwnProperty = objectProto.hasOwnProperty;
|
|
|
|
|
|
/**
|
|
|
* Used to resolve the
|
|
|
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
|
* of values.
|
|
|
*/
|
|
|
var nativeObjectToString = objectProto.toString;
|
|
|
|
|
|
/** Built-in value references. */
|
|
|
var symToStringTag = _Symbol ? _Symbol.toStringTag : undefined;
|
|
|
|
|
|
/**
|
|
|
* A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
|
|
|
*
|
|
|
* @private
|
|
|
* @param {*} value The value to query.
|
|
|
* @returns {string} Returns the raw `toStringTag`.
|
|
|
*/
|
|
|
function getRawTag(value) {
|
|
|
var isOwn = _getRawTag_hasOwnProperty.call(value, symToStringTag),
|
|
|
tag = value[symToStringTag];
|
|
|
|
|
|
try {
|
|
|
value[symToStringTag] = undefined;
|
|
|
var unmasked = true;
|
|
|
} catch (e) {}
|
|
|
|
|
|
var result = nativeObjectToString.call(value);
|
|
|
if (unmasked) {
|
|
|
if (isOwn) {
|
|
|
value[symToStringTag] = tag;
|
|
|
} else {
|
|
|
delete value[symToStringTag];
|
|
|
}
|
|
|
}
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ var _getRawTag = (getRawTag);
|
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/_lodash-es@4.17.21@lodash-es/_objectToString.js
|
|
|
/** Used for built-in method references. */
|
|
|
var _objectToString_objectProto = Object.prototype;
|
|
|
|
|
|
/**
|
|
|
* Used to resolve the
|
|
|
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
|
* of values.
|
|
|
*/
|
|
|
var _objectToString_nativeObjectToString = _objectToString_objectProto.toString;
|
|
|
|
|
|
/**
|
|
|
* Converts `value` to a string using `Object.prototype.toString`.
|
|
|
*
|
|
|
* @private
|
|
|
* @param {*} value The value to convert.
|
|
|
* @returns {string} Returns the converted string.
|
|
|
*/
|
|
|
function objectToString(value) {
|
|
|
return _objectToString_nativeObjectToString.call(value);
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ var _objectToString = (objectToString);
|
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/_lodash-es@4.17.21@lodash-es/_baseGetTag.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** `Object#toString` result references. */
|
|
|
var nullTag = '[object Null]',
|
|
|
undefinedTag = '[object Undefined]';
|
|
|
|
|
|
/** Built-in value references. */
|
|
|
var _baseGetTag_symToStringTag = _Symbol ? _Symbol.toStringTag : undefined;
|
|
|
|
|
|
/**
|
|
|
* The base implementation of `getTag` without fallbacks for buggy environments.
|
|
|
*
|
|
|
* @private
|
|
|
* @param {*} value The value to query.
|
|
|
* @returns {string} Returns the `toStringTag`.
|
|
|
*/
|
|
|
function baseGetTag(value) {
|
|
|
if (value == null) {
|
|
|
return value === undefined ? undefinedTag : nullTag;
|
|
|
}
|
|
|
return (_baseGetTag_symToStringTag && _baseGetTag_symToStringTag in Object(value))
|
|
|
? _getRawTag(value)
|
|
|
: _objectToString(value);
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ var _baseGetTag = (baseGetTag);
|
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/_lodash-es@4.17.21@lodash-es/isObject.js
|
|
|
/**
|
|
|
* Checks if `value` is the
|
|
|
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
|
|
|
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
|
|
*
|
|
|
* @static
|
|
|
* @memberOf _
|
|
|
* @since 0.1.0
|
|
|
* @category Lang
|
|
|
* @param {*} value The value to check.
|
|
|
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
|
|
|
* @example
|
|
|
*
|
|
|
* _.isObject({});
|
|
|
* // => true
|
|
|
*
|
|
|
* _.isObject([1, 2, 3]);
|
|
|
* // => true
|
|
|
*
|
|
|
* _.isObject(_.noop);
|
|
|
* // => true
|
|
|
*
|
|
|
* _.isObject(null);
|
|
|
* // => false
|
|
|
*/
|
|
|
function isObject(value) {
|
|
|
var type = typeof value;
|
|
|
return value != null && (type == 'object' || type == 'function');
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ var _lodash_es_4_17_21_lodash_es_isObject = (isObject);
|
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/_lodash-es@4.17.21@lodash-es/isFunction.js
|
|
|
|
|
|
|
|
|
|
|
|
/** `Object#toString` result references. */
|
|
|
var asyncTag = '[object AsyncFunction]',
|
|
|
funcTag = '[object Function]',
|
|
|
genTag = '[object GeneratorFunction]',
|
|
|
proxyTag = '[object Proxy]';
|
|
|
|
|
|
/**
|
|
|
* Checks if `value` is classified as a `Function` object.
|
|
|
*
|
|
|
* @static
|
|
|
* @memberOf _
|
|
|
* @since 0.1.0
|
|
|
* @category Lang
|
|
|
* @param {*} value The value to check.
|
|
|
* @returns {boolean} Returns `true` if `value` is a function, else `false`.
|
|
|
* @example
|
|
|
*
|
|
|
* _.isFunction(_);
|
|
|
* // => true
|
|
|
*
|
|
|
* _.isFunction(/abc/);
|
|
|
* // => false
|
|
|
*/
|
|
|
function isFunction(value) {
|
|
|
if (!_lodash_es_4_17_21_lodash_es_isObject(value)) {
|
|
|
return false;
|
|
|
}
|
|
|
// The use of `Object#toString` avoids issues with the `typeof` operator
|
|
|
// in Safari 9 which returns 'object' for typed arrays and other constructors.
|
|
|
var tag = _baseGetTag(value);
|
|
|
return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ var _lodash_es_4_17_21_lodash_es_isFunction = (isFunction);
|
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/_lodash-es@4.17.21@lodash-es/_coreJsData.js
|
|
|
|
|
|
|
|
|
/** Used to detect overreaching core-js shims. */
|
|
|
var coreJsData = _root['__core-js_shared__'];
|
|
|
|
|
|
/* harmony default export */ var _coreJsData = (coreJsData);
|
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/_lodash-es@4.17.21@lodash-es/_isMasked.js
|
|
|
|
|
|
|
|
|
/** Used to detect methods masquerading as native. */
|
|
|
var maskSrcKey = (function() {
|
|
|
var uid = /[^.]+$/.exec(_coreJsData && _coreJsData.keys && _coreJsData.keys.IE_PROTO || '');
|
|
|
return uid ? ('Symbol(src)_1.' + uid) : '';
|
|
|
}());
|
|
|
|
|
|
/**
|
|
|
* Checks if `func` has its source masked.
|
|
|
*
|
|
|
* @private
|
|
|
* @param {Function} func The function to check.
|
|
|
* @returns {boolean} Returns `true` if `func` is masked, else `false`.
|
|
|
*/
|
|
|
function isMasked(func) {
|
|
|
return !!maskSrcKey && (maskSrcKey in func);
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ var _isMasked = (isMasked);
|
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/_lodash-es@4.17.21@lodash-es/_toSource.js
|
|
|
/** Used for built-in method references. */
|
|
|
var funcProto = Function.prototype;
|
|
|
|
|
|
/** Used to resolve the decompiled source of functions. */
|
|
|
var funcToString = funcProto.toString;
|
|
|
|
|
|
/**
|
|
|
* Converts `func` to its source code.
|
|
|
*
|
|
|
* @private
|
|
|
* @param {Function} func The function to convert.
|
|
|
* @returns {string} Returns the source code.
|
|
|
*/
|
|
|
function toSource(func) {
|
|
|
if (func != null) {
|
|
|
try {
|
|
|
return funcToString.call(func);
|
|
|
} catch (e) {}
|
|
|
try {
|
|
|
return (func + '');
|
|
|
} catch (e) {}
|
|
|
}
|
|
|
return '';
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ var _toSource = (toSource);
|
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/_lodash-es@4.17.21@lodash-es/_baseIsNative.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
* Used to match `RegExp`
|
|
|
* [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
|
|
|
*/
|
|
|
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
|
|
|
|
|
/** Used to detect host constructors (Safari). */
|
|
|
var reIsHostCtor = /^\[object .+?Constructor\]$/;
|
|
|
|
|
|
/** Used for built-in method references. */
|
|
|
var _baseIsNative_funcProto = Function.prototype,
|
|
|
_baseIsNative_objectProto = Object.prototype;
|
|
|
|
|
|
/** Used to resolve the decompiled source of functions. */
|
|
|
var _baseIsNative_funcToString = _baseIsNative_funcProto.toString;
|
|
|
|
|
|
/** Used to check objects for own properties. */
|
|
|
var _baseIsNative_hasOwnProperty = _baseIsNative_objectProto.hasOwnProperty;
|
|
|
|
|
|
/** Used to detect if a method is native. */
|
|
|
var reIsNative = RegExp('^' +
|
|
|
_baseIsNative_funcToString.call(_baseIsNative_hasOwnProperty).replace(reRegExpChar, '\\$&')
|
|
|
.replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
|
|
|
);
|
|
|
|
|
|
/**
|
|
|
* The base implementation of `_.isNative` without bad shim checks.
|
|
|
*
|
|
|
* @private
|
|
|
* @param {*} value The value to check.
|
|
|
* @returns {boolean} Returns `true` if `value` is a native function,
|
|
|
* else `false`.
|
|
|
*/
|
|
|
function baseIsNative(value) {
|
|
|
if (!_lodash_es_4_17_21_lodash_es_isObject(value) || _isMasked(value)) {
|
|
|
return false;
|
|
|
}
|
|
|
var pattern = _lodash_es_4_17_21_lodash_es_isFunction(value) ? reIsNative : reIsHostCtor;
|
|
|
return pattern.test(_toSource(value));
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ var _baseIsNative = (baseIsNative);
|
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/_lodash-es@4.17.21@lodash-es/_getValue.js
|
|
|
/**
|
|
|
* Gets the value at `key` of `object`.
|
|
|
*
|
|
|
* @private
|
|
|
* @param {Object} [object] The object to query.
|
|
|
* @param {string} key The key of the property to get.
|
|
|
* @returns {*} Returns the property value.
|
|
|
*/
|
|
|
function getValue(object, key) {
|
|
|
return object == null ? undefined : object[key];
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ var _getValue = (getValue);
|
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/_lodash-es@4.17.21@lodash-es/_getNative.js
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
* Gets the native function at `key` of `object`.
|
|
|
*
|
|
|
* @private
|
|
|
* @param {Object} object The object to query.
|
|
|
* @param {string} key The key of the method to get.
|
|
|
* @returns {*} Returns the function if it's native, else `undefined`.
|
|
|
*/
|
|
|
function getNative(object, key) {
|
|
|
var value = _getValue(object, key);
|
|
|
return _baseIsNative(value) ? value : undefined;
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ var _getNative = (getNative);
|
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/_lodash-es@4.17.21@lodash-es/_Map.js
|
|
|
|
|
|
|
|
|
|
|
|
/* Built-in method references that are verified to be native. */
|
|
|
var _Map_Map = _getNative(_root, 'Map');
|
|
|
|
|
|
/* harmony default export */ var _Map = (_Map_Map);
|
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/_lodash-es@4.17.21@lodash-es/_nativeCreate.js
|
|
|
|
|
|
|
|
|
/* Built-in method references that are verified to be native. */
|
|
|
var nativeCreate = _getNative(Object, 'create');
|
|
|
|
|
|
/* harmony default export */ var _nativeCreate = (nativeCreate);
|
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/_lodash-es@4.17.21@lodash-es/_hashClear.js
|
|
|
|
|
|
|
|
|
/**
|
|
|
* Removes all key-value entries from the hash.
|
|
|
*
|
|
|
* @private
|
|
|
* @name clear
|
|
|
* @memberOf Hash
|
|
|
*/
|
|
|
function hashClear() {
|
|
|
this.__data__ = _nativeCreate ? _nativeCreate(null) : {};
|
|
|
this.size = 0;
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ var _hashClear = (hashClear);
|
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/_lodash-es@4.17.21@lodash-es/_hashDelete.js
|
|
|
/**
|
|
|
* Removes `key` and its value from the hash.
|
|
|
*
|
|
|
* @private
|
|
|
* @name delete
|
|
|
* @memberOf Hash
|
|
|
* @param {Object} hash The hash to modify.
|
|
|
* @param {string} key The key of the value to remove.
|
|
|
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
|
*/
|
|
|
function hashDelete(key) {
|
|
|
var result = this.has(key) && delete this.__data__[key];
|
|
|
this.size -= result ? 1 : 0;
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ var _hashDelete = (hashDelete);
|
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/_lodash-es@4.17.21@lodash-es/_hashGet.js
|
|
|
|
|
|
|
|
|
/** Used to stand-in for `undefined` hash values. */
|
|
|
var HASH_UNDEFINED = '__lodash_hash_undefined__';
|
|
|
|
|
|
/** Used for built-in method references. */
|
|
|
var _hashGet_objectProto = Object.prototype;
|
|
|
|
|
|
/** Used to check objects for own properties. */
|
|
|
var _hashGet_hasOwnProperty = _hashGet_objectProto.hasOwnProperty;
|
|
|
|
|
|
/**
|
|
|
* Gets the hash value for `key`.
|
|
|
*
|
|
|
* @private
|
|
|
* @name get
|
|
|
* @memberOf Hash
|
|
|
* @param {string} key The key of the value to get.
|
|
|
* @returns {*} Returns the entry value.
|
|
|
*/
|
|
|
function hashGet(key) {
|
|
|
var data = this.__data__;
|
|
|
if (_nativeCreate) {
|
|
|
var result = data[key];
|
|
|
return result === HASH_UNDEFINED ? undefined : result;
|
|
|
}
|
|
|
return _hashGet_hasOwnProperty.call(data, key) ? data[key] : undefined;
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ var _hashGet = (hashGet);
|
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/_lodash-es@4.17.21@lodash-es/_hashHas.js
|
|
|
|
|
|
|
|
|
/** Used for built-in method references. */
|
|
|
var _hashHas_objectProto = Object.prototype;
|
|
|
|
|
|
/** Used to check objects for own properties. */
|
|
|
var _hashHas_hasOwnProperty = _hashHas_objectProto.hasOwnProperty;
|
|
|
|
|
|
/**
|
|
|
* Checks if a hash value for `key` exists.
|
|
|
*
|
|
|
* @private
|
|
|
* @name has
|
|
|
* @memberOf Hash
|
|
|
* @param {string} key The key of the entry to check.
|
|
|
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
|
*/
|
|
|
function hashHas(key) {
|
|
|
var data = this.__data__;
|
|
|
return _nativeCreate ? (data[key] !== undefined) : _hashHas_hasOwnProperty.call(data, key);
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ var _hashHas = (hashHas);
|
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/_lodash-es@4.17.21@lodash-es/_hashSet.js
|
|
|
|
|
|
|
|
|
/** Used to stand-in for `undefined` hash values. */
|
|
|
var _hashSet_HASH_UNDEFINED = '__lodash_hash_undefined__';
|
|
|
|
|
|
/**
|
|
|
* Sets the hash `key` to `value`.
|
|
|
*
|
|
|
* @private
|
|
|
* @name set
|
|
|
* @memberOf Hash
|
|
|
* @param {string} key The key of the value to set.
|
|
|
* @param {*} value The value to set.
|
|
|
* @returns {Object} Returns the hash instance.
|
|
|
*/
|
|
|
function hashSet(key, value) {
|
|
|
var data = this.__data__;
|
|
|
this.size += this.has(key) ? 0 : 1;
|
|
|
data[key] = (_nativeCreate && value === undefined) ? _hashSet_HASH_UNDEFINED : value;
|
|
|
return this;
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ var _hashSet = (hashSet);
|
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/_lodash-es@4.17.21@lodash-es/_Hash.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
* Creates a hash object.
|
|
|
*
|
|
|
* @private
|
|
|
* @constructor
|
|
|
* @param {Array} [entries] The key-value pairs to cache.
|
|
|
*/
|
|
|
function Hash(entries) {
|
|
|
var index = -1,
|
|
|
length = entries == null ? 0 : entries.length;
|
|
|
|
|
|
this.clear();
|
|
|
while (++index < length) {
|
|
|
var entry = entries[index];
|
|
|
this.set(entry[0], entry[1]);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
// Add methods to `Hash`.
|
|
|
Hash.prototype.clear = _hashClear;
|
|
|
Hash.prototype['delete'] = _hashDelete;
|
|
|
Hash.prototype.get = _hashGet;
|
|
|
Hash.prototype.has = _hashHas;
|
|
|
Hash.prototype.set = _hashSet;
|
|
|
|
|
|
/* harmony default export */ var _Hash = (Hash);
|
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/_lodash-es@4.17.21@lodash-es/_mapCacheClear.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
* Removes all key-value entries from the map.
|
|
|
*
|
|
|
* @private
|
|
|
* @name clear
|
|
|
* @memberOf MapCache
|
|
|
*/
|
|
|
function mapCacheClear() {
|
|
|
this.size = 0;
|
|
|
this.__data__ = {
|
|
|
'hash': new _Hash,
|
|
|
'map': new (_Map || _ListCache),
|
|
|
'string': new _Hash
|
|
|
};
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ var _mapCacheClear = (mapCacheClear);
|
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/_lodash-es@4.17.21@lodash-es/_isKeyable.js
|
|
|
/**
|
|
|
* Checks if `value` is suitable for use as unique object key.
|
|
|
*
|
|
|
* @private
|
|
|
* @param {*} value The value to check.
|
|
|
* @returns {boolean} Returns `true` if `value` is suitable, else `false`.
|
|
|
*/
|
|
|
function isKeyable(value) {
|
|
|
var type = typeof value;
|
|
|
return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
|
|
|
? (value !== '__proto__')
|
|
|
: (value === null);
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ var _isKeyable = (isKeyable);
|
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/_lodash-es@4.17.21@lodash-es/_getMapData.js
|
|
|
|
|
|
|
|
|
/**
|
|
|
* Gets the data for `map`.
|
|
|
*
|
|
|
* @private
|
|
|
* @param {Object} map The map to query.
|
|
|
* @param {string} key The reference key.
|
|
|
* @returns {*} Returns the map data.
|
|
|
*/
|
|
|
function getMapData(map, key) {
|
|
|
var data = map.__data__;
|
|
|
return _isKeyable(key)
|
|
|
? data[typeof key == 'string' ? 'string' : 'hash']
|
|
|
: data.map;
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ var _getMapData = (getMapData);
|
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/_lodash-es@4.17.21@lodash-es/_mapCacheDelete.js
|
|
|
|
|
|
|
|
|
/**
|
|
|
* Removes `key` and its value from the map.
|
|
|
*
|
|
|
* @private
|
|
|
* @name delete
|
|
|
* @memberOf MapCache
|
|
|
* @param {string} key The key of the value to remove.
|
|
|
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
|
*/
|
|
|
function mapCacheDelete(key) {
|
|
|
var result = _getMapData(this, key)['delete'](key);
|
|
|
this.size -= result ? 1 : 0;
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ var _mapCacheDelete = (mapCacheDelete);
|
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/_lodash-es@4.17.21@lodash-es/_mapCacheGet.js
|
|
|
|
|
|
|
|
|
/**
|
|
|
* Gets the map value for `key`.
|
|
|
*
|
|
|
* @private
|
|
|
* @name get
|
|
|
* @memberOf MapCache
|
|
|
* @param {string} key The key of the value to get.
|
|
|
* @returns {*} Returns the entry value.
|
|
|
*/
|
|
|
function mapCacheGet(key) {
|
|
|
return _getMapData(this, key).get(key);
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ var _mapCacheGet = (mapCacheGet);
|
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/_lodash-es@4.17.21@lodash-es/_mapCacheHas.js
|
|
|
|
|
|
|
|
|
/**
|
|
|
* Checks if a map value for `key` exists.
|
|
|
*
|
|
|
* @private
|
|
|
* @name has
|
|
|
* @memberOf MapCache
|
|
|
* @param {string} key The key of the entry to check.
|
|
|
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
|
*/
|
|
|
function mapCacheHas(key) {
|
|
|
return _getMapData(this, key).has(key);
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ var _mapCacheHas = (mapCacheHas);
|
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/_lodash-es@4.17.21@lodash-es/_mapCacheSet.js
|
|
|
|
|
|
|
|
|
/**
|
|
|
* Sets the map `key` to `value`.
|
|
|
*
|
|
|
* @private
|
|
|
* @name set
|
|
|
* @memberOf MapCache
|
|
|
* @param {string} key The key of the value to set.
|
|
|
* @param {*} value The value to set.
|
|
|
* @returns {Object} Returns the map cache instance.
|
|
|
*/
|
|
|
function mapCacheSet(key, value) {
|
|
|
var data = _getMapData(this, key),
|
|
|
size = data.size;
|
|
|
|
|
|
data.set(key, value);
|
|
|
this.size += data.size == size ? 0 : 1;
|
|
|
return this;
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ var _mapCacheSet = (mapCacheSet);
|
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/_lodash-es@4.17.21@lodash-es/_MapCache.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
* Creates a map cache object to store key-value pairs.
|
|
|
*
|
|
|
* @private
|
|
|
* @constructor
|
|
|
* @param {Array} [entries] The key-value pairs to cache.
|
|
|
*/
|
|
|
function MapCache(entries) {
|
|
|
var index = -1,
|
|
|
length = entries == null ? 0 : entries.length;
|
|
|
|
|
|
this.clear();
|
|
|
while (++index < length) {
|
|
|
var entry = entries[index];
|
|
|
this.set(entry[0], entry[1]);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
// Add methods to `MapCache`.
|
|
|
MapCache.prototype.clear = _mapCacheClear;
|
|
|
MapCache.prototype['delete'] = _mapCacheDelete;
|
|
|
MapCache.prototype.get = _mapCacheGet;
|
|
|
MapCache.prototype.has = _mapCacheHas;
|
|
|
MapCache.prototype.set = _mapCacheSet;
|
|
|
|
|
|
/* harmony default export */ var _MapCache = (MapCache);
|
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/_lodash-es@4.17.21@lodash-es/_stackSet.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** Used as the size to enable large array optimizations. */
|
|
|
var LARGE_ARRAY_SIZE = 200;
|
|
|
|
|
|
/**
|
|
|
* Sets the stack `key` to `value`.
|
|
|
*
|
|
|
* @private
|
|
|
* @name set
|
|
|
* @memberOf Stack
|
|
|
* @param {string} key The key of the value to set.
|
|
|
* @param {*} value The value to set.
|
|
|
* @returns {Object} Returns the stack cache instance.
|
|
|
*/
|
|
|
function stackSet(key, value) {
|
|
|
var data = this.__data__;
|
|
|
if (data instanceof _ListCache) {
|
|
|
var pairs = data.__data__;
|
|
|
if (!_Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
|
|
|
pairs.push([key, value]);
|
|
|
this.size = ++data.size;
|
|
|
return this;
|
|
|
}
|
|
|
data = this.__data__ = new _MapCache(pairs);
|
|
|
}
|
|
|
data.set(key, value);
|
|
|
this.size = data.size;
|
|
|
return this;
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ var _stackSet = (stackSet);
|
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/_lodash-es@4.17.21@lodash-es/_Stack.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
* Creates a stack cache object to store key-value pairs.
|
|
|
*
|
|
|
* @private
|
|
|
* @constructor
|
|
|
* @param {Array} [entries] The key-value pairs to cache.
|
|
|
*/
|
|
|
function Stack(entries) {
|
|
|
var data = this.__data__ = new _ListCache(entries);
|
|
|
this.size = data.size;
|
|
|
}
|
|
|
|
|
|
// Add methods to `Stack`.
|
|
|
Stack.prototype.clear = _stackClear;
|
|
|
Stack.prototype['delete'] = _stackDelete;
|
|
|
Stack.prototype.get = _stackGet;
|
|
|
Stack.prototype.has = _stackHas;
|
|
|
Stack.prototype.set = _stackSet;
|
|
|
|
|
|
/* harmony default export */ var _Stack = (Stack);
|
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/_lodash-es@4.17.21@lodash-es/_defineProperty.js
|
|
|
|
|
|
|
|
|
var _defineProperty_defineProperty = (function() {
|
|
|
try {
|
|
|
var func = _getNative(Object, 'defineProperty');
|
|
|
func({}, '', {});
|
|
|
return func;
|
|
|
} catch (e) {}
|
|
|
}());
|
|
|
|
|
|
/* harmony default export */ var _defineProperty = (_defineProperty_defineProperty);
|
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/_lodash-es@4.17.21@lodash-es/_baseAssignValue.js
|
|
|
|
|
|
|
|
|
/**
|
|
|
* The base implementation of `assignValue` and `assignMergeValue` without
|
|
|
* value checks.
|
|
|
*
|
|
|
* @private
|
|
|
* @param {Object} object The object to modify.
|
|
|
* @param {string} key The key of the property to assign.
|
|
|
* @param {*} value The value to assign.
|
|
|
*/
|
|
|
function baseAssignValue(object, key, value) {
|
|
|
if (key == '__proto__' && _defineProperty) {
|
|
|
_defineProperty(object, key, {
|
|
|
'configurable': true,
|
|
|
'enumerable': true,
|
|
|
'value': value,
|
|
|
'writable': true
|
|
|
});
|
|
|
} else {
|
|
|
object[key] = value;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ var _baseAssignValue = (baseAssignValue);
|
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/_lodash-es@4.17.21@lodash-es/_assignMergeValue.js
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
* This function is like `assignValue` except that it doesn't assign
|
|
|
* `undefined` values.
|
|
|
*
|
|
|
* @private
|
|
|
* @param {Object} object The object to modify.
|
|
|
* @param {string} key The key of the property to assign.
|
|
|
* @param {*} value The value to assign.
|
|
|
*/
|
|
|
function assignMergeValue(object, key, value) {
|
|
|
if ((value !== undefined && !_lodash_es_4_17_21_lodash_es_eq(object[key], value)) ||
|
|
|
(value === undefined && !(key in object))) {
|
|
|
_baseAssignValue(object, key, value);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ var _assignMergeValue = (assignMergeValue);
|
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/_lodash-es@4.17.21@lodash-es/_createBaseFor.js
|
|
|
/**
|
|
|
* Creates a base function for methods like `_.forIn` and `_.forOwn`.
|
|
|
*
|
|
|
* @private
|
|
|
* @param {boolean} [fromRight] Specify iterating from right to left.
|
|
|
* @returns {Function} Returns the new base function.
|
|
|
*/
|
|
|
function createBaseFor(fromRight) {
|
|
|
return function(object, iteratee, keysFunc) {
|
|
|
var index = -1,
|
|
|
iterable = Object(object),
|
|
|
props = keysFunc(object),
|
|
|
length = props.length;
|
|
|
|
|
|
while (length--) {
|
|
|
var key = props[fromRight ? length : ++index];
|
|
|
if (iteratee(iterable[key], key, iterable) === false) {
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
return object;
|
|
|
};
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ var _createBaseFor = (createBaseFor);
|
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/_lodash-es@4.17.21@lodash-es/_baseFor.js
|
|
|
|
|
|
|
|
|
/**
|
|
|
* The base implementation of `baseForOwn` which iterates over `object`
|
|
|
* properties returned by `keysFunc` and invokes `iteratee` for each property.
|
|
|
* Iteratee functions may exit iteration early by explicitly returning `false`.
|
|
|
*
|
|
|
* @private
|
|
|
* @param {Object} object The object to iterate over.
|
|
|
* @param {Function} iteratee The function invoked per iteration.
|
|
|
* @param {Function} keysFunc The function to get the keys of `object`.
|
|
|
* @returns {Object} Returns `object`.
|
|
|
*/
|
|
|
var baseFor = _createBaseFor();
|
|
|
|
|
|
/* harmony default export */ var _baseFor = (baseFor);
|
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/_lodash-es@4.17.21@lodash-es/_cloneBuffer.js
|
|
|
|
|
|
|
|
|
/** Detect free variable `exports`. */
|
|
|
var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
|
|
|
|
|
|
/** Detect free variable `module`. */
|
|
|
var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
|
|
|
|
|
|
/** Detect the popular CommonJS extension `module.exports`. */
|
|
|
var moduleExports = freeModule && freeModule.exports === freeExports;
|
|
|
|
|
|
/** Built-in value references. */
|
|
|
var Buffer = moduleExports ? _root.Buffer : undefined,
|
|
|
allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;
|
|
|
|
|
|
/**
|
|
|
* Creates a clone of `buffer`.
|
|
|
*
|
|
|
* @private
|
|
|
* @param {Buffer} buffer The buffer to clone.
|
|
|
* @param {boolean} [isDeep] Specify a deep clone.
|
|
|
* @returns {Buffer} Returns the cloned buffer.
|
|
|
*/
|
|
|
function cloneBuffer(buffer, isDeep) {
|
|
|
if (isDeep) {
|
|
|
return buffer.slice();
|
|
|
}
|
|
|
var length = buffer.length,
|
|
|
result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
|
|
|
|
|
|
buffer.copy(result);
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ var _cloneBuffer = (cloneBuffer);
|
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/_lodash-es@4.17.21@lodash-es/_Uint8Array.js
|
|
|
|
|
|
|
|
|
/** Built-in value references. */
|
|
|
var Uint8Array = _root.Uint8Array;
|
|
|
|
|
|
/* harmony default export */ var _Uint8Array = (Uint8Array);
|
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/_lodash-es@4.17.21@lodash-es/_cloneArrayBuffer.js
|
|
|
|
|
|
|
|
|
/**
|
|
|
* Creates a clone of `arrayBuffer`.
|
|
|
*
|
|
|
* @private
|
|
|
* @param {ArrayBuffer} arrayBuffer The array buffer to clone.
|
|
|
* @returns {ArrayBuffer} Returns the cloned array buffer.
|
|
|
*/
|
|
|
function cloneArrayBuffer(arrayBuffer) {
|
|
|
var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
|
|
|
new _Uint8Array(result).set(new _Uint8Array(arrayBuffer));
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ var _cloneArrayBuffer = (cloneArrayBuffer);
|
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/_lodash-es@4.17.21@lodash-es/_cloneTypedArray.js
|
|
|
|
|
|
|
|
|
/**
|
|
|
* Creates a clone of `typedArray`.
|
|
|
*
|
|
|
* @private
|
|
|
* @param {Object} typedArray The typed array to clone.
|
|
|
* @param {boolean} [isDeep] Specify a deep clone.
|
|
|
* @returns {Object} Returns the cloned typed array.
|
|
|
*/
|
|
|
function cloneTypedArray(typedArray, isDeep) {
|
|
|
var buffer = isDeep ? _cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
|
|
|
return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ var _cloneTypedArray = (cloneTypedArray);
|
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/_lodash-es@4.17.21@lodash-es/_copyArray.js
|
|
|
/**
|
|
|
* Copies the values of `source` to `array`.
|
|
|
*
|
|
|
* @private
|
|
|
* @param {Array} source The array to copy values from.
|
|
|
* @param {Array} [array=[]] The array to copy values to.
|
|
|
* @returns {Array} Returns `array`.
|
|
|
*/
|
|
|
function copyArray(source, array) {
|
|
|
var index = -1,
|
|
|
length = source.length;
|
|
|
|
|
|
array || (array = Array(length));
|
|
|
while (++index < length) {
|
|
|
array[index] = source[index];
|
|
|
}
|
|
|
return array;
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ var _copyArray = (copyArray);
|
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/_lodash-es@4.17.21@lodash-es/_baseCreate.js
|
|
|
|
|
|
|
|
|
/** Built-in value references. */
|
|
|
var objectCreate = Object.create;
|
|
|
|
|
|
/**
|
|
|
* The base implementation of `_.create` without support for assigning
|
|
|
* properties to the created object.
|
|
|
*
|
|
|
* @private
|
|
|
* @param {Object} proto The object to inherit from.
|
|
|
* @returns {Object} Returns the new object.
|
|
|
*/
|
|
|
var baseCreate = (function() {
|
|
|
function object() {}
|
|
|
return function(proto) {
|
|
|
if (!_lodash_es_4_17_21_lodash_es_isObject(proto)) {
|
|
|
return {};
|
|
|
}
|
|
|
if (objectCreate) {
|
|
|
return objectCreate(proto);
|
|
|
}
|
|
|
object.prototype = proto;
|
|
|
var result = new object;
|
|
|
object.prototype = undefined;
|
|
|
return result;
|
|
|
};
|
|
|
}());
|
|
|
|
|
|
/* harmony default export */ var _baseCreate = (baseCreate);
|
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/_lodash-es@4.17.21@lodash-es/_overArg.js
|
|
|
/**
|
|
|
* Creates a unary function that invokes `func` with its argument transformed.
|
|
|
*
|
|
|
* @private
|
|
|
* @param {Function} func The function to wrap.
|
|
|
* @param {Function} transform The argument transform.
|
|
|
* @returns {Function} Returns the new function.
|
|
|
*/
|
|
|
function overArg(func, transform) {
|
|
|
return function(arg) {
|
|
|
return func(transform(arg));
|
|
|
};
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ var _overArg = (overArg);
|
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/_lodash-es@4.17.21@lodash-es/_getPrototype.js
|
|
|
|
|
|
|
|
|
/** Built-in value references. */
|
|
|
var getPrototype = _overArg(Object.getPrototypeOf, Object);
|
|
|
|
|
|
/* harmony default export */ var _getPrototype = (getPrototype);
|
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/_lodash-es@4.17.21@lodash-es/_isPrototype.js
|
|
|
/** Used for built-in method references. */
|
|
|
var _isPrototype_objectProto = Object.prototype;
|
|
|
|
|
|
/**
|
|
|
* Checks if `value` is likely a prototype object.
|
|
|
*
|
|
|
* @private
|
|
|
* @param {*} value The value to check.
|
|
|
* @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
|
|
|
*/
|
|
|
function isPrototype(value) {
|
|
|
var Ctor = value && value.constructor,
|
|
|
proto = (typeof Ctor == 'function' && Ctor.prototype) || _isPrototype_objectProto;
|
|
|
|
|
|
return value === proto;
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ var _isPrototype = (isPrototype);
|
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/_lodash-es@4.17.21@lodash-es/_initCloneObject.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
* Initializes an object clone.
|
|
|
*
|
|
|
* @private
|
|
|
* @param {Object} object The object to clone.
|
|
|
* @returns {Object} Returns the initialized clone.
|
|
|
*/
|
|
|
function initCloneObject(object) {
|
|
|
return (typeof object.constructor == 'function' && !_isPrototype(object))
|
|
|
? _baseCreate(_getPrototype(object))
|
|
|
: {};
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ var _initCloneObject = (initCloneObject);
|
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/_lodash-es@4.17.21@lodash-es/isObjectLike.js
|
|
|
/**
|
|
|
* Checks if `value` is object-like. A value is object-like if it's not `null`
|
|
|
* and has a `typeof` result of "object".
|
|
|
*
|
|
|
* @static
|
|
|
* @memberOf _
|
|
|
* @since 4.0.0
|
|
|
* @category Lang
|
|
|
* @param {*} value The value to check.
|
|
|
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
|
|
* @example
|
|
|
*
|
|
|
* _.isObjectLike({});
|
|
|
* // => true
|
|
|
*
|
|
|
* _.isObjectLike([1, 2, 3]);
|
|
|
* // => true
|
|
|
*
|
|
|
* _.isObjectLike(_.noop);
|
|
|
* // => false
|
|
|
*
|
|
|
* _.isObjectLike(null);
|
|
|
* // => false
|
|
|
*/
|
|
|
function isObjectLike(value) {
|
|
|
return value != null && typeof value == 'object';
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ var _lodash_es_4_17_21_lodash_es_isObjectLike = (isObjectLike);
|
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/_lodash-es@4.17.21@lodash-es/_baseIsArguments.js
|
|
|
|
|
|
|
|
|
|
|
|
/** `Object#toString` result references. */
|
|
|
var argsTag = '[object Arguments]';
|
|
|
|
|
|
/**
|
|
|
* The base implementation of `_.isArguments`.
|
|
|
*
|
|
|
* @private
|
|
|
* @param {*} value The value to check.
|
|
|
* @returns {boolean} Returns `true` if `value` is an `arguments` object,
|
|
|
*/
|
|
|
function baseIsArguments(value) {
|
|
|
return _lodash_es_4_17_21_lodash_es_isObjectLike(value) && _baseGetTag(value) == argsTag;
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ var _baseIsArguments = (baseIsArguments);
|
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/_lodash-es@4.17.21@lodash-es/isArguments.js
|
|
|
|
|
|
|
|
|
|
|
|
/** Used for built-in method references. */
|
|
|
var isArguments_objectProto = Object.prototype;
|
|
|
|
|
|
/** Used to check objects for own properties. */
|
|
|
var isArguments_hasOwnProperty = isArguments_objectProto.hasOwnProperty;
|
|
|
|
|
|
/** Built-in value references. */
|
|
|
var propertyIsEnumerable = isArguments_objectProto.propertyIsEnumerable;
|
|
|
|
|
|
/**
|
|
|
* Checks if `value` is likely an `arguments` object.
|
|
|
*
|
|
|
* @static
|
|
|
* @memberOf _
|
|
|
* @since 0.1.0
|
|
|
* @category Lang
|
|
|
* @param {*} value The value to check.
|
|
|
* @returns {boolean} Returns `true` if `value` is an `arguments` object,
|
|
|
* else `false`.
|
|
|
* @example
|
|
|
*
|
|
|
* _.isArguments(function() { return arguments; }());
|
|
|
* // => true
|
|
|
*
|
|
|
* _.isArguments([1, 2, 3]);
|
|
|
* // => false
|
|
|
*/
|
|
|
var isArguments = _baseIsArguments(function() { return arguments; }()) ? _baseIsArguments : function(value) {
|
|
|
return _lodash_es_4_17_21_lodash_es_isObjectLike(value) && isArguments_hasOwnProperty.call(value, 'callee') &&
|
|
|
!propertyIsEnumerable.call(value, 'callee');
|
|
|
};
|
|
|
|
|
|
/* harmony default export */ var _lodash_es_4_17_21_lodash_es_isArguments = (isArguments);
|
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/_lodash-es@4.17.21@lodash-es/isArray.js
|
|
|
/**
|
|
|
* Checks if `value` is classified as an `Array` object.
|
|
|
*
|
|
|
* @static
|
|
|
* @memberOf _
|
|
|
* @since 0.1.0
|
|
|
* @category Lang
|
|
|
* @param {*} value The value to check.
|
|
|
* @returns {boolean} Returns `true` if `value` is an array, else `false`.
|
|
|
* @example
|
|
|
*
|
|
|
* _.isArray([1, 2, 3]);
|
|
|
* // => true
|
|
|
*
|
|
|
* _.isArray(document.body.children);
|
|
|
* // => false
|
|
|
*
|
|
|
* _.isArray('abc');
|
|
|
* // => false
|
|
|
*
|
|
|
* _.isArray(_.noop);
|
|
|
* // => false
|
|
|
*/
|
|
|
var isArray = Array.isArray;
|
|
|
|
|
|
/* harmony default export */ var _lodash_es_4_17_21_lodash_es_isArray = (isArray);
|
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/_lodash-es@4.17.21@lodash-es/isLength.js
|
|
|
/** Used as references for various `Number` constants. */
|
|
|
var MAX_SAFE_INTEGER = 9007199254740991;
|
|
|
|
|
|
/**
|
|
|
* Checks if `value` is a valid array-like length.
|
|
|
*
|
|
|
* **Note:** This method is loosely based on
|
|
|
* [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
|
|
|
*
|
|
|
* @static
|
|
|
* @memberOf _
|
|
|
* @since 4.0.0
|
|
|
* @category Lang
|
|
|
* @param {*} value The value to check.
|
|
|
* @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
|
|
|
* @example
|
|
|
*
|
|
|
* _.isLength(3);
|
|
|
* // => true
|
|
|
*
|
|
|
* _.isLength(Number.MIN_VALUE);
|
|
|
* // => false
|
|
|
*
|
|
|
* _.isLength(Infinity);
|
|
|
* // => false
|
|
|
*
|
|
|
* _.isLength('3');
|
|
|
* // => false
|
|
|
*/
|
|
|
function isLength(value) {
|
|
|
return typeof value == 'number' &&
|
|
|
value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ var _lodash_es_4_17_21_lodash_es_isLength = (isLength);
|
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/_lodash-es@4.17.21@lodash-es/isArrayLike.js
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
* Checks if `value` is array-like. A value is considered array-like if it's
|
|
|
* not a function and has a `value.length` that's an integer greater than or
|
|
|
* equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
|
|
|
*
|
|
|
* @static
|
|
|
* @memberOf _
|
|
|
* @since 4.0.0
|
|
|
* @category Lang
|
|
|
* @param {*} value The value to check.
|
|
|
* @returns {boolean} Returns `true` if `value` is array-like, else `false`.
|
|
|
* @example
|
|
|
*
|
|
|
* _.isArrayLike([1, 2, 3]);
|
|
|
* // => true
|
|
|
*
|
|
|
* _.isArrayLike(document.body.children);
|
|
|
* // => true
|
|
|
*
|
|
|
* _.isArrayLike('abc');
|
|
|
* // => true
|
|
|
*
|
|
|
* _.isArrayLike(_.noop);
|
|
|
* // => false
|
|
|
*/
|
|
|
function isArrayLike(value) {
|
|
|
return value != null && _lodash_es_4_17_21_lodash_es_isLength(value.length) && !_lodash_es_4_17_21_lodash_es_isFunction(value);
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ var _lodash_es_4_17_21_lodash_es_isArrayLike = (isArrayLike);
|
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/_lodash-es@4.17.21@lodash-es/isArrayLikeObject.js
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
* This method is like `_.isArrayLike` except that it also checks if `value`
|
|
|
* is an object.
|
|
|
*
|
|
|
* @static
|
|
|
* @memberOf _
|
|
|
* @since 4.0.0
|
|
|
* @category Lang
|
|
|
* @param {*} value The value to check.
|
|
|
* @returns {boolean} Returns `true` if `value` is an array-like object,
|
|
|
* else `false`.
|
|
|
* @example
|
|
|
*
|
|
|
* _.isArrayLikeObject([1, 2, 3]);
|
|
|
* // => true
|
|
|
*
|
|
|
* _.isArrayLikeObject(document.body.children);
|
|
|
* // => true
|
|
|
*
|
|
|
* _.isArrayLikeObject('abc');
|
|
|
* // => false
|
|
|
*
|
|
|
* _.isArrayLikeObject(_.noop);
|
|
|
* // => false
|
|
|
*/
|
|
|
function isArrayLikeObject(value) {
|
|
|
return _lodash_es_4_17_21_lodash_es_isObjectLike(value) && _lodash_es_4_17_21_lodash_es_isArrayLike(value);
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ var _lodash_es_4_17_21_lodash_es_isArrayLikeObject = (isArrayLikeObject);
|
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/_lodash-es@4.17.21@lodash-es/stubFalse.js
|
|
|
/**
|
|
|
* This method returns `false`.
|
|
|
*
|
|
|
* @static
|
|
|
* @memberOf _
|
|
|
* @since 4.13.0
|
|
|
* @category Util
|
|
|
* @returns {boolean} Returns `false`.
|
|
|
* @example
|
|
|
*
|
|
|
* _.times(2, _.stubFalse);
|
|
|
* // => [false, false]
|
|
|
*/
|
|
|
function stubFalse() {
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ var _lodash_es_4_17_21_lodash_es_stubFalse = (stubFalse);
|
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/_lodash-es@4.17.21@lodash-es/isBuffer.js
|
|
|
|
|
|
|
|
|
|
|
|
/** Detect free variable `exports`. */
|
|
|
var isBuffer_freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
|
|
|
|
|
|
/** Detect free variable `module`. */
|
|
|
var isBuffer_freeModule = isBuffer_freeExports && typeof module == 'object' && module && !module.nodeType && module;
|
|
|
|
|
|
/** Detect the popular CommonJS extension `module.exports`. */
|
|
|
var isBuffer_moduleExports = isBuffer_freeModule && isBuffer_freeModule.exports === isBuffer_freeExports;
|
|
|
|
|
|
/** Built-in value references. */
|
|
|
var isBuffer_Buffer = isBuffer_moduleExports ? _root.Buffer : undefined;
|
|
|
|
|
|
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
|
var nativeIsBuffer = isBuffer_Buffer ? isBuffer_Buffer.isBuffer : undefined;
|
|
|
|
|
|
/**
|
|
|
* Checks if `value` is a buffer.
|
|
|
*
|
|
|
* @static
|
|
|
* @memberOf _
|
|
|
* @since 4.3.0
|
|
|
* @category Lang
|
|
|
* @param {*} value The value to check.
|
|
|
* @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
|
|
|
* @example
|
|
|
*
|
|
|
* _.isBuffer(new Buffer(2));
|
|
|
* // => true
|
|
|
*
|
|
|
* _.isBuffer(new Uint8Array(2));
|
|
|
* // => false
|
|
|
*/
|
|
|
var isBuffer = nativeIsBuffer || _lodash_es_4_17_21_lodash_es_stubFalse;
|
|
|
|
|
|
/* harmony default export */ var _lodash_es_4_17_21_lodash_es_isBuffer = (isBuffer);
|
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/_lodash-es@4.17.21@lodash-es/isPlainObject.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** `Object#toString` result references. */
|
|
|
var objectTag = '[object Object]';
|
|
|
|
|
|
/** Used for built-in method references. */
|
|
|
var isPlainObject_funcProto = Function.prototype,
|
|
|
isPlainObject_objectProto = Object.prototype;
|
|
|
|
|
|
/** Used to resolve the decompiled source of functions. */
|
|
|
var isPlainObject_funcToString = isPlainObject_funcProto.toString;
|
|
|
|
|
|
/** Used to check objects for own properties. */
|
|
|
var isPlainObject_hasOwnProperty = isPlainObject_objectProto.hasOwnProperty;
|
|
|
|
|
|
/** Used to infer the `Object` constructor. */
|
|
|
var objectCtorString = isPlainObject_funcToString.call(Object);
|
|
|
|
|
|
/**
|
|
|
* Checks if `value` is a plain object, that is, an object created by the
|
|
|
* `Object` constructor or one with a `[[Prototype]]` of `null`.
|
|
|
*
|
|
|
* @static
|
|
|
* @memberOf _
|
|
|
* @since 0.8.0
|
|
|
* @category Lang
|
|
|
* @param {*} value The value to check.
|
|
|
* @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
|
|
|
* @example
|
|
|
*
|
|
|
* function Foo() {
|
|
|
* this.a = 1;
|
|
|
* }
|
|
|
*
|
|
|
* _.isPlainObject(new Foo);
|
|
|
* // => false
|
|
|
*
|
|
|
* _.isPlainObject([1, 2, 3]);
|
|
|
* // => false
|
|
|
*
|
|
|
* _.isPlainObject({ 'x': 0, 'y': 0 });
|
|
|
* // => true
|
|
|
*
|
|
|
* _.isPlainObject(Object.create(null));
|
|
|
* // => true
|
|
|
*/
|
|
|
function isPlainObject(value) {
|
|
|
if (!_lodash_es_4_17_21_lodash_es_isObjectLike(value) || _baseGetTag(value) != objectTag) {
|
|
|
return false;
|
|
|
}
|
|
|
var proto = _getPrototype(value);
|
|
|
if (proto === null) {
|
|
|
return true;
|
|
|
}
|
|
|
var Ctor = isPlainObject_hasOwnProperty.call(proto, 'constructor') && proto.constructor;
|
|
|
return typeof Ctor == 'function' && Ctor instanceof Ctor &&
|
|
|
isPlainObject_funcToString.call(Ctor) == objectCtorString;
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ var _lodash_es_4_17_21_lodash_es_isPlainObject = (isPlainObject);
|
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/_lodash-es@4.17.21@lodash-es/_baseIsTypedArray.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** `Object#toString` result references. */
|
|
|
var _baseIsTypedArray_argsTag = '[object Arguments]',
|
|
|
arrayTag = '[object Array]',
|
|
|
boolTag = '[object Boolean]',
|
|
|
dateTag = '[object Date]',
|
|
|
errorTag = '[object Error]',
|
|
|
_baseIsTypedArray_funcTag = '[object Function]',
|
|
|
mapTag = '[object Map]',
|
|
|
numberTag = '[object Number]',
|
|
|
_baseIsTypedArray_objectTag = '[object Object]',
|
|
|
regexpTag = '[object RegExp]',
|
|
|
setTag = '[object Set]',
|
|
|
stringTag = '[object String]',
|
|
|
weakMapTag = '[object WeakMap]';
|
|
|
|
|
|
var arrayBufferTag = '[object ArrayBuffer]',
|
|
|
dataViewTag = '[object DataView]',
|
|
|
float32Tag = '[object Float32Array]',
|
|
|
float64Tag = '[object Float64Array]',
|
|
|
int8Tag = '[object Int8Array]',
|
|
|
int16Tag = '[object Int16Array]',
|
|
|
int32Tag = '[object Int32Array]',
|
|
|
uint8Tag = '[object Uint8Array]',
|
|
|
uint8ClampedTag = '[object Uint8ClampedArray]',
|
|
|
uint16Tag = '[object Uint16Array]',
|
|
|
uint32Tag = '[object Uint32Array]';
|
|
|
|
|
|
/** Used to identify `toStringTag` values of typed arrays. */
|
|
|
var typedArrayTags = {};
|
|
|
typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
|
|
|
typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
|
|
|
typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
|
|
|
typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
|
|
|
typedArrayTags[uint32Tag] = true;
|
|
|
typedArrayTags[_baseIsTypedArray_argsTag] = typedArrayTags[arrayTag] =
|
|
|
typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
|
|
|
typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
|
|
|
typedArrayTags[errorTag] = typedArrayTags[_baseIsTypedArray_funcTag] =
|
|
|
typedArrayTags[mapTag] = typedArrayTags[numberTag] =
|
|
|
typedArrayTags[_baseIsTypedArray_objectTag] = typedArrayTags[regexpTag] =
|
|
|
typedArrayTags[setTag] = typedArrayTags[stringTag] =
|
|
|
typedArrayTags[weakMapTag] = false;
|
|
|
|
|
|
/**
|
|
|
* The base implementation of `_.isTypedArray` without Node.js optimizations.
|
|
|
*
|
|
|
* @private
|
|
|
* @param {*} value The value to check.
|
|
|
* @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
|
|
|
*/
|
|
|
function baseIsTypedArray(value) {
|
|
|
return _lodash_es_4_17_21_lodash_es_isObjectLike(value) &&
|
|
|
_lodash_es_4_17_21_lodash_es_isLength(value.length) && !!typedArrayTags[_baseGetTag(value)];
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ var _baseIsTypedArray = (baseIsTypedArray);
|
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/_lodash-es@4.17.21@lodash-es/_baseUnary.js
|
|
|
/**
|
|
|
* The base implementation of `_.unary` without support for storing metadata.
|
|
|
*
|
|
|
* @private
|
|
|
* @param {Function} func The function to cap arguments for.
|
|
|
* @returns {Function} Returns the new capped function.
|
|
|
*/
|
|
|
function baseUnary(func) {
|
|
|
return function(value) {
|
|
|
return func(value);
|
|
|
};
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ var _baseUnary = (baseUnary);
|
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/_lodash-es@4.17.21@lodash-es/_nodeUtil.js
|
|
|
|
|
|
|
|
|
/** Detect free variable `exports`. */
|
|
|
var _nodeUtil_freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
|
|
|
|
|
|
/** Detect free variable `module`. */
|
|
|
var _nodeUtil_freeModule = _nodeUtil_freeExports && typeof module == 'object' && module && !module.nodeType && module;
|
|
|
|
|
|
/** Detect the popular CommonJS extension `module.exports`. */
|
|
|
var _nodeUtil_moduleExports = _nodeUtil_freeModule && _nodeUtil_freeModule.exports === _nodeUtil_freeExports;
|
|
|
|
|
|
/** Detect free variable `process` from Node.js. */
|
|
|
var freeProcess = _nodeUtil_moduleExports && _freeGlobal.process;
|
|
|
|
|
|
/** Used to access faster Node.js helpers. */
|
|
|
var nodeUtil = (function() {
|
|
|
try {
|
|
|
// Use `util.types` for Node.js 10+.
|
|
|
var types = _nodeUtil_freeModule && _nodeUtil_freeModule.require && _nodeUtil_freeModule.require('util').types;
|
|
|
|
|
|
if (types) {
|
|
|
return types;
|
|
|
}
|
|
|
|
|
|
// Legacy `process.binding('util')` for Node.js < 10.
|
|
|
return freeProcess && freeProcess.binding && freeProcess.binding('util');
|
|
|
} catch (e) {}
|
|
|
}());
|
|
|
|
|
|
/* harmony default export */ var _nodeUtil = (nodeUtil);
|
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/_lodash-es@4.17.21@lodash-es/isTypedArray.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* Node.js helper references. */
|
|
|
var nodeIsTypedArray = _nodeUtil && _nodeUtil.isTypedArray;
|
|
|
|
|
|
/**
|
|
|
* Checks if `value` is classified as a typed array.
|
|
|
*
|
|
|
* @static
|
|
|
* @memberOf _
|
|
|
* @since 3.0.0
|
|
|
* @category Lang
|
|
|
* @param {*} value The value to check.
|
|
|
* @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
|
|
|
* @example
|
|
|
*
|
|
|
* _.isTypedArray(new Uint8Array);
|
|
|
* // => true
|
|
|
*
|
|
|
* _.isTypedArray([]);
|
|
|
* // => false
|
|
|
*/
|
|
|
var isTypedArray = nodeIsTypedArray ? _baseUnary(nodeIsTypedArray) : _baseIsTypedArray;
|
|
|
|
|
|
/* harmony default export */ var _lodash_es_4_17_21_lodash_es_isTypedArray = (isTypedArray);
|
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/_lodash-es@4.17.21@lodash-es/_safeGet.js
|
|
|
/**
|
|
|
* Gets the value at `key`, unless `key` is "__proto__" or "constructor".
|
|
|
*
|
|
|
* @private
|
|
|
* @param {Object} object The object to query.
|
|
|
* @param {string} key The key of the property to get.
|
|
|
* @returns {*} Returns the property value.
|
|
|
*/
|
|
|
function safeGet(object, key) {
|
|
|
if (key === 'constructor' && typeof object[key] === 'function') {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
if (key == '__proto__') {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
return object[key];
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ var _safeGet = (safeGet);
|
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/_lodash-es@4.17.21@lodash-es/_assignValue.js
|
|
|
|
|
|
|
|
|
|
|
|
/** Used for built-in method references. */
|
|
|
var _assignValue_objectProto = Object.prototype;
|
|
|
|
|
|
/** Used to check objects for own properties. */
|
|
|
var _assignValue_hasOwnProperty = _assignValue_objectProto.hasOwnProperty;
|
|
|
|
|
|
/**
|
|
|
* Assigns `value` to `key` of `object` if the existing value is not equivalent
|
|
|
* using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
|
|
* for equality comparisons.
|
|
|
*
|
|
|
* @private
|
|
|
* @param {Object} object The object to modify.
|
|
|
* @param {string} key The key of the property to assign.
|
|
|
* @param {*} value The value to assign.
|
|
|
*/
|
|
|
function assignValue(object, key, value) {
|
|
|
var objValue = object[key];
|
|
|
if (!(_assignValue_hasOwnProperty.call(object, key) && _lodash_es_4_17_21_lodash_es_eq(objValue, value)) ||
|
|
|
(value === undefined && !(key in object))) {
|
|
|
_baseAssignValue(object, key, value);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ var _assignValue = (assignValue);
|
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/_lodash-es@4.17.21@lodash-es/_copyObject.js
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
* Copies properties of `source` to `object`.
|
|
|
*
|
|
|
* @private
|
|
|
* @param {Object} source The object to copy properties from.
|
|
|
* @param {Array} props The property identifiers to copy.
|
|
|
* @param {Object} [object={}] The object to copy properties to.
|
|
|
* @param {Function} [customizer] The function to customize copied values.
|
|
|
* @returns {Object} Returns `object`.
|
|
|
*/
|
|
|
function copyObject(source, props, object, customizer) {
|
|
|
var isNew = !object;
|
|
|
object || (object = {});
|
|
|
|
|
|
var index = -1,
|
|
|
length = props.length;
|
|
|
|
|
|
while (++index < length) {
|
|
|
var key = props[index];
|
|
|
|
|
|
var newValue = customizer
|
|
|
? customizer(object[key], source[key], key, object, source)
|
|
|
: undefined;
|
|
|
|
|
|
if (newValue === undefined) {
|
|
|
newValue = source[key];
|
|
|
}
|
|
|
if (isNew) {
|
|
|
_baseAssignValue(object, key, newValue);
|
|
|
} else {
|
|
|
_assignValue(object, key, newValue);
|
|
|
}
|
|
|
}
|
|
|
return object;
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ var _copyObject = (copyObject);
|
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/_lodash-es@4.17.21@lodash-es/_baseTimes.js
|
|
|
/**
|
|
|
* The base implementation of `_.times` without support for iteratee shorthands
|
|
|
* or max array length checks.
|
|
|
*
|
|
|
* @private
|
|
|
* @param {number} n The number of times to invoke `iteratee`.
|
|
|
* @param {Function} iteratee The function invoked per iteration.
|
|
|
* @returns {Array} Returns the array of results.
|
|
|
*/
|
|
|
function baseTimes(n, iteratee) {
|
|
|
var index = -1,
|
|
|
result = Array(n);
|
|
|
|
|
|
while (++index < n) {
|
|
|
result[index] = iteratee(index);
|
|
|
}
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ var _baseTimes = (baseTimes);
|
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/_lodash-es@4.17.21@lodash-es/_isIndex.js
|
|
|
/** Used as references for various `Number` constants. */
|
|
|
var _isIndex_MAX_SAFE_INTEGER = 9007199254740991;
|
|
|
|
|
|
/** Used to detect unsigned integer values. */
|
|
|
var reIsUint = /^(?:0|[1-9]\d*)$/;
|
|
|
|
|
|
/**
|
|
|
* Checks if `value` is a valid array-like index.
|
|
|
*
|
|
|
* @private
|
|
|
* @param {*} value The value to check.
|
|
|
* @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
|
|
|
* @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
|
|
|
*/
|
|
|
function isIndex(value, length) {
|
|
|
var type = typeof value;
|
|
|
length = length == null ? _isIndex_MAX_SAFE_INTEGER : length;
|
|
|
|
|
|
return !!length &&
|
|
|
(type == 'number' ||
|
|
|
(type != 'symbol' && reIsUint.test(value))) &&
|
|
|
(value > -1 && value % 1 == 0 && value < length);
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ var _isIndex = (isIndex);
|
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/_lodash-es@4.17.21@lodash-es/_arrayLikeKeys.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** Used for built-in method references. */
|
|
|
var _arrayLikeKeys_objectProto = Object.prototype;
|
|
|
|
|
|
/** Used to check objects for own properties. */
|
|
|
var _arrayLikeKeys_hasOwnProperty = _arrayLikeKeys_objectProto.hasOwnProperty;
|
|
|
|
|
|
/**
|
|
|
* Creates an array of the enumerable property names of the array-like `value`.
|
|
|
*
|
|
|
* @private
|
|
|
* @param {*} value The value to query.
|
|
|
* @param {boolean} inherited Specify returning inherited property names.
|
|
|
* @returns {Array} Returns the array of property names.
|
|
|
*/
|
|
|
function arrayLikeKeys(value, inherited) {
|
|
|
var isArr = _lodash_es_4_17_21_lodash_es_isArray(value),
|
|
|
isArg = !isArr && _lodash_es_4_17_21_lodash_es_isArguments(value),
|
|
|
isBuff = !isArr && !isArg && _lodash_es_4_17_21_lodash_es_isBuffer(value),
|
|
|
isType = !isArr && !isArg && !isBuff && _lodash_es_4_17_21_lodash_es_isTypedArray(value),
|
|
|
skipIndexes = isArr || isArg || isBuff || isType,
|
|
|
result = skipIndexes ? _baseTimes(value.length, String) : [],
|
|
|
length = result.length;
|
|
|
|
|
|
for (var key in value) {
|
|
|
if ((inherited || _arrayLikeKeys_hasOwnProperty.call(value, key)) &&
|
|
|
!(skipIndexes && (
|
|
|
// Safari 9 has enumerable `arguments.length` in strict mode.
|
|
|
key == 'length' ||
|
|
|
// Node.js 0.10 has enumerable non-index properties on buffers.
|
|
|
(isBuff && (key == 'offset' || key == 'parent')) ||
|
|
|
// PhantomJS 2 has enumerable non-index properties on typed arrays.
|
|
|
(isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
|
|
|
// Skip index properties.
|
|
|
_isIndex(key, length)
|
|
|
))) {
|
|
|
result.push(key);
|
|
|
}
|
|
|
}
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ var _arrayLikeKeys = (arrayLikeKeys);
|
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/_lodash-es@4.17.21@lodash-es/_nativeKeysIn.js
|
|
|
/**
|
|
|
* This function is like
|
|
|
* [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
|
|
|
* except that it includes inherited enumerable properties.
|
|
|
*
|
|
|
* @private
|
|
|
* @param {Object} object The object to query.
|
|
|
* @returns {Array} Returns the array of property names.
|
|
|
*/
|
|
|
function nativeKeysIn(object) {
|
|
|
var result = [];
|
|
|
if (object != null) {
|
|
|
for (var key in Object(object)) {
|
|
|
result.push(key);
|
|
|
}
|
|
|
}
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ var _nativeKeysIn = (nativeKeysIn);
|
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/_lodash-es@4.17.21@lodash-es/_baseKeysIn.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** Used for built-in method references. */
|
|
|
var _baseKeysIn_objectProto = Object.prototype;
|
|
|
|
|
|
/** Used to check objects for own properties. */
|
|
|
var _baseKeysIn_hasOwnProperty = _baseKeysIn_objectProto.hasOwnProperty;
|
|
|
|
|
|
/**
|
|
|
* The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.
|
|
|
*
|
|
|
* @private
|
|
|
* @param {Object} object The object to query.
|
|
|
* @returns {Array} Returns the array of property names.
|
|
|
*/
|
|
|
function baseKeysIn(object) {
|
|
|
if (!_lodash_es_4_17_21_lodash_es_isObject(object)) {
|
|
|
return _nativeKeysIn(object);
|
|
|
}
|
|
|
var isProto = _isPrototype(object),
|
|
|
result = [];
|
|
|
|
|
|
for (var key in object) {
|
|
|
if (!(key == 'constructor' && (isProto || !_baseKeysIn_hasOwnProperty.call(object, key)))) {
|
|
|
result.push(key);
|
|
|
}
|
|
|
}
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ var _baseKeysIn = (baseKeysIn);
|
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/_lodash-es@4.17.21@lodash-es/keysIn.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
* Creates an array of the own and inherited enumerable property names of `object`.
|
|
|
*
|
|
|
* **Note:** Non-object values are coerced to objects.
|
|
|
*
|
|
|
* @static
|
|
|
* @memberOf _
|
|
|
* @since 3.0.0
|
|
|
* @category Object
|
|
|
* @param {Object} object The object to query.
|
|
|
* @returns {Array} Returns the array of property names.
|
|
|
* @example
|
|
|
*
|
|
|
* function Foo() {
|
|
|
* this.a = 1;
|
|
|
* this.b = 2;
|
|
|
* }
|
|
|
*
|
|
|
* Foo.prototype.c = 3;
|
|
|
*
|
|
|
* _.keysIn(new Foo);
|
|
|
* // => ['a', 'b', 'c'] (iteration order is not guaranteed)
|
|
|
*/
|
|
|
function keysIn(object) {
|
|
|
return _lodash_es_4_17_21_lodash_es_isArrayLike(object) ? _arrayLikeKeys(object, true) : _baseKeysIn(object);
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ var _lodash_es_4_17_21_lodash_es_keysIn = (keysIn);
|
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/_lodash-es@4.17.21@lodash-es/toPlainObject.js
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
* Converts `value` to a plain object flattening inherited enumerable string
|
|
|
* keyed properties of `value` to own properties of the plain object.
|
|
|
*
|
|
|
* @static
|
|
|
* @memberOf _
|
|
|
* @since 3.0.0
|
|
|
* @category Lang
|
|
|
* @param {*} value The value to convert.
|
|
|
* @returns {Object} Returns the converted plain object.
|
|
|
* @example
|
|
|
*
|
|
|
* function Foo() {
|
|
|
* this.b = 2;
|
|
|
* }
|
|
|
*
|
|
|
* Foo.prototype.c = 3;
|
|
|
*
|
|
|
* _.assign({ 'a': 1 }, new Foo);
|
|
|
* // => { 'a': 1, 'b': 2 }
|
|
|
*
|
|
|
* _.assign({ 'a': 1 }, _.toPlainObject(new Foo));
|
|
|
* // => { 'a': 1, 'b': 2, 'c': 3 }
|
|
|
*/
|
|
|
function toPlainObject(value) {
|
|
|
return _copyObject(value, _lodash_es_4_17_21_lodash_es_keysIn(value));
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ var _lodash_es_4_17_21_lodash_es_toPlainObject = (toPlainObject);
|
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/_lodash-es@4.17.21@lodash-es/_baseMergeDeep.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
* A specialized version of `baseMerge` for arrays and objects which performs
|
|
|
* deep merges and tracks traversed objects enabling objects with circular
|
|
|
* references to be merged.
|
|
|
*
|
|
|
* @private
|
|
|
* @param {Object} object The destination object.
|
|
|
* @param {Object} source The source object.
|
|
|
* @param {string} key The key of the value to merge.
|
|
|
* @param {number} srcIndex The index of `source`.
|
|
|
* @param {Function} mergeFunc The function to merge values.
|
|
|
* @param {Function} [customizer] The function to customize assigned values.
|
|
|
* @param {Object} [stack] Tracks traversed source values and their merged
|
|
|
* counterparts.
|
|
|
*/
|
|
|
function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {
|
|
|
var objValue = _safeGet(object, key),
|
|
|
srcValue = _safeGet(source, key),
|
|
|
stacked = stack.get(srcValue);
|
|
|
|
|
|
if (stacked) {
|
|
|
_assignMergeValue(object, key, stacked);
|
|
|
return;
|
|
|
}
|
|
|
var newValue = customizer
|
|
|
? customizer(objValue, srcValue, (key + ''), object, source, stack)
|
|
|
: undefined;
|
|
|
|
|
|
var isCommon = newValue === undefined;
|
|
|
|
|
|
if (isCommon) {
|
|
|
var isArr = _lodash_es_4_17_21_lodash_es_isArray(srcValue),
|
|
|
isBuff = !isArr && _lodash_es_4_17_21_lodash_es_isBuffer(srcValue),
|
|
|
isTyped = !isArr && !isBuff && _lodash_es_4_17_21_lodash_es_isTypedArray(srcValue);
|
|
|
|
|
|
newValue = srcValue;
|
|
|
if (isArr || isBuff || isTyped) {
|
|
|
if (_lodash_es_4_17_21_lodash_es_isArray(objValue)) {
|
|
|
newValue = objValue;
|
|
|
}
|
|
|
else if (_lodash_es_4_17_21_lodash_es_isArrayLikeObject(objValue)) {
|
|
|
newValue = _copyArray(objValue);
|
|
|
}
|
|
|
else if (isBuff) {
|
|
|
isCommon = false;
|
|
|
newValue = _cloneBuffer(srcValue, true);
|
|
|
}
|
|
|
else if (isTyped) {
|
|
|
isCommon = false;
|
|
|
newValue = _cloneTypedArray(srcValue, true);
|
|
|
}
|
|
|
else {
|
|
|
newValue = [];
|
|
|
}
|
|
|
}
|
|
|
else if (_lodash_es_4_17_21_lodash_es_isPlainObject(srcValue) || _lodash_es_4_17_21_lodash_es_isArguments(srcValue)) {
|
|
|
newValue = objValue;
|
|
|
if (_lodash_es_4_17_21_lodash_es_isArguments(objValue)) {
|
|
|
newValue = _lodash_es_4_17_21_lodash_es_toPlainObject(objValue);
|
|
|
}
|
|
|
else if (!_lodash_es_4_17_21_lodash_es_isObject(objValue) || _lodash_es_4_17_21_lodash_es_isFunction(objValue)) {
|
|
|
newValue = _initCloneObject(srcValue);
|
|
|
}
|
|
|
}
|
|
|
else {
|
|
|
isCommon = false;
|
|
|
}
|
|
|
}
|
|
|
if (isCommon) {
|
|
|
// Recursively merge objects and arrays (susceptible to call stack limits).
|
|
|
stack.set(srcValue, newValue);
|
|
|
mergeFunc(newValue, srcValue, srcIndex, customizer, stack);
|
|
|
stack['delete'](srcValue);
|
|
|
}
|
|
|
_assignMergeValue(object, key, newValue);
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ var _baseMergeDeep = (baseMergeDeep);
|
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/_lodash-es@4.17.21@lodash-es/_baseMerge.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
* The base implementation of `_.merge` without support for multiple sources.
|
|
|
*
|
|
|
* @private
|
|
|
* @param {Object} object The destination object.
|
|
|
* @param {Object} source The source object.
|
|
|
* @param {number} srcIndex The index of `source`.
|
|
|
* @param {Function} [customizer] The function to customize merged values.
|
|
|
* @param {Object} [stack] Tracks traversed source values and their merged
|
|
|
* counterparts.
|
|
|
*/
|
|
|
function baseMerge(object, source, srcIndex, customizer, stack) {
|
|
|
if (object === source) {
|
|
|
return;
|
|
|
}
|
|
|
_baseFor(source, function(srcValue, key) {
|
|
|
stack || (stack = new _Stack);
|
|
|
if (_lodash_es_4_17_21_lodash_es_isObject(srcValue)) {
|
|
|
_baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
|
|
|
}
|
|
|
else {
|
|
|
var newValue = customizer
|
|
|
? customizer(_safeGet(object, key), srcValue, (key + ''), object, source, stack)
|
|
|
: undefined;
|
|
|
|
|
|
if (newValue === undefined) {
|
|
|
newValue = srcValue;
|
|
|
}
|
|
|
_assignMergeValue(object, key, newValue);
|
|
|
}
|
|
|
}, _lodash_es_4_17_21_lodash_es_keysIn);
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ var _baseMerge = (baseMerge);
|
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/_lodash-es@4.17.21@lodash-es/identity.js
|
|
|
/**
|
|
|
* This method returns the first argument it receives.
|
|
|
*
|
|
|
* @static
|
|
|
* @since 0.1.0
|
|
|
* @memberOf _
|
|
|
* @category Util
|
|
|
* @param {*} value Any value.
|
|
|
* @returns {*} Returns `value`.
|
|
|
* @example
|
|
|
*
|
|
|
* var object = { 'a': 1 };
|
|
|
*
|
|
|
* console.log(_.identity(object) === object);
|
|
|
* // => true
|
|
|
*/
|
|
|
function identity(value) {
|
|
|
return value;
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ var _lodash_es_4_17_21_lodash_es_identity = (identity);
|
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/_lodash-es@4.17.21@lodash-es/_apply.js
|
|
|
/**
|
|
|
* A faster alternative to `Function#apply`, this function invokes `func`
|
|
|
* with the `this` binding of `thisArg` and the arguments of `args`.
|
|
|
*
|
|
|
* @private
|
|
|
* @param {Function} func The function to invoke.
|
|
|
* @param {*} thisArg The `this` binding of `func`.
|
|
|
* @param {Array} args The arguments to invoke `func` with.
|
|
|
* @returns {*} Returns the result of `func`.
|
|
|
*/
|
|
|
function apply(func, thisArg, args) {
|
|
|
switch (args.length) {
|
|
|
case 0: return func.call(thisArg);
|
|
|
case 1: return func.call(thisArg, args[0]);
|
|
|
case 2: return func.call(thisArg, args[0], args[1]);
|
|
|
case 3: return func.call(thisArg, args[0], args[1], args[2]);
|
|
|
}
|
|
|
return func.apply(thisArg, args);
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ var _apply = (apply);
|
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/_lodash-es@4.17.21@lodash-es/_overRest.js
|
|
|
|
|
|
|
|
|
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
|
var nativeMax = Math.max;
|
|
|
|
|
|
/**
|
|
|
* A specialized version of `baseRest` which transforms the rest array.
|
|
|
*
|
|
|
* @private
|
|
|
* @param {Function} func The function to apply a rest parameter to.
|
|
|
* @param {number} [start=func.length-1] The start position of the rest parameter.
|
|
|
* @param {Function} transform The rest array transform.
|
|
|
* @returns {Function} Returns the new function.
|
|
|
*/
|
|
|
function overRest(func, start, transform) {
|
|
|
start = nativeMax(start === undefined ? (func.length - 1) : start, 0);
|
|
|
return function() {
|
|
|
var args = arguments,
|
|
|
index = -1,
|
|
|
length = nativeMax(args.length - start, 0),
|
|
|
array = Array(length);
|
|
|
|
|
|
while (++index < length) {
|
|
|
array[index] = args[start + index];
|
|
|
}
|
|
|
index = -1;
|
|
|
var otherArgs = Array(start + 1);
|
|
|
while (++index < start) {
|
|
|
otherArgs[index] = args[index];
|
|
|
}
|
|
|
otherArgs[start] = transform(array);
|
|
|
return _apply(func, this, otherArgs);
|
|
|
};
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ var _overRest = (overRest);
|
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/_lodash-es@4.17.21@lodash-es/constant.js
|
|
|
/**
|
|
|
* Creates a function that returns `value`.
|
|
|
*
|
|
|
* @static
|
|
|
* @memberOf _
|
|
|
* @since 2.4.0
|
|
|
* @category Util
|
|
|
* @param {*} value The value to return from the new function.
|
|
|
* @returns {Function} Returns the new constant function.
|
|
|
* @example
|
|
|
*
|
|
|
* var objects = _.times(2, _.constant({ 'a': 1 }));
|
|
|
*
|
|
|
* console.log(objects);
|
|
|
* // => [{ 'a': 1 }, { 'a': 1 }]
|
|
|
*
|
|
|
* console.log(objects[0] === objects[1]);
|
|
|
* // => true
|
|
|
*/
|
|
|
function constant(value) {
|
|
|
return function() {
|
|
|
return value;
|
|
|
};
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ var _lodash_es_4_17_21_lodash_es_constant = (constant);
|
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/_lodash-es@4.17.21@lodash-es/_baseSetToString.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
* The base implementation of `setToString` without support for hot loop shorting.
|
|
|
*
|
|
|
* @private
|
|
|
* @param {Function} func The function to modify.
|
|
|
* @param {Function} string The `toString` result.
|
|
|
* @returns {Function} Returns `func`.
|
|
|
*/
|
|
|
var baseSetToString = !_defineProperty ? _lodash_es_4_17_21_lodash_es_identity : function(func, string) {
|
|
|
return _defineProperty(func, 'toString', {
|
|
|
'configurable': true,
|
|
|
'enumerable': false,
|
|
|
'value': _lodash_es_4_17_21_lodash_es_constant(string),
|
|
|
'writable': true
|
|
|
});
|
|
|
};
|
|
|
|
|
|
/* harmony default export */ var _baseSetToString = (baseSetToString);
|
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/_lodash-es@4.17.21@lodash-es/_shortOut.js
|
|
|
/** Used to detect hot functions by number of calls within a span of milliseconds. */
|
|
|
var HOT_COUNT = 800,
|
|
|
HOT_SPAN = 16;
|
|
|
|
|
|
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
|
var nativeNow = Date.now;
|
|
|
|
|
|
/**
|
|
|
* Creates a function that'll short out and invoke `identity` instead
|
|
|
* of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`
|
|
|
* milliseconds.
|
|
|
*
|
|
|
* @private
|
|
|
* @param {Function} func The function to restrict.
|
|
|
* @returns {Function} Returns the new shortable function.
|
|
|
*/
|
|
|
function shortOut(func) {
|
|
|
var count = 0,
|
|
|
lastCalled = 0;
|
|
|
|
|
|
return function() {
|
|
|
var stamp = nativeNow(),
|
|
|
remaining = HOT_SPAN - (stamp - lastCalled);
|
|
|
|
|
|
lastCalled = stamp;
|
|
|
if (remaining > 0) {
|
|
|
if (++count >= HOT_COUNT) {
|
|
|
return arguments[0];
|
|
|
}
|
|
|
} else {
|
|
|
count = 0;
|
|
|
}
|
|
|
return func.apply(undefined, arguments);
|
|
|
};
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ var _shortOut = (shortOut);
|
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/_lodash-es@4.17.21@lodash-es/_setToString.js
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
* Sets the `toString` method of `func` to return `string`.
|
|
|
*
|
|
|
* @private
|
|
|
* @param {Function} func The function to modify.
|
|
|
* @param {Function} string The `toString` result.
|
|
|
* @returns {Function} Returns `func`.
|
|
|
*/
|
|
|
var setToString = _shortOut(_baseSetToString);
|
|
|
|
|
|
/* harmony default export */ var _setToString = (setToString);
|
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/_lodash-es@4.17.21@lodash-es/_baseRest.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
* The base implementation of `_.rest` which doesn't validate or coerce arguments.
|
|
|
*
|
|
|
* @private
|
|
|
* @param {Function} func The function to apply a rest parameter to.
|
|
|
* @param {number} [start=func.length-1] The start position of the rest parameter.
|
|
|
* @returns {Function} Returns the new function.
|
|
|
*/
|
|
|
function baseRest(func, start) {
|
|
|
return _setToString(_overRest(func, start, _lodash_es_4_17_21_lodash_es_identity), func + '');
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ var _baseRest = (baseRest);
|
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/_lodash-es@4.17.21@lodash-es/_isIterateeCall.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
* Checks if the given arguments are from an iteratee call.
|
|
|
*
|
|
|
* @private
|
|
|
* @param {*} value The potential iteratee value argument.
|
|
|
* @param {*} index The potential iteratee index or key argument.
|
|
|
* @param {*} object The potential iteratee object argument.
|
|
|
* @returns {boolean} Returns `true` if the arguments are from an iteratee call,
|
|
|
* else `false`.
|
|
|
*/
|
|
|
function isIterateeCall(value, index, object) {
|
|
|
if (!_lodash_es_4_17_21_lodash_es_isObject(object)) {
|
|
|
return false;
|
|
|
}
|
|
|
var type = typeof index;
|
|
|
if (type == 'number'
|
|
|
? (_lodash_es_4_17_21_lodash_es_isArrayLike(object) && _isIndex(index, object.length))
|
|
|
: (type == 'string' && index in object)
|
|
|
) {
|
|
|
return _lodash_es_4_17_21_lodash_es_eq(object[index], value);
|
|
|
}
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ var _isIterateeCall = (isIterateeCall);
|
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/_lodash-es@4.17.21@lodash-es/_createAssigner.js
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
* Creates a function like `_.assign`.
|
|
|
*
|
|
|
* @private
|
|
|
* @param {Function} assigner The function to assign values.
|
|
|
* @returns {Function} Returns the new assigner function.
|
|
|
*/
|
|
|
function createAssigner(assigner) {
|
|
|
return _baseRest(function(object, sources) {
|
|
|
var index = -1,
|
|
|
length = sources.length,
|
|
|
customizer = length > 1 ? sources[length - 1] : undefined,
|
|
|
guard = length > 2 ? sources[2] : undefined;
|
|
|
|
|
|
customizer = (assigner.length > 3 && typeof customizer == 'function')
|
|
|
? (length--, customizer)
|
|
|
: undefined;
|
|
|
|
|
|
if (guard && _isIterateeCall(sources[0], sources[1], guard)) {
|
|
|
customizer = length < 3 ? undefined : customizer;
|
|
|
length = 1;
|
|
|
}
|
|
|
object = Object(object);
|
|
|
while (++index < length) {
|
|
|
var source = sources[index];
|
|
|
if (source) {
|
|
|
assigner(object, source, index, customizer);
|
|
|
}
|
|
|
}
|
|
|
return object;
|
|
|
});
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ var _createAssigner = (createAssigner);
|
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/_lodash-es@4.17.21@lodash-es/merge.js
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
* This method is like `_.assign` except that it recursively merges own and
|
|
|
* inherited enumerable string keyed properties of source objects into the
|
|
|
* destination object. Source properties that resolve to `undefined` are
|
|
|
* skipped if a destination value exists. Array and plain object properties
|
|
|
* are merged recursively. Other objects and value types are overridden by
|
|
|
* assignment. Source objects are applied from left to right. Subsequent
|
|
|
* sources overwrite property assignments of previous sources.
|
|
|
*
|
|
|
* **Note:** This method mutates `object`.
|
|
|
*
|
|
|
* @static
|
|
|
* @memberOf _
|
|
|
* @since 0.5.0
|
|
|
* @category Object
|
|
|
* @param {Object} object The destination object.
|
|
|
* @param {...Object} [sources] The source objects.
|
|
|
* @returns {Object} Returns `object`.
|
|
|
* @example
|
|
|
*
|
|
|
* var object = {
|
|
|
* 'a': [{ 'b': 2 }, { 'd': 4 }]
|
|
|
* };
|
|
|
*
|
|
|
* var other = {
|
|
|
* 'a': [{ 'c': 3 }, { 'e': 5 }]
|
|
|
* };
|
|
|
*
|
|
|
* _.merge(object, other);
|
|
|
* // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }
|
|
|
*/
|
|
|
var merge = _createAssigner(function(object, source, srcIndex) {
|
|
|
_baseMerge(object, source, srcIndex);
|
|
|
});
|
|
|
|
|
|
/* harmony default export */ var _lodash_es_4_17_21_lodash_es_merge = (merge);
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_rc-util@5.44.4@rc-util/es/utils/get.js
|
|
|
var get = __webpack_require__(97938);
|
|
|
// EXTERNAL MODULE: ./node_modules/_rc-util@5.44.4@rc-util/es/utils/set.js
|
|
|
var set = __webpack_require__(24434);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_pro-utils@2.17.0@@ant-design/pro-utils/es/isNil/index.js
|
|
|
var isNil = __webpack_require__(40965);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_pro-utils@2.17.0@@ant-design/pro-utils/es/merge/index.js
|
|
|
var es_merge = __webpack_require__(6361);
|
|
|
;// CONCATENATED MODULE: ./node_modules/_@ant-design_pro-utils@2.17.0@@ant-design/pro-utils/es/transformKeySubmitValue/index.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
* 暂时还不支持 Set和 Map 结构 判断是不是一个能遍历的对象
|
|
|
*
|
|
|
* @param itemValue
|
|
|
* @returns Boolean
|
|
|
*/
|
|
|
function isPlainObj(itemValue) {
|
|
|
if ((0,esm_typeof/* default */.Z)(itemValue) !== 'object') return false;
|
|
|
|
|
|
/** Null 也要处理,不然omit空会失效 */
|
|
|
if (itemValue === null) return true;
|
|
|
if ( /*#__PURE__*/_react_17_0_2_react.isValidElement(itemValue)) return false;
|
|
|
if (itemValue.constructor === RegExp) return false;
|
|
|
if (itemValue instanceof Map) return false;
|
|
|
if (itemValue instanceof Set) return false;
|
|
|
if (itemValue instanceof HTMLElement) return false;
|
|
|
if (itemValue instanceof Blob) return false;
|
|
|
if (itemValue instanceof File) return false;
|
|
|
if (Array.isArray(itemValue)) return false;
|
|
|
return true;
|
|
|
}
|
|
|
var transformKeySubmitValue = function transformKeySubmitValue(values, dataFormatMapRaw) {
|
|
|
var omit = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
|
|
|
// ignore nil transform
|
|
|
var dataFormatMap = Object.keys(dataFormatMapRaw).reduce(function (ret, key) {
|
|
|
var value = dataFormatMapRaw[key];
|
|
|
if (!(0,isNil/* isNil */.k)(value)) {
|
|
|
// eslint-disable-next-line no-param-reassign
|
|
|
ret[key] = value; // can't be undefined
|
|
|
}
|
|
|
return ret;
|
|
|
}, {});
|
|
|
if (Object.keys(dataFormatMap).length < 1) {
|
|
|
return values;
|
|
|
}
|
|
|
if (typeof window === 'undefined') return values;
|
|
|
// 如果 value 是 string | null | Array | Blob类型 其中之一,直接返回
|
|
|
// 形如 {key: [File, File]} 的表单字段当进行第二次递归时会导致其直接越过 typeof value !== 'object' 这一判断 https://github.com/ant-design/pro-components/issues/2071
|
|
|
if ((0,esm_typeof/* default */.Z)(values) !== 'object' || (0,isNil/* isNil */.k)(values) || values instanceof Blob) {
|
|
|
return values;
|
|
|
}
|
|
|
var finalValues = Array.isArray(values) ? [] : {};
|
|
|
var gen = function gen(tempValues, parentsKey) {
|
|
|
var isArrayValues = Array.isArray(tempValues);
|
|
|
var result = isArrayValues ? [] : {};
|
|
|
if (tempValues == null || tempValues === undefined) {
|
|
|
return result;
|
|
|
}
|
|
|
Object.keys(tempValues).forEach(function (entityKey) {
|
|
|
var transformForArray = function transformForArray(transformList, subItemValue) {
|
|
|
if (!Array.isArray(transformList)) return entityKey;
|
|
|
transformList.forEach(function (transform, idx) {
|
|
|
// 如果不存在直接返回
|
|
|
if (!transform) return;
|
|
|
var subTransformItem = subItemValue === null || subItemValue === void 0 ? void 0 : subItemValue[idx];
|
|
|
|
|
|
// 如果是个方法,把key设置为方法的返回值
|
|
|
if (typeof transform === 'function') {
|
|
|
subItemValue[idx] = transform(subItemValue, entityKey, tempValues);
|
|
|
}
|
|
|
if ((0,esm_typeof/* default */.Z)(transform) === 'object' && !Array.isArray(transform)) {
|
|
|
Object.keys(transform).forEach(function (transformArrayItem) {
|
|
|
var subTransformItemValue = subTransformItem === null || subTransformItem === void 0 ? void 0 : subTransformItem[transformArrayItem];
|
|
|
if (typeof transform[transformArrayItem] === 'function' && subTransformItemValue) {
|
|
|
var res = transform[transformArrayItem](subTransformItem[transformArrayItem], entityKey, tempValues);
|
|
|
subTransformItem[transformArrayItem] = (0,esm_typeof/* default */.Z)(res) === 'object' ? res[transformArrayItem] : res;
|
|
|
} else if ((0,esm_typeof/* default */.Z)(transform[transformArrayItem]) === 'object' && Array.isArray(transform[transformArrayItem]) && subTransformItemValue) {
|
|
|
transformForArray(transform[transformArrayItem], subTransformItemValue);
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
if ((0,esm_typeof/* default */.Z)(transform) === 'object' && Array.isArray(transform) && subTransformItem) {
|
|
|
transformForArray(transform, subTransformItem);
|
|
|
}
|
|
|
});
|
|
|
return entityKey;
|
|
|
};
|
|
|
var key = parentsKey ? [parentsKey, entityKey].flat(1) : [entityKey].flat(1);
|
|
|
var itemValue = tempValues[entityKey];
|
|
|
var transformFunction = (0,get/* default */.Z)(dataFormatMap, key);
|
|
|
var transform = function transform() {
|
|
|
var tempKey,
|
|
|
transformedResult,
|
|
|
isTransformedResultPrimitive = false;
|
|
|
|
|
|
/**
|
|
|
* 先判断是否是方法,是的话执行后拿到值,如果是基本类型,则认为是直接 transform 为新的值,
|
|
|
* 如果返回是 Object 则认为是 transform 为新的 {newKey: newValue}
|
|
|
*/
|
|
|
if (typeof transformFunction === 'function') {
|
|
|
transformedResult = transformFunction === null || transformFunction === void 0 ? void 0 : transformFunction(itemValue, entityKey, tempValues);
|
|
|
var typeOfResult = (0,esm_typeof/* default */.Z)(transformedResult);
|
|
|
if (typeOfResult !== 'object' && typeOfResult !== 'undefined') {
|
|
|
tempKey = entityKey;
|
|
|
isTransformedResultPrimitive = true;
|
|
|
} else {
|
|
|
tempKey = transformedResult;
|
|
|
}
|
|
|
} else {
|
|
|
tempKey = transformForArray(transformFunction, itemValue);
|
|
|
}
|
|
|
|
|
|
// { [key:string]:any } 数组也能通过编译
|
|
|
if (Array.isArray(tempKey)) {
|
|
|
result = (0,set/* default */.Z)(result, tempKey, itemValue);
|
|
|
return;
|
|
|
}
|
|
|
if ((0,esm_typeof/* default */.Z)(tempKey) === 'object' && !Array.isArray(finalValues)) {
|
|
|
finalValues = _lodash_es_4_17_21_lodash_es_merge(finalValues, tempKey);
|
|
|
} else if ((0,esm_typeof/* default */.Z)(tempKey) === 'object' && Array.isArray(finalValues)) {
|
|
|
result = (0,objectSpread2/* default */.Z)((0,objectSpread2/* default */.Z)({}, result), tempKey);
|
|
|
} else if (tempKey !== null || tempKey !== undefined) {
|
|
|
result = (0,set/* default */.Z)(result, [tempKey], isTransformedResultPrimitive ? transformedResult : itemValue);
|
|
|
}
|
|
|
};
|
|
|
|
|
|
/** 如果存在转化器提前渲染一下 */
|
|
|
if (transformFunction && typeof transformFunction === 'function') {
|
|
|
transform();
|
|
|
}
|
|
|
if (typeof window === 'undefined') return;
|
|
|
if (isPlainObj(itemValue)) {
|
|
|
var genValues = gen(itemValue, key);
|
|
|
if (Object.keys(genValues).length < 1) {
|
|
|
return;
|
|
|
}
|
|
|
result = (0,set/* default */.Z)(result, [entityKey], genValues);
|
|
|
return;
|
|
|
}
|
|
|
transform();
|
|
|
});
|
|
|
// namePath、transform在omit为false时需正常返回 https://github.com/ant-design/pro-components/issues/2901#issue-908097115
|
|
|
return omit ? result : tempValues;
|
|
|
};
|
|
|
finalValues = Array.isArray(values) && Array.isArray(finalValues) ? (0,toConsumableArray/* default */.Z)(gen(values)) : (0,es_merge/* merge */.T)({}, gen(values), finalValues);
|
|
|
return finalValues;
|
|
|
};
|
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_pro-utils@2.17.0@@ant-design/pro-utils/es/conversionMomentValue/index.js
|
|
|
var conversionMomentValue = __webpack_require__(41727);
|
|
|
;// CONCATENATED MODULE: ./node_modules/_@umijs_use-params@1.0.9@@umijs/use-params/es/index.js
|
|
|
var __assign = (undefined && undefined.__assign) || function () {
|
|
|
__assign = Object.assign || function(t) {
|
|
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
|
s = arguments[i];
|
|
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
|
t[p] = s[p];
|
|
|
}
|
|
|
return t;
|
|
|
};
|
|
|
return __assign.apply(this, arguments);
|
|
|
};
|
|
|
/* eslint-disable no-restricted-syntax */
|
|
|
|
|
|
/**
|
|
|
*
|
|
|
* @param {object} params
|
|
|
* @returns {URL}
|
|
|
*/
|
|
|
function setQueryToCurrentUrl(params) {
|
|
|
var _a;
|
|
|
var URL = (typeof window !== 'undefined' ? window : {}).URL;
|
|
|
var url = new URL((_a = window === null || window === void 0 ? void 0 : window.location) === null || _a === void 0 ? void 0 : _a.href);
|
|
|
Object.keys(params).forEach(function (key) {
|
|
|
var value = params[key];
|
|
|
if (value !== null && value !== undefined) {
|
|
|
if (Array.isArray(value)) {
|
|
|
url.searchParams.delete(key);
|
|
|
value.forEach(function (valueItem) {
|
|
|
url.searchParams.append(key, valueItem);
|
|
|
});
|
|
|
}
|
|
|
else if (value instanceof Date) {
|
|
|
if (!Number.isNaN(value.getTime())) {
|
|
|
url.searchParams.set(key, value.toISOString());
|
|
|
}
|
|
|
}
|
|
|
else if (typeof value === 'object') {
|
|
|
url.searchParams.set(key, JSON.stringify(value));
|
|
|
}
|
|
|
else {
|
|
|
url.searchParams.set(key, value);
|
|
|
}
|
|
|
}
|
|
|
else {
|
|
|
url.searchParams.delete(key);
|
|
|
}
|
|
|
});
|
|
|
return url;
|
|
|
}
|
|
|
function useUrlSearchParams(initial, config) {
|
|
|
var _a;
|
|
|
if (initial === void 0) { initial = {}; }
|
|
|
if (config === void 0) { config = { disabled: false }; }
|
|
|
/**
|
|
|
* The main idea of this hook is to make things response to change of `window.location.search`,
|
|
|
* so no need for introducing new state (in the mean time).
|
|
|
* Whenever `window.location.search` is changed but not cause re-render, call `forceUpdate()`.
|
|
|
* Whenever the component - user of this hook - re-render, this hook should return
|
|
|
* the query object that corresponse to the current `window.location.search`
|
|
|
*/
|
|
|
var _b = (0,_react_17_0_2_react.useState)(), forceUpdate = _b[1];
|
|
|
var locationSearch = typeof window !== 'undefined' && ((_a = window === null || window === void 0 ? void 0 : window.location) === null || _a === void 0 ? void 0 : _a.search);
|
|
|
/**
|
|
|
* @type {URLSearchParams}
|
|
|
*/
|
|
|
var urlSearchParams = (0,_react_17_0_2_react.useMemo)(function () {
|
|
|
if (config.disabled)
|
|
|
return {};
|
|
|
return new URLSearchParams(locationSearch || {});
|
|
|
}, [config.disabled, locationSearch]);
|
|
|
var params = (0,_react_17_0_2_react.useMemo)(function () {
|
|
|
if (config.disabled)
|
|
|
return {};
|
|
|
if (typeof window === 'undefined' || !window.URL)
|
|
|
return {};
|
|
|
var result = [];
|
|
|
// @ts-ignore
|
|
|
urlSearchParams.forEach(function (value, key) {
|
|
|
result.push({
|
|
|
key: key,
|
|
|
value: value,
|
|
|
});
|
|
|
});
|
|
|
// group by key
|
|
|
result = result.reduce(function (acc, val) {
|
|
|
(acc[val.key] = acc[val.key] || []).push(val);
|
|
|
return acc;
|
|
|
}, {});
|
|
|
result = Object.keys(result).map(function (key) {
|
|
|
var valueGroup = result[key];
|
|
|
if (valueGroup.length === 1) {
|
|
|
return [key, valueGroup[0].value];
|
|
|
}
|
|
|
return [key, valueGroup.map(function (_a) {
|
|
|
var value = _a.value;
|
|
|
return value;
|
|
|
})];
|
|
|
});
|
|
|
var newParams = __assign({}, initial);
|
|
|
result.forEach(function (_a) {
|
|
|
var key = _a[0], value = _a[1];
|
|
|
newParams[key] = parseValue(key, value, {}, initial);
|
|
|
});
|
|
|
return newParams;
|
|
|
}, [config.disabled, initial, urlSearchParams]);
|
|
|
function redirectToNewSearchParams(newParams) {
|
|
|
if (typeof window === 'undefined' || !window.URL)
|
|
|
return;
|
|
|
var url = setQueryToCurrentUrl(newParams);
|
|
|
if (window.location.search !== url.search) {
|
|
|
window.history.replaceState({}, '', url.toString());
|
|
|
}
|
|
|
if (urlSearchParams.toString() !== url.searchParams.toString()) {
|
|
|
forceUpdate({});
|
|
|
}
|
|
|
}
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
if (config.disabled)
|
|
|
return;
|
|
|
if (typeof window === 'undefined' || !window.URL)
|
|
|
return;
|
|
|
redirectToNewSearchParams(__assign(__assign({}, initial), params));
|
|
|
}, [config.disabled, params]);
|
|
|
var setParams = function (newParams) {
|
|
|
redirectToNewSearchParams(newParams);
|
|
|
};
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
if (config.disabled)
|
|
|
return function () { };
|
|
|
if (typeof window === 'undefined' || !window.URL)
|
|
|
return function () { };
|
|
|
var onPopState = function () {
|
|
|
forceUpdate({});
|
|
|
};
|
|
|
window.addEventListener('popstate', onPopState);
|
|
|
return function () {
|
|
|
window.removeEventListener('popstate', onPopState);
|
|
|
};
|
|
|
}, [config.disabled]);
|
|
|
return [params, setParams];
|
|
|
}
|
|
|
var booleanValues = {
|
|
|
true: true,
|
|
|
false: false,
|
|
|
};
|
|
|
function parseValue(key, _value, types, defaultParams) {
|
|
|
if (!types)
|
|
|
return _value;
|
|
|
var type = types[key];
|
|
|
var value = _value === undefined ? defaultParams[key] : _value;
|
|
|
if (type === Number) {
|
|
|
return Number(value);
|
|
|
}
|
|
|
if (type === Boolean || _value === 'true' || _value === 'false') {
|
|
|
return booleanValues[value];
|
|
|
}
|
|
|
if (Array.isArray(type)) {
|
|
|
// eslint-disable-next-line eqeqeq
|
|
|
return type.find(function (item) { return item == value; }) || defaultParams[key];
|
|
|
}
|
|
|
return value;
|
|
|
}
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/form/index.js + 19 modules
|
|
|
var es_form = __webpack_require__(78241);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/config-provider/index.js + 5 modules
|
|
|
var config_provider = __webpack_require__(92736);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/spin/index.js + 1 modules
|
|
|
var spin = __webpack_require__(71418);
|
|
|
// EXTERNAL MODULE: ./node_modules/_classnames@2.5.1@classnames/index.js
|
|
|
var _classnames_2_5_1_classnames = __webpack_require__(92310);
|
|
|
var _classnames_2_5_1_classnames_default = /*#__PURE__*/__webpack_require__.n(_classnames_2_5_1_classnames);
|
|
|
// EXTERNAL MODULE: ./node_modules/_rc-util@5.44.4@rc-util/es/omit.js
|
|
|
var omit = __webpack_require__(2738);
|
|
|
// EXTERNAL MODULE: ./node_modules/_rc-util@5.44.4@rc-util/es/warning.js
|
|
|
var warning = __webpack_require__(48736);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_pro-form@2.31.7@@ant-design/pro-form/es/FieldContext.js
|
|
|
var FieldContext = __webpack_require__(17563);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/button/index.js
|
|
|
var es_button = __webpack_require__(3113);
|
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
|
|
|
var jsx_runtime = __webpack_require__(37712);
|
|
|
;// CONCATENATED MODULE: ./node_modules/_@ant-design_pro-form@2.31.7@@ant-design/pro-form/es/components/Submitter/index.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** @name 用于配置操作栏 */
|
|
|
|
|
|
|
|
|
/**
|
|
|
* FormFooter 的组件,可以自动进行一些配置
|
|
|
*
|
|
|
* @param props
|
|
|
*/
|
|
|
|
|
|
var Submitter = function Submitter(props) {
|
|
|
var intl = (0,es/* useIntl */.YB)();
|
|
|
var form = es_form/* default */.Z.useFormInstance();
|
|
|
if (props.render === false) {
|
|
|
return null;
|
|
|
}
|
|
|
var onSubmit = props.onSubmit,
|
|
|
render = props.render,
|
|
|
onReset = props.onReset,
|
|
|
_props$searchConfig = props.searchConfig,
|
|
|
searchConfig = _props$searchConfig === void 0 ? {} : _props$searchConfig,
|
|
|
submitButtonProps = props.submitButtonProps,
|
|
|
resetButtonProps = props.resetButtonProps;
|
|
|
var _proTheme$useToken = useStyle/* proTheme */.Ow.useToken(),
|
|
|
token = _proTheme$useToken.token;
|
|
|
var submit = function submit() {
|
|
|
form.submit();
|
|
|
onSubmit === null || onSubmit === void 0 || onSubmit();
|
|
|
};
|
|
|
var reset = function reset() {
|
|
|
form.resetFields();
|
|
|
onReset === null || onReset === void 0 || onReset();
|
|
|
};
|
|
|
var _searchConfig$submitT = searchConfig.submitText,
|
|
|
submitText = _searchConfig$submitT === void 0 ? intl.getMessage('tableForm.submit', '提交') : _searchConfig$submitT,
|
|
|
_searchConfig$resetTe = searchConfig.resetText,
|
|
|
resetText = _searchConfig$resetTe === void 0 ? intl.getMessage('tableForm.reset', '重置') : _searchConfig$resetTe;
|
|
|
/** 默认的操作的逻辑 */
|
|
|
var dom = [];
|
|
|
if (resetButtonProps !== false) {
|
|
|
dom.push( /*#__PURE__*/(0,_react_17_0_2_react.createElement)(es_button/* default */.ZP, (0,objectSpread2/* default */.Z)((0,objectSpread2/* default */.Z)({}, (0,omit/* default */.Z)(resetButtonProps !== null && resetButtonProps !== void 0 ? resetButtonProps : {}, ['preventDefault'])), {}, {
|
|
|
key: "rest",
|
|
|
onClick: function onClick(e) {
|
|
|
var _resetButtonProps$onC;
|
|
|
if (!(resetButtonProps !== null && resetButtonProps !== void 0 && resetButtonProps.preventDefault)) reset();
|
|
|
resetButtonProps === null || resetButtonProps === void 0 || (_resetButtonProps$onC = resetButtonProps.onClick) === null || _resetButtonProps$onC === void 0 || _resetButtonProps$onC.call(resetButtonProps, e);
|
|
|
}
|
|
|
}), resetText));
|
|
|
}
|
|
|
if (submitButtonProps !== false) {
|
|
|
dom.push( /*#__PURE__*/(0,_react_17_0_2_react.createElement)(es_button/* default */.ZP, (0,objectSpread2/* default */.Z)((0,objectSpread2/* default */.Z)({
|
|
|
type: "primary"
|
|
|
}, (0,omit/* default */.Z)(submitButtonProps || {}, ['preventDefault'])), {}, {
|
|
|
key: "submit",
|
|
|
onClick: function onClick(e) {
|
|
|
var _submitButtonProps$on;
|
|
|
if (!(submitButtonProps !== null && submitButtonProps !== void 0 && submitButtonProps.preventDefault)) submit();
|
|
|
submitButtonProps === null || submitButtonProps === void 0 || (_submitButtonProps$on = submitButtonProps.onClick) === null || _submitButtonProps$on === void 0 || _submitButtonProps$on.call(submitButtonProps, e);
|
|
|
}
|
|
|
}), submitText));
|
|
|
}
|
|
|
var renderDom = render ? render((0,objectSpread2/* default */.Z)((0,objectSpread2/* default */.Z)({}, props), {}, {
|
|
|
form: form,
|
|
|
submit: submit,
|
|
|
reset: reset
|
|
|
}), dom) : dom;
|
|
|
if (!renderDom) {
|
|
|
return null;
|
|
|
}
|
|
|
if (Array.isArray(renderDom)) {
|
|
|
if ((renderDom === null || renderDom === void 0 ? void 0 : renderDom.length) < 1) {
|
|
|
return null;
|
|
|
}
|
|
|
if ((renderDom === null || renderDom === void 0 ? void 0 : renderDom.length) === 1) {
|
|
|
return renderDom[0];
|
|
|
}
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
style: {
|
|
|
display: 'flex',
|
|
|
gap: token.marginXS,
|
|
|
alignItems: 'center'
|
|
|
},
|
|
|
children: renderDom
|
|
|
});
|
|
|
}
|
|
|
return renderDom;
|
|
|
};
|
|
|
/* harmony default export */ var components_Submitter = (Submitter);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_pro-form@2.31.7@@ant-design/pro-form/es/components/List/index.js
|
|
|
var List = __webpack_require__(71190);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_pro-form@2.31.7@@ant-design/pro-form/es/helpers/grid.js
|
|
|
var helpers_grid = __webpack_require__(71498);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_pro-form@2.31.7@@ant-design/pro-form/es/BaseForm/EditOrReadOnlyContext.js
|
|
|
var EditOrReadOnlyContext = __webpack_require__(42326);
|
|
|
;// CONCATENATED MODULE: ./node_modules/_@ant-design_pro-form@2.31.7@@ant-design/pro-form/es/BaseForm/BaseForm.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var _excluded = ["children", "contentRender", "submitter", "fieldProps", "formItemProps", "groupProps", "transformKey", "formRef", "onInit", "form", "loading", "formComponentType", "extraUrlParams", "syncToUrl", "onUrlSearchChange", "onReset", "omitNil", "isKeyPressSubmit", "autoFocusFirstInput", "grid", "rowProps", "colProps"],
|
|
|
_excluded2 = ["extraUrlParams", "syncToUrl", "isKeyPressSubmit", "syncToUrlAsImportant", "syncToInitialValues", "children", "contentRender", "submitter", "fieldProps", "proFieldProps", "formItemProps", "groupProps", "dateFormatter", "formRef", "onInit", "form", "formComponentType", "onReset", "grid", "rowProps", "colProps", "omitNil", "request", "params", "initialValues", "formKey", "readonly", "onLoadingChange", "loading"];
|
|
|
/* eslint-disable react-hooks/exhaustive-deps */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var genParams = function genParams(syncUrl, params, type) {
|
|
|
if (syncUrl === true) {
|
|
|
return params;
|
|
|
}
|
|
|
return (0,runFunction/* runFunction */.h)(syncUrl, params, type);
|
|
|
};
|
|
|
/**
|
|
|
* It takes a name path and converts it to an array.
|
|
|
* @param {NamePath} name - The name of the form.
|
|
|
* @returns string[]
|
|
|
*
|
|
|
* a-> [a]
|
|
|
* [a] -> [a]
|
|
|
*/
|
|
|
var covertFormName = function covertFormName(name) {
|
|
|
if (!name) return name;
|
|
|
if (Array.isArray(name)) return name;
|
|
|
return [name];
|
|
|
};
|
|
|
function BaseFormComponents(props) {
|
|
|
var _ConfigProvider$useCo;
|
|
|
var children = props.children,
|
|
|
contentRender = props.contentRender,
|
|
|
submitter = props.submitter,
|
|
|
fieldProps = props.fieldProps,
|
|
|
formItemProps = props.formItemProps,
|
|
|
groupProps = props.groupProps,
|
|
|
transformKey = props.transformKey,
|
|
|
propsFormRef = props.formRef,
|
|
|
onInit = props.onInit,
|
|
|
form = props.form,
|
|
|
loading = props.loading,
|
|
|
formComponentType = props.formComponentType,
|
|
|
_props$extraUrlParams = props.extraUrlParams,
|
|
|
extraUrlParams = _props$extraUrlParams === void 0 ? {} : _props$extraUrlParams,
|
|
|
syncToUrl = props.syncToUrl,
|
|
|
onUrlSearchChange = props.onUrlSearchChange,
|
|
|
_onReset = props.onReset,
|
|
|
_props$omitNil = props.omitNil,
|
|
|
omitNil = _props$omitNil === void 0 ? true : _props$omitNil,
|
|
|
isKeyPressSubmit = props.isKeyPressSubmit,
|
|
|
_props$autoFocusFirst = props.autoFocusFirstInput,
|
|
|
autoFocusFirstInput = _props$autoFocusFirst === void 0 ? true : _props$autoFocusFirst,
|
|
|
grid = props.grid,
|
|
|
rowProps = props.rowProps,
|
|
|
colProps = props.colProps,
|
|
|
rest = (0,objectWithoutProperties/* default */.Z)(props, _excluded);
|
|
|
|
|
|
/**
|
|
|
* 获取 form 实例
|
|
|
*/
|
|
|
var formInstance = es_form/* default */.Z.useFormInstance();
|
|
|
var _ref = (config_provider/* default */.ZP === null || config_provider/* default */.ZP === void 0 || (_ConfigProvider$useCo = config_provider/* default */.ZP.useConfig) === null || _ConfigProvider$useCo === void 0 ? void 0 : _ConfigProvider$useCo.call(config_provider/* default */.ZP)) || {
|
|
|
componentSize: 'middle'
|
|
|
},
|
|
|
componentSize = _ref.componentSize;
|
|
|
|
|
|
/** 同步 url 上的参数 */
|
|
|
var formRef = (0,_react_17_0_2_react.useRef)(form || formInstance);
|
|
|
|
|
|
/**
|
|
|
* 获取布局
|
|
|
*/
|
|
|
var _useGridHelpers = (0,helpers_grid/* useGridHelpers */.zx)({
|
|
|
grid: grid,
|
|
|
rowProps: rowProps
|
|
|
}),
|
|
|
RowWrapper = _useGridHelpers.RowWrapper;
|
|
|
var getFormInstance = (0,useRefFunction/* useRefFunction */.J)(function () {
|
|
|
return formInstance;
|
|
|
});
|
|
|
var formatValues = (0,_react_17_0_2_react.useMemo)(function () {
|
|
|
return {
|
|
|
/**
|
|
|
* 获取被 ProForm 格式化后的所有数据
|
|
|
* @param allData boolean
|
|
|
* @returns T
|
|
|
*
|
|
|
* @example getFieldsFormatValue(true) ->返回所有数据,即使没有被 form 托管的
|
|
|
*/
|
|
|
getFieldsFormatValue: function getFieldsFormatValue(allData) {
|
|
|
var _getFormInstance;
|
|
|
return transformKey((_getFormInstance = getFormInstance()) === null || _getFormInstance === void 0 ? void 0 : _getFormInstance.getFieldsValue(allData), omitNil);
|
|
|
},
|
|
|
/**
|
|
|
* 获取被 ProForm 格式化后的单个数据
|
|
|
* @param nameList (string|number)[]
|
|
|
* @returns T
|
|
|
*
|
|
|
* @example {a:{b:value}} -> getFieldFormatValue(['a', 'b']) -> value
|
|
|
*/
|
|
|
/** 获取格式化之后的单个数据 */
|
|
|
getFieldFormatValue: function getFieldFormatValue() {
|
|
|
var _getFormInstance2;
|
|
|
var paramsNameList = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
|
var nameList = covertFormName(paramsNameList);
|
|
|
if (!nameList) throw new Error('nameList is require');
|
|
|
var value = (_getFormInstance2 = getFormInstance()) === null || _getFormInstance2 === void 0 ? void 0 : _getFormInstance2.getFieldValue(nameList);
|
|
|
var obj = nameList ? (0,set/* default */.Z)({}, nameList, value) : value;
|
|
|
//transformKey会将keys重新和nameList拼接,所以这里要将nameList的首个元素弹出
|
|
|
var newNameList = (0,toConsumableArray/* default */.Z)(nameList);
|
|
|
newNameList.shift();
|
|
|
return (0,get/* default */.Z)(transformKey(obj, omitNil, newNameList), nameList);
|
|
|
},
|
|
|
/**
|
|
|
* 获取被 ProForm 格式化后的单个数据, 包含他的 name
|
|
|
* @param nameList (string|number)[]
|
|
|
* @returns T
|
|
|
*
|
|
|
* @example {a:{b:value}} -> getFieldFormatValueObject(['a', 'b']) -> {a:{b:value}}
|
|
|
*/
|
|
|
/** 获取格式化之后的单个数据 */
|
|
|
getFieldFormatValueObject: function getFieldFormatValueObject(paramsNameList) {
|
|
|
var _getFormInstance3;
|
|
|
var nameList = covertFormName(paramsNameList);
|
|
|
var value = (_getFormInstance3 = getFormInstance()) === null || _getFormInstance3 === void 0 ? void 0 : _getFormInstance3.getFieldValue(nameList);
|
|
|
var obj = nameList ? (0,set/* default */.Z)({}, nameList, value) : value;
|
|
|
return transformKey(obj, omitNil, nameList);
|
|
|
},
|
|
|
/**
|
|
|
/**
|
|
|
*验字段后返回格式化之后的所有数据
|
|
|
* @param nameList (string|number)[]
|
|
|
* @returns T
|
|
|
*
|
|
|
* @example validateFieldsReturnFormatValue -> {a:{b:value}}
|
|
|
*/
|
|
|
validateFieldsReturnFormatValue: function () {
|
|
|
var _validateFieldsReturnFormatValue = (0,asyncToGenerator/* default */.Z)( /*#__PURE__*/(0,regeneratorRuntime/* default */.Z)().mark(function _callee(nameList) {
|
|
|
var _getFormInstance4;
|
|
|
var values, transformedKey;
|
|
|
return (0,regeneratorRuntime/* default */.Z)().wrap(function _callee$(_context) {
|
|
|
while (1) switch (_context.prev = _context.next) {
|
|
|
case 0:
|
|
|
if (!(!Array.isArray(nameList) && nameList)) {
|
|
|
_context.next = 2;
|
|
|
break;
|
|
|
}
|
|
|
throw new Error('nameList must be array');
|
|
|
case 2:
|
|
|
_context.next = 4;
|
|
|
return (_getFormInstance4 = getFormInstance()) === null || _getFormInstance4 === void 0 ? void 0 : _getFormInstance4.validateFields(nameList);
|
|
|
case 4:
|
|
|
values = _context.sent;
|
|
|
transformedKey = transformKey(values, omitNil);
|
|
|
return _context.abrupt("return", transformedKey ? transformedKey : {});
|
|
|
case 7:
|
|
|
case "end":
|
|
|
return _context.stop();
|
|
|
}
|
|
|
}, _callee);
|
|
|
}));
|
|
|
function validateFieldsReturnFormatValue(_x) {
|
|
|
return _validateFieldsReturnFormatValue.apply(this, arguments);
|
|
|
}
|
|
|
return validateFieldsReturnFormatValue;
|
|
|
}()
|
|
|
};
|
|
|
}, [omitNil, transformKey]);
|
|
|
var items = (0,_react_17_0_2_react.useMemo)(function () {
|
|
|
return _react_17_0_2_react.Children.toArray(children).map(function (item, index) {
|
|
|
if (index === 0 && /*#__PURE__*/_react_17_0_2_react.isValidElement(item) && autoFocusFirstInput) {
|
|
|
return /*#__PURE__*/_react_17_0_2_react.cloneElement(item, (0,objectSpread2/* default */.Z)((0,objectSpread2/* default */.Z)({}, item.props), {}, {
|
|
|
autoFocus: autoFocusFirstInput
|
|
|
}));
|
|
|
}
|
|
|
return item;
|
|
|
});
|
|
|
}, [autoFocusFirstInput, children]);
|
|
|
|
|
|
/** 计算 props 的对象 */
|
|
|
var submitterProps = (0,_react_17_0_2_react.useMemo)(function () {
|
|
|
return typeof submitter === 'boolean' || !submitter ? {} : submitter;
|
|
|
}, [submitter]);
|
|
|
|
|
|
/** 渲染提交按钮与重置按钮 */
|
|
|
var submitterNode = (0,_react_17_0_2_react.useMemo)(function () {
|
|
|
if (submitter === false) return undefined;
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(components_Submitter, (0,objectSpread2/* default */.Z)((0,objectSpread2/* default */.Z)({}, submitterProps), {}, {
|
|
|
onReset: function onReset() {
|
|
|
var _formRef$current, _submitterProps$onRes;
|
|
|
var finalValues = transformKey((_formRef$current = formRef.current) === null || _formRef$current === void 0 ? void 0 : _formRef$current.getFieldsValue(), omitNil);
|
|
|
submitterProps === null || submitterProps === void 0 || (_submitterProps$onRes = submitterProps.onReset) === null || _submitterProps$onRes === void 0 || _submitterProps$onRes.call(submitterProps, finalValues);
|
|
|
_onReset === null || _onReset === void 0 || _onReset(finalValues);
|
|
|
// 如果 syncToUrl,清空一下数据
|
|
|
if (syncToUrl) {
|
|
|
var _formRef$current2;
|
|
|
// 把没有的值设置为未定义可以删掉 url 的参数
|
|
|
var params = Object.keys(transformKey((_formRef$current2 = formRef.current) === null || _formRef$current2 === void 0 ? void 0 : _formRef$current2.getFieldsValue(), false)).reduce(function (pre, next) {
|
|
|
return (0,objectSpread2/* default */.Z)((0,objectSpread2/* default */.Z)({}, pre), {}, (0,defineProperty/* default */.Z)({}, next, finalValues[next] || undefined));
|
|
|
}, extraUrlParams);
|
|
|
|
|
|
/** 在同步到 url 上时对参数进行转化 */
|
|
|
onUrlSearchChange(genParams(syncToUrl, params || {}, 'set'));
|
|
|
}
|
|
|
},
|
|
|
submitButtonProps: (0,objectSpread2/* default */.Z)({
|
|
|
loading: loading
|
|
|
}, submitterProps.submitButtonProps)
|
|
|
}), "submitter");
|
|
|
}, [submitter, submitterProps, loading, transformKey, omitNil, _onReset, syncToUrl, extraUrlParams, onUrlSearchChange]);
|
|
|
var content = (0,_react_17_0_2_react.useMemo)(function () {
|
|
|
var wrapItems = grid ? /*#__PURE__*/(0,jsx_runtime.jsx)(RowWrapper, {
|
|
|
children: items
|
|
|
}) : items;
|
|
|
if (contentRender) {
|
|
|
return contentRender(wrapItems, submitterNode, formRef.current);
|
|
|
}
|
|
|
return wrapItems;
|
|
|
}, [grid, RowWrapper, items, contentRender, submitterNode]);
|
|
|
var preInitialValues = usePrevious(props.initialValues);
|
|
|
|
|
|
// 提示一个 initialValues ,问的人实在是太多了
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
if (syncToUrl || !props.initialValues || !preInitialValues || rest.request) return;
|
|
|
var isEqual = (0,isDeepEqualReact/* isDeepEqualReact */.A)(props.initialValues, preInitialValues);
|
|
|
(0,warning/* noteOnce */.ET)(isEqual, "initialValues \u53EA\u5728 form \u521D\u59CB\u5316\u65F6\u751F\u6548\uFF0C\u5982\u679C\u4F60\u9700\u8981\u5F02\u6B65\u52A0\u8F7D\u63A8\u8350\u4F7F\u7528 request\uFF0C\u6216\u8005 initialValues ? <Form/> : null ");
|
|
|
(0,warning/* noteOnce */.ET)(isEqual, "The initialValues only take effect when the form is initialized, if you need to load asynchronously recommended request, or the initialValues ? <Form/> : null ");
|
|
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
|
}, [props.initialValues]);
|
|
|
|
|
|
// 初始化给一个默认的 form
|
|
|
(0,_react_17_0_2_react.useImperativeHandle)(propsFormRef, function () {
|
|
|
return (0,objectSpread2/* default */.Z)((0,objectSpread2/* default */.Z)({}, formRef.current), formatValues);
|
|
|
}, [formatValues, formRef.current]);
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
var _formRef$current3, _formRef$current3$get;
|
|
|
var finalValues = transformKey((_formRef$current3 = formRef.current) === null || _formRef$current3 === void 0 || (_formRef$current3$get = _formRef$current3.getFieldsValue) === null || _formRef$current3$get === void 0 ? void 0 : _formRef$current3$get.call(_formRef$current3, true), omitNil);
|
|
|
onInit === null || onInit === void 0 || onInit(finalValues, (0,objectSpread2/* default */.Z)((0,objectSpread2/* default */.Z)({}, formRef.current), formatValues));
|
|
|
}, []);
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(ProFormContext/* ProFormContext */.J.Provider, {
|
|
|
value: (0,objectSpread2/* default */.Z)((0,objectSpread2/* default */.Z)({}, formatValues), {}, {
|
|
|
formRef: formRef
|
|
|
}),
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(config_provider/* default */.ZP, {
|
|
|
componentSize: rest.size || componentSize,
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(helpers_grid/* GridContext */._p.Provider, {
|
|
|
value: {
|
|
|
grid: grid,
|
|
|
colProps: colProps
|
|
|
},
|
|
|
children: [rest.component !== false && /*#__PURE__*/(0,jsx_runtime.jsx)("input", {
|
|
|
type: "text",
|
|
|
style: {
|
|
|
display: 'none'
|
|
|
}
|
|
|
}), content]
|
|
|
})
|
|
|
})
|
|
|
});
|
|
|
}
|
|
|
|
|
|
/** 自动的formKey 防止重复 */
|
|
|
var requestFormCacheId = 0;
|
|
|
function BaseForm(props) {
|
|
|
var _props$extraUrlParams2 = props.extraUrlParams,
|
|
|
extraUrlParams = _props$extraUrlParams2 === void 0 ? {} : _props$extraUrlParams2,
|
|
|
syncToUrl = props.syncToUrl,
|
|
|
isKeyPressSubmit = props.isKeyPressSubmit,
|
|
|
_props$syncToUrlAsImp = props.syncToUrlAsImportant,
|
|
|
syncToUrlAsImportant = _props$syncToUrlAsImp === void 0 ? false : _props$syncToUrlAsImp,
|
|
|
_props$syncToInitialV = props.syncToInitialValues,
|
|
|
syncToInitialValues = _props$syncToInitialV === void 0 ? true : _props$syncToInitialV,
|
|
|
children = props.children,
|
|
|
contentRender = props.contentRender,
|
|
|
submitter = props.submitter,
|
|
|
fieldProps = props.fieldProps,
|
|
|
proFieldProps = props.proFieldProps,
|
|
|
formItemProps = props.formItemProps,
|
|
|
groupProps = props.groupProps,
|
|
|
_props$dateFormatter = props.dateFormatter,
|
|
|
dateFormatter = _props$dateFormatter === void 0 ? 'string' : _props$dateFormatter,
|
|
|
propsFormRef = props.formRef,
|
|
|
onInit = props.onInit,
|
|
|
form = props.form,
|
|
|
formComponentType = props.formComponentType,
|
|
|
onReset = props.onReset,
|
|
|
grid = props.grid,
|
|
|
rowProps = props.rowProps,
|
|
|
colProps = props.colProps,
|
|
|
_props$omitNil2 = props.omitNil,
|
|
|
omitNil = _props$omitNil2 === void 0 ? true : _props$omitNil2,
|
|
|
request = props.request,
|
|
|
params = props.params,
|
|
|
initialValues = props.initialValues,
|
|
|
_props$formKey = props.formKey,
|
|
|
formKey = _props$formKey === void 0 ? requestFormCacheId : _props$formKey,
|
|
|
readonly = props.readonly,
|
|
|
onLoadingChange = props.onLoadingChange,
|
|
|
propsLoading = props.loading,
|
|
|
propRest = (0,objectWithoutProperties/* default */.Z)(props, _excluded2);
|
|
|
var formRef = (0,_react_17_0_2_react.useRef)({});
|
|
|
var _useMountMergeState = (0,useMergedState/* default */.Z)(false, {
|
|
|
onChange: onLoadingChange,
|
|
|
value: propsLoading
|
|
|
}),
|
|
|
_useMountMergeState2 = (0,slicedToArray/* default */.Z)(_useMountMergeState, 2),
|
|
|
loading = _useMountMergeState2[0],
|
|
|
setLoading = _useMountMergeState2[1];
|
|
|
var _useUrlSearchParams = useUrlSearchParams({}, {
|
|
|
disabled: !syncToUrl
|
|
|
}),
|
|
|
_useUrlSearchParams2 = (0,slicedToArray/* default */.Z)(_useUrlSearchParams, 2),
|
|
|
urlSearch = _useUrlSearchParams2[0],
|
|
|
setUrlSearch = _useUrlSearchParams2[1];
|
|
|
var curFormKey = (0,_react_17_0_2_react.useRef)((0,nanoid/* nanoid */.x)());
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
requestFormCacheId += 0;
|
|
|
}, []);
|
|
|
var _useFetchData = useFetchData({
|
|
|
request: request,
|
|
|
params: params,
|
|
|
proFieldKey: formKey
|
|
|
}),
|
|
|
_useFetchData2 = (0,slicedToArray/* default */.Z)(_useFetchData, 1),
|
|
|
initialData = _useFetchData2[0];
|
|
|
var _useContext = (0,_react_17_0_2_react.useContext)(config_provider/* default.ConfigContext */.ZP.ConfigContext),
|
|
|
getPrefixCls = _useContext.getPrefixCls;
|
|
|
var prefixCls = getPrefixCls('pro-form');
|
|
|
// css
|
|
|
var _useStyle = (0,useStyle/* useStyle */.Xj)('ProForm', function (token) {
|
|
|
return (0,defineProperty/* default */.Z)({}, ".".concat(prefixCls), (0,defineProperty/* default */.Z)({}, "> div:not(".concat(token.proComponentsCls, "-form-light-filter)"), {
|
|
|
'.pro-field': {
|
|
|
maxWidth: '100%',
|
|
|
'@media screen and (max-width: 575px)': {
|
|
|
// 减少了 form 的 padding
|
|
|
maxWidth: 'calc(93vw - 48px)'
|
|
|
},
|
|
|
// 适用于短数字,短文本或者选项
|
|
|
'&-xs': {
|
|
|
width: 104
|
|
|
},
|
|
|
'&-s': {
|
|
|
width: 216
|
|
|
},
|
|
|
// 适用于较短字段录入、如姓名、电话、ID 等。
|
|
|
'&-sm': {
|
|
|
width: 216
|
|
|
},
|
|
|
'&-m': {
|
|
|
width: 328
|
|
|
},
|
|
|
// 标准宽度,适用于大部分字段长度
|
|
|
'&-md': {
|
|
|
width: 328
|
|
|
},
|
|
|
'&-l': {
|
|
|
width: 440
|
|
|
},
|
|
|
// 适用于较长字段录入,如长网址、标签组、文件路径等。
|
|
|
'&-lg': {
|
|
|
width: 440
|
|
|
},
|
|
|
// 适用于长文本录入,如长链接、描述、备注等,通常搭配自适应多行输入框或定高文本域使用。
|
|
|
'&-xl': {
|
|
|
width: 552
|
|
|
}
|
|
|
}
|
|
|
}));
|
|
|
}),
|
|
|
wrapSSR = _useStyle.wrapSSR,
|
|
|
hashId = _useStyle.hashId;
|
|
|
|
|
|
// 如果为 false,不需要触发设置进去
|
|
|
var _useState = (0,_react_17_0_2_react.useState)(function () {
|
|
|
if (!syncToUrl) {
|
|
|
return {};
|
|
|
}
|
|
|
return genParams(syncToUrl, urlSearch, 'get');
|
|
|
}),
|
|
|
_useState2 = (0,slicedToArray/* default */.Z)(_useState, 2),
|
|
|
urlParamsMergeInitialValues = _useState2[0],
|
|
|
setUrlParamsMergeInitialValues = _useState2[1];
|
|
|
|
|
|
/** 保存 transformKeyRef,用于对表单key transform */
|
|
|
var transformKeyRef = (0,_react_17_0_2_react.useRef)({});
|
|
|
var fieldsValueType = (0,_react_17_0_2_react.useRef)({});
|
|
|
|
|
|
/** 使用 callback 的类型 */
|
|
|
var transformKey = (0,useRefFunction/* useRefFunction */.J)(function (values, paramsOmitNil, parentKey) {
|
|
|
return transformKeySubmitValue((0,conversionMomentValue/* conversionMomentValue */.lp)(values, dateFormatter, fieldsValueType.current, paramsOmitNil, parentKey), transformKeyRef.current, paramsOmitNil);
|
|
|
});
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
if (syncToInitialValues) return;
|
|
|
setUrlParamsMergeInitialValues({});
|
|
|
}, [syncToInitialValues]);
|
|
|
var getGenParams = (0,useRefFunction/* useRefFunction */.J)(function () {
|
|
|
return (0,objectSpread2/* default */.Z)((0,objectSpread2/* default */.Z)({}, urlSearch), extraUrlParams);
|
|
|
});
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
if (!syncToUrl) return;
|
|
|
setUrlSearch(genParams(syncToUrl, getGenParams(), 'set'));
|
|
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
|
}, [extraUrlParams, getGenParams, syncToUrl]);
|
|
|
var getPopupContainer = (0,_react_17_0_2_react.useMemo)(function () {
|
|
|
if (typeof window === 'undefined') return undefined;
|
|
|
// 如果在 drawerForm 和 modalForm 里就渲染dom到父节点里
|
|
|
// modalForm 可能高度太小不适合
|
|
|
if (formComponentType && ['DrawerForm'].includes(formComponentType)) {
|
|
|
return function (e) {
|
|
|
return e.parentNode || document.body;
|
|
|
};
|
|
|
}
|
|
|
return undefined;
|
|
|
}, [formComponentType]);
|
|
|
var onFinish = (0,useRefFunction/* useRefFunction */.J)( /*#__PURE__*/(0,asyncToGenerator/* default */.Z)( /*#__PURE__*/(0,regeneratorRuntime/* default */.Z)().mark(function _callee2() {
|
|
|
var _formRef$current4, _formRef$current4$get, finalValues, response, _formRef$current5, _formRef$current5$get, syncToUrlParams;
|
|
|
return (0,regeneratorRuntime/* default */.Z)().wrap(function _callee2$(_context2) {
|
|
|
while (1) switch (_context2.prev = _context2.next) {
|
|
|
case 0:
|
|
|
if (propRest.onFinish) {
|
|
|
_context2.next = 2;
|
|
|
break;
|
|
|
}
|
|
|
return _context2.abrupt("return");
|
|
|
case 2:
|
|
|
if (!loading) {
|
|
|
_context2.next = 4;
|
|
|
break;
|
|
|
}
|
|
|
return _context2.abrupt("return");
|
|
|
case 4:
|
|
|
_context2.prev = 4;
|
|
|
finalValues = formRef === null || formRef === void 0 || (_formRef$current4 = formRef.current) === null || _formRef$current4 === void 0 || (_formRef$current4$get = _formRef$current4.getFieldsFormatValue) === null || _formRef$current4$get === void 0 ? void 0 : _formRef$current4$get.call(_formRef$current4);
|
|
|
response = propRest.onFinish(finalValues);
|
|
|
if (response instanceof Promise) {
|
|
|
setLoading(true);
|
|
|
}
|
|
|
_context2.next = 10;
|
|
|
return response;
|
|
|
case 10:
|
|
|
if (syncToUrl) {
|
|
|
// 把没有的值设置为未定义可以删掉 url 的参数
|
|
|
syncToUrlParams = Object.keys(formRef === null || formRef === void 0 || (_formRef$current5 = formRef.current) === null || _formRef$current5 === void 0 || (_formRef$current5$get = _formRef$current5.getFieldsFormatValue) === null || _formRef$current5$get === void 0 ? void 0 : _formRef$current5$get.call(_formRef$current5, undefined, false)).reduce(function (pre, next) {
|
|
|
var _finalValues$next;
|
|
|
return (0,objectSpread2/* default */.Z)((0,objectSpread2/* default */.Z)({}, pre), {}, (0,defineProperty/* default */.Z)({}, next, (_finalValues$next = finalValues[next]) !== null && _finalValues$next !== void 0 ? _finalValues$next : undefined));
|
|
|
}, extraUrlParams); // fix #3547: 当原先在url中存在的字段被删除时,应该将 params 中的该字段设置为 undefined,以便触发url同步删除
|
|
|
Object.keys(urlSearch).forEach(function (key) {
|
|
|
if (syncToUrlParams[key] !== false && syncToUrlParams[key] !== 0 && !syncToUrlParams[key]) {
|
|
|
syncToUrlParams[key] = undefined;
|
|
|
}
|
|
|
});
|
|
|
/** 在同步到 url 上时对参数进行转化 */
|
|
|
setUrlSearch(genParams(syncToUrl, syncToUrlParams, 'set'));
|
|
|
}
|
|
|
setLoading(false);
|
|
|
_context2.next = 18;
|
|
|
break;
|
|
|
case 14:
|
|
|
_context2.prev = 14;
|
|
|
_context2.t0 = _context2["catch"](4);
|
|
|
console.log(_context2.t0);
|
|
|
setLoading(false);
|
|
|
case 18:
|
|
|
case "end":
|
|
|
return _context2.stop();
|
|
|
}
|
|
|
}, _callee2, null, [[4, 14]]);
|
|
|
})));
|
|
|
|
|
|
// 初始化给一个默认的 form
|
|
|
(0,_react_17_0_2_react.useImperativeHandle)(propsFormRef, function () {
|
|
|
return formRef.current;
|
|
|
}, [!initialData]);
|
|
|
if (!initialData && props.request) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
style: {
|
|
|
paddingTop: 50,
|
|
|
paddingBottom: 50,
|
|
|
textAlign: 'center'
|
|
|
},
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(spin/* default */.Z, {})
|
|
|
});
|
|
|
}
|
|
|
return wrapSSR( /*#__PURE__*/(0,jsx_runtime.jsx)(EditOrReadOnlyContext/* EditOrReadOnlyContext */.A.Provider, {
|
|
|
value: {
|
|
|
mode: props.readonly ? 'read' : 'edit'
|
|
|
},
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es/* ProConfigProvider */._Y, {
|
|
|
needDeps: true,
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(FieldContext/* default */.Z.Provider, {
|
|
|
value: {
|
|
|
formRef: formRef,
|
|
|
fieldProps: fieldProps,
|
|
|
proFieldProps: proFieldProps,
|
|
|
formItemProps: formItemProps,
|
|
|
groupProps: groupProps,
|
|
|
formComponentType: formComponentType,
|
|
|
getPopupContainer: getPopupContainer,
|
|
|
formKey: curFormKey.current,
|
|
|
setFieldValueType: function setFieldValueType(name, _ref4) {
|
|
|
var _ref4$valueType = _ref4.valueType,
|
|
|
valueType = _ref4$valueType === void 0 ? 'text' : _ref4$valueType,
|
|
|
dateFormat = _ref4.dateFormat,
|
|
|
transform = _ref4.transform;
|
|
|
if (!Array.isArray(name)) return;
|
|
|
transformKeyRef.current = (0,set/* default */.Z)(transformKeyRef.current, name, transform);
|
|
|
fieldsValueType.current = (0,set/* default */.Z)(fieldsValueType.current, name, {
|
|
|
valueType: valueType,
|
|
|
dateFormat: dateFormat
|
|
|
});
|
|
|
}
|
|
|
},
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(List/* FormListContext */.J.Provider, {
|
|
|
value: {},
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z, (0,objectSpread2/* default */.Z)((0,objectSpread2/* default */.Z)({
|
|
|
onKeyPress: function onKeyPress(event) {
|
|
|
if (!isKeyPressSubmit) return;
|
|
|
if (event.key === 'Enter') {
|
|
|
var _formRef$current6;
|
|
|
(_formRef$current6 = formRef.current) === null || _formRef$current6 === void 0 || _formRef$current6.submit();
|
|
|
}
|
|
|
},
|
|
|
autoComplete: "off",
|
|
|
form: form
|
|
|
}, (0,omit/* default */.Z)(propRest, ['ref', 'labelWidth', 'autoFocusFirstInput'])), {}, {
|
|
|
ref: function ref(instance) {
|
|
|
if (!formRef.current) return;
|
|
|
formRef.current.nativeElement = instance === null || instance === void 0 ? void 0 : instance.nativeElement;
|
|
|
}
|
|
|
// 组合 urlSearch 和 initialValues
|
|
|
,
|
|
|
initialValues: syncToUrlAsImportant ? (0,objectSpread2/* default */.Z)((0,objectSpread2/* default */.Z)((0,objectSpread2/* default */.Z)({}, initialValues), initialData), urlParamsMergeInitialValues) : (0,objectSpread2/* default */.Z)((0,objectSpread2/* default */.Z)((0,objectSpread2/* default */.Z)({}, urlParamsMergeInitialValues), initialValues), initialData),
|
|
|
onValuesChange: function onValuesChange(changedValues, values) {
|
|
|
var _propRest$onValuesCha;
|
|
|
propRest === null || propRest === void 0 || (_propRest$onValuesCha = propRest.onValuesChange) === null || _propRest$onValuesCha === void 0 || _propRest$onValuesCha.call(propRest, transformKey(changedValues, !!omitNil), transformKey(values, !!omitNil));
|
|
|
},
|
|
|
className: _classnames_2_5_1_classnames_default()(props.className, prefixCls, hashId),
|
|
|
onFinish: onFinish,
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(BaseFormComponents, (0,objectSpread2/* default */.Z)((0,objectSpread2/* default */.Z)({
|
|
|
transformKey: transformKey,
|
|
|
autoComplete: "off",
|
|
|
loading: loading,
|
|
|
onUrlSearchChange: setUrlSearch
|
|
|
}, props), {}, {
|
|
|
formRef: formRef,
|
|
|
initialValues: (0,objectSpread2/* default */.Z)((0,objectSpread2/* default */.Z)({}, initialValues), initialData)
|
|
|
}))
|
|
|
}))
|
|
|
})
|
|
|
})
|
|
|
})
|
|
|
}));
|
|
|
}
|
|
|
|
|
|
|
|
|
/***/ })
|
|
|
|
|
|
}]); |