/
inferno-create-class.min.js
1 lines (1 loc) · 1.78 KB
/
inferno-create-class.min.js
1
!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("inferno-component")):"function"==typeof define&&define.amd?define(["inferno-component"],t):(n.Inferno=n.Inferno||{},n.Inferno.createClass=t(n.Inferno.Component))}(this,function(n){"use strict";function t(n){return i(n)||e(n)}function o(n){return"function"==typeof n}function e(n){return null===n}function i(n){return void 0===n}function r(n,o,e){for(var i in o)e!==!0&&t(o[i])||(n[i]=o[i]);return n}function u(n){for(var t in n){var o=n[t];"function"!=typeof o||o.__bound||s[t]||((n[t]=o.bind(n)).__bound=!0)}}function f(n,t){void 0===t&&(t={});for(var o=0;o<n.length;o++){var e=n[o];e.mixins&&f(e.mixins,t);for(var i in e)e.hasOwnProperty(i)&&"function"==typeof e[i]&&(t[i]||(t[i]=[])).push(e[i])}return t}function p(n,t,o){var e=t[n];t[n]=function(){for(var n,r=arguments,u=0;u<o.length;u++){var f=o[u],p=f.apply(t,r);i(p)||(n=p)}if(e){var c=e.call(t);i(c)||(n=c)}return n}}function c(n,t){for(var e in t)if(t.hasOwnProperty(e)){var i=t[e];o(i[0])?p(e,n,i):n[e]=i}}function a(t){var o=function(n){function o(e,i){n.call(this,e,i),this.isMounted=function(){return!this._unmounted},r(this,t),o.mixins&&c(this,o.mixins),u(this),t.getInitialState&&(this.state=t.getInitialState.call(this))}return n&&(o.__proto__=n),o.prototype=Object.create(n&&n.prototype),o.prototype.constructor=o,o}(n);return o.displayName=t.displayName||"Component",o.propTypes=t.propTypes,o.defaultProps=t.getDefaultProps?t.getDefaultProps():void 0,o.mixins=t.mixins&&f(t.mixins),t.statics&&r(o,t.statics),o}n="default"in n?n.default:n;var s={constructor:1,render:1,shouldComponentUpdate:1,componentWillReceiveProps:1,componentWillUpdate:1,componentDidUpdate:1,componentWillMount:1,componentDidMount:1,componentWillUnmount:1,componentDidUnmount:1};return a});