var e=require("@hookform/resolvers"),r=require("react-hook-form");function t(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=Array(r);t<r;t++)n[t]=e[t];return n}exports.typeschemaResolver=function(n,a,o){return void 0===o&&(o={}),function(a,i,s){try{var u=function(){if(l.issues){var n=function(e,n){for(var a,o=Object.assign([],e),i=Object.create(null),s=function(e){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=function(e,r){if(e){if("string"==typeof e)return t(e,r);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?t(e,r):void 0}}(e))){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(o);!(a=s()).done;){var u=a.value;if(u.path){var l=u.path.join(".");if(i[l]||(i[l]={message:u.message,type:""}),n){var c=i[l].types,v=c&&c[""];i[l]=r.appendErrors(l,n,i,"",v?[].concat(v,u.message):u.message)}}}return i}(l.issues,!s.shouldUseNativeValidation&&"all"===s.criteriaMode);return{values:{},errors:e.toNestErrors(n,s)}}return s.shouldUseNativeValidation&&e.validateFieldsNatively({},s),{values:o.raw?Object.assign({},a):l.value,errors:{}}},l=n["~standard"].validate(a),c=function(){if(l instanceof Promise)return Promise.resolve(l).then(function(e){l=e})}();return Promise.resolve(c&&c.then?c.then(u):u())}catch(e){return Promise.reject(e)}}};
//# sourceMappingURL=typeschema.js.map
