text: !function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports,require("react"),require("react-hook-form")):"function"==typeof define&&define.amd?define(["exports","react","react-hook-form"],r):r((e||self).errorMessage={},e.react,e.reactHookForm)}(this,function(e,r,t){function n(e){if(e&&e.__esModule)return e;var r=Object.create(null);return e&&Object.keys(e).forEach(function(t){if("default"!==t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})}}),r.default=e,r}var o=n(r);e.ErrorMessage=function(e){var r=e.as,n=e.errors,a=e.name,s=e.message,f=e.render,i=function(e,r){if(null==e)return{};var t,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r.indexOf(t=a[n])>=0||(o[t]=e[t]);return o}(e,["as","errors","name","message","render"]),u=t.useFormContext(),c=t.get(n||u.formState.errors,a);if(!c)return null;var l=c.message,m=c.types,d=Object.assign({},i,{children:l||s});return o.isValidElement(r)?o.cloneElement(r,d):f?f({message:l||s,messages:m}):o.createElement(r||o.Fragment,d)}});
  //# sourceMappingURL=index.umd.js.map
  