{"version":3,"sources":["jsdelivr-header.js","/npm/redux-in-react@0.1.0/src/index.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,OCNO,OAAS,cAAiB,uBAElB,MAAM,iBAAiB,UAClC,yBAA2B,CACvB,SAAU,MAAM,UAAU,KAC1B,SAAU,MAAM,UAAU,MAG9B,eAAA,GACI,MAAO,CACH,SAAU,KAAK,SAAS,KAAK,MAC7B,SAAU,KAAK,SAAS,KAAK,MAErC,CAEA,QAAA,CAAS,GAYL,OAXA,KAAK,mBAAqB,KAAK,MAAM,QAAU,KAAK,QAAQ,KAAK,mBAAqB,KAAK,MAAO,GAE/F,KAAK,oBAAsB,KAAK,OAC/B,UAAU,UAAU,SAAS,KACzB,KACA,KAAK,kBAEJ,KAAK,uBAA0D,EAAtC,IAAM,KAAK,kBAAoB,MAI1D,CACX,CAEA,QAAA,GACI,MAAM,IAAI,MAAM,kGACpB,CAEA,QAAA,GACI,OAAO,KAAK,mBAAqB,KAAK,KAC1C,CAEA,MAAA,CAAO,EAAO,GACV,OAAO,CACX,SAGG,MAAM,kBAAkB,UAC3B,oBAAsB,CAClB,SAAU,MAAM,UAAU,KAC1B,SAAU,MAAM,UAAU,MAG9B,QAAA,CAAS,GACL,OAAO,KAAK,QAAQ,SAAS,EACjC,CAEA,QAAA,GACI,OAAO,KAAK,QAAQ,UACxB","file":"/npm/redux-in-react@0.1.0/src/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/redux-in-react@0.1.0/src/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","import React, { Component } from \"react\";\n\nexport default class Provider extends Component {\n    static childContextTypes = {\n        dispatch: React.PropTypes.func,\n        getState: React.PropTypes.func\n    };\n\n    getChildContext() {\n        return {\n            dispatch: this.dispatch.bind(this),\n            getState: this.getState.bind(this)\n        }\n    }\n\n    dispatch(action) {\n        this.intermediateState = (this.props.reduce || this.reduce)(this.intermediateState || this.state, action);\n\n        if(this.intermediateState !== this.state) {\n            Component.prototype.setState.call(\n                this,\n                this.intermediateState,\n                // Only schedule one callback to remove the intermediate state\n                !this.intermediateState ? () => this.intermediateState = null : undefined\n            );\n        }\n\n        return action;\n    }\n\n    setState() {\n        throw new Error(\"You cannot set state directly, you must dispatch an action and mutate the state in the reducer.\");\n    }\n\n    getState() {\n        return this.intermediateState || this.state;\n    }\n\n    reduce(state, action) {\n        return state;\n    }\n}\n\nexport class Connector extends Component {\n    static contextTypes = {\n        dispatch: React.PropTypes.func,\n        getState: React.PropTypes.func\n    };\n\n    dispatch(action) {\n        return this.context.dispatch(action);\n    }\n\n    getState() {\n        return this.context.getState();\n    }\n}"]}