katoikia-app/web-ui/web-react/node_modules/primereact/avatar/avatar.min.js

2 lines
3.3 KiB
JavaScript
Raw Normal View History

2022-07-06 04:15:11 +00:00
this.primereact=this.primereact||{},this.primereact.avatar=function(t,e,r){"use strict";function n(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var o=n(e);function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function l(t,e){return l=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},l(t,e)}function p(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&l(t,e)}function s(t){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s(t)}function c(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function u(t,e){if(e&&("object"===s(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return c(t)}function f(t){return f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},f(t)}function y(){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(t){return!1}}var h,m,b,v=function(t){p(m,t);var e,n,l,s,c,h=(e=m,n=y(),function(){var t,r=f(e);if(n){var o=f(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return u(this,t)});function m(){return a(this,m),h.apply(this,arguments)}return l=m,(s=[{key:"renderContent",value:function(){var t=this;return this.props.label?o.default.createElement("span",{className:"p-avatar-text"},this.props.label):this.props.icon?r.IconUtils.getJSXIcon(this.props.icon,{className:"p-avatar-icon"},{props:this.props}):this.props.image?o.default.createElement("img",{src:this.props.image,alt:this.props.imageAlt,onError:function(e){t.props.onImageError&&t.props.onImageError(e)}}):null}},{key:"render",value:function(){var t=r.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),e=this.props.template?r.ObjectUtils.getJSXElement(this.props.template,this.props):this.renderContent();return o.default.createElement("div",{className:t,style:this.props.style,onClick:this.props.onClick},e,this.props.children)}}])&&i(l.prototype,s),c&&i(l,c),Object.defineProperty(l,"prototype",{writable:!1}),m}(e.Component);return b={label:null,icon:null,image:null,size:"normal",shape:"square",style:null,className:null,template:null,imageAlt:"avatar",onImageError:null,onClick:null},(m="defaultProps")in(h=v)?Object.defineProperty(h,m,{value:b,enumerable:!0,configurable:!0,writable:!0}):h[m]=b,t.Avatar=v,Object.defineProperty(t,"__esModule",{value:!0}),t}({},React,primereact.utils);