!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports,require("@hookform/resolvers"),require("ata-validator"),require("react-hook-form")):"function"==typeof define&&define.amd?define(["exports","@hookform/resolvers","ata-validator","react-hook-form"],r):r((e||self).hookformResolversAtaValidator={},e.hookformResolvers,e.ataValidator,e.ReactHookForm)}(this,function(e,r,o,a){var t=function(e,r){for(var o={},t=0;t<e.length;t+=1){var s=e[t],i=("required"===s.keyword?s.instancePath+"/"+s.params.missingProperty:s.instancePath).substring(1).replace(/\//g,".");if(o[i]||(o[i]={message:s.message,type:s.keyword}),r){var n=o[i].types,l=n&&n[s.keyword];o[i]=a.appendErrors(i,r,o,s.keyword,l?[].concat(l,s.message||""):s.message)}}return o};e.ataResolver=function(e,a,s){void 0===s&&(s={});var i=new o.Validator(e,a);return function(e,o,a){try{var n=i.validate(e);return a.shouldUseNativeValidation&&r.validateFieldsNatively({},a),Promise.resolve(n.valid?{values:s.raw?Object.assign({},e):e,errors:{}}:{values:{},errors:r.toNestErrors(t(n.errors,!a.shouldUseNativeValidation&&"all"===a.criteriaMode),a)})}catch(e){return Promise.reject(e)}}}});
//# sourceMappingURL=ata-validator.umd.js.map
