-
Notifications
You must be signed in to change notification settings - Fork 4
/
react-redux-6.0-test.min.js
1 lines (1 loc) · 10.2 KB
/
react-redux-6.0-test.min.js
1
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("lodash-es/isPlainObject"),require("redux")):"function"==typeof define&&define.amd?define(["exports","react","lodash-es/isPlainObject","redux"],t):t(e.ReactRedux={},e.React,null,e.Redux)}(this,function(e,t,r,n){"use strict";var o="default"in t?t.default:t;function i(e){return function(){return e}}r=r&&r.hasOwnProperty("default")?r.default:r;var a=function(){};a.thatReturns=i,a.thatReturnsFalse=i(!1),a.thatReturnsTrue=i(!0),a.thatReturnsNull=i(null),a.thatReturnsThis=function(){return this},a.thatReturnsArgument=function(e){return e};var s=a,p=function(e){};var u,c=function(e,t,r,n,o,i,a,s){if(p(t),!e){var u;if(void 0===t)u=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[r,n,o,i,a,s],d=0;(u=Error(t.replace(/%s/g,function(){return c[d++]}))).name="Invariant Violation"}throw u.framesToPop=1,u}},d="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",f=(function(e){e.exports=function(){function e(e,t,r,n,o,i){i!==d&&c(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function t(){return e}e.isRequired=e;var r={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return r.checkPropTypes=s,r.PropTypes=r,r}()}(u={exports:{}},u.exports),u.exports),l=f.shape({subscribe:f.func.isRequired,dispatch:f.func.isRequired,getState:f.func.isRequired}),h=o.createContext(null),v=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},y=Object.assign||function(e){for(var t=1;arguments.length>t;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},m=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)},P=function(e,t){var r={};for(var n in e)0>t.indexOf(n)&&Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r},O=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t};function g(){var e=function(e){function r(t,n){v(this,r);var o=O(this,e.call(this,t,n)),i=t.store;return o.state={storeState:i.getState(),dispatch:i.dispatch},o}return m(r,e),r.prototype.componentDidMount=function(){var e=this,t=this.props.store;this.unsubscribe=t.subscribe(function(){e.setState({storeState:t.getState()})})},r.prototype.render=function(){return o.createElement(h.Provider,{value:this.state},t.Children.only(this.props.children))},r}(t.Component);return e.propTypes={store:l.isRequired,children:f.element.isRequired},e}var b=g(),w={childContextTypes:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},C={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},S=Object.defineProperty,E=Object.getOwnPropertyNames,T=Object.getOwnPropertySymbols,R=Object.getOwnPropertyDescriptor,j=Object.getPrototypeOf,q=j&&j(Object);var x=function e(t,r,n){if("string"!=typeof r){if(q){var o=j(r);o&&o!==q&&e(t,o,n)}var i=E(r);T&&(i=i.concat(T(r)));for(var a=0;i.length>a;++a){var s=i[a];if(!(w[s]||C[s]||n&&n[s])){var p=R(r,s);try{S(t,s,p)}catch(e){}}}return t}return t},N=function(e,t,r,n,o,i,a,s){if(!e){var p;if(void 0===t)p=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[r,n,o,i,a,s],c=0;(p=Error(t.replace(/%s/g,function(){return u[c++]}))).name="Invariant Violation"}throw p.framesToPop=1,p}},M=0;function D(){}function _(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.getDisplayName,i=void 0===n?function(e){return"ConnectAdvanced("+e+")"}:n,a=r.methodName,s=void 0===a?"connectAdvanced":a,p=r.renderCountProp,u=void 0===p?void 0:p,c=r.shouldHandleStateChanges,d=void 0===c||c,f=r.storeKey,l=void 0===f?"store":f,g=r.withRef,b=void 0!==g&&g,w=P(r,["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef"]),C=M++;return function(r){N("function"==typeof r,"You must pass a component to the function returned by "+s+". Instead received "+JSON.stringify(r));var n=r.displayName||r.name||"Component",a=i(n),p=y({},w,{getDisplayName:i,methodName:s,renderCountProp:u,shouldHandleStateChanges:d,storeKey:l,withRef:b,displayName:a,wrappedComponentName:n,WrappedComponent:r}),c=function(n){function i(e){v(this,i);var t=O(this,n.call(this,e));return t.version=C,t.renderCount=0,t.storeState=null,t.setWrappedInstance=t.setWrappedInstance.bind(t),t.renderChild=t.renderChild.bind(t),t}return m(i,n),i.prototype.componentDidMount=function(){d&&(this.selector.run(this.props,this.storeState),this.selector.shouldComponentUpdate&&this.forceUpdate())},i.prototype.UNSAFE_componentWillReceiveProps=function(e){this.selector.run(e,this.storeState)},i.prototype.shouldComponentUpdate=function(){return this.selector.shouldComponentUpdate},i.prototype.componentWillUnmount=function(){this.selector.run=D,this.selector.shouldComponentUpdate=!1},i.prototype.getWrappedInstance=function(){return N(b,"To access the wrapped instance, you need to specify { withRef: true } in the options argument of the "+s+"() call."),this.wrappedInstance},i.prototype.setWrappedInstance=function(e){this.wrappedInstance=e},i.prototype.initSelector=function(t,r){var n=e(t,p);this.selector=function(e){var t={run:function(r,n){try{var o=e(n,r);(o!==t.props||t.error)&&(t.shouldComponentUpdate=!0,t.props=o,t.error=null)}catch(e){t.shouldComponentUpdate=!0,t.error=e}}};return t}(n),this.selector.run(this.props,r)},i.prototype.addExtraProps=function(e){if(!b&&!u)return e;var t=y({},e);return b&&(t.ref=this.setWrappedInstance),u&&(t[u]=this.renderCount++),t},i.prototype.renderChild=function(e){var n=e.storeState,o=e.dispatch;if(this.storeState=n,this.selector?this.selector.run(this.props,n):this.initSelector(o,n),this.selector.error)throw this.selector.error;return this.selector.shouldComponentUpdate&&(this.selector.shouldComponentUpdate=!1,this.renderedElement=t.createElement(r,this.addExtraProps(this.selector.props))),this.renderedElement},i.prototype.render=function(){return o.createElement(h.Consumer,null,this.renderChild)},i}(t.Component);return c.WrappedComponent=r,c.displayName=a,x(c,r)}}var I=Object.prototype.hasOwnProperty;function U(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function W(e,t){if(U(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var r=Object.keys(e);if(r.length!==Object.keys(t).length)return!1;for(var n=0;r.length>n;n++)if(!I.call(t,r[n])||!U(e[r[n]],t[r[n]]))return!1;return!0}function F(e){return function(t,r){var n=e(t,r);function o(){return n}return o.dependsOnOwnProps=!1,o}}function A(e){return null!==e.dependsOnOwnProps&&void 0!==e.dependsOnOwnProps?!!e.dependsOnOwnProps:1!==e.length}function k(e,t){return function(t,r){var n=function(e,t){return n.dependsOnOwnProps?n.mapToProps(e,t):n.mapToProps(e)};return n.dependsOnOwnProps=!0,n.mapToProps=function(t,r){n.mapToProps=e,n.dependsOnOwnProps=A(e);var o=n(t,r);return"function"==typeof o&&(n.mapToProps=o,n.dependsOnOwnProps=A(o),o=n(t,r)),o},n}}var H=[function(e){return"function"==typeof e?k(e):void 0},function(e){return e?void 0:F(function(e){return{dispatch:e}})},function(e){return e&&"object"==typeof e?F(function(t){return n.bindActionCreators(e,t)}):void 0}];var K=[function(e){return"function"==typeof e?k(e):void 0},function(e){return e?void 0:F(function(){return{}})}];function L(e,t,r){return y({},r,e,t)}var V=[function(e){return"function"==typeof e?function(e){return function(t,r){var n=r.pure,o=r.areMergedPropsEqual,i=!1,a=void 0;return function(t,r,s){var p=e(t,r,s);return i?n&&o(p,a)||(a=p):(i=!0,a=p),a}}}(e):void 0},function(e){return e?void 0:function(){return L}}];function Y(e,t,r,n){return function(o,i){return r(e(o,i),t(n,i),i)}}function B(e,t,r,n,o){var i=o.areStatesEqual,a=o.areOwnPropsEqual,s=o.areStatePropsEqual,p=!1,u=void 0,c=void 0,d=void 0,f=void 0,l=void 0;function h(o,p){var h,v,y=!a(p,c),m=!i(o,u);return u=o,c=p,y&&m?(d=e(u,c),t.dependsOnOwnProps&&(f=t(n,c)),l=r(d,f,c)):y?(e.dependsOnOwnProps&&(d=e(u,c)),t.dependsOnOwnProps&&(f=t(n,c)),l=r(d,f,c)):m?(h=e(u,c),v=!s(h,d),d=h,v&&(l=r(d,f,c)),l):l}return function(o,i){return p?h(o,i):(d=e(u=o,c=i),f=t(n,c),l=r(d,f,c),p=!0,l)}}function J(e,t){var r=t.initMapStateToProps,n=t.initMapDispatchToProps,o=t.initMergeProps,i=P(t,["initMapStateToProps","initMapDispatchToProps","initMergeProps"]),a=r(e,i),s=n(e,i),p=o(e,i);return(i.pure?B:Y)(a,s,p,e,i)}function z(e,t,r){for(var n=t.length-1;n>=0;n--){var o=t[n](e);if(o)return o}return function(t,n){throw Error("Invalid value of type "+typeof e+" for "+r+" argument when connecting component "+n.wrappedComponentName+".")}}function G(e,t){return e===t}var Q=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.connectHOC,r=void 0===t?_:t,n=e.mapStateToPropsFactories,o=void 0===n?K:n,i=e.mapDispatchToPropsFactories,a=void 0===i?H:i,s=e.mergePropsFactories,p=void 0===s?V:s,u=e.selectorFactory,c=void 0===u?J:u;return function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},s=i.pure,u=void 0===s||s,d=i.areStatesEqual,f=void 0===d?G:d,l=i.areOwnPropsEqual,h=void 0===l?W:l,v=i.areStatePropsEqual,m=void 0===v?W:v,O=i.areMergedPropsEqual,g=void 0===O?W:O,b=P(i,["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"]),w=z(e,o,"mapStateToProps"),C=z(t,a,"mapDispatchToProps"),S=z(n,p,"mergeProps");return r(c,y({methodName:"connect",getDisplayName:function(e){return"Connect("+e+")"},shouldHandleStateChanges:!!e,initMapStateToProps:w,initMapDispatchToProps:C,initMergeProps:S,pure:u,areStatesEqual:f,areOwnPropsEqual:h,areStatePropsEqual:m,areMergedPropsEqual:g},b))}}();e.Provider=b,e.createProvider=g,e.connectAdvanced=_,e.connect=Q,Object.defineProperty(e,"__esModule",{value:!0})});