You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
paopao-ce/web/dist/assets/async-validator-DKvM95Vc.js

13 lines
16 KiB

function R(){return R=Object.assign?Object.assign.bind():function(i){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(i[t]=r[t])}return i},R.apply(this,arguments)}function ee(i,e){i.prototype=Object.create(e.prototype),i.prototype.constructor=i,T(i,e)}function U(i){return U=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},U(i)}function T(i,e){return T=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,n){return t.__proto__=n,t},T(i,e)}function re(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function M(i,e,r){return re()?M=Reflect.construct.bind():M=function(n,f,a){var s=[null];s.push.apply(s,f);var d=Function.bind.apply(n,s),q=new d;return a&&T(q,a.prototype),q},M.apply(null,arguments)}function te(i){return Function.toString.call(i).indexOf("[native code]")!==-1}function J(i){var e=typeof Map=="function"?new Map:void 0;return J=function(t){if(t===null||!te(t))return t;if(typeof t!="function")throw new TypeError("Super expression must either be null or a function");if(typeof e<"u"){if(e.has(t))return e.get(t);e.set(t,n)}function n(){return M(t,arguments,U(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),T(n,t)},J(i)}var ne=/%[sdj%]/g,ie=function(){};function W(i){if(!i||!i.length)return null;var e={};return i.forEach(function(r){var t=r.field;e[t]=e[t]||[],e[t].push(r)}),e}function F(i){for(var e=arguments.length,r=new Array(e>1?e-1:0),t=1;t<e;t++)r[t-1]=arguments[t];var n=0,f=r.length;if(typeof i=="function")return i.apply(null,r);if(typeof i=="string"){var a=i.replace(ne,function(s){if(s==="%%")return"%";if(n>=f)return s;switch(s){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch{return"[Circular]"}break;default:return s}});return a}return i}function ae(i){return i==="string"||i==="url"||i==="hex"||i==="email"||i==="date"||i==="pattern"}function h(i,e){return!!(i==null||e==="array"&&Array.isArray(i)&&!i.length||ae(e)&&typeof i=="string"&&!i)}function fe(i,e,r){var t=[],n=0,f=i.length;function a(s){t.push.apply(t,s||[]),n++,n===f&&r(t)}i.forEach(function(s){e(s,a)})}function G(i,e,r){var t=0,n=i.length;function f(a){if(a&&a.length){r(a);return}var s=t;t=t+1,s<n?e(i[s],f):r([])}f([])}function se(i){var e=[];return Object.keys(i).forEach(function(r){e.push.apply(e,i[r]||[])}),e}var K=function(i){ee(e,i);function e(r,t){var n;return n=i.call(this,"Async Validation Error")||this,n.errors=r,n.fields=t,n}return e}(J(Error));function oe(i,e,r,t,n){if(e.first){var f=new Promise(function(l,O){var x=function(o){return t(o),o.length?O(new K(o,W(o))):l(n)},u=se(i);G(u,r,x)});return f.catch(function(l){return l}),f}var a=e.firstFields===!0?Object.keys(i):e.firstFields||[],s=Object.keys(i),d=s.length,q=0,v=[],m=new Promise(function(l,O){var x=function(g){if(v.push.apply(v,g),q++,q===d)return t(v),v.length?O(new K(v,W(v))):l(n)};s.length||(t(v),l(n)),s.forEach(function(u){var g=i[u];a.indexOf(u)!==-1?G(g,r,x):fe(g,r,x)})});return m.catch(function(l){return l}),m}function de(i){return!!(i&&i.message!==void 0)}function ue(i,e){for(var r=i,t=0;t<e.length;t++){if(r==null)return r;r=r[e[t]]}return r}function H(i,e){return function(r){var t;return i.fullFields?t=ue(e,i.fullFields):t=e[r.field||i.fullField],de(r)?(r.field=r.field||i.fullField,r.fieldValue=t,r):{message:typeof r=="function"?r():r,fieldValue:t,field:r.field||i.fullField}}}function Q(i,e){if(e){for(var r in e)if(e.hasOwnProperty(r)){var t=e[r];typeof t=="object"&&typeof i[r]=="object"?i[r]=R({},i[r],t):i[r]=t}}return i}var C=function(e,r,t,n,f,a){e.required&&(!t.hasOwnProperty(e.field)||h(r,a||e.type))&&n.push(F(f.messages.required,e.fullField))},ce=function(e,r,t,n,f){(/^\s+$/.test(r)||r==="")&&n.push(F(f.messages.whitespace,e.fullF
(?:
(?:`+t+":){7}(?:"+t+`|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8
(?:`+t+":){6}(?:"+r+"|:"+t+`|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4
(?:`+t+":){5}(?::"+r+"|(?::"+t+`){1,2}|:)| // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::7:1.2.3.4
(?:`+t+":){4}(?:(?::"+t+"){0,1}:"+r+"|(?::"+t+`){1,3}|:)| // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::6:7:1.2.3.4
(?:`+t+":){3}(?:(?::"+t+"){0,2}:"+r+"|(?::"+t+`){1,4}|:)| // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::5:6:7:1.2.3.4
(?:`+t+":){2}(?:(?::"+t+"){0,3}:"+r+"|(?::"+t+`){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4
(?:`+t+":){1}(?:(?::"+t+"){0,4}:"+r+"|(?::"+t+`){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4
(?::(?:(?::`+t+"){0,5}:"+r+"|(?::"+t+`){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4
)(?:%[0-9a-zA-Z]{1,})? // %eth0 %1
`).replace(/\s*\/\/.*$/gm,"").replace(/\n/g,"").trim(),f=new RegExp("(?:^"+r+"$)|(?:^"+n+"$)"),a=new RegExp("^"+r+"$"),s=new RegExp("^"+n+"$"),d=function(y){return y&&y.exact?f:new RegExp("(?:"+e(y)+r+e(y)+")|(?:"+e(y)+n+e(y)+")","g")};d.v4=function(p){return p&&p.exact?a:new RegExp(""+e(p)+r+e(p),"g")},d.v6=function(p){return p&&p.exact?s:new RegExp(""+e(p)+n+e(p),"g")};var q="(?:(?:[a-z]+:)?//)",v="(?:\\S+(?::\\S*)?@)?",m=d.v4().source,l=d.v6().source,O="(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)",x="(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*",u="(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))",g="(?::\\d{2,5})?",o='(?:[/?#][^\\s"]*)?',A="(?:"+q+"|www\\.)"+v+"(?:localhost|"+m+"|"+l+"|"+O+x+u+")"+g+o;return $=new RegExp("(?:^"+A+"$)","i"),$},X={email:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},D={integer:function(e){return D.number(e)&&parseInt(e,10)===e},float:function(e){return D.number(e)&&!D.integer(e)},array:function(e){return Array.isArray(e)},regexp:function(e){if(e instanceof RegExp)return!0;try{return!!new RegExp(e)}catch{return!1}},date:function(e){return typeof e.getTime=="function"&&typeof e.getMonth=="function"&&typeof e.getYear=="function"&&!isNaN(e.getTime())},number:function(e){return isNaN(e)?!1:typeof e=="number"},object:function(e){return typeof e=="object"&&!D.array(e)},method:function(e){return typeof e=="function"},email:function(e){return typeof e=="string"&&e.length<=320&&!!e.match(X.email)},url:function(e){return typeof e=="string"&&e.length<=2048&&!!e.match(pe())},hex:function(e){return typeof e=="string"&&!!e.match(X.hex)}},ye=function(e,r,t,n,f){if(e.required&&r===void 0){C(e,r,t,n,f);return}var a=["integer","float","array","regexp","object","method","email","number","date","url","hex"],s=e.type;a.indexOf(s)>-1?D[s](r)||n.push(F(f.messages.types[s],e.fullField,e.type)):s&&typeof r!==e.type&&n.push(F(f.messages.types[s],e.fullField,e.type))},ge=function(e,r,t,n,f){var a=typeof e.len=="number",s=typeof e.min=="number",d=typeof e.max=="number",q=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,v=r,m=null,l=typeof r=="number",O=typeof r=="string",x=Array.isArray(r);if(l?m="number":O?m="string":x&&(m="array"),!m)return!1;x&&(v=r.length),O&&(v=r.replace(q,"_").length),a?v!==e.len&&n.push(F(f.messages[m].len,e.fullField,e.len)):s&&!d&&v<e.min?n.push(F(f.messages[m].min,e.fullField,e.min)):d&&!s&&v>e.max?n.push(F(f.messages[m].max,e.fullField,e.max)):s&&d&&(v<e.min||v>e.max)&&n.push(F(f.messages[m].range,e.fullField,e.min,e.max))},N="enum",ve=function(e,r,t,n,f){e[N]=Array.isArray(e[N])?e[N]:[],e[N].indexOf(r)===-1&&n.push(F(f.messages[N],e.fullField,e[N].join(", ")))},he=function(e,r,t,n,f){if(e.pattern){if(e.pattern instanceof RegExp)e.pattern.lastIndex=0,e.pattern.test(r)||n.push(F(f.messages.pattern.mismatch,e.fullField,r,e.pattern));else if(typeof e.pattern=="string"){var a=new RegExp(e.pattern);a.test(r)||n.push(F(f.messages.pattern.mismatch,e.fullField,r,e.pattern))}}},c={required:C,whitespace:ce,type:ye,range:ge,enum:ve,pattern:he},me=function(e,r,t,n,f){var a=[],s=e.required||!e.required&&n.hasOwnProperty(e.field);if(s){if(h(r,"string")&&!e.required)return t();c.required(e,r,n,a,f,"string"),h(r,"string")||(c.type(e,r,n,a,f),c.range(e,r,n,a,f),c.pattern(e,r,n,a,f),e.whitespace===!0&&c.whitespace(e,r,n,a,f))}t(a)},le=function(e,r,t,n,f){var a=[],s=e.required||!e.required&&n.hasOwnProperty(e.field);if(s){if(h(r)&&!e.required)return t();c.required(e,r,n,a,f),r!==void 0&&c.type(e,r,n,a,f)}t(a)},qe=function(e,r,t,n,f){var a=[],s=e.required||!e.required&&n.hasOwnProperty(e.field);if(s){if(r===""&&(r=void 0),h(r)&&!e.required)return t();c.required(e,r,n,a,f),r!==void 0&&(c.type(e,r,n,a,f),c.range(e,r,n,a,f))}t(a)},we=function(e,r,t,n,f){var a=[],s=e.required||!e.required&&n.hasOwnProperty(e.field);if(s){if(h(r)&&!e.required)return t();c.required(e,r,n,a,f),r!==void