text: "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("primereact/core");function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=r(e);function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function p(e,t){return!t||"object"!==s(t)&&"function"!=typeof t?c(e):t}function u(e){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function f(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}var m,y,h,b=function(r){i(b,e.Component);var l,s,c,m,y,h=(l=b,s=f(),function(){var e,t=u(l);if(s){var r=u(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return p(this,e)});function b(){return o(this,b),h.apply(this,arguments)}return c=b,(m=[{key:"renderContent",value:function(){var e=this;if(this.props.label)return n.default.createElement("span",{className:"p-avatar-text"},this.props.label);if(this.props.icon){var r=t.classNames("p-avatar-icon",this.props.icon);return n.default.createElement("span",{className:r})}return this.props.image?n.default.createElement("img",{src:this.props.image,alt:this.props.imageAlt,onError:function(t){e.props.onImageError&&e.props.onImageError(t)}}):null}},{key:"render",value:function(){var e=t.classNames("p-avatar p-component",{"p-avatar-image":null!=this.props.image,"p-avatar-circle":"circle"===this.props.shape,"p-avatar-lg":"large"===this.props.size,"p-avatar-xl":"xlarge"===this.props.size,"p-avatar-clickable":!!this.props.onClick},this.props.className),r=this.props.template?t.ObjectUtils.getJSXElement(this.props.template,this.props):this.renderContent();return n.default.createElement("div",{className:e,style:this.props.style,onClick:this.props.onClick},r,this.props.children)}}])&&a(c.prototype,m),y&&a(c,y),b}();h={label:null,icon:null,image:null,size:"normal",shape:"square",style:null,className:null,template:null,imageAlt:"avatar",onImageError:null,onClick:null},(y="defaultProps")in(m=b)?Object.defineProperty(m,y,{value:h,enumerable:!0,configurable:!0,writable:!0}):m[y]=h,exports.Avatar=b;
  