{"version":3,"sources":["webpack:///./node_modules/core-js/modules/es.array.splice.js","webpack:///./src/other/validator.js"],"names":["$","toAbsoluteIndex","toInteger","toLength","toObject","arraySpeciesCreate","createProperty","arrayMethodHasSpeciesSupport","arrayMethodUsesToLength","HAS_SPECIES_SUPPORT","USES_TO_LENGTH","ACCESSORS","0","1","max","Math","min","MAX_SAFE_INTEGER","MAXIMUM_ALLOWED_LENGTH_EXCEEDED","target","proto","forced","splice","start","deleteCount","insertCount","actualDeleteCount","A","k","from","to","O","this","len","length","actualStart","argumentsLength","arguments","TypeError","validator","phone","required","rule","value","callback","test","trigger","name","message","type","captcha","password","email","Website","CreditCode","patrn","Ancode","Ancodevalue","total","weightedfactors","str","i","substring","indexOf","logiccheckcode","Str","Array_Str","split","checkcode","BusinessLicenses","regex","ws","codes","Array","substr","sum","charAt","c18","s","p","a","m","parseInt"],"mappings":"07qGACA,IAAIA,EAAI,EAAQ,QACZC,EAAkB,EAAQ,QAC1BC,EAAY,EAAQ,QACpBC,EAAW,EAAQ,QACnBC,EAAW,EAAQ,QACnBC,EAAqB,EAAQ,QAC7BC,EAAiB,EAAQ,QACzBC,EAA+B,EAAQ,QACvCC,EAA0B,EAAQ,QAElCC,EAAsBF,EAA6B,UACnDG,EAAiBF,EAAwB,SAAU,CAAEG,WAAW,EAAMC,EAAG,EAAGC,EAAG,IAE/EC,EAAMC,KAAKD,IACXE,EAAMD,KAAKC,IACXC,EAAmB,iBACnBC,EAAkC,kCAKtClB,EAAE,CAAEmB,OAAQ,QAASC,OAAO,EAAMC,QAASZ,IAAwBC,GAAkB,CACnFY,OAAQ,SAAgBC,EAAOC,GAC7B,IAIIC,EAAaC,EAAmBC,EAAGC,EAAGC,EAAMC,EAJ5CC,EAAI3B,EAAS4B,MACbC,EAAM9B,EAAS4B,EAAEG,QACjBC,EAAclC,EAAgBsB,EAAOU,GACrCG,EAAkBC,UAAUH,OAWhC,GATwB,IAApBE,EACFX,EAAcC,EAAoB,EACL,IAApBU,GACTX,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b9.js","sourcesContent":["'use strict';\nvar $ = require('../internals/export');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\nvar toInteger = require('../internals/to-integer');\nvar toLength = require('../internals/to-length');\nvar toObject = require('../internals/to-object');\nvar arraySpeciesCreate = require('../internals/array-species-create');\nvar createProperty = require('../internals/create-property');\nvar arrayMethodHasSpeciesSupport = require('../internals/array-method-has-species-support');\nvar arrayMethodUsesToLength = require('../internals/array-method-uses-to-length');\n\nvar HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('splice');\nvar USES_TO_LENGTH = arrayMethodUsesToLength('splice', { ACCESSORS: true, 0: 0, 1: 2 });\n\nvar max = Math.max;\nvar min = Math.min;\nvar MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;\nvar MAXIMUM_ALLOWED_LENGTH_EXCEEDED = 'Maximum allowed length exceeded';\n\n// `Array.prototype.splice` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.splice\n// with adding support of @@species\n$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT || !USES_TO_LENGTH }, {\n splice: function splice(start, deleteCount /* , ...items */) {\n var O = toObject(this);\n var len = toLength(O.length);\n var actualStart = toAbsoluteIndex(start, len);\n var argumentsLength = arguments.length;\n var insertCount, actualDeleteCount, A, k, from, to;\n if (argumentsLength === 0) {\n insertCount = actualDeleteCount = 0;\n } else if (argumentsLength === 1) {\n insertCount = 0;\n actualDeleteCount = len - actualStart;\n } else {\n insertCount = argumentsLength - 2;\n actualDeleteCount = min(max(toInteger(deleteCount), 0), len - actualStart);\n }\n if (len + insertCount - actualDeleteCount > MAX_SAFE_INTEGER) {\n throw TypeError(MAXIMUM_ALLOWED_LENGTH_EXCEEDED);\n }\n A = arraySpeciesCreate(O, actualDeleteCount);\n for (k = 0; k < actualDeleteCount; k++) {\n from = actualStart + k;\n if (from in O) createProperty(A, k, O[from]);\n }\n A.length = actualDeleteCount;\n if (insertCount < actualDeleteCount) {\n for (k = actualStart; k < len - actualDeleteCount; k++) {\n from = k + actualDeleteCount;\n to = k + insertCount;\n if (from in O) O[to] = O[from];\n else delete O[to];\n }\n for (k = len; k > len - actualDeleteCount + insertCount; k--) delete O[k - 1];\n } else if (insertCount > actualDeleteCount) {\n for (k = len - actualDeleteCount; k > actualStart; k--) {\n from = k + actualDeleteCount - 1;\n to = k + insertCount - 1;\n if (from in O) O[to] = O[from];\n else delete O[to];\n }\n }\n for (k = 0; k < insertCount; k++) {\n O[k + actualStart] = arguments[k + 2];\n }\n O.length = len - actualDeleteCount + insertCount;\n return A;\n }\n});\n","export const validator = { // async-validator 所有验证规则 通用的独立出来\n phone: [\n {\n required: true,\n validator: (rule, value, callback) => {\n if (!value) {\n callback('请输入手机号码');\n } else if (/^[1][0-9]{10}$/.test(value)) {\n callback();\n } else {\n callback('请输入正确的手机号码');\n }\n }, trigger: \"blur\"\n }\n ],\n name: [\n { required: true, message: \"用户名不能为空\", trigger: \"blur\" },\n { type: \"string\", min: 3, message: \"用户名不能小于4位\", trigger: \"blur\" },\n { type: \"string\", max: 15, message: \"用户名不能大于15位\", trigger: \"blur\" }\n ],\n captcha: [\n { required: true, message: \"验证码为必填选项\", trigger: \"blur\" }\n ],\n password: [\n { required: true, message: \"密码不能为空\", trigger: \"blur\" },\n { type: \"string\", min: 4, message: \"密码不能小于4位\", trigger: \"blur\" },\n { type: \"string\", max: 12, message: \"密码不能大于12位\", trigger: \"blur\" }\n ],\n email: [\n { required: true, message: '邮箱不能为空', trigger: 'blur' },\n { type: 'email', message: '邮箱格式有误', trigger: 'blur' }\n ],\n Website: [ // 验证网址\n {\n validator: (rule, value, callback) => {\n if (value) {\n if (/(http|https):\\/\\/([\\w.]+\\/?)\\S*/.test(value)) {\n callback();\n } else {\n callback(\"请输入正确的外链地址\");\n }\n } else {\n callback();\n }\n }, trigger: \"blur\"\n }\n ],\n CreditCode: [ // 验证统一社会信用代码\n {\n validator: (rule, value, callback) => {\n if (!value) {\n callback();\n }\n var patrn = /^[0-9A-Z]+$/;\n //18位校验及大写校验\n if ((value.length != 18) || (patrn.test(value) == false)) {\n callback(\"请输入正确的统一社会信用代码\");\n }\n else {\n var Ancode;//统一社会信用代码的每一个值\n var Ancodevalue;//统一社会信用代码每一个值的权重\n var total = 0;\n var weightedfactors = [1, 3, 9, 27, 19, 26, 16, 17, 20, 29, 25, 13, 8, 24, 10, 30, 28];//加权因子\n var str = '0123456789ABCDEFGHJKLMNPQRTUWXY';\n //不用I、O、S、V、Z\n for (var i = 0; i < value.length - 1; i++) {\n Ancode = value.substring(i, i + 1);\n Ancodevalue = str.indexOf(Ancode);\n total = total + Ancodevalue * weightedfactors[i];\n //权重与加权因子相乘之和\n }\n var logiccheckcode = 31 - total % 31;\n if (logiccheckcode == 31) {\n logiccheckcode = 0;\n }\n var Str = \"0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,T,U,W,X,Y\";\n var Array_Str = Str.split(',');\n logiccheckcode = Array_Str[logiccheckcode];\n var checkcode = value.substring(17, 18);\n if (logiccheckcode != checkcode) {\n callback(\"请输入正确的统一社会信用代码\");\n } else {\n callback();\n }\n callback();\n }\n }, trigger: \"blur\"\n }\n ],\n BusinessLicenses: [ // 验证统一社会信用代码\n {\n validator: (rule, value, callback) => {\n if (!value) {\n callback();\n }\n if (value.length != 18 && value.length != 15) { \n callback(\"请输入正确的营业执照\");\n }\n //十八位新码\n if (value.length == 18) {\n var regex = /^([159Y]{1})([1239]{1})([0-9ABCDEFGHJKLMNPQRTUWXY]{6})([0-9ABCDEFGHJKLMNPQRTUWXY]{9})([0-90-9ABCDEFGHJKLMNPQRTUWXY])$/;\n if (!regex.test(value)) { \n callback(\"请输入正确的营业执照\");\n }\n var str = \"0123456789ABCDEFGHJKLMNPQRTUWXY\";\n var ws = [1, 3, 9, 27, 19, 26, 16, 17, 20, 29, 25, 13, 8, 24, 10, 30, 28];\n var codes = new Array();\n codes[0] = value.substr(0, value.length - 1);\n codes[1] = value.substr(value.length - 1, value.length);\n var sum = 0;\n for (var i = 0; i < 17; i++) {\n sum += str.indexOf(codes[0].charAt(i)) * ws[i];\n }\n var c18 = 31 - (sum % 31);\n if (c18 == 31) {\n c18 = 'Y';\n } else if (c18 == 30) {\n c18 = '0';\n }\n if (str.charAt(c18) != codes[1].charAt(0)) {\n\n callback(\"请输入正确的营业执照\");\n }\n callback();\n\n }\n //十五位编码\n else {\n var ret = false;\n var sum = 0;\n var s = [];\n var p = [];\n var a = [];\n var m = 10;\n p[0] = m;\n for (var i = 0; i < value.length; i++) {\n a[i] = parseInt(value.substring(i, i + 1), m);\n s[i] = (p[i] % (m + 1)) + a[i];\n if (0 == s[i] % m) {\n p[i + 1] = 10 * 2;\n } else {\n p[i + 1] = (s[i] % m) * 2;\n }\n }\n if (1 == (s[14] % m)) {\n callback();\n } else {\n callback(\"请输入正确的营业执照\");\n }\n }\n }, trigger: \"blur\"\n }\n ]\n} "],"sourceRoot":""}