{"code":"import * as tslib_1 from \"tslib\";\r\nimport * as React from 'react';\r\nimport handleChildrenTransitions from './children';\r\nvar Transition = (function (_super) {\r\n    tslib_1.__extends(Transition, _super);\r\n    function Transition() {\r\n        var _this = _super !== null && _super.apply(this, arguments) || this;\r\n        _this.state = {\r\n            displayedChildren: [],\r\n            finishedLeaving: {},\r\n            hasInitialized: false,\r\n            indexedChildren: {},\r\n            scheduleChildRemoval: function (key) { return _this.removeChild(key); }\r\n        };\r\n        return _this;\r\n    }\r\n    Transition.prototype.removeChild = function (key) {\r\n        var _a = this.state, displayedChildren = _a.displayedChildren, finishedLeaving = _a.finishedLeaving;\r\n        var _b = this.props, enterAfterExit = _b.enterAfterExit, onRest = _b.onRest;\r\n        if (!finishedLeaving.hasOwnProperty(key))\r\n            return;\r\n        finishedLeaving[key] = true;\r\n        if (!Object.keys(finishedLeaving).every(function (leavingKey) { return finishedLeaving[leavingKey]; })) {\r\n            return;\r\n        }\r\n        var targetChildren = displayedChildren.filter(function (child) { return !finishedLeaving.hasOwnProperty(child.key); });\r\n        var newState = enterAfterExit\r\n            ? tslib_1.__assign({ finishedLeaving: {} }, handleChildrenTransitions(tslib_1.__assign({}, this.props, { enterAfterExit: false }), tslib_1.__assign({}, this.state, { displayedChildren: targetChildren }))) : {\r\n            finishedLeaving: {},\r\n            displayedChildren: targetChildren\r\n        };\r\n        this.setState(newState, onRest);\r\n    };\r\n    Transition.prototype.shouldComponentUpdate = function (nextProps, nextState) {\r\n        return this.state !== nextState;\r\n    };\r\n    Transition.prototype.render = function () {\r\n        return this.state.displayedChildren;\r\n    };\r\n    Transition.defaultProps = {\r\n        flipMove: false,\r\n        enterAfterExit: false,\r\n        preEnterPose: 'exit',\r\n        enterPose: 'enter',\r\n        exitPose: 'exit'\r\n    };\r\n    Transition.getDerivedStateFromProps = handleChildrenTransitions;\r\n    return Transition;\r\n}(React.Component));\r\nexport default Transition;\r\n//# sourceMappingURL=index.js.map","map":"{\"version\":3,\"file\":\"index.js\",\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