{"ast":null,"code":"import _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _typeof from \"@babel/runtime/helpers/esm/typeof\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport _wrapNativeSuper from \"@babel/runtime/helpers/esm/wrapNativeSuper\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\n/* eslint no-console:0 */\n\nvar formatRegExp = /%[sdj%]/g;\nexport var warning = function warning() {};\n\n// don't print warning message when in production env or node runtime\nif (typeof process !== 'undefined' && process.env && process.env.NODE_ENV !== 'production' && typeof window !== 'undefined' && typeof document !== 'undefined') {\n warning = function warning(type, errors) {\n if (typeof console !== 'undefined' && console.warn && typeof ASYNC_VALIDATOR_NO_WARNING === 'undefined') {\n if (errors.every(function (e) {\n return typeof e === 'string';\n })) {\n console.warn(type, errors);\n }\n }\n };\n}\nexport function convertFieldsError(errors) {\n if (!errors || !errors.length) return null;\n var fields = {};\n errors.forEach(function (error) {\n var field = error.field;\n fields[field] = fields[field] || [];\n fields[field].push(error);\n });\n return fields;\n}\nexport function format(template) {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n var i = 0;\n var len = args.length;\n if (typeof template === 'function') {\n // eslint-disable-next-line prefer-spread\n return template.apply(null, args);\n }\n if (typeof template === 'string') {\n var str = template.replace(formatRegExp, function (x) {\n if (x === '%%') {\n return '%';\n }\n if (i >= len) {\n return x;\n }\n switch (x) {\n case '%s':\n return String(args[i++]);\n case '%d':\n return Number(args[i++]);\n case '%j':\n try {\n return JSON.stringify(args[i++]);\n } catch (_) {\n return '[Circular]';\n }\n break;\n default:\n return x;\n }\n });\n return str;\n }\n return template;\n}\nfunction isNativeStringType(type) {\n return type === 'string' || type === 'url' || type === 'hex' || type === 'email' || type === 'date' || type === 'pattern';\n}\nexport function isEmptyValue(value, type) {\n if (value === undefined || value === null) {\n return true;\n }\n if (type === 'array' && Array.isArray(value) && !value.length) {\n return true;\n }\n if (isNativeStringType(type) && typeof value === 'string' && !value) {\n return true;\n }\n return false;\n}\nexport function isEmptyObject(obj) {\n return Object.keys(obj).length === 0;\n}\nfunction asyncParallelArray(arr, func, callback) {\n var results = [];\n var total = 0;\n var arrLength = arr.length;\n function count(errors) {\n results.push.apply(results, _toConsumableArray(errors || []));\n total++;\n if (total === arrLength) {\n callback(results);\n }\n }\n arr.forEach(function (a) {\n func(a, count);\n });\n}\nfunction asyncSerialArray(arr, func, callback) {\n var index = 0;\n var arrLength = arr.length;\n function next(errors) {\n if (errors && errors.length) {\n callback(errors);\n return;\n }\n var original = index;\n index = index + 1;\n if (original < arrLength) {\n func(arr[original], next);\n } else {\n callback([]);\n }\n }\n next([]);\n}\nfunction flattenObjArr(objArr) {\n var ret = [];\n Object.keys(objArr).forEach(function (k) {\n ret.push.apply(ret, _toConsumableArray(objArr[k] || []));\n });\n return ret;\n}\nexport var AsyncValidationError = /*#__PURE__*/function (_Error) {\n _inherits(AsyncValidationError, _Error);\n var _super = _createSuper(AsyncValidationError);\n function AsyncValidationError(errors, fields) {\n var _this;\n _classCallCheck(this, AsyncValidationError);\n _this = _super.call(this, 'Async Validation Error');\n _defineProperty(_assertThisInitialized(_this), \"errors\", void 0);\n _defineProperty(_assertThisInitialized(_this), \"fields\", void 0);\n _this.errors = errors;\n _this.fields = fields;\n return _this;\n }\n return _createClass(AsyncValidationError);\n}( /*#__PURE__*/_wrapNativeSuper(Error));\nexport function asyncMap(objArr, option, func, callback, source) {\n if (option.first) {\n var _pending = new Promise(function (resolve, reject) {\n var next = function next(errors) {\n callback(errors);\n return errors.length ? reject(new AsyncValidationError(errors, convertFieldsError(errors))) : resolve(source);\n };\n var flattenArr = flattenObjArr(objArr);\n asyncSerialArray(flattenArr, func, next);\n });\n _pending.catch(function (e) {\n return e;\n });\n return _pending;\n }\n var firstFields = option.firstFields === true ? Object.keys(objArr) : option.firstFields || [];\n var objArrKeys = Object.keys(objArr);\n var objArrLength = objArrKeys.length;\n var total = 0;\n var results = [];\n var pending = new Promise(function (resolve, reject) {\n var next = function next(errors) {\n // eslint-disable-next-line prefer-spread\n results.push.apply(results, errors);\n total++;\n if (total === objArrLength) {\n callback(results);\n return results.length ? reject(new AsyncValidationError(results, convertFieldsError(results))) : resolve(source);\n }\n };\n if (!objArrKeys.length) {\n callback(results);\n resolve(source);\n }\n objArrKeys.forEach(function (key) {\n var arr = objArr[key];\n if (firstFields.indexOf(key) !== -1) {\n asyncSerialArray(arr, func, next);\n } else {\n asyncParallelArray(arr, func, next);\n }\n });\n });\n pending.catch(function (e) {\n return e;\n });\n return pending;\n}\nfunction isErrorObj(obj) {\n return !!(obj && obj.message !== undefined);\n}\nfunction getValue(value, path) {\n var v = value;\n for (var i = 0; i < path.length; i++) {\n if (v == undefined) {\n return v;\n }\n v = v[path[i]];\n }\n return v;\n}\nexport function complementError(rule, source) {\n return function (oe) {\n var fieldValue;\n if (rule.fullFields) {\n fieldValue = getValue(source, rule.fullFields);\n } else {\n fieldValue = source[oe.field || rule.fullField];\n }\n if (isErrorObj(oe)) {\n oe.field = oe.field || rule.fullField;\n oe.fieldValue = fieldValue;\n return oe;\n }\n return {\n message: typeof oe === 'function' ? oe() : oe,\n fieldValue: fieldValue,\n field: oe.field || rule.fullField\n };\n };\n}\nexport function deepMerge(target, source) {\n if (source) {\n for (var s in source) {\n if (source.hasOwnProperty(s)) {\n var value = source[s];\n if (_typeof(value) === 'object' && _typeof(target[s]) === 'object') {\n target[s] = _objectSpread(_objectSpread({}, target[s]), value);\n } else {\n target[s] = value;\n }\n }\n }\n }\n return target;\n}","map":{"version":3,"names":["_objectSpread","_typeof","_createClass","_classCallCheck","_assertThisInitialized","_inherits","_createSuper","_wrapNativeSuper","_defineProperty","_toConsumableArray","formatRegExp","warning","process","env","NODE_ENV","window","document","type","errors","console","warn","ASYNC_VALIDATOR_NO_WARNING","every","e","convertFieldsError","length","fields","forEach","error","field","push","format","template","_len","arguments","args","Array","_key","i","len","apply","str","replace","x","String","Number","JSON","stringify","_","isNativeStringType","isEmptyValue","value","undefined","isArray","isEmptyObject","obj","Object","keys","asyncParallelArray","arr","func","callback","results","total","arrLength","count","a","asyncSerialArray","index","next","original","flattenObjArr","objArr","ret","k","AsyncValidationError","_Error","_super","_this","call","Error","asyncMap","option","source","first","_pending","Promise","resolve","reject","flattenArr","catch","firstFields","objArrKeys","objArrLength","pending","key","indexOf","isErrorObj","message","getValue","path","v","complementError","rule","oe","fieldValue","fullFields","fullField","deepMerge","target","s","hasOwnProperty"],"sources":["C:/Users/Аришина)/source/repos/PromoCursed/node_modules/@rc-component/async-validator/es/util.js"],"sourcesContent":["import _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _typeof from \"@babel/runtime/helpers/esm/typeof\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport _wrapNativeSuper from \"@babel/runtime/helpers/esm/wrapNativeSuper\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\n/* eslint no-console:0 */\n\nvar formatRegExp = /%[sdj%]/g;\nexport var warning = function warning() {};\n\n// don't print warning message when in production env or node runtime\nif (typeof process !== 'undefined' && process.env && process.env.NODE_ENV !== 'production' && typeof window !== 'undefined' && typeof document !== 'undefined') {\n warning = function warning(type, errors) {\n if (typeof console !== 'undefined' && console.warn && typeof ASYNC_VALIDATOR_NO_WARNING === 'undefined') {\n if (errors.every(function (e) {\n return typeof e === 'string';\n })) {\n console.warn(type, errors);\n }\n }\n };\n}\nexport function convertFieldsError(errors) {\n if (!errors || !errors.length) return null;\n var fields = {};\n errors.forEach(function (error) {\n var field = error.field;\n fields[field] = fields[field] || [];\n fields[field].push(error);\n });\n return fields;\n}\nexport function format(template) {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n var i = 0;\n var len = args.length;\n if (typeof template === 'function') {\n // eslint-disable-next-line prefer-spread\n return template.apply(null, args);\n }\n if (typeof template === 'string') {\n var str = template.replace(formatRegExp, function (x) {\n if (x === '%%') {\n return '%';\n }\n if (i >= len) {\n return x;\n }\n switch (x) {\n case '%s':\n return String(args[i++]);\n case '%d':\n return Number(args[i++]);\n case '%j':\n try {\n return JSON.stringify(args[i++]);\n } catch (_) {\n return '[Circular]';\n }\n break;\n default:\n return x;\n }\n });\n return str;\n }\n return template;\n}\nfunction isNativeStringType(type) {\n return type === 'string' || type === 'url' || type === 'hex' || type === 'email' || type === 'date' || type === 'pattern';\n}\nexport function isEmptyValue(value, type) {\n if (value === undefined || value === null) {\n return true;\n }\n if (type === 'array' && Array.isArray(value) && !value.length) {\n return true;\n }\n if (isNativeStringType(type) && typeof value === 'string' && !value) {\n return true;\n }\n return false;\n}\nexport function isEmptyObject(obj) {\n return Object.keys(obj).length === 0;\n}\nfunction asyncParallelArray(arr, func, callback) {\n var results = [];\n var total = 0;\n var arrLength = arr.length;\n function count(errors) {\n results.push.apply(results, _toConsumableArray(errors || []));\n total++;\n if (total === arrLength) {\n callback(results);\n }\n }\n arr.forEach(function (a) {\n func(a, count);\n });\n}\nfunction asyncSerialArray(arr, func, callback) {\n var index = 0;\n var arrLength = arr.length;\n function next(errors) {\n if (errors && errors.length) {\n callback(errors);\n return;\n }\n var original = index;\n index = index + 1;\n if (original < arrLength) {\n func(arr[original], next);\n } else {\n callback([]);\n }\n }\n next([]);\n}\nfunction flattenObjArr(objArr) {\n var ret = [];\n Object.keys(objArr).forEach(function (k) {\n ret.push.apply(ret, _toConsumableArray(objArr[k] || []));\n });\n return ret;\n}\nexport var AsyncValidationError = /*#__PURE__*/function (_Error) {\n _inherits(AsyncValidationError, _Error);\n var _super = _createSuper(AsyncValidationError);\n function AsyncValidationError(errors, fields) {\n var _this;\n _classCallCheck(this, AsyncValidationError);\n _this = _super.call(this, 'Async Validation Error');\n _defineProperty(_assertThisInitialized(_this), \"errors\", void 0);\n _defineProperty(_assertThisInitialized(_this), \"fields\", void 0);\n _this.errors = errors;\n _this.fields = fields;\n return _this;\n }\n return _createClass(AsyncValidationError);\n}( /*#__PURE__*/_wrapNativeSuper(Error));\nexport function asyncMap(objArr, option, func, callback, source) {\n if (option.first) {\n var _pending = new Promise(function (resolve, reject) {\n var next = function next(errors) {\n callback(errors);\n return errors.length ? reject(new AsyncValidationError(errors, convertFieldsError(errors))) : resolve(source);\n };\n var flattenArr = flattenObjArr(objArr);\n asyncSerialArray(flattenArr, func, next);\n });\n _pending.catch(function (e) {\n return e;\n });\n return _pending;\n }\n var firstFields = option.firstFields === true ? Object.keys(objArr) : option.firstFields || [];\n var objArrKeys = Object.keys(objArr);\n var objArrLength = objArrKeys.length;\n var total = 0;\n var results = [];\n var pending = new Promise(function (resolve, reject) {\n var next = function next(errors) {\n // eslint-disable-next-line prefer-spread\n results.push.apply(results, errors);\n total++;\n if (total === objArrLength) {\n callback(results);\n return results.length ? reject(new AsyncValidationError(results, convertFieldsError(results))) : resolve(source);\n }\n };\n if (!objArrKeys.length) {\n callback(results);\n resolve(source);\n }\n objArrKeys.forEach(function (key) {\n var arr = objArr[key];\n if (firstFields.indexOf(key) !== -1) {\n asyncSerialArray(arr, func, next);\n } else {\n asyncParallelArray(arr, func, next);\n }\n });\n });\n pending.catch(function (e) {\n return e;\n });\n return pending;\n}\nfunction isErrorObj(obj) {\n return !!(obj && obj.message !== undefined);\n}\nfunction getValue(value, path) {\n var v = value;\n for (var i = 0; i < path.length; i++) {\n if (v == undefined) {\n return v;\n }\n v = v[path[i]];\n }\n return v;\n}\nexport function complementError(rule, source) {\n return function (oe) {\n var fieldValue;\n if (rule.fullFields) {\n fieldValue = getValue(source, rule.fullFields);\n } else {\n fieldValue = source[oe.field || rule.fullField];\n }\n if (isErrorObj(oe)) {\n oe.field = oe.field || rule.fullField;\n oe.fieldValue = fieldValue;\n return oe;\n }\n return {\n message: typeof oe === 'function' ? oe() : oe,\n fieldValue: fieldValue,\n field: oe.field || rule.fullField\n };\n };\n}\nexport function deepMerge(target, source) {\n if (source) {\n for (var s in source) {\n if (source.hasOwnProperty(s)) {\n var value = source[s];\n if (_typeof(value) === 'object' && _typeof(target[s]) === 'object') {\n target[s] = _objectSpread(_objectSpread({}, target[s]), value);\n } else {\n target[s] = value;\n }\n }\n }\n }\n return target;\n}"],"mappings":"AAAA,OAAOA,aAAa,MAAM,0CAA0C;AACpE,OAAOC,OAAO,MAAM,mCAAmC;AACvD,OAAOC,YAAY,MAAM,wCAAwC;AACjE,OAAOC,eAAe,MAAM,2CAA2C;AACvE,OAAOC,sBAAsB,MAAM,kDAAkD;AACrF,OAAOC,SAAS,MAAM,qCAAqC;AAC3D,OAAOC,YAAY,MAAM,wCAAwC;AACjE,OAAOC,gBAAgB,MAAM,4CAA4C;AACzE,OAAOC,eAAe,MAAM,2CAA2C;AACvE,OAAOC,kBAAkB,MAAM,8CAA8C;AAC7E;;AAEA,IAAIC,YAAY,GAAG,UAAU;AAC7B,OAAO,IAAIC,OAAO,GAAG,SAASA,OAAOA,CAAA,EAAG,CAAC,CAAC;;AAE1C;AACA,IAAI,OAAOC,OAAO,KAAK,WAAW,IAAIA,OAAO,CAACC,GAAG,IAAID,OAAO,CAACC,GAAG,CAACC,QAAQ,KAAK,YAAY,IAAI,OAAOC,MAAM,KAAK,WAAW,IAA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