!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports,require("@hookform/resolvers"),require("@vinejs/vine"),require("react-hook-form")):"function"==typeof define&&define.amd?define(["exports","@hookform/resolvers","@vinejs/vine","react-hook-form"],r):r((e||self).hookformResolversVine={},e.hookformResolvers,e.vine,e.ReactHookForm)}(this,function(e,r,o,t){function n(e,r){for(var o=Object.create(null);e.length;){var n=e[0],s=n.field;if(s in o||(o[s]={message:n.message,type:n.rule}),r){var i=o[s].types,a=i&&i[n.rule];o[s]=t.appendErrors(s,r,o,n.rule,a?[].concat(a,[n.message]):n.message)}e.shift()}return o}e.vineResolver=function(e,t,s){return void 0===s&&(s={}),function(i,a,l){try{return Promise.resolve(function(o,n){try{var a=Promise.resolve(e.validate(i,t)).then(function(e){return l.shouldUseNativeValidation&&r.validateFieldsNatively({},l),{errors:{},values:s.raw?Object.assign({},i):e}})}catch(e){return n(e)}return a&&a.then?a.then(void 0,n):a}(0,function(e){if(e instanceof o.errors.E_VALIDATION_ERROR)return{values:{},errors:r.toNestErrors(n(e.messages,!l.shouldUseNativeValidation&&"all"===l.criteriaMode),l)};throw e}))}catch(e){return Promise.reject(e)}}}});
//# sourceMappingURL=vine.umd.js.map
