(self["webpackChunkuview2_0_cli"]=self["webpackChunkuview2_0_cli"]||[]).push([[4606],{32813:function(e,t,r){var n=r(66337);n.__esModule&&(n=n.default),"string"===typeof n&&(n=[[e.id,n,""]]),n.locals&&(e.exports=n.locals);var i=r(56).Z;i("4d0ae131",n,!0,{sourceMap:!1,shadowMode:!1})},92863:function(e,t,r){var n=r(54422);n.__esModule&&(n=n.default),"string"===typeof n&&(n=[[e.id,n,""]]),n.locals&&(e.exports=n.locals);var i=r(56).Z;i("04301087",n,!0,{sourceMap:!1,shadowMode:!1})},90587:function(e,t,r){"use strict";var n;r.d(t,{Z:function(){return he}});var i,a=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("uvForm",{ref:"uForm",attrs:{model:e.model,rules:e.rules,errorType:e.errorType,borderBottom:e.borderBottom,labelPosition:e.labelPosition,labelWidth:e.labelWidth,labelAlign:e.labelAlign,labelStyle:e.labelStyle,customStyle:e.customStyle}},[e._t("default")],2)},o=[],s=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("v-uni-view",{staticClass:"u-form"},[e._t("default")],2)},u=[],l=r(66407),f=r(18334),d=r(7028),c=r(4587),p=(r(21249),r(47941),r(92222),r(26699),r(32023),r(74916),r(77601),r(57658),r(41539),r(9653),{props:{model:{type:Object,default:uni.$u.props.form.model},rules:{type:[Object,Function,Array],default:uni.$u.props.form.rules},errorType:{type:String,default:uni.$u.props.form.errorType},borderBottom:{type:Boolean,default:uni.$u.props.form.borderBottom},labelPosition:{type:String,default:uni.$u.props.form.labelPosition},labelWidth:{type:[String,Number],default:uni.$u.props.form.labelWidth},labelAlign:{type:String,default:uni.$u.props.form.labelAlign},labelStyle:{type:Object,default:uni.$u.props.form.labelStyle}}}),m=r(41541),h=r(96257);r(54747),r(47042),r(15306),r(38862),r(82772),r(24603),r(28450),r(88386),r(39714),r(4723),r(21703),r(96647),r(33948),r(40561);var y=/%[sdj%]/g,g=function(){};function v(e){if(!e||!e.length)return null;var t={};return e.forEach((function(e){var r=e.field;t[r]=t[r]||[],t[r].push(e)})),t}function b(){for(var e=arguments.length,t=new Array(e),r=0;r=a)return e;switch(e){case"%s":return String(t[n++]);case"%d":return Number(t[n++]);case"%j":try{return JSON.stringify(t[n++])}catch(r){return"[Circular]"}break;default:return e}})),s=t[n];n()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,url:new RegExp("^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$","i"),hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},j={integer:function(e){return/^(-)?\d+$/.test(e)},float:function(e){return/^(-)?\d+(\.\d+)?$/.test(e)},array:function(e){return Array.isArray(e)},regexp:function(e){if(e instanceof RegExp)return!0;try{return!!new RegExp(e)}catch(t){return!1}},date:function(e){return"function"===typeof e.getTime&&"function"===typeof e.getMonth&&"function"===typeof e.getYear},number:function(e){return!isNaN(e)&&"number"===typeof+e},object:function(e){return"object"===(0,h.Z)(e)&&!j.array(e)},method:function(e){return"function"===typeof e},email:function(e){return"string"===typeof e&&!!e.match(A.email)&&e.length<255},url:function(e){return"string"===typeof e&&!!e.match(A.url)},hex:function(e){return"string"===typeof e&&!!e.match(A.hex)}};function C(e,t,r,n,i){if(e.required&&void 0===t)O(e,t,r,n,i);else{var a=["integer","float","array","regexp","object","method","email","number","date","url","hex"],o=e.type;a.indexOf(o)>-1?j[o](t)||n.push(b(i.messages.types[o],e.fullField,e.type)):o&&(0,h.Z)(t)!==e.type&&n.push(b(i.messages.types[o],e.fullField,e.type))}}function D(e,t,r,n,i){var a="number"===typeof e.len,o="number"===typeof e.min,s="number"===typeof e.max,u=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,l=t,f=null,d="number"===typeof t,c="string"===typeof t,p=Array.isArray(t);if(d?f="number":c?f="string":p&&(f="array"),!f)return!1;p&&(l=t.length),c&&(l=t.replace(u,"_").length),a?l!==e.len&&n.push(b(i.messages[f].len,e.fullField,e.len)):o&&!s&&le.max?n.push(b(i.messages[f].max,e.fullField,e.max)):o&&s&&(le.max)&&n.push(b(i.messages[f].range,e.fullField,e.min,e.max))}var k="enum";function I(e,t,r,n,i){e[k]=Array.isArray(e[k])?e[k]:[],-1===e[k].indexOf(t)&&n.push(b(i.messages[k],e.fullField,e[k].join(", ")))}function E(e,t,r,n,i){if(e.pattern)if(e.pattern instanceof RegExp)e.pattern.lastIndex=0,e.pattern.test(t)||n.push(b(i.messages.pattern.mismatch,e.fullField,t,e.pattern));else if("string"===typeof e.pattern){var a=new RegExp(e.pattern);a.test(t)||n.push(b(i.messages.pattern.mismatch,e.fullField,t,e.pattern))}}var M={required:O,whitespace:Z,type:C,range:D,enum:I,pattern:E};function T(e,t,r,n,i){var a=[],o=e.required||!e.required&&n.hasOwnProperty(e.field);if(o){if(x(t,"string")&&!e.required)return r();M.required(e,t,n,a,i,"string"),x(t,"string")||(M.type(e,t,n,a,i),M.range(e,t,n,a,i),M.pattern(e,t,n,a,i),!0===e.whitespace&&M.whitespace(e,t,n,a,i))}r(a)}function B(e,t,r,n,i){var a=[],o=e.required||!e.required&&n.hasOwnProperty(e.field);if(o){if(x(t)&&!e.required)return r();M.required(e,t,n,a,i),void 0!==t&&M.type(e,t,n,a,i)}r(a)}function W(e,t,r,n,i){var a=[],o=e.required||!e.required&&n.hasOwnProperty(e.field);if(o){if(""===t&&(t=void 0),x(t)&&!e.required)return r();M.required(e,t,n,a,i),void 0!==t&&(M.type(e,t,n,a,i),M.range(e,t,n,a,i))}r(a)}function R(e,t,r,n,i){var a=[],o=e.required||!e.required&&n.hasOwnProperty(e.field);if(o){if(x(t)&&!e.required)return r();M.required(e,t,n,a,i),void 0!==t&&M.type(e,t,n,a,i)}r(a)}function V(e,t,r,n,i){var a=[],o=e.required||!e.required&&n.hasOwnProperty(e.field);if(o){if(x(t)&&!e.required)return r();M.required(e,t,n,a,i),x(t)||M.type(e,t,n,a,i)}r(a)}function z(e,t,r,n,i){var a=[],o=e.required||!e.required&&n.hasOwnProperty(e.field);if(o){if(x(t)&&!e.required)return r();M.required(e,t,n,a,i),void 0!==t&&(M.type(e,t,n,a,i),M.range(e,t,n,a,i))}r(a)}function N(e,t,r,n,i){var a=[],o=e.required||!e.required&&n.hasOwnProperty(e.field);if(o){if(x(t)&&!e.required)return r();M.required(e,t,n,a,i),void 0!==t&&(M.type(e,t,n,a,i),M.range(e,t,n,a,i))}r(a)}function U(e,t,r,n,i){var a=[],o=e.required||!e.required&&n.hasOwnProperty(e.field);if(o){if(x(t,"array")&&!e.required)return r();M.required(e,t,n,a,i,"array"),x(t,"array")||(M.type(e,t,n,a,i),M.range(e,t,n,a,i))}r(a)}function L(e,t,r,n,i){var a=[],o=e.required||!e.required&&n.hasOwnProperty(e.field);if(o){if(x(t)&&!e.required)return r();M.required(e,t,n,a,i),void 0!==t&&M.type(e,t,n,a,i)}r(a)}var J="enum";function H(e,t,r,n,i){var a=[],o=e.required||!e.required&&n.hasOwnProperty(e.field);if(o){if(x(t)&&!e.required)return r();M.required(e,t,n,a,i),void 0!==t&&M[J](e,t,n,a,i)}r(a)}function Y(e,t,r,n,i){var a=[],o=e.required||!e.required&&n.hasOwnProperty(e.field);if(o){if(x(t,"string")&&!e.required)return r();M.required(e,t,n,a,i),x(t,"string")||M.pattern(e,t,n,a,i)}r(a)}function X(e,t,r,n,i){var a=[],o=e.required||!e.required&&n.hasOwnProperty(e.field);if(o){if(x(t)&&!e.required)return r();var s;if(M.required(e,t,n,a,i),!x(t))s="number"===typeof t?new Date(t):t,M.type(e,s,n,a,i),s&&M.range(e,s.getTime(),n,a,i)}r(a)}function G(e,t,r,n,i){var a=[],o=Array.isArray(t)?"array":(0,h.Z)(t);M.required(e,t,n,a,i,o),r(a)}function K(e,t,r,n,i){var a=e.type,o=[],s=e.required||!e.required&&n.hasOwnProperty(e.field);if(s){if(x(t,a)&&!e.required)return r();M.required(e,t,n,o,i,a),x(t,a)||M.type(e,t,n,o,i)}r(o)}function Q(e,t,r,n,i){var a=[],o=e.required||!e.required&&n.hasOwnProperty(e.field);if(o){if(x(t)&&!e.required)return r();M.required(e,t,n,a,i)}r(a)}var ee={string:T,method:B,number:W,boolean:R,regexp:V,integer:z,float:N,array:U,object:L,enum:H,pattern:Y,date:X,url:K,hex:K,email:K,required:G,any:Q};function te(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone:function(){var e=JSON.parse(JSON.stringify(this));return e.clone=this.clone,e}}}var re=te();function ne(e){this.rules=null,this._messages=re,this.define(e)}ne.prototype={messages:function(e){return e&&(this._messages=S(te(),e)),this._messages},define:function(e){if(!e)throw new Error("Cannot configure a schema with no rules");if("object"!==(0,h.Z)(e)||Array.isArray(e))throw new Error("Rules must be an object");var t,r;for(t in this.rules={},e)e.hasOwnProperty(t)&&(r=e[t],this.rules[t]=Array.isArray(r)?r:[r])},validate:function(e,t,r){var n=this;void 0===t&&(t={}),void 0===r&&(r=function(){});var i,a,o=e,s=t,u=r;if("function"===typeof s&&(u=s,s={}),!this.rules||0===Object.keys(this.rules).length)return u&&u(),Promise.resolve();function l(e){var t,r=[],n={};function i(e){var t;Array.isArray(e)?r=(t=r).concat.apply(t,e):r.push(e)}for(t=0;t2&&void 0!==r[2]?r[2]:null,n.$nextTick((function(){var r=[];e=[].concat(e),n.children.map((function(t){var i=[];if(e.includes(t.prop)){var o=uni.$u.getProperty(n.model,t.prop),s=t.prop.split("."),u=s[s.length-1],l=n.formRules[t.prop];if(!l)return;for(var c=[].concat(l),p=0;p