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

2 lines
2.8 KiB
JavaScript
Raw Normal View History

2022-07-06 04:15:11 +00:00
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("react-dom"),n=require("primereact/api"),r=require("primereact/utils");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=o(t),i=o(n);function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function a(e,t){return a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},a(e,t)}function f(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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&a(e,t)}function p(e){return p="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},p(e)}function s(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function y(e,t){if(t&&("object"===p(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return s(e)}function d(e){return d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},d(e)}function b(){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,h,v,O=function(t){f(h,e.Component);var n,o,a,p,s,m=(n=h,o=b(),function(){var e,t=d(n);if(o){var r=d(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return y(this,e)});function h(e){var t;c(this,h),t=m.call(this,e);var n=e.visible&&r.DomHandler.hasDOM();return t.state={mounted:n},t}return a=h,(p=[{key:"componentDidMount",value:function(){r.DomHandler.hasDOM()&&!this.state.mounted&&this.setState({mounted:!0},this.props.onMounted)}},{key:"componentWillUnmount",value:function(){this.props.onUnmounted&&this.props.onUnmounted()}},{key:"render",value:function(){var e=this.props.element||this.props.children;if(e&&this.state.mounted){var t=this.props.appendTo||i.default.appendTo||document.body;return"self"===t?e:u.default.createPortal(e,t)}return null}}])&&l(a.prototype,p),s&&l(a,s),Object.defineProperty(a,"prototype",{writable:!1}),h}();v={element:null,appendTo:null,visible:!1,onMounted:null,onUnmounted:null},(h="defaultProps")in(m=O)?Object.defineProperty(m,h,{value:v,enumerable:!0,configurable:!0,writable:!0}):m[h]=v,exports.Portal=O;