!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("preact"),require("redux")):"function"==typeof define&&define.amd?define(["preact","redux"],e):t.preactRedux=e(t.preact,t.Redux)}(this,function(t,e){function n(){}function r(){var t=[],e=[];return{clear:function(){e=D,t=D},notify:function(){for(var n=t=e,r=0;r=0;r--){var o=e[r](t);if(o)return o}return function(e,r){throw Error("Invalid value of type "+(void 0===t?"undefined":q(t))+" for "+n+" argument when connecting component "+r.wrappedComponentName+".")}}function g(t,e){return t===e}function C(){var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],e=t.connectHOC,n=void 0===e?o:e,r=t.mapStateToPropsFactories,s=void 0===r?B:r,u=t.mapDispatchToPropsFactories,p=void 0===u?z:u,a=t.mergePropsFactories,c=void 0===a?G:a,d=t.selectorFactory,f=void 0===d?S:d;return function(t,e,r){var o=arguments.length<=3||void 0===arguments[3]?{}:arguments[3],u=o.pure,a=void 0===u||u,d=o.areStatesEqual,l=void 0===d?g:d,h=o.areOwnPropsEqual,y=void 0===h?i:h,b=o.areStatePropsEqual,v=void 0===b?i:b,m=o.areMergedPropsEqual,P=void 0===m?i:m,S=x(o,["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"]),C=O(t,s,"mapStateToProps"),w=O(e,p,"mapDispatchToProps"),T=O(r,c,"mergeProps");return n(f,E({methodName:"connect",getDisplayName:function(t){return"Connect("+t+")"},shouldHandleStateChanges:!!t,initMapStateToProps:C,initMapDispatchToProps:w,initMergeProps:T,pure:a,areStatesEqual:l,areOwnPropsEqual:y,areStatePropsEqual:v,areMergedPropsEqual:P},S))}}var w={only:function(t){return t&&t[0]||null}};n.isRequired=n;var T={element:n,func:n,shape:function(){return n},instanceOf:function(){return n}},q="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},E=Object.assign||function(t){for(var e=1;e=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n},j=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e},D=null,M={notify:function(){}},U=function(){function t(t,e){this.store=t,this.parentSub=e,this.unsubscribe=null,this.listeners=M}return t.prototype.addNestedSub=function(t){return this.trySubscribe(),this.listeners.subscribe(t)},t.prototype.notifyNestedSubs=function(){this.listeners.notify()},t.prototype.isSubscribed=function(){return!!this.unsubscribe},t.prototype.trySubscribe=function(){this.unsubscribe||(this.unsubscribe=this.parentSub?this.parentSub.addNestedSub(this.onStateChange):this.store.subscribe(this.onStateChange),this.listeners=r())},t.prototype.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null,this.listeners.clear(),this.listeners=M)},t}(),R=T.shape({subscribe:T.func.isRequired,dispatch:T.func.isRequired,getState:T.func.isRequired}),W=function(t){function e(e,n){var r=j(this,t.call(this,e,n));return r.store=e.store,r}return N(e,t),e.prototype.getChildContext=function(){return{store:this.store,storeSubscription:null}},e.prototype.render=function(){return w.only(this.props.children)},e}(t.Component);W.childContextTypes={store:R.isRequired,storeSubscription:T.instanceOf(U)},W.displayName="Provider";var I={childContextTypes:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,mixins:!0,propTypes:!0,type:!0},F={name:!0,length:!0,prototype:!0,caller:!0,arguments:!0,arity:!0},H="function"==typeof Object.getOwnPropertySymbols,A=function(t,e,n){if("string"!=typeof e){var r=Object.getOwnPropertyNames(e);H&&(r=r.concat(Object.getOwnPropertySymbols(e)));for(var o=0;o