From 90ee2890fe3e0f1fcbdb5e00d1084f9991ff8351 Mon Sep 17 00:00:00 2001 From: Fadi Khadra Date: Wed, 6 Jun 2018 22:46:05 +0200 Subject: [PATCH 1/5] WIP fix issue #192 --- src/components/Toast.js | 54 ++++++++++++++++++++++++++--------------- 1 file changed, 35 insertions(+), 19 deletions(-) diff --git a/src/components/Toast.js b/src/components/Toast.js index 62306a5a..879641ba 100644 --- a/src/components/Toast.js +++ b/src/components/Toast.js @@ -22,7 +22,7 @@ function getY(e) { : e.clientY; } -const noop = () => {}; +const noop = () => { }; class Toast extends Component { static propTypes = { @@ -88,33 +88,48 @@ class Toast extends Component { componentDidMount() { this.props.onOpen(this.props.children.props); - if (this.props.draggable) { - document.addEventListener('mousemove', this.onDragMove); - document.addEventListener('mouseup', this.onDragEnd); - - document.addEventListener('touchmove', this.onDragMove); - document.addEventListener('touchend', this.onDragEnd); + this.bindDragEvents(); } } - componentWillUnmount() { - this.props.onClose(this.props.children.props); + bindDragEvents() { + document.addEventListener('mousemove', this.onDragMove); + document.addEventListener('mouseup', this.onDragEnd); - if (this.props.draggable) { - document.removeEventListener('mousemove', this.onDragMove); - document.removeEventListener('mouseup', this.onDragEnd); + document.addEventListener('touchmove', this.onDragMove); + document.addEventListener('touchend', this.onDragEnd); + } - document.removeEventListener('touchmove', this.onDragMove); - document.removeEventListener('touchend', this.onDragEnd); - } + unbindDragEvents() { + document.removeEventListener('mousemove', this.onDragMove); + document.removeEventListener('mouseup', this.onDragEnd); + + document.removeEventListener('touchmove', this.onDragMove); + document.removeEventListener('touchend', this.onDragEnd); } - componentWillReceiveProps(nextProps) { - if (this.props.isDocumentHidden !== nextProps.isDocumentHidden) { + componentDidUpdate(prevProps) { + if (prevProps.draggable !== this.props.draggable) { + this.props.draggable ? this.bindDragEvents() : this.unbindDragEvents(); + } + + if (this.props.isDocumentHidden !== prevProps.isDocumentHidden) { this.setState({ - isRunning: !nextProps.isDocumentHidden - }); + isRunning: this.props.isDocumentHidden ? false : true + }, () => { + console.log('State Change:', this.state.isRunning) + }); + } + // this.setState({ + // isRunning: !nextProps.isDocumentHidden + // }); + } + + componentWillUnmount() { + this.props.onClose(this.props.children.props); + if (this.props.draggable) { + this.unbindDragEvents(); } } @@ -267,6 +282,7 @@ class Toast extends Component { hide={hideProgressBar} type={type} className={progressClassName} + ref={r => console.log(r)} /> )} From 3b0d9b103b05bb1fdd98129aa8e751d14dbc28cd Mon Sep 17 00:00:00 2001 From: Fadi Khadra Date: Thu, 7 Jun 2018 13:13:38 +0200 Subject: [PATCH 2/5] Fix drag on update and disable `pauseOnVisibilityChange` --- index.d.ts | 1 + src/components/Toast.js | 14 +------------- src/components/ToastContainer.js | 17 +++++++++-------- 3 files changed, 11 insertions(+), 21 deletions(-) diff --git a/index.d.ts b/index.d.ts index 6be60278..78d22fb8 100644 --- a/index.d.ts +++ b/index.d.ts @@ -151,6 +151,7 @@ interface ToastContainerProps extends CommonOptions { rtl?: boolean; /** + * ⚠️ NOT WORKING ATM, has been disabled until I fix it ⚠️ * Pause toast's timer on document visibility change * `Default: true` */ diff --git a/src/components/Toast.js b/src/components/Toast.js index 879641ba..a0a58015 100644 --- a/src/components/Toast.js +++ b/src/components/Toast.js @@ -113,17 +113,6 @@ class Toast extends Component { if (prevProps.draggable !== this.props.draggable) { this.props.draggable ? this.bindDragEvents() : this.unbindDragEvents(); } - - if (this.props.isDocumentHidden !== prevProps.isDocumentHidden) { - this.setState({ - isRunning: this.props.isDocumentHidden ? false : true - }, () => { - console.log('State Change:', this.state.isRunning) - }); - } - // this.setState({ - // isRunning: !nextProps.isDocumentHidden - // }); } componentWillUnmount() { @@ -274,7 +263,7 @@ class Toast extends Component { {closeButton !== false && closeButton} {autoClose !== false && ( console.log(r)} /> )} diff --git a/src/components/ToastContainer.js b/src/components/ToastContainer.js index 11a42302..8c0c4c02 100644 --- a/src/components/ToastContainer.js +++ b/src/components/ToastContainer.js @@ -101,6 +101,7 @@ class ToastContainer extends Component { draggablePercent: PropTypes.number, /** + * ⚠️ NOT WORKING ATM, has been disabled until I fix it ⚠️ * pause on document visibility change */ pauseOnVisibilityChange: PropTypes.bool @@ -149,19 +150,19 @@ class ToastContainer extends Component { .on(CLEAR, id => (id !== null ? this.removeToast(id) : this.clear())) .emit(MOUNTED, this); - this.props.pauseOnVisibilityChange && - document.addEventListener('visibilitychange', this.isDocumentHidden); + //this.props.pauseOnVisibilityChange && + // document.addEventListener('visibilitychange', this.isDocumentHidden); } componentWillUnmount() { EventManager.off(ACTION.SHOW); EventManager.off(ACTION.CLEAR); - this.props.pauseOnVisibilityChange && - document.removeEventListener('visibilitychange', this.isDocumentHidden); + // this.props.pauseOnVisibilityChange && + // document.removeEventListener('visibilitychange', this.isDocumentHidden); } - isDocumentHidden = () => this.setState({ isDocumentHidden: document.hidden }); + //isDocumentHidden = () => this.setState({ isDocumentHidden: document.hidden }); isToastActive = id => this.state.toast.indexOf(parseInt(id, 10)) !== -1; @@ -188,9 +189,9 @@ class ToastContainer extends Component { return closeButton === false ? false : cloneElement(closeButton, { - closeToast: () => this.removeToast(toastId), - type: type - }); + closeToast: () => this.removeToast(toastId), + type: type + }); } getAutoCloseDelay(toastAutoClose) { From 71847598b91c3a5b8f077f5f1e956ef88504ba78 Mon Sep 17 00:00:00 2001 From: Fadi Khadra Date: Thu, 7 Jun 2018 14:01:37 +0200 Subject: [PATCH 3/5] Fix issue 191 --- src/components/ToastContainer.js | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/src/components/ToastContainer.js b/src/components/ToastContainer.js index 8c0c4c02..2515c653 100644 --- a/src/components/ToastContainer.js +++ b/src/components/ToastContainer.js @@ -209,6 +209,16 @@ class ToastContainer extends Component { ); } + parseClassName(prop){ + if (typeof prop === 'string') { + return prop; + } else if(prop !== null && typeof prop === 'object' && 'toString' in prop) { + return prop.toString() + } + + return null; + } + show(content, options) { if (!this.canBeRendered(content)) { throw new Error( @@ -225,8 +235,8 @@ class ToastContainer extends Component { rtl: this.props.rtl, position: options.position || this.props.position, transition: options.transition || this.props.transition, - className: options.className || this.props.toastClassName, - bodyClassName: options.bodyClassName || this.props.bodyClassName, + className: this.parseClassName(options.className || this.props.toastClassName), + bodyClassName: this.parseClassName(options.bodyClassName || this.props.bodyClassName), closeButton: this.makeCloseButton( options.closeButton, toastId, @@ -247,7 +257,7 @@ class ToastContainer extends Component { ? options.closeOnClick : this.props.closeOnClick, progressClassName: - options.progressClassName || this.props.progressClassName, + this.parseClassName(options.progressClassName || this.props.progressClassName), autoClose: this.getAutoCloseDelay( options.autoClose !== false ? parseInt(options.autoClose, 10) @@ -345,7 +355,7 @@ class ToastContainer extends Component { 'Toastify__toast-container', `Toastify__toast-container--${position}`, { 'Toastify__toast-container--rtl': this.props.rtl }, - className + this.parseClassName(className) ), style: disablePointer ? { ...style, pointerEvents: 'none' } From 83e7d4e578664852592df1693b1d866d7643d47a Mon Sep 17 00:00:00 2001 From: Fadi Khadra Date: Thu, 7 Jun 2018 14:04:56 +0200 Subject: [PATCH 4/5] Disable visibility api tests --- src/__tests__/Toast.js | 13 +++---- src/__tests__/ToastContainer.js | 60 +++++++++++++++++---------------- 2 files changed, 38 insertions(+), 35 deletions(-) diff --git a/src/__tests__/Toast.js b/src/__tests__/Toast.js index 41c99232..fc3f4196 100644 --- a/src/__tests__/Toast.js +++ b/src/__tests__/Toast.js @@ -136,12 +136,13 @@ describe('Toast', () => { expect(component.state('isRunning')).toBeTruthy(); }); - it('Should pause Toast when document visibility change', () => { - const component = mount(FooBar); - expect(component.state('isRunning')).toBe(true); - component.setProps({ isDocumentHidden: true }); - expect(component.state('isRunning')).toBe(false); - }); + // ⚠️ Disabled until I fix the issue + //it('Should pause Toast when document visibility change', () => { + // const component = mount(FooBar); + // expect(component.state('isRunning')).toBe(true); + // component.setProps({ isDocumentHidden: true }); + // expect(component.state('isRunning')).toBe(false); + //}); describe('Drag event', () => { it('Should handle drag start on mousedown', () => { diff --git a/src/__tests__/ToastContainer.js b/src/__tests__/ToastContainer.js index 0c1f65d7..e23a5f59 100644 --- a/src/__tests__/ToastContainer.js +++ b/src/__tests__/ToastContainer.js @@ -41,22 +41,22 @@ describe('ToastContainer', () => { -pauseOnHover -transition -closeToast`, () => { - const component = mount(); - // Create a toast - toaster('coucou'); - jest.runAllTimers(); + const component = mount(); + // Create a toast + toaster('coucou'); + jest.runAllTimers(); - const props = getToastProps(component); + const props = getToastProps(component); - [ - 'autoClose', - 'closeButton', - 'position', - 'closeToast', - 'transition', - 'pauseOnHover' - ].forEach(key => expect(hasProp(props, key)).toBeTruthy()); - }); + [ + 'autoClose', + 'closeButton', + 'position', + 'closeToast', + 'transition', + 'pauseOnHover' + ].forEach(key => expect(hasProp(props, key)).toBeTruthy()); + }); it('Should clear all toast when clear is called without id', () => { const component = mount(); @@ -98,7 +98,7 @@ describe('ToastContainer', () => { it('Toast options should supersede ToastContainer props', () => { const component = mount(); const CloseBtn = () =>
Close
; - const fn = () => {}; + const fn = () => { }; const desiredProps = { pauseOnHover: false, closeOnClick: false, @@ -173,20 +173,22 @@ describe('ToastContainer', () => { expect(props).toHaveProperty('closeToast'); }); - it('Should update state when document visibility change', () => { - let trigger; - let event; - document.addEventListener = (evt, cb) => { - trigger = cb; - event = evt; - }; - - const component = mount(); - expect(event).toBe('visibilitychange'); - expect(component.state().isDocumentHidden).toBe(false); - trigger(); - expect(component.state().isDocumentHidden).toBe(true); - }); + // ⚠️ Disabled until I fix the issue + // it('Should update state when document visibility change', () => { + // expect(true).toBe(true); + // let trigger; + // let event; + // document.addEventListener = (evt, cb) => { + // trigger = cb; + // event = evt; + // }; + + // const component = mount(); + // expect(event).toBe('visibilitychange'); + // expect(component.state().isDocumentHidden).toBe(false); + // trigger(); + // expect(component.state().isDocumentHidden).toBe(true); + //}); describe('closeToast function', () => { it('Should remove toast when closeToast is called', () => { From 1b13cd4e0b847dbeb7d72c759fef4dc71ce04d0f Mon Sep 17 00:00:00 2001 From: Fadi Khadra Date: Thu, 7 Jun 2018 14:05:33 +0200 Subject: [PATCH 5/5] Rebuild --- dist/ReactToastify.js | 2 +- dist/ReactToastify.js.map | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/ReactToastify.js b/dist/ReactToastify.js index cd80cf93..c771fe53 100644 --- a/dist/ReactToastify.js +++ b/dist/ReactToastify.js @@ -9,5 +9,5 @@ Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */ -!function(){"use strict";var n={}.hasOwnProperty;function r(){for(var e=[],t=0;t0&&void 0!==arguments[0]?arguments[0]:null;return this.eventList.delete(e)},emit:function(e){for(var t=this,n=arguments.length,o=Array(n>1?n-1:0),r=1;r=0||Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=e[o]);return n}(e,["children","position","preventExitTransition"]),h=f?t+"--"+c:t,y=f?n+"--"+c:n,m=void 0,v=void 0;if(Array.isArray(l)&&2===l.length){var g=r(l,2);m=g[0],v=g[1]}else m=v=l;return i.default.createElement(a.default,o({},d,{timeout:p?0:{enter:m,exit:v},onEnter:function(e){e.classList.add(h),e.style.animationFillMode="forwards",e.style.animationDuration=.001*m+"s"},onEntered:function(e){e.classList.remove(h),e.style.cssText=""},onExit:p?u:function(e){e.classList.add(y),e.style.animationFillMode="forwards",e.style.animationDuration=.001*v+"s"}}),s)}};var i=s(n(0)),a=s(n(11));function s(e){return e&&e.__esModule?e:{default:e}}var u=function(){}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Flip=t.Zoom=t.Slide=t.Bounce=void 0;var o,r=n(5),i=(o=r)&&o.__esModule?o:{default:o};var a=(0,i.default)({enter:"Toastify__bounce-enter",exit:"Toastify__bounce-exit",appendPosition:!0}),s=(0,i.default)({enter:"Toastify__slide-enter",exit:"Toastify__slide-exit",duration:[450,750],appendPosition:!0}),u=(0,i.default)({enter:"Toastify__zoom-enter",exit:"Toastify__zoom-exit"}),l=(0,i.default)({enter:"Toastify__flip-enter",exit:"Toastify__flip-exit"});t.Bounce=a,t.Slide=s,t.Zoom=u,t.Flip=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.falseOrElement=t.falseOrDelay=void 0,t.isValidDelay=r,t.objectValues=function(e){return Object.keys(e).map(function(t){return e[t]})};var o=n(0);function r(e){return"number"==typeof e&&!isNaN(e)&&e>0}function i(e){return e.isRequired=function(t,n,o){if(void 0===t[n])return new Error("The prop "+n+" is marked as required in \n "+o+", but its value is undefined.");e(t,n,o)},e}t.falseOrDelay=i(function(e,t,n){var o=e[t];return!1===o||r(o)?null:new Error(n+" expect "+t+" \n to be a valid Number > 0 or equal to false. "+o+" given.")}),t.falseOrElement=i(function(e,t,n){var r=e[t];return!1===r||(0,o.isValidElement)(r)?null:new Error(n+" expect "+t+" \n to be a valid react element or equal to false. "+r+" given.")})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,r=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:null;return l&&a.default.emit(s.ACTION.CLEAR,e)},isActive:function(){return!1},update:function(e,t){setTimeout(function(){if(l&&void 0!==l.collection[e]){var n=l.collection[e],o=n.options,i=n.content,a=null!==o.updateId?o.updateId+1:1,s=r({},o,t,{toastId:e,updateId:a}),u=void 0!==s.render?s.render:i;delete s.render,d(u,s)}},0)},onChange:function(e){"function"==typeof e&&a.default.on(s.ACTION.ON_CHANGE,e)}},{POSITION:s.POSITION,TYPE:s.TYPE});a.default.on(s.ACTION.MOUNTED,function(e){l=e,h.isActive=function(e){return l.isToastActive(e)},c.forEach(function(e){a.default.emit(e.action,e.content,e.options)}),c=[]}),t.default=h},function(e,t,n){"use strict";t.__esModule=!0,t.classNamesShape=t.timeoutsShape=void 0,t.transitionTimeout=function(e){var t="transition"+e+"Timeout",n="transition"+e;return function(e){if(e[n]){if(null==e[t])return new Error(t+" wasn't supplied to CSSTransitionGroup: this can cause unreliable animations and won't be supported in a future version of React. See https://fb.me/react-animation-transition-group-timeout for more information.");if("number"!=typeof e[t])return new Error(t+" must be a number (in milliseconds)")}return null}};var o,r=n(1),i=(o=r)&&o.__esModule?o:{default:o};t.timeoutsShape=i.default.oneOfType([i.default.number,i.default.shape({enter:i.default.number,exit:i.default.number}).isRequired]),t.classNamesShape=i.default.oneOfType([i.default.string,i.default.shape({enter:i.default.string,exit:i.default.string,active:i.default.string}),i.default.shape({enter:i.default.string,enterDone:i.default.string,enterActive:i.default.string,exit:i.default.string,exitDone:i.default.string,exitActive:i.default.string})])},function(e,t){e.exports=n},function(e,t,n){"use strict";t.__esModule=!0,t.EXITING=t.ENTERED=t.ENTERING=t.EXITED=t.UNMOUNTED=void 0;var o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(1)),r=a(n(0)),i=a(n(10));n(9);function a(e){return e&&e.__esModule?e:{default:e}}var s=t.UNMOUNTED="unmounted",u=t.EXITED="exited",l=t.ENTERING="entering",c=t.ENTERED="entered",f=t.EXITING="exiting",p=function(e){function t(n,o){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=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}(this,e.call(this,n,o)),i=o.transitionGroup,a=i&&!i.isMounting?n.enter:n.appear,f=void 0;return r.nextStatus=null,n.in?a?(f=u,r.nextStatus=l):f=c:f=n.unmountOnExit||n.mountOnEnter?s:u,r.state={status:f},r.nextCallback=null,r}return 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)}(t,e),t.prototype.getChildContext=function(){return{transitionGroup:null}},t.prototype.componentDidMount=function(){this.updateStatus(!0)},t.prototype.componentWillReceiveProps=function(e){var t=(this.pendingState||this.state).status;e.in?(t===s&&this.setState({status:u}),t!==l&&t!==c&&(this.nextStatus=l)):t!==l&&t!==c||(this.nextStatus=f)},t.prototype.componentDidUpdate=function(){this.updateStatus()},t.prototype.componentWillUnmount=function(){this.cancelNextCallback()},t.prototype.getTimeouts=function(){var e=this.props.timeout,t=void 0,n=void 0,o=void 0;return t=n=o=e,null!=e&&"number"!=typeof e&&(t=e.exit,n=e.enter,o=e.appear),{exit:t,enter:n,appear:o}},t.prototype.updateStatus=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.nextStatus;if(null!==t){this.nextStatus=null,this.cancelNextCallback();var n=i.default.findDOMNode(this);t===l?this.performEnter(n,e):this.performExit(n)}else this.props.unmountOnExit&&this.state.status===u&&this.setState({status:s})},t.prototype.performEnter=function(e,t){var n=this,o=this.props.enter,r=this.context.transitionGroup?this.context.transitionGroup.isMounting:t,i=this.getTimeouts();t||o?(this.props.onEnter(e,r),this.safeSetState({status:l},function(){n.props.onEntering(e,r),n.onTransitionEnd(e,i.enter,function(){n.safeSetState({status:c},function(){n.props.onEntered(e,r)})})})):this.safeSetState({status:c},function(){n.props.onEntered(e)})},t.prototype.performExit=function(e){var t=this,n=this.props.exit,o=this.getTimeouts();n?(this.props.onExit(e),this.safeSetState({status:f},function(){t.props.onExiting(e),t.onTransitionEnd(e,o.exit,function(){t.safeSetState({status:u},function(){t.props.onExited(e)})})})):this.safeSetState({status:u},function(){t.props.onExited(e)})},t.prototype.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},t.prototype.safeSetState=function(e,t){var n=this;this.pendingState=e,t=this.setNextCallback(t),this.setState(e,function(){n.pendingState=null,t()})},t.prototype.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(o){n&&(n=!1,t.nextCallback=null,e(o))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},t.prototype.onTransitionEnd=function(e,t,n){this.setNextCallback(n),e?(this.props.addEndListener&&this.props.addEndListener(e,this.nextCallback),null!=t&&setTimeout(this.nextCallback,t)):setTimeout(this.nextCallback,0)},t.prototype.render=function(){var e=this.state.status;if(e===s)return null;var t=this.props,n=t.children,o=function(e,t){var n={};for(var o in e)t.indexOf(o)>=0||Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=e[o]);return n}(t,["children"]);if(delete o.in,delete o.mountOnEnter,delete o.unmountOnExit,delete o.appear,delete o.enter,delete o.exit,delete o.timeout,delete o.addEndListener,delete o.onEnter,delete o.onEntering,delete o.onEntered,delete o.onExit,delete o.onExiting,delete o.onExited,"function"==typeof n)return n(e,o);var i=r.default.Children.only(n);return r.default.cloneElement(i,o)},t}(r.default.Component);function d(){}p.contextTypes={transitionGroup:o.object},p.childContextTypes={transitionGroup:function(){}},p.propTypes={},p.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:d,onEntering:d,onEntered:d,onExit:d,onExiting:d,onExited:d},p.UNMOUNTED=0,p.EXITED=1,p.ENTERING=2,p.ENTERED=3,p.EXITING=4,t.default=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=i(n(0)),r=i(n(1));function i(e){return e&&e.__esModule?e:{default:e}}function a(e){var t=e.closeToast,n=e.type,r=e.ariaLabel;return o.default.createElement("button",{className:"Toastify__close-button Toastify__close-button--"+n,type:"button",onClick:t,"aria-label":r},"✖")}a.propTypes={closeToast:r.default.func,arialLabel:r.default.string},a.defaultProps={ariaLabel:"close"},t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=s(n(0)),r=s(n(1)),i=s(n(3)),a=n(2);function s(e){return e&&e.__esModule?e:{default:e}}function u(e){var t=e.delay,n=e.isRunning,r=e.closeToast,a=e.type,s=e.hide,u=e.className,l=e.rtl,c={animationDuration:t+"ms",animationPlayState:n?"running":"paused",opacity:s?0:1},f=(0,i.default)("Toastify__progress-bar","Toastify__progress-bar--"+a,{"Toastify__progress-bar--rtl":l},u);return o.default.createElement("div",{className:f,style:c,onAnimationEnd:r})}u.propTypes={delay:r.default.number.isRequired,isRunning:r.default.bool.isRequired,closeToast:r.default.func.isRequired,rtl:r.default.bool.isRequired,type:r.default.string,hide:r.default.bool,className:r.default.oneOfType([r.default.string,r.default.object])},u.defaultProps={type:a.TYPE.DEFAULT,hide:!1},t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t=1?e.targetTouches[0].clientX:e.clientX}var y=function(){},m=function(e){function t(){var e,n,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var r=arguments.length,i=Array(r),a=0;ao.drag.removalDistance)return void o.setState({preventExitTransition:!0},o.props.closeToast);o.drag.y=function(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientY:e.clientY}(e),o.ref.style.transition="transform 0.2s, opacity 0.2s",o.ref.style.transform="translateX(0)",o.ref.style.opacity=1}},o.onDragTransitionEnd=function(){var e=o.ref.getBoundingClientRect(),t=e.top,n=e.bottom,r=e.left,i=e.right;o.props.pauseOnHover&&o.drag.x>=r&&o.drag.x<=i&&o.drag.y>=t&&o.drag.y<=n?o.pauseToast():o.playToast()},d(o,n)}return 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)}(t,i.Component),r(t,[{key:"componentDidMount",value:function(){this.props.onOpen(this.props.children.props),this.props.draggable&&(document.addEventListener("mousemove",this.onDragMove),document.addEventListener("mouseup",this.onDragEnd),document.addEventListener("touchmove",this.onDragMove),document.addEventListener("touchend",this.onDragEnd))}},{key:"componentWillUnmount",value:function(){this.props.onClose(this.props.children.props),this.props.draggable&&(document.removeEventListener("mousemove",this.onDragMove),document.removeEventListener("mouseup",this.onDragEnd),document.removeEventListener("touchmove",this.onDragMove),document.removeEventListener("touchend",this.onDragEnd))}},{key:"componentWillReceiveProps",value:function(e){this.props.isDocumentHidden!==e.isDocumentHidden&&this.setState({isRunning:!e.isDocumentHidden})}},{key:"render",value:function(){var e=this,t=this.props,n=t.closeButton,r=t.children,i=t.autoClose,s=t.pauseOnHover,c=t.closeOnClick,f=t.type,p=t.hideProgressBar,d=t.closeToast,h=t.transition,y=t.position,m=t.onExited,v=t.className,g=t.bodyClassName,b=t.progressClassName,O=t.updateId,E=t.role,T=t.rtl,C={className:(0,u.default)("Toastify__toast","Toastify__toast--"+f,{"Toastify__toast--rtl":T},v)};return i&&s&&(C.onMouseEnter=this.pauseToast,C.onMouseLeave=this.playToast),c&&(C.onClick=function(){return e.flag.canCloseOnClick&&d()}),a.default.createElement(h,{in:this.props.in,appear:!0,unmountOnExit:!0,onExited:m,position:y,preventExitTransition:this.state.preventExitTransition},a.default.createElement("div",o({},C,{ref:function(t){return e.ref=t},onMouseDown:this.onDragStart,onTouchStart:this.onDragStart,onTransitionEnd:this.onDragTransitionEnd}),a.default.createElement("div",o({},this.props.in&&{role:E},{className:(0,u.default)("Toastify__toast-body",g)}),r),!1!==n&&n,!1!==i&&a.default.createElement(l.default,{key:"pb-"+O,rtl:T,delay:i,isRunning:this.state.isRunning,closeToast:d,hide:p,type:f,className:b})))}}]),t}();m.propTypes={closeButton:f.falseOrElement.isRequired,autoClose:f.falseOrDelay.isRequired,children:s.default.node.isRequired,closeToast:s.default.func.isRequired,position:s.default.oneOf((0,f.objectValues)(c.POSITION)).isRequired,pauseOnHover:s.default.bool.isRequired,closeOnClick:s.default.bool.isRequired,transition:s.default.func.isRequired,isDocumentHidden:s.default.bool.isRequired,rtl:s.default.bool.isRequired,hideProgressBar:s.default.bool.isRequired,draggable:s.default.bool.isRequired,draggablePercent:s.default.number.isRequired,in:s.default.bool,onExited:s.default.func,onOpen:s.default.func,onClose:s.default.func,type:s.default.oneOf((0,f.objectValues)(c.TYPE)),className:s.default.oneOfType([s.default.string,s.default.object]),bodyClassName:s.default.oneOfType([s.default.string,s.default.object]),progressClassName:s.default.oneOfType([s.default.string,s.default.object]),updateId:s.default.number,ariaLabel:s.default.string},m.defaultProps={type:c.TYPE.DEFAULT,in:!0,onOpen:y,onClose:y,className:null,bodyClassName:null,progressClassName:null,updateId:null,role:"alert"},t.default=m},function(e,t,n){"use strict";t.__esModule=!0,t.getChildMapping=function(e,t){var n=Object.create(null);e&&o.Children.map(e,function(e){return e}).forEach(function(e){n[e.key]=function(e){return t&&(0,o.isValidElement)(e)?t(e):e}(e)});return n},t.mergeChildMappings=function(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var o=Object.create(null),r=[];for(var i in e)i in t?r.length&&(o[i]=r,r=[]):r.push(i);var a=void 0,s={};for(var u in t){if(o[u])for(a=0;a2&&void 0!==arguments[2]?arguments[2]:this.props;return null!=n[t]?n[t]:e.props[t]},t.prototype.componentDidMount=function(){this.appeared=!0},t.prototype.componentWillReceiveProps=function(e){var t=this,n=this.state.children,o=(0,s.getChildMapping)(e.children),r=(0,s.mergeChildMappings)(n,o);Object.keys(r).forEach(function(a){var s=r[a];if((0,i.isValidElement)(s)){var u=a in n,l=a in o,c=n[a],f=(0,i.isValidElement)(c)&&!c.props.in;!l||u&&!f?l||!u||f?l&&u&&(0,i.isValidElement)(c)&&(r[a]=(0,i.cloneElement)(s,{onExited:t.handleExited.bind(t,s),in:c.props.in,exit:t.getProp(s,"exit",e),enter:t.getProp(s,"enter",e)})):r[a]=(0,i.cloneElement)(s,{in:!1}):r[a]=(0,i.cloneElement)(s,{onExited:t.handleExited.bind(t,s),in:!0,exit:t.getProp(s,"exit",e),enter:t.getProp(s,"enter",e)})}}),this.setState({children:r})},t.prototype.handleExited=function(e,t){var n=(0,s.getChildMapping)(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.setState(function(t){var n=o({},t.children);return delete n[e.key],{children:n}}))},t.prototype.render=function(){var e=this.props,t=e.component,n=e.childFactory,o=function(e,t){var n={};for(var o in e)t.indexOf(o)>=0||Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=e[o]);return n}(e,["component","childFactory"]),r=l(this.state.children).map(n);return delete o.appear,delete o.enter,delete o.exit,null===t?r:a.default.createElement(t,o,r)},t}(a.default.Component));c.childContextTypes={transitionGroup:r.default.object.isRequired},c.propTypes={},c.defaultProps={component:"div",childFactory:function(e){return e}},t.default=c,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:null;return this.eventList.delete(e)},emit:function(e){for(var t=this,n=arguments.length,o=Array(n>1?n-1:0),r=1;r=0||Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=e[o]);return n}(e,["children","position","preventExitTransition"]),h=f?t+"--"+c:t,y=f?n+"--"+c:n,v=void 0,g=void 0;if(Array.isArray(l)&&2===l.length){var m=r(l,2);v=m[0],g=m[1]}else v=g=l;return a.default.createElement(i.default,o({},d,{timeout:p?0:{enter:v,exit:g},onEnter:function(e){e.classList.add(h),e.style.animationFillMode="forwards",e.style.animationDuration=.001*v+"s"},onEntered:function(e){e.classList.remove(h),e.style.cssText=""},onExit:p?u:function(e){e.classList.add(y),e.style.animationFillMode="forwards",e.style.animationDuration=.001*g+"s"}}),s)}};var a=s(n(0)),i=s(n(11));function s(e){return e&&e.__esModule?e:{default:e}}var u=function(){}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Flip=t.Zoom=t.Slide=t.Bounce=void 0;var o,r=n(5),a=(o=r)&&o.__esModule?o:{default:o};var i=(0,a.default)({enter:"Toastify__bounce-enter",exit:"Toastify__bounce-exit",appendPosition:!0}),s=(0,a.default)({enter:"Toastify__slide-enter",exit:"Toastify__slide-exit",duration:[450,750],appendPosition:!0}),u=(0,a.default)({enter:"Toastify__zoom-enter",exit:"Toastify__zoom-exit"}),l=(0,a.default)({enter:"Toastify__flip-enter",exit:"Toastify__flip-exit"});t.Bounce=i,t.Slide=s,t.Zoom=u,t.Flip=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.falseOrElement=t.falseOrDelay=void 0,t.isValidDelay=r,t.objectValues=function(e){return Object.keys(e).map(function(t){return e[t]})};var o=n(0);function r(e){return"number"==typeof e&&!isNaN(e)&&e>0}function a(e){return e.isRequired=function(t,n,o){if(void 0===t[n])return new Error("The prop "+n+" is marked as required in \n "+o+", but its value is undefined.");e(t,n,o)},e}t.falseOrDelay=a(function(e,t,n){var o=e[t];return!1===o||r(o)?null:new Error(n+" expect "+t+" \n to be a valid Number > 0 or equal to false. "+o+" given.")}),t.falseOrElement=a(function(e,t,n){var r=e[t];return!1===r||(0,o.isValidElement)(r)?null:new Error(n+" expect "+t+" \n to be a valid react element or equal to false. "+r+" given.")})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,r=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:null;return l&&i.default.emit(s.ACTION.CLEAR,e)},isActive:function(){return!1},update:function(e,t){setTimeout(function(){if(l&&void 0!==l.collection[e]){var n=l.collection[e],o=n.options,a=n.content,i=null!==o.updateId?o.updateId+1:1,s=r({},o,t,{toastId:e,updateId:i}),u=void 0!==s.render?s.render:a;delete s.render,d(u,s)}},0)},onChange:function(e){"function"==typeof e&&i.default.on(s.ACTION.ON_CHANGE,e)}},{POSITION:s.POSITION,TYPE:s.TYPE});i.default.on(s.ACTION.MOUNTED,function(e){l=e,h.isActive=function(e){return l.isToastActive(e)},c.forEach(function(e){i.default.emit(e.action,e.content,e.options)}),c=[]}),t.default=h},function(e,t,n){"use strict";t.__esModule=!0,t.classNamesShape=t.timeoutsShape=void 0,t.transitionTimeout=function(e){var t="transition"+e+"Timeout",n="transition"+e;return function(e){if(e[n]){if(null==e[t])return new Error(t+" wasn't supplied to CSSTransitionGroup: this can cause unreliable animations and won't be supported in a future version of React. See https://fb.me/react-animation-transition-group-timeout for more information.");if("number"!=typeof e[t])return new Error(t+" must be a number (in milliseconds)")}return null}};var o,r=n(1),a=(o=r)&&o.__esModule?o:{default:o};t.timeoutsShape=a.default.oneOfType([a.default.number,a.default.shape({enter:a.default.number,exit:a.default.number}).isRequired]),t.classNamesShape=a.default.oneOfType([a.default.string,a.default.shape({enter:a.default.string,exit:a.default.string,active:a.default.string}),a.default.shape({enter:a.default.string,enterDone:a.default.string,enterActive:a.default.string,exit:a.default.string,exitDone:a.default.string,exitActive:a.default.string})])},function(e,t){e.exports=n},function(e,t,n){"use strict";t.__esModule=!0,t.EXITING=t.ENTERED=t.ENTERING=t.EXITED=t.UNMOUNTED=void 0;var o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(1)),r=i(n(0)),a=i(n(10));n(9);function i(e){return e&&e.__esModule?e:{default:e}}var s=t.UNMOUNTED="unmounted",u=t.EXITED="exited",l=t.ENTERING="entering",c=t.ENTERED="entered",f=t.EXITING="exiting",p=function(e){function t(n,o){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=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}(this,e.call(this,n,o)),a=o.transitionGroup,i=a&&!a.isMounting?n.enter:n.appear,f=void 0;return r.nextStatus=null,n.in?i?(f=u,r.nextStatus=l):f=c:f=n.unmountOnExit||n.mountOnEnter?s:u,r.state={status:f},r.nextCallback=null,r}return 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)}(t,e),t.prototype.getChildContext=function(){return{transitionGroup:null}},t.prototype.componentDidMount=function(){this.updateStatus(!0)},t.prototype.componentWillReceiveProps=function(e){var t=(this.pendingState||this.state).status;e.in?(t===s&&this.setState({status:u}),t!==l&&t!==c&&(this.nextStatus=l)):t!==l&&t!==c||(this.nextStatus=f)},t.prototype.componentDidUpdate=function(){this.updateStatus()},t.prototype.componentWillUnmount=function(){this.cancelNextCallback()},t.prototype.getTimeouts=function(){var e=this.props.timeout,t=void 0,n=void 0,o=void 0;return t=n=o=e,null!=e&&"number"!=typeof e&&(t=e.exit,n=e.enter,o=e.appear),{exit:t,enter:n,appear:o}},t.prototype.updateStatus=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.nextStatus;if(null!==t){this.nextStatus=null,this.cancelNextCallback();var n=a.default.findDOMNode(this);t===l?this.performEnter(n,e):this.performExit(n)}else this.props.unmountOnExit&&this.state.status===u&&this.setState({status:s})},t.prototype.performEnter=function(e,t){var n=this,o=this.props.enter,r=this.context.transitionGroup?this.context.transitionGroup.isMounting:t,a=this.getTimeouts();t||o?(this.props.onEnter(e,r),this.safeSetState({status:l},function(){n.props.onEntering(e,r),n.onTransitionEnd(e,a.enter,function(){n.safeSetState({status:c},function(){n.props.onEntered(e,r)})})})):this.safeSetState({status:c},function(){n.props.onEntered(e)})},t.prototype.performExit=function(e){var t=this,n=this.props.exit,o=this.getTimeouts();n?(this.props.onExit(e),this.safeSetState({status:f},function(){t.props.onExiting(e),t.onTransitionEnd(e,o.exit,function(){t.safeSetState({status:u},function(){t.props.onExited(e)})})})):this.safeSetState({status:u},function(){t.props.onExited(e)})},t.prototype.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},t.prototype.safeSetState=function(e,t){var n=this;this.pendingState=e,t=this.setNextCallback(t),this.setState(e,function(){n.pendingState=null,t()})},t.prototype.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(o){n&&(n=!1,t.nextCallback=null,e(o))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},t.prototype.onTransitionEnd=function(e,t,n){this.setNextCallback(n),e?(this.props.addEndListener&&this.props.addEndListener(e,this.nextCallback),null!=t&&setTimeout(this.nextCallback,t)):setTimeout(this.nextCallback,0)},t.prototype.render=function(){var e=this.state.status;if(e===s)return null;var t=this.props,n=t.children,o=function(e,t){var n={};for(var o in e)t.indexOf(o)>=0||Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=e[o]);return n}(t,["children"]);if(delete o.in,delete o.mountOnEnter,delete o.unmountOnExit,delete o.appear,delete o.enter,delete o.exit,delete o.timeout,delete o.addEndListener,delete o.onEnter,delete o.onEntering,delete o.onEntered,delete o.onExit,delete o.onExiting,delete o.onExited,"function"==typeof n)return n(e,o);var a=r.default.Children.only(n);return r.default.cloneElement(a,o)},t}(r.default.Component);function d(){}p.contextTypes={transitionGroup:o.object},p.childContextTypes={transitionGroup:function(){}},p.propTypes={},p.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:d,onEntering:d,onEntered:d,onExit:d,onExiting:d,onExited:d},p.UNMOUNTED=0,p.EXITED=1,p.ENTERING=2,p.ENTERED=3,p.EXITING=4,t.default=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=a(n(0)),r=a(n(1));function a(e){return e&&e.__esModule?e:{default:e}}function i(e){var t=e.closeToast,n=e.type,r=e.ariaLabel;return o.default.createElement("button",{className:"Toastify__close-button Toastify__close-button--"+n,type:"button",onClick:t,"aria-label":r},"✖")}i.propTypes={closeToast:r.default.func,arialLabel:r.default.string},i.defaultProps={ariaLabel:"close"},t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=s(n(0)),r=s(n(1)),a=s(n(3)),i=n(2);function s(e){return e&&e.__esModule?e:{default:e}}function u(e){var t=e.delay,n=e.isRunning,r=e.closeToast,i=e.type,s=e.hide,u=e.className,l=e.rtl,c={animationDuration:t+"ms",animationPlayState:n?"running":"paused",opacity:s?0:1},f=(0,a.default)("Toastify__progress-bar","Toastify__progress-bar--"+i,{"Toastify__progress-bar--rtl":l},u);return o.default.createElement("div",{className:f,style:c,onAnimationEnd:r})}u.propTypes={delay:r.default.number.isRequired,isRunning:r.default.bool.isRequired,closeToast:r.default.func.isRequired,rtl:r.default.bool.isRequired,type:r.default.string,hide:r.default.bool,className:r.default.oneOfType([r.default.string,r.default.object])},u.defaultProps={type:i.TYPE.DEFAULT,hide:!1},t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t=1?e.targetTouches[0].clientX:e.clientX}var y=function(){},v=function(e){function t(){var e,n,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var r=arguments.length,a=Array(r),i=0;io.drag.removalDistance)return void o.setState({preventExitTransition:!0},o.props.closeToast);o.drag.y=function(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientY:e.clientY}(e),o.ref.style.transition="transform 0.2s, opacity 0.2s",o.ref.style.transform="translateX(0)",o.ref.style.opacity=1}},o.onDragTransitionEnd=function(){var e=o.ref.getBoundingClientRect(),t=e.top,n=e.bottom,r=e.left,a=e.right;o.props.pauseOnHover&&o.drag.x>=r&&o.drag.x<=a&&o.drag.y>=t&&o.drag.y<=n?o.pauseToast():o.playToast()},d(o,n)}return 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)}(t,a.Component),r(t,[{key:"componentDidMount",value:function(){this.props.onOpen(this.props.children.props),this.props.draggable&&this.bindDragEvents()}},{key:"bindDragEvents",value:function(){document.addEventListener("mousemove",this.onDragMove),document.addEventListener("mouseup",this.onDragEnd),document.addEventListener("touchmove",this.onDragMove),document.addEventListener("touchend",this.onDragEnd)}},{key:"unbindDragEvents",value:function(){document.removeEventListener("mousemove",this.onDragMove),document.removeEventListener("mouseup",this.onDragEnd),document.removeEventListener("touchmove",this.onDragMove),document.removeEventListener("touchend",this.onDragEnd)}},{key:"componentDidUpdate",value:function(e){e.draggable!==this.props.draggable&&(this.props.draggable?this.bindDragEvents():this.unbindDragEvents())}},{key:"componentWillUnmount",value:function(){this.props.onClose(this.props.children.props),this.props.draggable&&this.unbindDragEvents()}},{key:"render",value:function(){var e=this,t=this.props,n=t.closeButton,r=t.children,a=t.autoClose,s=t.pauseOnHover,c=t.closeOnClick,f=t.type,p=t.hideProgressBar,d=t.closeToast,h=t.transition,y=t.position,v=t.onExited,g=t.className,m=t.bodyClassName,b=t.progressClassName,E=t.updateId,O=t.role,T=t.rtl,C={className:(0,u.default)("Toastify__toast","Toastify__toast--"+f,{"Toastify__toast--rtl":T},g)};return a&&s&&(C.onMouseEnter=this.pauseToast,C.onMouseLeave=this.playToast),c&&(C.onClick=function(){return e.flag.canCloseOnClick&&d()}),i.default.createElement(h,{in:this.props.in,appear:!0,unmountOnExit:!0,onExited:v,position:y,preventExitTransition:this.state.preventExitTransition},i.default.createElement("div",o({},C,{ref:function(t){return e.ref=t},onMouseDown:this.onDragStart,onTouchStart:this.onDragStart,onTransitionEnd:this.onDragTransitionEnd}),i.default.createElement("div",o({},this.props.in&&{role:O},{className:(0,u.default)("Toastify__toast-body",m)}),r),!1!==n&&n,!1!==a&&i.default.createElement(l.default,o({},E?{key:"pb-"+E}:{},{rtl:T,delay:a,isRunning:this.state.isRunning,closeToast:d,hide:p,type:f,className:b}))))}}]),t}();v.propTypes={closeButton:f.falseOrElement.isRequired,autoClose:f.falseOrDelay.isRequired,children:s.default.node.isRequired,closeToast:s.default.func.isRequired,position:s.default.oneOf((0,f.objectValues)(c.POSITION)).isRequired,pauseOnHover:s.default.bool.isRequired,closeOnClick:s.default.bool.isRequired,transition:s.default.func.isRequired,isDocumentHidden:s.default.bool.isRequired,rtl:s.default.bool.isRequired,hideProgressBar:s.default.bool.isRequired,draggable:s.default.bool.isRequired,draggablePercent:s.default.number.isRequired,in:s.default.bool,onExited:s.default.func,onOpen:s.default.func,onClose:s.default.func,type:s.default.oneOf((0,f.objectValues)(c.TYPE)),className:s.default.oneOfType([s.default.string,s.default.object]),bodyClassName:s.default.oneOfType([s.default.string,s.default.object]),progressClassName:s.default.oneOfType([s.default.string,s.default.object]),updateId:s.default.number,ariaLabel:s.default.string},v.defaultProps={type:c.TYPE.DEFAULT,in:!0,onOpen:y,onClose:y,className:null,bodyClassName:null,progressClassName:null,updateId:null,role:"alert"},t.default=v},function(e,t,n){"use strict";t.__esModule=!0,t.getChildMapping=function(e,t){var n=Object.create(null);e&&o.Children.map(e,function(e){return e}).forEach(function(e){n[e.key]=function(e){return t&&(0,o.isValidElement)(e)?t(e):e}(e)});return n},t.mergeChildMappings=function(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var o=Object.create(null),r=[];for(var a in e)a in t?r.length&&(o[a]=r,r=[]):r.push(a);var i=void 0,s={};for(var u in t){if(o[u])for(i=0;i2&&void 0!==arguments[2]?arguments[2]:this.props;return null!=n[t]?n[t]:e.props[t]},t.prototype.componentDidMount=function(){this.appeared=!0},t.prototype.componentWillReceiveProps=function(e){var t=this,n=this.state.children,o=(0,s.getChildMapping)(e.children),r=(0,s.mergeChildMappings)(n,o);Object.keys(r).forEach(function(i){var s=r[i];if((0,a.isValidElement)(s)){var u=i in n,l=i in o,c=n[i],f=(0,a.isValidElement)(c)&&!c.props.in;!l||u&&!f?l||!u||f?l&&u&&(0,a.isValidElement)(c)&&(r[i]=(0,a.cloneElement)(s,{onExited:t.handleExited.bind(t,s),in:c.props.in,exit:t.getProp(s,"exit",e),enter:t.getProp(s,"enter",e)})):r[i]=(0,a.cloneElement)(s,{in:!1}):r[i]=(0,a.cloneElement)(s,{onExited:t.handleExited.bind(t,s),in:!0,exit:t.getProp(s,"exit",e),enter:t.getProp(s,"enter",e)})}}),this.setState({children:r})},t.prototype.handleExited=function(e,t){var n=(0,s.getChildMapping)(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.setState(function(t){var n=o({},t.children);return delete n[e.key],{children:n}}))},t.prototype.render=function(){var e=this.props,t=e.component,n=e.childFactory,o=function(e,t){var n={};for(var o in e)t.indexOf(o)>=0||Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=e[o]);return n}(e,["component","childFactory"]),r=l(this.state.children).map(n);return delete o.appear,delete o.enter,delete o.exit,null===t?r:i.default.createElement(t,o,r)},t}(i.default.Component));c.childContextTypes={transitionGroup:r.default.object.isRequired},c.propTypes={},c.defaultProps={component:"div",childFactory:function(e){return e}},t.default=c,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t setTimeout(() => callback.call(this, ...args), 0));\n\n return true;\n }\n};\n\nexport default eventManager;\n","import React from 'react';\nimport Transition from 'react-transition-group/Transition';\n\nconst noop = () => {};\n\nexport default function({\n enter,\n exit,\n duration = 750,\n appendPosition = false\n}) {\n return function Animation({\n children,\n position,\n preventExitTransition,\n ...props\n }) {\n const enterClassName = appendPosition ? `${enter}--${position}` : enter;\n const exitClassName = appendPosition ? `${exit}--${position}` : exit;\n let enterDuration, exitDuration;\n\n if (Array.isArray(duration) && duration.length === 2) {\n [enterDuration, exitDuration] = duration;\n } else {\n enterDuration = exitDuration = duration;\n }\n\n const onEnter = node => {\n node.classList.add(enterClassName);\n node.style.animationFillMode = 'forwards';\n node.style.animationDuration = `${enterDuration * 0.001}s`;\n };\n const onEntered = node => {\n node.classList.remove(enterClassName);\n node.style.cssText = '';\n };\n const onExit = node => {\n node.classList.add(exitClassName);\n node.style.animationFillMode = 'forwards';\n node.style.animationDuration = `${exitDuration * 0.001}s`;\n };\n\n return (\n \n {children}\n \n );\n };\n}\n","import cssTransition from './../utils/cssTransition';\n\nconst Bounce = cssTransition({\n enter: 'Toastify__bounce-enter',\n exit: 'Toastify__bounce-exit',\n appendPosition: true\n});\n\nconst Slide = cssTransition({\n enter: 'Toastify__slide-enter',\n exit: 'Toastify__slide-exit',\n duration: [450, 750],\n appendPosition: true\n});\n\nconst Zoom = cssTransition({\n enter: 'Toastify__zoom-enter',\n exit: 'Toastify__zoom-exit'\n});\n\nconst Flip = cssTransition({\n enter: 'Toastify__flip-enter',\n exit: 'Toastify__flip-exit'\n});\n\nexport { Bounce, Slide, Zoom, Flip };\n","import { isValidElement } from 'react';\n\nexport function isValidDelay(val) {\n return typeof val === 'number' && !isNaN(val) && val > 0;\n}\n\nexport function objectValues(obj) {\n return Object.keys(obj).map(key => obj[key]);\n}\n\nfunction withRequired(fn) {\n fn.isRequired = function(props, propName, componentName) {\n const prop = props[propName];\n\n if (typeof prop === 'undefined') {\n return new Error(`The prop ${propName} is marked as required in \n ${componentName}, but its value is undefined.`);\n }\n\n fn(props, propName, componentName);\n };\n return fn;\n}\n\nexport const falseOrDelay = withRequired((props, propName, componentName) => {\n const prop = props[propName];\n\n if (prop !== false && !isValidDelay(prop)) {\n return new Error(`${componentName} expect ${propName} \n to be a valid Number > 0 or equal to false. ${prop} given.`);\n }\n\n return null;\n});\n\nexport const falseOrElement = withRequired((props, propName, componentName) => {\n const prop = props[propName];\n\n if (prop !== false && !isValidElement(prop)) {\n return new Error(`${componentName} expect ${propName} \n to be a valid react element or equal to false. ${prop} given.`);\n }\n\n return null;\n});\n","import EventManager from './utils/EventManager';\nimport { POSITION, TYPE, ACTION } from './utils/constant';\n\nconst defaultOptions = {\n type: TYPE.DEFAULT,\n autoClose: null,\n closeButton: null,\n hideProgressBar: null,\n position: null,\n pauseOnHover: null,\n closeOnClick: null,\n className: null,\n bodyClassName: null,\n progressClassName: null,\n transition: null,\n updateId: null,\n draggable: null\n};\n\nlet container = null;\nlet queue = [];\nlet toastId = 0;\n\n/**\n * Merge provided options with the defaults settings and generate the toastId\n * @param {*} options\n */\nfunction mergeOptions(options, type) {\n return Object.assign({}, defaultOptions, options, {\n type: type,\n toastId: ++toastId\n });\n}\n\n/**\n * Dispatch toast. If the container is not mounted, the toast is enqueued\n * @param {*} content\n * @param {*} options\n */\nfunction emitEvent(content, options) {\n if (container !== null) {\n EventManager.emit(ACTION.SHOW, content, options);\n } else {\n queue.push({ action: ACTION.SHOW, content, options });\n }\n\n return options.toastId;\n}\n\nconst toaster = Object.assign(\n (content, options) =>\n emitEvent(\n content,\n mergeOptions(options, (options && options.type) || TYPE.DEFAULT)\n ),\n {\n success: (content, options) =>\n emitEvent(content, mergeOptions(options, TYPE.SUCCESS)),\n info: (content, options) =>\n emitEvent(content, mergeOptions(options, TYPE.INFO)),\n warn: (content, options) =>\n emitEvent(content, mergeOptions(options, TYPE.WARNING)),\n warning: (content, options) =>\n emitEvent(content, mergeOptions(options, TYPE.WARNING)),\n error: (content, options) =>\n emitEvent(content, mergeOptions(options, TYPE.ERROR)),\n dismiss: (id = null) => container && EventManager.emit(ACTION.CLEAR, id),\n isActive: () => false,\n update(id, options) {\n setTimeout(() => {\n if (container && typeof container.collection[id] !== 'undefined') {\n const {\n options: oldOptions,\n content: oldContent\n } = container.collection[id];\n const updateId =\n oldOptions.updateId !== null ? oldOptions.updateId + 1 : 1;\n\n const nextOptions = Object.assign({}, oldOptions, options, {\n toastId: id,\n updateId: updateId\n });\n const content =\n typeof nextOptions.render !== 'undefined'\n ? nextOptions.render\n : oldContent;\n delete nextOptions.render;\n emitEvent(content, nextOptions);\n }\n }, 0);\n },\n onChange(callback) {\n if (typeof callback === 'function') {\n EventManager.on(ACTION.ON_CHANGE, callback);\n }\n }\n },\n {\n POSITION,\n TYPE\n }\n);\n\n/**\n * Wait until the ToastContainer is mounted to dispatch the toast\n * and attach isActive method\n */\nEventManager.on(ACTION.MOUNTED, containerInstance => {\n container = containerInstance;\n\n toaster.isActive = id => container.isToastActive(id);\n\n queue.forEach(item => {\n EventManager.emit(item.action, item.content, item.options);\n });\n queue = [];\n});\n\nexport default toaster;\n","'use strict';\n\nexports.__esModule = true;\nexports.classNamesShape = exports.timeoutsShape = undefined;\nexports.transitionTimeout = transitionTimeout;\n\nvar _propTypes = require('prop-types');\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction transitionTimeout(transitionType) {\n var timeoutPropName = 'transition' + transitionType + 'Timeout';\n var enabledPropName = 'transition' + transitionType;\n\n return function (props) {\n // If the transition is enabled\n if (props[enabledPropName]) {\n // If no timeout duration is provided\n if (props[timeoutPropName] == null) {\n return new Error(timeoutPropName + ' wasn\\'t supplied to CSSTransitionGroup: ' + 'this can cause unreliable animations and won\\'t be supported in ' + 'a future version of React. See ' + 'https://fb.me/react-animation-transition-group-timeout for more ' + 'information.');\n\n // If the duration isn't a number\n } else if (typeof props[timeoutPropName] !== 'number') {\n return new Error(timeoutPropName + ' must be a number (in milliseconds)');\n }\n }\n\n return null;\n };\n}\n\nvar timeoutsShape = exports.timeoutsShape = _propTypes2.default.oneOfType([_propTypes2.default.number, _propTypes2.default.shape({\n enter: _propTypes2.default.number,\n exit: _propTypes2.default.number\n}).isRequired]);\n\nvar classNamesShape = exports.classNamesShape = _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.shape({\n enter: _propTypes2.default.string,\n exit: _propTypes2.default.string,\n active: _propTypes2.default.string\n}), _propTypes2.default.shape({\n enter: _propTypes2.default.string,\n enterDone: _propTypes2.default.string,\n enterActive: _propTypes2.default.string,\n exit: _propTypes2.default.string,\n exitDone: _propTypes2.default.string,\n exitActive: _propTypes2.default.string\n})]);","module.exports = __WEBPACK_EXTERNAL_MODULE__10__;","'use strict';\n\nexports.__esModule = true;\nexports.EXITING = exports.ENTERED = exports.ENTERING = exports.EXITED = exports.UNMOUNTED = undefined;\n\nvar _propTypes = require('prop-types');\n\nvar PropTypes = _interopRequireWildcard(_propTypes);\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactDom = require('react-dom');\n\nvar _reactDom2 = _interopRequireDefault(_reactDom);\n\nvar _PropTypes = require('./utils/PropTypes');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar UNMOUNTED = exports.UNMOUNTED = 'unmounted';\nvar EXITED = exports.EXITED = 'exited';\nvar ENTERING = exports.ENTERING = 'entering';\nvar ENTERED = exports.ENTERED = 'entered';\nvar EXITING = exports.EXITING = 'exiting';\n\n/**\n * The Transition component lets you describe a transition from one component\n * state to another _over time_ with a simple declarative API. Most commonly\n * it's used to animate the mounting and unmounting of a component, but can also\n * be used to describe in-place transition states as well.\n *\n * By default the `Transition` component does not alter the behavior of the\n * component it renders, it only tracks \"enter\" and \"exit\" states for the components.\n * It's up to you to give meaning and effect to those states. For example we can\n * add styles to a component when it enters or exits:\n *\n * ```jsx\n * import Transition from 'react-transition-group/Transition';\n *\n * const duration = 300;\n *\n * const defaultStyle = {\n * transition: `opacity ${duration}ms ease-in-out`,\n * opacity: 0,\n * }\n *\n * const transitionStyles = {\n * entering: { opacity: 0 },\n * entered: { opacity: 1 },\n * };\n *\n * const Fade = ({ in: inProp }) => (\n * \n * {(state) => (\n *
\n * I'm a fade Transition!\n *
\n * )}\n *
\n * );\n * ```\n *\n * As noted the `Transition` component doesn't _do_ anything by itself to its child component.\n * What it does do is track transition states over time so you can update the\n * component (such as by adding styles or classes) when it changes states.\n *\n * There are 4 main states a Transition can be in:\n * - `'entering'`\n * - `'entered'`\n * - `'exiting'`\n * - `'exited'`\n *\n * Transition state is toggled via the `in` prop. When `true` the component begins the\n * \"Enter\" stage. During this stage, the component will shift from its current transition state,\n * to `'entering'` for the duration of the transition and then to the `'entered'` stage once\n * it's complete. Let's take the following example:\n *\n * ```jsx\n * state = { in: false };\n *\n * toggleEnterState = () => {\n * this.setState({ in: true });\n * }\n *\n * render() {\n * return (\n *
\n * \n * \n *
\n * );\n * }\n * ```\n *\n * When the button is clicked the component will shift to the `'entering'` state and\n * stay there for 500ms (the value of `timeout`) before it finally switches to `'entered'`.\n *\n * When `in` is `false` the same thing happens except the state moves from `'exiting'` to `'exited'`.\n *\n * ## Timing\n *\n * Timing is often the trickiest part of animation, mistakes can result in slight delays\n * that are hard to pin down. A common example is when you want to add an exit transition,\n * you should set the desired final styles when the state is `'exiting'`. That's when the\n * transition to those styles will start and, if you matched the `timeout` prop with the\n * CSS Transition duration, it will end exactly when the state changes to `'exited'`.\n *\n * > **Note**: For simpler transitions the `Transition` component might be enough, but\n * > take into account that it's platform-agnostic, while the `CSSTransition` component\n * > [forces reflows](https://github.com/reactjs/react-transition-group/blob/5007303e729a74be66a21c3e2205e4916821524b/src/CSSTransition.js#L208-L215)\n * > in order to make more complex transitions more predictable. For example, even though\n * > classes `example-enter` and `example-enter-active` are applied immediately one after\n * > another, you can still transition from one to the other because of the forced reflow\n * > (read [this issue](https://github.com/reactjs/react-transition-group/issues/159#issuecomment-322761171)\n * > for more info). Take this into account when choosing between `Transition` and\n * > `CSSTransition`.\n *\n * ## Example\n *\n * \n *\n */\n\nvar Transition = function (_React$Component) {\n _inherits(Transition, _React$Component);\n\n function Transition(props, context) {\n _classCallCheck(this, Transition);\n\n var _this = _possibleConstructorReturn(this, _React$Component.call(this, props, context));\n\n var parentGroup = context.transitionGroup;\n // In the context of a TransitionGroup all enters are really appears\n var appear = parentGroup && !parentGroup.isMounting ? props.enter : props.appear;\n\n var initialStatus = void 0;\n _this.nextStatus = null;\n\n if (props.in) {\n if (appear) {\n initialStatus = EXITED;\n _this.nextStatus = ENTERING;\n } else {\n initialStatus = ENTERED;\n }\n } else {\n if (props.unmountOnExit || props.mountOnEnter) {\n initialStatus = UNMOUNTED;\n } else {\n initialStatus = EXITED;\n }\n }\n\n _this.state = { status: initialStatus };\n\n _this.nextCallback = null;\n return _this;\n }\n\n Transition.prototype.getChildContext = function getChildContext() {\n return { transitionGroup: null }; // allows for nested Transitions\n };\n\n Transition.prototype.componentDidMount = function componentDidMount() {\n this.updateStatus(true);\n };\n\n Transition.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {\n var _ref = this.pendingState || this.state,\n status = _ref.status;\n\n if (nextProps.in) {\n if (status === UNMOUNTED) {\n this.setState({ status: EXITED });\n }\n if (status !== ENTERING && status !== ENTERED) {\n this.nextStatus = ENTERING;\n }\n } else {\n if (status === ENTERING || status === ENTERED) {\n this.nextStatus = EXITING;\n }\n }\n };\n\n Transition.prototype.componentDidUpdate = function componentDidUpdate() {\n this.updateStatus();\n };\n\n Transition.prototype.componentWillUnmount = function componentWillUnmount() {\n this.cancelNextCallback();\n };\n\n Transition.prototype.getTimeouts = function getTimeouts() {\n var timeout = this.props.timeout;\n\n var exit = void 0,\n enter = void 0,\n appear = void 0;\n\n exit = enter = appear = timeout;\n\n if (timeout != null && typeof timeout !== 'number') {\n exit = timeout.exit;\n enter = timeout.enter;\n appear = timeout.appear;\n }\n return { exit: exit, enter: enter, appear: appear };\n };\n\n Transition.prototype.updateStatus = function updateStatus() {\n var mounting = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n\n var nextStatus = this.nextStatus;\n\n if (nextStatus !== null) {\n this.nextStatus = null;\n // nextStatus will always be ENTERING or EXITING.\n this.cancelNextCallback();\n var node = _reactDom2.default.findDOMNode(this);\n\n if (nextStatus === ENTERING) {\n this.performEnter(node, mounting);\n } else {\n this.performExit(node);\n }\n } else if (this.props.unmountOnExit && this.state.status === EXITED) {\n this.setState({ status: UNMOUNTED });\n }\n };\n\n Transition.prototype.performEnter = function performEnter(node, mounting) {\n var _this2 = this;\n\n var enter = this.props.enter;\n\n var appearing = this.context.transitionGroup ? this.context.transitionGroup.isMounting : mounting;\n\n var timeouts = this.getTimeouts();\n\n // no enter animation skip right to ENTERED\n // if we are mounting and running this it means appear _must_ be set\n if (!mounting && !enter) {\n this.safeSetState({ status: ENTERED }, function () {\n _this2.props.onEntered(node);\n });\n return;\n }\n\n this.props.onEnter(node, appearing);\n\n this.safeSetState({ status: ENTERING }, function () {\n _this2.props.onEntering(node, appearing);\n\n // FIXME: appear timeout?\n _this2.onTransitionEnd(node, timeouts.enter, function () {\n _this2.safeSetState({ status: ENTERED }, function () {\n _this2.props.onEntered(node, appearing);\n });\n });\n });\n };\n\n Transition.prototype.performExit = function performExit(node) {\n var _this3 = this;\n\n var exit = this.props.exit;\n\n var timeouts = this.getTimeouts();\n\n // no exit animation skip right to EXITED\n if (!exit) {\n this.safeSetState({ status: EXITED }, function () {\n _this3.props.onExited(node);\n });\n return;\n }\n this.props.onExit(node);\n\n this.safeSetState({ status: EXITING }, function () {\n _this3.props.onExiting(node);\n\n _this3.onTransitionEnd(node, timeouts.exit, function () {\n _this3.safeSetState({ status: EXITED }, function () {\n _this3.props.onExited(node);\n });\n });\n });\n };\n\n Transition.prototype.cancelNextCallback = function cancelNextCallback() {\n if (this.nextCallback !== null) {\n this.nextCallback.cancel();\n this.nextCallback = null;\n }\n };\n\n Transition.prototype.safeSetState = function safeSetState(nextState, callback) {\n var _this4 = this;\n\n // We need to track pending updates for instances where a cWRP fires quickly\n // after cDM and before the state flushes, which would double trigger a\n // transition\n this.pendingState = nextState;\n\n // This shouldn't be necessary, but there are weird race conditions with\n // setState callbacks and unmounting in testing, so always make sure that\n // we can cancel any pending setState callbacks after we unmount.\n callback = this.setNextCallback(callback);\n this.setState(nextState, function () {\n _this4.pendingState = null;\n callback();\n });\n };\n\n Transition.prototype.setNextCallback = function setNextCallback(callback) {\n var _this5 = this;\n\n var active = true;\n\n this.nextCallback = function (event) {\n if (active) {\n active = false;\n _this5.nextCallback = null;\n\n callback(event);\n }\n };\n\n this.nextCallback.cancel = function () {\n active = false;\n };\n\n return this.nextCallback;\n };\n\n Transition.prototype.onTransitionEnd = function onTransitionEnd(node, timeout, handler) {\n this.setNextCallback(handler);\n\n if (node) {\n if (this.props.addEndListener) {\n this.props.addEndListener(node, this.nextCallback);\n }\n if (timeout != null) {\n setTimeout(this.nextCallback, timeout);\n }\n } else {\n setTimeout(this.nextCallback, 0);\n }\n };\n\n Transition.prototype.render = function render() {\n var status = this.state.status;\n if (status === UNMOUNTED) {\n return null;\n }\n\n var _props = this.props,\n children = _props.children,\n childProps = _objectWithoutProperties(_props, ['children']);\n // filter props for Transtition\n\n\n delete childProps.in;\n delete childProps.mountOnEnter;\n delete childProps.unmountOnExit;\n delete childProps.appear;\n delete childProps.enter;\n delete childProps.exit;\n delete childProps.timeout;\n delete childProps.addEndListener;\n delete childProps.onEnter;\n delete childProps.onEntering;\n delete childProps.onEntered;\n delete childProps.onExit;\n delete childProps.onExiting;\n delete childProps.onExited;\n\n if (typeof children === 'function') {\n return children(status, childProps);\n }\n\n var child = _react2.default.Children.only(children);\n return _react2.default.cloneElement(child, childProps);\n };\n\n return Transition;\n}(_react2.default.Component);\n\nTransition.contextTypes = {\n transitionGroup: PropTypes.object\n};\nTransition.childContextTypes = {\n transitionGroup: function transitionGroup() {}\n};\n\n\nTransition.propTypes = process.env.NODE_ENV !== \"production\" ? {\n /**\n * A `function` child can be used instead of a React element.\n * This function is called with the current transition status\n * ('entering', 'entered', 'exiting', 'exited', 'unmounted'), which can be used\n * to apply context specific props to a component.\n *\n * ```jsx\n * \n * {(status) => (\n * \n * )}\n * \n * ```\n */\n children: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.element.isRequired]).isRequired,\n\n /**\n * Show the component; triggers the enter or exit states\n */\n in: PropTypes.bool,\n\n /**\n * By default the child component is mounted immediately along with\n * the parent `Transition` component. If you want to \"lazy mount\" the component on the\n * first `in={true}` you can set `mountOnEnter`. After the first enter transition the component will stay\n * mounted, even on \"exited\", unless you also specify `unmountOnExit`.\n */\n mountOnEnter: PropTypes.bool,\n\n /**\n * By default the child component stays mounted after it reaches the `'exited'` state.\n * Set `unmountOnExit` if you'd prefer to unmount the component after it finishes exiting.\n */\n unmountOnExit: PropTypes.bool,\n\n /**\n * Normally a component is not transitioned if it is shown when the `` component mounts.\n * If you want to transition on the first mount set `appear` to `true`, and the\n * component will transition in as soon as the `` mounts.\n *\n * > Note: there are no specific \"appear\" states. `appear` only adds an additional `enter` transition.\n */\n appear: PropTypes.bool,\n\n /**\n * Enable or disable enter transitions.\n */\n enter: PropTypes.bool,\n\n /**\n * Enable or disable exit transitions.\n */\n exit: PropTypes.bool,\n\n /**\n * The duration of the transition, in milliseconds.\n * Required unless `addEndListener` is provided\n *\n * You may specify a single timeout for all transitions like: `timeout={500}`,\n * or individually like:\n *\n * ```jsx\n * timeout={{\n * enter: 300,\n * exit: 500,\n * }}\n * ```\n *\n * @type {number | { enter?: number, exit?: number }}\n */\n timeout: function timeout(props) {\n for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n var pt = _PropTypes.timeoutsShape;\n if (!props.addEndListener) pt = pt.isRequired;\n return pt.apply(undefined, [props].concat(args));\n },\n\n /**\n * Add a custom transition end trigger. Called with the transitioning\n * DOM node and a `done` callback. Allows for more fine grained transition end\n * logic. **Note:** Timeouts are still used as a fallback if provided.\n *\n * ```jsx\n * addEndListener={(node, done) => {\n * // use the css transitionend event to mark the finish of a transition\n * node.addEventListener('transitionend', done, false);\n * }}\n * ```\n */\n addEndListener: PropTypes.func,\n\n /**\n * Callback fired before the \"entering\" status is applied. An extra parameter\n * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount\n *\n * @type Function(node: HtmlElement, isAppearing: bool) -> void\n */\n onEnter: PropTypes.func,\n\n /**\n * Callback fired after the \"entering\" status is applied. An extra parameter\n * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount\n *\n * @type Function(node: HtmlElement, isAppearing: bool)\n */\n onEntering: PropTypes.func,\n\n /**\n * Callback fired after the \"entered\" status is applied. An extra parameter\n * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount\n *\n * @type Function(node: HtmlElement, isAppearing: bool) -> void\n */\n onEntered: PropTypes.func,\n\n /**\n * Callback fired before the \"exiting\" status is applied.\n *\n * @type Function(node: HtmlElement) -> void\n */\n onExit: PropTypes.func,\n\n /**\n * Callback fired after the \"exiting\" status is applied.\n *\n * @type Function(node: HtmlElement) -> void\n */\n onExiting: PropTypes.func,\n\n /**\n * Callback fired after the \"exited\" status is applied.\n *\n * @type Function(node: HtmlElement) -> void\n */\n onExited: PropTypes.func\n} : {};\n\n// Name the function so it is clearer in the documentation\nfunction noop() {}\n\nTransition.defaultProps = {\n in: false,\n mountOnEnter: false,\n unmountOnExit: false,\n appear: false,\n enter: true,\n exit: true,\n\n onEnter: noop,\n onEntering: noop,\n onEntered: noop,\n\n onExit: noop,\n onExiting: noop,\n onExited: noop\n};\n\nTransition.UNMOUNTED = 0;\nTransition.EXITED = 1;\nTransition.ENTERING = 2;\nTransition.ENTERED = 3;\nTransition.EXITING = 4;\n\nexports.default = Transition;","import React from 'react';\nimport PropTypes from 'prop-types';\n\nfunction CloseButton({ closeToast, type, ariaLabel }) {\n return (\n \n ✖\n \n );\n}\n\nCloseButton.propTypes = {\n closeToast: PropTypes.func,\n arialLabel: PropTypes.string\n};\n\nCloseButton.defaultProps = {\n ariaLabel: 'close'\n};\n\nexport default CloseButton;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport cx from 'classnames';\n\nimport { TYPE } from './../utils/constant';\n\nfunction ProgressBar({\n delay,\n isRunning,\n closeToast,\n type,\n hide,\n className,\n rtl\n}) {\n const style = {\n animationDuration: `${delay}ms`,\n animationPlayState: isRunning ? 'running' : 'paused',\n opacity: hide ? 0 : 1\n };\n\n const classNames = cx(\n 'Toastify__progress-bar',\n `Toastify__progress-bar--${type}`,\n {\n 'Toastify__progress-bar--rtl': rtl\n },\n className\n );\n\n return (\n
\n );\n}\n\nProgressBar.propTypes = {\n /**\n * The animation delay which determine when to close the toast\n */\n delay: PropTypes.number.isRequired,\n\n /**\n * Whether or not the animation is running or paused\n */\n isRunning: PropTypes.bool.isRequired,\n\n /**\n * Func to close the current toast\n */\n closeToast: PropTypes.func.isRequired,\n\n /**\n * Support rtl content\n */\n rtl: PropTypes.bool.isRequired,\n\n /**\n * Optional type : info, success ...\n */\n type: PropTypes.string,\n\n /**\n * Hide or not the progress bar\n */\n hide: PropTypes.bool,\n\n /**\n * Optionnal className\n */\n className: PropTypes.oneOfType([PropTypes.string, PropTypes.object])\n};\n\nProgressBar.defaultProps = {\n type: TYPE.DEFAULT,\n hide: false\n};\n\nexport default ProgressBar;\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport cx from 'classnames';\n\nimport ProgressBar from './ProgressBar';\nimport { POSITION, TYPE } from './../utils/constant';\nimport {\n falseOrElement,\n falseOrDelay,\n objectValues\n} from './../utils/propValidator';\n\nfunction getX(e) {\n return e.targetTouches && e.targetTouches.length >= 1\n ? e.targetTouches[0].clientX\n : e.clientX;\n}\n\nfunction getY(e) {\n return e.targetTouches && e.targetTouches.length >= 1\n ? e.targetTouches[0].clientY\n : e.clientY;\n}\n\nconst noop = () => {};\n\nclass Toast extends Component {\n static propTypes = {\n closeButton: falseOrElement.isRequired,\n autoClose: falseOrDelay.isRequired,\n children: PropTypes.node.isRequired,\n closeToast: PropTypes.func.isRequired,\n position: PropTypes.oneOf(objectValues(POSITION)).isRequired,\n pauseOnHover: PropTypes.bool.isRequired,\n closeOnClick: PropTypes.bool.isRequired,\n transition: PropTypes.func.isRequired,\n isDocumentHidden: PropTypes.bool.isRequired,\n rtl: PropTypes.bool.isRequired,\n hideProgressBar: PropTypes.bool.isRequired,\n draggable: PropTypes.bool.isRequired,\n draggablePercent: PropTypes.number.isRequired,\n in: PropTypes.bool,\n onExited: PropTypes.func,\n onOpen: PropTypes.func,\n onClose: PropTypes.func,\n type: PropTypes.oneOf(objectValues(TYPE)),\n className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]),\n bodyClassName: PropTypes.oneOfType([PropTypes.string, PropTypes.object]),\n progressClassName: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.object\n ]),\n updateId: PropTypes.number,\n ariaLabel: PropTypes.string\n };\n\n static defaultProps = {\n type: TYPE.DEFAULT,\n in: true,\n onOpen: noop,\n onClose: noop,\n className: null,\n bodyClassName: null,\n progressClassName: null,\n updateId: null,\n role: 'alert'\n };\n\n state = {\n isRunning: true,\n preventExitTransition: false\n };\n\n flag = {\n canCloseOnClick: true,\n canDrag: false\n };\n\n drag = {\n start: 0,\n x: 0,\n y: 0,\n deltaX: 0,\n removalDistance: 0\n };\n\n ref = null;\n\n componentDidMount() {\n this.props.onOpen(this.props.children.props);\n\n if (this.props.draggable) {\n document.addEventListener('mousemove', this.onDragMove);\n document.addEventListener('mouseup', this.onDragEnd);\n\n document.addEventListener('touchmove', this.onDragMove);\n document.addEventListener('touchend', this.onDragEnd);\n }\n }\n\n componentWillUnmount() {\n this.props.onClose(this.props.children.props);\n\n if (this.props.draggable) {\n document.removeEventListener('mousemove', this.onDragMove);\n document.removeEventListener('mouseup', this.onDragEnd);\n\n document.removeEventListener('touchmove', this.onDragMove);\n document.removeEventListener('touchend', this.onDragEnd);\n }\n }\n\n componentWillReceiveProps(nextProps) {\n if (this.props.isDocumentHidden !== nextProps.isDocumentHidden) {\n this.setState({\n isRunning: !nextProps.isDocumentHidden\n });\n }\n }\n\n pauseToast = () => {\n this.setState({ isRunning: false });\n };\n\n playToast = () => {\n this.setState({ isRunning: true });\n };\n\n onDragStart = e => {\n this.flag.canCloseOnClick = true;\n this.flag.canDrag = true;\n\n this.ref.style.transition = '';\n\n this.drag.start = this.drag.x = getX(e.nativeEvent);\n this.drag.removalDistance =\n this.ref.offsetWidth * (this.props.draggablePercent / 100);\n };\n\n onDragMove = e => {\n if (this.flag.canDrag) {\n if (this.state.isRunning) {\n this.pauseToast();\n }\n\n this.drag.x = getX(e);\n this.drag.deltaX = this.drag.x - this.drag.start;\n\n // prevent false positif during a toast click\n this.drag.start !== this.drag.x && (this.flag.canCloseOnClick = false);\n\n this.ref.style.transform = `translateX(${this.drag.deltaX}px)`;\n this.ref.style.opacity =\n 1 - Math.abs(this.drag.deltaX / this.drag.removalDistance);\n }\n };\n\n onDragEnd = e => {\n if (this.flag.canDrag) {\n this.flag.canDrag = false;\n\n if (Math.abs(this.drag.deltaX) > this.drag.removalDistance) {\n this.setState(\n {\n preventExitTransition: true\n },\n this.props.closeToast\n );\n return;\n }\n\n this.drag.y = getY(e);\n this.ref.style.transition = 'transform 0.2s, opacity 0.2s';\n this.ref.style.transform = 'translateX(0)';\n this.ref.style.opacity = 1;\n }\n };\n\n onDragTransitionEnd = () => {\n const { top, bottom, left, right } = this.ref.getBoundingClientRect();\n\n if (\n this.props.pauseOnHover &&\n this.drag.x >= left &&\n this.drag.x <= right &&\n this.drag.y >= top &&\n this.drag.y <= bottom\n ) {\n this.pauseToast();\n } else {\n this.playToast();\n }\n };\n\n render() {\n const {\n closeButton,\n children,\n autoClose,\n pauseOnHover,\n closeOnClick,\n type,\n hideProgressBar,\n closeToast,\n transition: Transition,\n position,\n onExited,\n className,\n bodyClassName,\n progressClassName,\n updateId,\n role,\n rtl\n } = this.props;\n\n const toastProps = {\n className: cx(\n 'Toastify__toast',\n `Toastify__toast--${type}`,\n {\n 'Toastify__toast--rtl': rtl\n },\n className\n )\n };\n\n if (autoClose && pauseOnHover) {\n toastProps.onMouseEnter = this.pauseToast;\n toastProps.onMouseLeave = this.playToast;\n }\n\n // prevent toast from closing when user drags the toast\n if (closeOnClick) {\n toastProps.onClick = () => this.flag.canCloseOnClick && closeToast();\n }\n\n return (\n \n (this.ref = ref)}\n onMouseDown={this.onDragStart}\n onTouchStart={this.onDragStart}\n onTransitionEnd={this.onDragTransitionEnd}\n >\n \n {children}\n
\n {closeButton !== false && closeButton}\n {autoClose !== false && (\n \n )}\n \n
\n );\n }\n}\n\nexport default Toast;\n","'use strict';\n\nexports.__esModule = true;\nexports.getChildMapping = getChildMapping;\nexports.mergeChildMappings = mergeChildMappings;\n\nvar _react = require('react');\n\n/**\n * Given `this.props.children`, return an object mapping key to child.\n *\n * @param {*} children `this.props.children`\n * @return {object} Mapping of key to child\n */\nfunction getChildMapping(children, mapFn) {\n var mapper = function mapper(child) {\n return mapFn && (0, _react.isValidElement)(child) ? mapFn(child) : child;\n };\n\n var result = Object.create(null);\n if (children) _react.Children.map(children, function (c) {\n return c;\n }).forEach(function (child) {\n // run the map function here instead so that the key is the computed one\n result[child.key] = mapper(child);\n });\n return result;\n}\n\n/**\n * When you're adding or removing children some may be added or removed in the\n * same render pass. We want to show *both* since we want to simultaneously\n * animate elements in and out. This function takes a previous set of keys\n * and a new set of keys and merges them with its best guess of the correct\n * ordering. In the future we may expose some of the utilities in\n * ReactMultiChild to make this easy, but for now React itself does not\n * directly have this concept of the union of prevChildren and nextChildren\n * so we implement it here.\n *\n * @param {object} prev prev children as returned from\n * `ReactTransitionChildMapping.getChildMapping()`.\n * @param {object} next next children as returned from\n * `ReactTransitionChildMapping.getChildMapping()`.\n * @return {object} a key set that contains all keys in `prev` and all keys\n * in `next` in a reasonable order.\n */\nfunction mergeChildMappings(prev, next) {\n prev = prev || {};\n next = next || {};\n\n function getValueForKey(key) {\n return key in next ? next[key] : prev[key];\n }\n\n // For each key of `next`, the list of keys to insert before that key in\n // the combined list\n var nextKeysPending = Object.create(null);\n\n var pendingKeys = [];\n for (var prevKey in prev) {\n if (prevKey in next) {\n if (pendingKeys.length) {\n nextKeysPending[prevKey] = pendingKeys;\n pendingKeys = [];\n }\n } else {\n pendingKeys.push(prevKey);\n }\n }\n\n var i = void 0;\n var childMapping = {};\n for (var nextKey in next) {\n if (nextKeysPending[nextKey]) {\n for (i = 0; i < nextKeysPending[nextKey].length; i++) {\n var pendingNextKey = nextKeysPending[nextKey][i];\n childMapping[nextKeysPending[nextKey][i]] = getValueForKey(pendingNextKey);\n }\n }\n childMapping[nextKey] = getValueForKey(nextKey);\n }\n\n // Finally, add the keys which didn't appear before any key in `next`\n for (i = 0; i < pendingKeys.length; i++) {\n childMapping[pendingKeys[i]] = getValueForKey(pendingKeys[i]);\n }\n\n return childMapping;\n}","'use strict';\n\nexports.__esModule = true;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _propTypes = require('prop-types');\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _ChildMapping = require('./utils/ChildMapping');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar values = Object.values || function (obj) {\n return Object.keys(obj).map(function (k) {\n return obj[k];\n });\n};\n\nvar propTypes = {\n /**\n * `` renders a `
` by default. You can change this\n * behavior by providing a `component` prop.\n * If you use React v16+ and would like to avoid a wrapping `
` element\n * you can pass in `component={null}`. This is useful if the wrapping div\n * borks your css styles.\n */\n component: _propTypes2.default.any,\n /**\n * A set of `` components, that are toggled `in` and out as they\n * leave. the `` will inject specific transition props, so\n * remember to spread them through if you are wrapping the `` as\n * with our `` example.\n */\n children: _propTypes2.default.node,\n\n /**\n * A convenience prop that enables or disables appear animations\n * for all children. Note that specifying this will override any defaults set\n * on individual children Transitions.\n */\n appear: _propTypes2.default.bool,\n /**\n * A convenience prop that enables or disables enter animations\n * for all children. Note that specifying this will override any defaults set\n * on individual children Transitions.\n */\n enter: _propTypes2.default.bool,\n /**\n * A convenience prop that enables or disables exit animations\n * for all children. Note that specifying this will override any defaults set\n * on individual children Transitions.\n */\n exit: _propTypes2.default.bool,\n\n /**\n * You may need to apply reactive updates to a child as it is exiting.\n * This is generally done by using `cloneElement` however in the case of an exiting\n * child the element has already been removed and not accessible to the consumer.\n *\n * If you do need to update a child as it leaves you can provide a `childFactory`\n * to wrap every child, even the ones that are leaving.\n *\n * @type Function(child: ReactElement) -> ReactElement\n */\n childFactory: _propTypes2.default.func\n};\n\nvar defaultProps = {\n component: 'div',\n childFactory: function childFactory(child) {\n return child;\n }\n};\n\n/**\n * The `` component manages a set of `` components\n * in a list. Like with the `` component, ``, is a\n * state machine for managing the mounting and unmounting of components over\n * time.\n *\n * Consider the example below using the `Fade` CSS transition from before.\n * As items are removed or added to the TodoList the `in` prop is toggled\n * automatically by the ``. You can use _any_ ``\n * component in a ``, not just css.\n *\n * ## Example\n *\n * \n *\n * Note that `` does not define any animation behavior!\n * Exactly _how_ a list item animates is up to the individual ``\n * components. This means you can mix and match animations across different\n * list items.\n */\n\nvar TransitionGroup = function (_React$Component) {\n _inherits(TransitionGroup, _React$Component);\n\n function TransitionGroup(props, context) {\n _classCallCheck(this, TransitionGroup);\n\n // Initial children should all be entering, dependent on appear\n var _this = _possibleConstructorReturn(this, _React$Component.call(this, props, context));\n\n _this.state = {\n children: (0, _ChildMapping.getChildMapping)(props.children, function (child) {\n return (0, _react.cloneElement)(child, {\n onExited: _this.handleExited.bind(_this, child),\n in: true,\n appear: _this.getProp(child, 'appear'),\n enter: _this.getProp(child, 'enter'),\n exit: _this.getProp(child, 'exit')\n });\n })\n };\n return _this;\n }\n\n TransitionGroup.prototype.getChildContext = function getChildContext() {\n return {\n transitionGroup: { isMounting: !this.appeared }\n };\n };\n // use child config unless explictly set by the Group\n\n\n TransitionGroup.prototype.getProp = function getProp(child, prop) {\n var props = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.props;\n\n return props[prop] != null ? props[prop] : child.props[prop];\n };\n\n TransitionGroup.prototype.componentDidMount = function componentDidMount() {\n this.appeared = true;\n };\n\n TransitionGroup.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {\n var _this2 = this;\n\n var prevChildMapping = this.state.children;\n var nextChildMapping = (0, _ChildMapping.getChildMapping)(nextProps.children);\n\n var children = (0, _ChildMapping.mergeChildMappings)(prevChildMapping, nextChildMapping);\n\n Object.keys(children).forEach(function (key) {\n var child = children[key];\n\n if (!(0, _react.isValidElement)(child)) return;\n\n var hasPrev = key in prevChildMapping;\n var hasNext = key in nextChildMapping;\n\n var prevChild = prevChildMapping[key];\n var isLeaving = (0, _react.isValidElement)(prevChild) && !prevChild.props.in;\n\n // item is new (entering)\n if (hasNext && (!hasPrev || isLeaving)) {\n // console.log('entering', key)\n children[key] = (0, _react.cloneElement)(child, {\n onExited: _this2.handleExited.bind(_this2, child),\n in: true,\n exit: _this2.getProp(child, 'exit', nextProps),\n enter: _this2.getProp(child, 'enter', nextProps)\n });\n }\n // item is old (exiting)\n else if (!hasNext && hasPrev && !isLeaving) {\n // console.log('leaving', key)\n children[key] = (0, _react.cloneElement)(child, { in: false });\n }\n // item hasn't changed transition states\n // copy over the last transition props;\n else if (hasNext && hasPrev && (0, _react.isValidElement)(prevChild)) {\n // console.log('unchanged', key)\n children[key] = (0, _react.cloneElement)(child, {\n onExited: _this2.handleExited.bind(_this2, child),\n in: prevChild.props.in,\n exit: _this2.getProp(child, 'exit', nextProps),\n enter: _this2.getProp(child, 'enter', nextProps)\n });\n }\n });\n\n this.setState({ children: children });\n };\n\n TransitionGroup.prototype.handleExited = function handleExited(child, node) {\n var currentChildMapping = (0, _ChildMapping.getChildMapping)(this.props.children);\n\n if (child.key in currentChildMapping) return;\n\n if (child.props.onExited) {\n child.props.onExited(node);\n }\n\n this.setState(function (state) {\n var children = _extends({}, state.children);\n\n delete children[child.key];\n return { children: children };\n });\n };\n\n TransitionGroup.prototype.render = function render() {\n var _props = this.props,\n Component = _props.component,\n childFactory = _props.childFactory,\n props = _objectWithoutProperties(_props, ['component', 'childFactory']);\n\n var children = values(this.state.children).map(childFactory);\n\n delete props.appear;\n delete props.enter;\n delete props.exit;\n\n if (Component === null) {\n return children;\n }\n return _react2.default.createElement(\n Component,\n props,\n children\n );\n };\n\n return TransitionGroup;\n}(_react2.default.Component);\n\nTransitionGroup.childContextTypes = {\n transitionGroup: _propTypes2.default.object.isRequired\n};\n\n\nTransitionGroup.propTypes = process.env.NODE_ENV !== \"production\" ? propTypes : {};\nTransitionGroup.defaultProps = defaultProps;\n\nexports.default = TransitionGroup;\nmodule.exports = exports['default'];","import React, { Component, isValidElement, cloneElement } from 'react';\nimport PropTypes from 'prop-types';\nimport cx from 'classnames';\nimport TransitionGroup from 'react-transition-group/TransitionGroup';\n\nimport Toast from './Toast';\nimport CloseButton from './CloseButton';\nimport { Bounce } from './Transitions';\nimport { POSITION, ACTION } from './../utils/constant';\nimport EventManager from './../utils/EventManager';\nimport {\n falseOrDelay,\n falseOrElement,\n isValidDelay,\n objectValues\n} from './../utils/propValidator';\n\nclass ToastContainer extends Component {\n static propTypes = {\n /**\n * Set toast position\n */\n position: PropTypes.oneOf(objectValues(POSITION)),\n\n /**\n * Disable or set autoClose delay\n */\n autoClose: falseOrDelay,\n\n /**\n * Disable or set a custom react element for the close button\n */\n closeButton: falseOrElement,\n\n /**\n * Hide or not progress bar when autoClose is enabled\n */\n hideProgressBar: PropTypes.bool,\n\n /**\n * Pause toast duration on hover\n */\n pauseOnHover: PropTypes.bool,\n\n /**\n * Dismiss toast on click\n */\n closeOnClick: PropTypes.bool,\n\n /**\n * Newest on top\n */\n newestOnTop: PropTypes.bool,\n\n /**\n * An optional className\n */\n className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]),\n\n /**\n * An optional style\n */\n style: PropTypes.object,\n\n /**\n * An optional className for the toast\n */\n toastClassName: PropTypes.oneOfType([PropTypes.string, PropTypes.object]),\n\n /**\n * An optional className for the toast body\n */\n bodyClassName: PropTypes.oneOfType([PropTypes.string, PropTypes.object]),\n\n /**\n * An optional className for the toast progress bar\n */\n progressClassName: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.object\n ]),\n\n /**\n * Define enter and exit transition using react-transition-group\n */\n transition: PropTypes.func,\n\n /**\n * Support rtl display\n */\n rtl: PropTypes.bool,\n\n /**\n * Allow toast to be draggable\n */\n draggable: PropTypes.bool,\n\n /**\n * The percentage of the toast's width it takes for a drag to dismiss a toast\n */\n draggablePercent: PropTypes.number,\n\n /**\n * pause on document visibility change\n */\n pauseOnVisibilityChange: PropTypes.bool\n };\n\n static defaultProps = {\n position: POSITION.TOP_RIGHT,\n transition: Bounce,\n rtl: false,\n pauseOnVisibilityChange: true,\n autoClose: 5000,\n hideProgressBar: false,\n closeButton: ,\n pauseOnHover: true,\n closeOnClick: true,\n newestOnTop: false,\n draggable: true,\n draggablePercent: 80,\n className: null,\n style: null,\n toastClassName: null,\n bodyClassName: null,\n progressClassName: null\n };\n\n /**\n * Hold toast ids\n */\n state = {\n toast: [],\n isDocumentHidden: false\n };\n\n /**\n * Hold toast's informations:\n * - what to render\n * - position\n * - raw content\n * - options\n */\n collection = {};\n\n componentDidMount() {\n const { SHOW, CLEAR, MOUNTED } = ACTION;\n EventManager.on(SHOW, (content, options) => this.show(content, options))\n .on(CLEAR, id => (id !== null ? this.removeToast(id) : this.clear()))\n .emit(MOUNTED, this);\n\n this.props.pauseOnVisibilityChange &&\n document.addEventListener('visibilitychange', this.isDocumentHidden);\n }\n\n componentWillUnmount() {\n EventManager.off(ACTION.SHOW);\n EventManager.off(ACTION.CLEAR);\n\n this.props.pauseOnVisibilityChange &&\n document.removeEventListener('visibilitychange', this.isDocumentHidden);\n }\n\n isDocumentHidden = () => this.setState({ isDocumentHidden: document.hidden });\n\n isToastActive = id => this.state.toast.indexOf(parseInt(id, 10)) !== -1;\n\n removeToast(id) {\n this.setState(\n {\n toast: this.state.toast.filter(v => v !== parseInt(id, 10))\n },\n this.dispatchChange\n );\n }\n\n dispatchChange() {\n EventManager.emit(ACTION.ON_CHANGE, this.state.toast.length);\n }\n\n makeCloseButton(toastClose, toastId, type) {\n let closeButton = this.props.closeButton;\n\n if (isValidElement(toastClose) || toastClose === false) {\n closeButton = toastClose;\n }\n\n return closeButton === false\n ? false\n : cloneElement(closeButton, {\n closeToast: () => this.removeToast(toastId),\n type: type\n });\n }\n\n getAutoCloseDelay(toastAutoClose) {\n return toastAutoClose === false || isValidDelay(toastAutoClose)\n ? toastAutoClose\n : this.props.autoClose;\n }\n\n canBeRendered(content) {\n return (\n isValidElement(content) ||\n typeof content === 'string' ||\n typeof content === 'number' ||\n typeof content === 'function'\n );\n }\n\n show(content, options) {\n if (!this.canBeRendered(content)) {\n throw new Error(\n `The element you provided cannot be rendered. You provided an element of type ${typeof content}`\n );\n }\n const toastId = options.toastId;\n const closeToast = () => this.removeToast(toastId);\n const toastOptions = {\n id: toastId,\n type: options.type,\n closeToast: closeToast,\n updateId: options.updateId,\n rtl: this.props.rtl,\n position: options.position || this.props.position,\n transition: options.transition || this.props.transition,\n className: options.className || this.props.toastClassName,\n bodyClassName: options.bodyClassName || this.props.bodyClassName,\n closeButton: this.makeCloseButton(\n options.closeButton,\n toastId,\n options.type\n ),\n pauseOnHover:\n options.pauseOnHover !== null\n ? options.pauseOnHover\n : this.props.pauseOnHover,\n draggable:\n options.draggable !== null ? options.draggable : this.props.draggable,\n draggablePercent:\n options.draggable !== null\n ? options.draggablePercent\n : this.props.draggablePercent,\n closeOnClick:\n options.closeOnClick !== null\n ? options.closeOnClick\n : this.props.closeOnClick,\n progressClassName:\n options.progressClassName || this.props.progressClassName,\n autoClose: this.getAutoCloseDelay(\n options.autoClose !== false\n ? parseInt(options.autoClose, 10)\n : options.autoClose\n ),\n hideProgressBar:\n typeof options.hideProgressBar === 'boolean'\n ? options.hideProgressBar\n : this.props.hideProgressBar\n };\n\n typeof options.onOpen === 'function' &&\n (toastOptions.onOpen = options.onOpen);\n\n typeof options.onClose === 'function' &&\n (toastOptions.onClose = options.onClose);\n\n // add closeToast function to react component only\n if (\n isValidElement(content) &&\n typeof content.type !== 'string' &&\n typeof content.type !== 'number'\n ) {\n content = cloneElement(content, {\n closeToast\n });\n } else if (typeof content === 'function') {\n content = content({ closeToast });\n }\n\n this.collection = {\n ...this.collection,\n [toastId]: {\n position: toastOptions.position,\n options: toastOptions,\n content: content\n }\n };\n\n this.setState(\n {\n toast:\n toastOptions.updateId !== null\n ? [...this.state.toast]\n : [...this.state.toast, toastId]\n },\n this.dispatchChange\n );\n }\n\n makeToast(content, options) {\n return (\n \n {content}\n \n );\n }\n\n clear() {\n this.setState({ toast: [] });\n }\n\n renderToast() {\n const toastToRender = {};\n const { className, style, newestOnTop } = this.props;\n const collection = newestOnTop\n ? Object.keys(this.collection).reverse()\n : Object.keys(this.collection);\n\n // group toast by position\n collection.forEach(toastId => {\n const toast = this.collection[toastId];\n toastToRender[toast.position] || (toastToRender[toast.position] = []);\n\n if (this.state.toast.indexOf(parseInt(toastId, 10)) !== -1) {\n toastToRender[toast.position].push(\n this.makeToast(toast.content, toast.options)\n );\n } else {\n toastToRender[toast.position].push(null);\n delete this.collection[toastId];\n }\n });\n\n return Object.keys(toastToRender).map(position => {\n const disablePointer =\n toastToRender[position].length === 1 &&\n toastToRender[position][0] === null;\n const props = {\n className: cx(\n 'Toastify__toast-container',\n `Toastify__toast-container--${position}`,\n { 'Toastify__toast-container--rtl': this.props.rtl },\n className\n ),\n style: disablePointer\n ? { ...style, pointerEvents: 'none' }\n : { ...style }\n };\n\n return (\n \n {toastToRender[position]}\n \n );\n });\n }\n\n render() {\n return
{this.renderToast()}
;\n }\n}\n\nexport default ToastContainer;\n","import ToastContainer from './components/ToastContainer';\nimport { Bounce, Slide, Zoom, Flip } from './components/Transitions';\nimport toaster from './toaster';\nimport cssTransition from './utils/cssTransition';\n\nexport {\n ToastContainer,\n toaster as toast,\n cssTransition,\n Bounce,\n Slide,\n Zoom,\n Flip\n};\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack://ReactToastify/webpack/universalModuleDefinition","webpack://ReactToastify/webpack/bootstrap","webpack://ReactToastify/external \"react\"","webpack://ReactToastify/external \"prop-types\"","webpack://ReactToastify/./src/utils/constant.js","webpack://ReactToastify/./node_modules/classnames/index.js","webpack://ReactToastify/./src/utils/EventManager.js","webpack://ReactToastify/./src/utils/cssTransition.js","webpack://ReactToastify/./src/components/Transitions.js","webpack://ReactToastify/./src/utils/propValidator.js","webpack://ReactToastify/./src/toaster.js","webpack://ReactToastify/./node_modules/react-transition-group/utils/PropTypes.js","webpack://ReactToastify/external \"react-dom\"","webpack://ReactToastify/./node_modules/react-transition-group/Transition.js","webpack://ReactToastify/./src/components/CloseButton.js","webpack://ReactToastify/./src/components/ProgressBar.js","webpack://ReactToastify/./src/components/Toast.js","webpack://ReactToastify/./node_modules/react-transition-group/utils/ChildMapping.js","webpack://ReactToastify/./node_modules/react-transition-group/TransitionGroup.js","webpack://ReactToastify/./src/components/ToastContainer.js","webpack://ReactToastify/./src/index.js"],"names":["root","factory","exports","module","require","define","amd","window","__WEBPACK_EXTERNAL_MODULE__0__","__WEBPACK_EXTERNAL_MODULE__1__","__WEBPACK_EXTERNAL_MODULE__10__","installedModules","__webpack_require__","moduleId","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","POSITION","TOP_LEFT","TOP_RIGHT","TOP_CENTER","BOTTOM_LEFT","BOTTOM_RIGHT","BOTTOM_CENTER","TYPE","INFO","SUCCESS","WARNING","ERROR","DEFAULT","ACTION","SHOW","CLEAR","MOUNTED","ON_CHANGE","__WEBPACK_AMD_DEFINE_RESULT__","hasOwn","classNames","classes","arguments","length","arg","argType","push","Array","isArray","apply","join","undefined","eventManager","eventList","Map","on","event","callback","this","has","set","off","delete","emit","_this","_len","args","_key","forEach","setTimeout","concat","_toConsumableArray","_ref","enter","exit","_ref$duration","duration","_ref$appendPosition","appendPosition","_ref2","children","position","preventExitTransition","props","_objectWithoutProperties","enterClassName","exitClassName","enterDuration","exitDuration","_duration","_slicedToArray","_react2","default","createElement","_Transition2","_extends","timeout","onEnter","node","classList","add","style","animationFillMode","animationDuration","onEntered","remove","cssText","onExit","noop","_cssTransition","Bounce","_cssTransition2","Slide","Zoom","Flip","isValidDelay","objectValues","obj","keys","map","_react","val","isNaN","withRequired","fn","isRequired","propName","componentName","Error","falseOrDelay","prop","falseOrElement","isValidElement","_EventManager","_constant","defaultOptions","type","autoClose","closeButton","hideProgressBar","pauseOnHover","closeOnClick","className","bodyClassName","progressClassName","transition","updateId","draggable","container","queue","toastId","mergeOptions","options","emitEvent","content","EventManager","action","toaster","success","info","warn","warning","error","dismiss","id","isActive","update","collection","_container$collection","oldOptions","oldContent","nextOptions","render","onChange","containerInstance","isToastActive","item","classNamesShape","timeoutsShape","transitionTimeout","transitionType","timeoutPropName","enabledPropName","_propTypes","_propTypes2","oneOfType","number","shape","string","active","enterDone","enterActive","exitDone","exitActive","EXITING","ENTERED","ENTERING","EXITED","UNMOUNTED","PropTypes","newObj","_interopRequireWildcard","_interopRequireDefault","_reactDom2","Transition","_React$Component","context","instance","Constructor","TypeError","_classCallCheck","self","ReferenceError","_possibleConstructorReturn","parentGroup","transitionGroup","appear","isMounting","initialStatus","nextStatus","in","unmountOnExit","mountOnEnter","state","status","nextCallback","subClass","superClass","constructor","writable","configurable","setPrototypeOf","__proto__","_inherits","getChildContext","componentDidMount","updateStatus","componentWillReceiveProps","nextProps","pendingState","setState","componentDidUpdate","componentWillUnmount","cancelNextCallback","getTimeouts","mounting","findDOMNode","performEnter","performExit","_this2","appearing","timeouts","safeSetState","onEntering","onTransitionEnd","_this3","onExiting","onExited","cancel","nextState","_this4","setNextCallback","_this5","handler","addEndListener","_props","childProps","target","indexOf","child","Children","only","cloneElement","Component","contextTypes","childContextTypes","propTypes","defaultProps","CloseButton","closeToast","ariaLabel","onClick","aria-label","func","arialLabel","ProgressBar","delay","isRunning","hide","rtl","animationPlayState","opacity","_classnames2","Toastify__progress-bar--rtl","onAnimationEnd","bool","_propValidator","getX","e","targetTouches","clientX","Toast","flag","canCloseOnClick","canDrag","drag","start","x","y","deltaX","removalDistance","ref","pauseToast","playToast","onDragStart","nativeEvent","offsetWidth","draggablePercent","onDragMove","transform","Math","abs","onDragEnd","clientY","getY","onDragTransitionEnd","_this$ref$getBounding","getBoundingClientRect","top","bottom","left","right","onOpen","bindDragEvents","document","addEventListener","removeEventListener","prevProps","unbindDragEvents","onClose","role","toastProps","Toastify__toast--rtl","onMouseEnter","onMouseLeave","onMouseDown","onTouchStart","_ProgressBar2","oneOf","isDocumentHidden","getChildMapping","mapFn","result","mapper","mergeChildMappings","prev","next","getValueForKey","nextKeysPending","pendingKeys","prevKey","childMapping","nextKey","pendingNextKey","assign","source","_ChildMapping","values","k","TransitionGroup","any","handleExited","getProp","appeared","prevChildMapping","nextChildMapping","hasPrev","hasNext","prevChild","isLeaving","currentChildMapping","component","childFactory","_Transitions","ToastContainer","toast","parseInt","show","removeToast","clear","filter","v","dispatchChange","toastClose","toastAutoClose","_typeof","toString","canBeRendered","toastOptions","parseClassName","toastClassName","makeCloseButton","getAutoCloseDelay","_Toast2","toastToRender","newestOnTop","reverse","makeToast","disablePointer","Toastify__toast-container--rtl","pointerEvents","_TransitionGroup2","renderToast","pauseOnVisibilityChange","_CloseButton2","cssTransition"],"mappings":"CAAA,SAAAA,EAAAC,GACA,iBAAAC,SAAA,iBAAAC,OACAA,OAAAD,QAAAD,EAAAG,QAAA,SAAAA,QAAA,cAAAA,QAAA,cACA,mBAAAC,eAAAC,IACAD,QAAA,kCAAAJ,GACA,iBAAAC,QACAA,QAAA,cAAAD,EAAAG,QAAA,SAAAA,QAAA,cAAAA,QAAA,cAEAJ,EAAA,cAAAC,EAAAD,EAAA,MAAAA,EAAA,cAAAA,EAAA,cARA,CASCO,OAAA,SAAAC,EAAAC,EAAAC,GACD,mBCTA,IAAAC,KAGA,SAAAC,EAAAC,GAGA,GAAAF,EAAAE,GACA,OAAAF,EAAAE,GAAAX,QAGA,IAAAC,EAAAQ,EAAAE,IACAC,EAAAD,EACAE,GAAA,EACAb,YAUA,OANAc,EAAAH,GAAAI,KAAAd,EAAAD,QAAAC,IAAAD,QAAAU,GAGAT,EAAAY,GAAA,EAGAZ,EAAAD,QA0DA,OArDAU,EAAAM,EAAAF,EAGAJ,EAAAO,EAAAR,EAGAC,EAAAQ,EAAA,SAAAlB,EAAAmB,EAAAC,GACAV,EAAAW,EAAArB,EAAAmB,IACAG,OAAAC,eAAAvB,EAAAmB,GAA0CK,YAAA,EAAAC,IAAAL,KAK1CV,EAAAgB,E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B,EACjBD,YAAa/C,EAAAC,QAAAC,cAACiU,EAAAlU,QAAD,MACbgD,cAAc,EACdC,cAAc,EACdwQ,aAAa,EACblQ,WAAW,EACX0K,iBAAkB,GAClB/K,UAAW,KACXzC,MAAO,KACP2S,eAAgB,KAChBjQ,cAAe,KACfC,kBAAmB,gBA2PRgP,gKCzXf,QAAA9Y,EAAA,KACA6Y,EAAA7Y,EAAA,OACAA,EAAA,QACAA,EAAA,yDAGE8Y,2BACWC,MAAXpO,YACAkQ,0BACAjT,kBACAE,gBACAC,cACAC","file":"ReactToastify.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"react\"), require(\"prop-types\"), require(\"react-dom\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"react\", \"prop-types\", \"react-dom\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"ReactToastify\"] = factory(require(\"react\"), require(\"prop-types\"), require(\"react-dom\"));\n\telse\n\t\troot[\"ReactToastify\"] = factory(root[\"react\"], root[\"prop-types\"], root[\"react-dom\"]);\n})(window, function(__WEBPACK_EXTERNAL_MODULE__0__, __WEBPACK_EXTERNAL_MODULE__1__, __WEBPACK_EXTERNAL_MODULE__10__) {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 18);\n","module.exports = __WEBPACK_EXTERNAL_MODULE__0__;","module.exports = __WEBPACK_EXTERNAL_MODULE__1__;","export const POSITION = {\n TOP_LEFT: 'top-left',\n TOP_RIGHT: 'top-right',\n TOP_CENTER: 'top-center',\n BOTTOM_LEFT: 'bottom-left',\n BOTTOM_RIGHT: 'bottom-right',\n BOTTOM_CENTER: 'bottom-center'\n};\n\nexport const TYPE = {\n INFO: 'info',\n SUCCESS: 'success',\n WARNING: 'warning',\n ERROR: 'error',\n DEFAULT: 'default'\n};\nexport const ACTION = {\n SHOW: 'SHOW_TOAST',\n CLEAR: 'CLEAR_TOAST',\n MOUNTED: 'CONTAINER_MOUNTED',\n ON_CHANGE: 'ON_CHANGE'\n};\n","/*!\n Copyright (c) 2016 Jed Watson.\n Licensed under the MIT License (MIT), see\n http://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames () {\n\t\tvar classes = [];\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (!arg) continue;\n\n\t\t\tvar argType = typeof arg;\n\n\t\t\tif (argType === 'string' || argType === 'number') {\n\t\t\t\tclasses.push(arg);\n\t\t\t} else if (Array.isArray(arg)) {\n\t\t\t\tclasses.push(classNames.apply(null, arg));\n\t\t\t} else if (argType === 'object') {\n\t\t\t\tfor (var key in arg) {\n\t\t\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\t\t\tclasses.push(key);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn classes.join(' ');\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n","const eventManager = {\n eventList: new Map(),\n\n on(event, callback) {\n this.eventList.has(event) || this.eventList.set(event, []);\n\n this.eventList.get(event).push(callback);\n\n return this;\n },\n\n off(event = null) {\n return this.eventList.delete(event);\n },\n\n emit(event, ...args) {\n if (!this.eventList.has(event)) {\n return false;\n }\n\n this.eventList\n .get(event)\n .forEach(callback => setTimeout(() => callback.call(this, ...args), 0));\n\n return true;\n }\n};\n\nexport default eventManager;\n","import React from 'react';\nimport Transition from 'react-transition-group/Transition';\n\nconst noop = () => {};\n\nexport default function({\n enter,\n exit,\n duration = 750,\n appendPosition = false\n}) {\n return function Animation({\n children,\n position,\n preventExitTransition,\n ...props\n }) {\n const enterClassName = appendPosition ? `${enter}--${position}` : enter;\n const exitClassName = appendPosition ? `${exit}--${position}` : exit;\n let enterDuration, exitDuration;\n\n if (Array.isArray(duration) && duration.length === 2) {\n [enterDuration, exitDuration] = duration;\n } else {\n enterDuration = exitDuration = duration;\n }\n\n const onEnter = node => {\n node.classList.add(enterClassName);\n node.style.animationFillMode = 'forwards';\n node.style.animationDuration = `${enterDuration * 0.001}s`;\n };\n const onEntered = node => {\n node.classList.remove(enterClassName);\n node.style.cssText = '';\n };\n const onExit = node => {\n node.classList.add(exitClassName);\n node.style.animationFillMode = 'forwards';\n node.style.animationDuration = `${exitDuration * 0.001}s`;\n };\n\n return (\n \n {children}\n
\n );\n };\n}\n","import cssTransition from './../utils/cssTransition';\n\nconst Bounce = cssTransition({\n enter: 'Toastify__bounce-enter',\n exit: 'Toastify__bounce-exit',\n appendPosition: true\n});\n\nconst Slide = cssTransition({\n enter: 'Toastify__slide-enter',\n exit: 'Toastify__slide-exit',\n duration: [450, 750],\n appendPosition: true\n});\n\nconst Zoom = cssTransition({\n enter: 'Toastify__zoom-enter',\n exit: 'Toastify__zoom-exit'\n});\n\nconst Flip = cssTransition({\n enter: 'Toastify__flip-enter',\n exit: 'Toastify__flip-exit'\n});\n\nexport { Bounce, Slide, Zoom, Flip };\n","import { isValidElement } from 'react';\n\nexport function isValidDelay(val) {\n return typeof val === 'number' && !isNaN(val) && val > 0;\n}\n\nexport function objectValues(obj) {\n return Object.keys(obj).map(key => obj[key]);\n}\n\nfunction withRequired(fn) {\n fn.isRequired = function(props, propName, componentName) {\n const prop = props[propName];\n\n if (typeof prop === 'undefined') {\n return new Error(`The prop ${propName} is marked as required in \n ${componentName}, but its value is undefined.`);\n }\n\n fn(props, propName, componentName);\n };\n return fn;\n}\n\nexport const falseOrDelay = withRequired((props, propName, componentName) => {\n const prop = props[propName];\n\n if (prop !== false && !isValidDelay(prop)) {\n return new Error(`${componentName} expect ${propName} \n to be a valid Number > 0 or equal to false. ${prop} given.`);\n }\n\n return null;\n});\n\nexport const falseOrElement = withRequired((props, propName, componentName) => {\n const prop = props[propName];\n\n if (prop !== false && !isValidElement(prop)) {\n return new Error(`${componentName} expect ${propName} \n to be a valid react element or equal to false. ${prop} given.`);\n }\n\n return null;\n});\n","import EventManager from './utils/EventManager';\nimport { POSITION, TYPE, ACTION } from './utils/constant';\n\nconst defaultOptions = {\n type: TYPE.DEFAULT,\n autoClose: null,\n closeButton: null,\n hideProgressBar: null,\n position: null,\n pauseOnHover: null,\n closeOnClick: null,\n className: null,\n bodyClassName: null,\n progressClassName: null,\n transition: null,\n updateId: null,\n draggable: null\n};\n\nlet container = null;\nlet queue = [];\nlet toastId = 0;\n\n/**\n * Merge provided options with the defaults settings and generate the toastId\n * @param {*} options\n */\nfunction mergeOptions(options, type) {\n return Object.assign({}, defaultOptions, options, {\n type: type,\n toastId: ++toastId\n });\n}\n\n/**\n * Dispatch toast. If the container is not mounted, the toast is enqueued\n * @param {*} content\n * @param {*} options\n */\nfunction emitEvent(content, options) {\n if (container !== null) {\n EventManager.emit(ACTION.SHOW, content, options);\n } else {\n queue.push({ action: ACTION.SHOW, content, options });\n }\n\n return options.toastId;\n}\n\nconst toaster = Object.assign(\n (content, options) =>\n emitEvent(\n content,\n mergeOptions(options, (options && options.type) || TYPE.DEFAULT)\n ),\n {\n success: (content, options) =>\n emitEvent(content, mergeOptions(options, TYPE.SUCCESS)),\n info: (content, options) =>\n emitEvent(content, mergeOptions(options, TYPE.INFO)),\n warn: (content, options) =>\n emitEvent(content, mergeOptions(options, TYPE.WARNING)),\n warning: (content, options) =>\n emitEvent(content, mergeOptions(options, TYPE.WARNING)),\n error: (content, options) =>\n emitEvent(content, mergeOptions(options, TYPE.ERROR)),\n dismiss: (id = null) => container && EventManager.emit(ACTION.CLEAR, id),\n isActive: () => false,\n update(id, options) {\n setTimeout(() => {\n if (container && typeof container.collection[id] !== 'undefined') {\n const {\n options: oldOptions,\n content: oldContent\n } = container.collection[id];\n const updateId =\n oldOptions.updateId !== null ? oldOptions.updateId + 1 : 1;\n\n const nextOptions = Object.assign({}, oldOptions, options, {\n toastId: id,\n updateId: updateId\n });\n const content =\n typeof nextOptions.render !== 'undefined'\n ? nextOptions.render\n : oldContent;\n delete nextOptions.render;\n emitEvent(content, nextOptions);\n }\n }, 0);\n },\n onChange(callback) {\n if (typeof callback === 'function') {\n EventManager.on(ACTION.ON_CHANGE, callback);\n }\n }\n },\n {\n POSITION,\n TYPE\n }\n);\n\n/**\n * Wait until the ToastContainer is mounted to dispatch the toast\n * and attach isActive method\n */\nEventManager.on(ACTION.MOUNTED, containerInstance => {\n container = containerInstance;\n\n toaster.isActive = id => container.isToastActive(id);\n\n queue.forEach(item => {\n EventManager.emit(item.action, item.content, item.options);\n });\n queue = [];\n});\n\nexport default toaster;\n","'use strict';\n\nexports.__esModule = true;\nexports.classNamesShape = exports.timeoutsShape = undefined;\nexports.transitionTimeout = transitionTimeout;\n\nvar _propTypes = require('prop-types');\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction transitionTimeout(transitionType) {\n var timeoutPropName = 'transition' + transitionType + 'Timeout';\n var enabledPropName = 'transition' + transitionType;\n\n return function (props) {\n // If the transition is enabled\n if (props[enabledPropName]) {\n // If no timeout duration is provided\n if (props[timeoutPropName] == null) {\n return new Error(timeoutPropName + ' wasn\\'t supplied to CSSTransitionGroup: ' + 'this can cause unreliable animations and won\\'t be supported in ' + 'a future version of React. See ' + 'https://fb.me/react-animation-transition-group-timeout for more ' + 'information.');\n\n // If the duration isn't a number\n } else if (typeof props[timeoutPropName] !== 'number') {\n return new Error(timeoutPropName + ' must be a number (in milliseconds)');\n }\n }\n\n return null;\n };\n}\n\nvar timeoutsShape = exports.timeoutsShape = _propTypes2.default.oneOfType([_propTypes2.default.number, _propTypes2.default.shape({\n enter: _propTypes2.default.number,\n exit: _propTypes2.default.number\n}).isRequired]);\n\nvar classNamesShape = exports.classNamesShape = _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.shape({\n enter: _propTypes2.default.string,\n exit: _propTypes2.default.string,\n active: _propTypes2.default.string\n}), _propTypes2.default.shape({\n enter: _propTypes2.default.string,\n enterDone: _propTypes2.default.string,\n enterActive: _propTypes2.default.string,\n exit: _propTypes2.default.string,\n exitDone: _propTypes2.default.string,\n exitActive: _propTypes2.default.string\n})]);","module.exports = __WEBPACK_EXTERNAL_MODULE__10__;","'use strict';\n\nexports.__esModule = true;\nexports.EXITING = exports.ENTERED = exports.ENTERING = exports.EXITED = exports.UNMOUNTED = undefined;\n\nvar _propTypes = require('prop-types');\n\nvar PropTypes = _interopRequireWildcard(_propTypes);\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactDom = require('react-dom');\n\nvar _reactDom2 = _interopRequireDefault(_reactDom);\n\nvar _PropTypes = require('./utils/PropTypes');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar UNMOUNTED = exports.UNMOUNTED = 'unmounted';\nvar EXITED = exports.EXITED = 'exited';\nvar ENTERING = exports.ENTERING = 'entering';\nvar ENTERED = exports.ENTERED = 'entered';\nvar EXITING = exports.EXITING = 'exiting';\n\n/**\n * The Transition component lets you describe a transition from one component\n * state to another _over time_ with a simple declarative API. Most commonly\n * it's used to animate the mounting and unmounting of a component, but can also\n * be used to describe in-place transition states as well.\n *\n * By default the `Transition` component does not alter the behavior of the\n * component it renders, it only tracks \"enter\" and \"exit\" states for the components.\n * It's up to you to give meaning and effect to those states. For example we can\n * add styles to a component when it enters or exits:\n *\n * ```jsx\n * import Transition from 'react-transition-group/Transition';\n *\n * const duration = 300;\n *\n * const defaultStyle = {\n * transition: `opacity ${duration}ms ease-in-out`,\n * opacity: 0,\n * }\n *\n * const transitionStyles = {\n * entering: { opacity: 0 },\n * entered: { opacity: 1 },\n * };\n *\n * const Fade = ({ in: inProp }) => (\n * \n * {(state) => (\n *
\n * I'm a fade Transition!\n *
\n * )}\n *
\n * );\n * ```\n *\n * As noted the `Transition` component doesn't _do_ anything by itself to its child component.\n * What it does do is track transition states over time so you can update the\n * component (such as by adding styles or classes) when it changes states.\n *\n * There are 4 main states a Transition can be in:\n * - `'entering'`\n * - `'entered'`\n * - `'exiting'`\n * - `'exited'`\n *\n * Transition state is toggled via the `in` prop. When `true` the component begins the\n * \"Enter\" stage. During this stage, the component will shift from its current transition state,\n * to `'entering'` for the duration of the transition and then to the `'entered'` stage once\n * it's complete. Let's take the following example:\n *\n * ```jsx\n * state = { in: false };\n *\n * toggleEnterState = () => {\n * this.setState({ in: true });\n * }\n *\n * render() {\n * return (\n *
\n * \n * \n *
\n * );\n * }\n * ```\n *\n * When the button is clicked the component will shift to the `'entering'` state and\n * stay there for 500ms (the value of `timeout`) before it finally switches to `'entered'`.\n *\n * When `in` is `false` the same thing happens except the state moves from `'exiting'` to `'exited'`.\n *\n * ## Timing\n *\n * Timing is often the trickiest part of animation, mistakes can result in slight delays\n * that are hard to pin down. A common example is when you want to add an exit transition,\n * you should set the desired final styles when the state is `'exiting'`. That's when the\n * transition to those styles will start and, if you matched the `timeout` prop with the\n * CSS Transition duration, it will end exactly when the state changes to `'exited'`.\n *\n * > **Note**: For simpler transitions the `Transition` component might be enough, but\n * > take into account that it's platform-agnostic, while the `CSSTransition` component\n * > [forces reflows](https://github.com/reactjs/react-transition-group/blob/5007303e729a74be66a21c3e2205e4916821524b/src/CSSTransition.js#L208-L215)\n * > in order to make more complex transitions more predictable. For example, even though\n * > classes `example-enter` and `example-enter-active` are applied immediately one after\n * > another, you can still transition from one to the other because of the forced reflow\n * > (read [this issue](https://github.com/reactjs/react-transition-group/issues/159#issuecomment-322761171)\n * > for more info). Take this into account when choosing between `Transition` and\n * > `CSSTransition`.\n *\n * ## Example\n *\n * \n *\n */\n\nvar Transition = function (_React$Component) {\n _inherits(Transition, _React$Component);\n\n function Transition(props, context) {\n _classCallCheck(this, Transition);\n\n var _this = _possibleConstructorReturn(this, _React$Component.call(this, props, context));\n\n var parentGroup = context.transitionGroup;\n // In the context of a TransitionGroup all enters are really appears\n var appear = parentGroup && !parentGroup.isMounting ? props.enter : props.appear;\n\n var initialStatus = void 0;\n _this.nextStatus = null;\n\n if (props.in) {\n if (appear) {\n initialStatus = EXITED;\n _this.nextStatus = ENTERING;\n } else {\n initialStatus = ENTERED;\n }\n } else {\n if (props.unmountOnExit || props.mountOnEnter) {\n initialStatus = UNMOUNTED;\n } else {\n initialStatus = EXITED;\n }\n }\n\n _this.state = { status: initialStatus };\n\n _this.nextCallback = null;\n return _this;\n }\n\n Transition.prototype.getChildContext = function getChildContext() {\n return { transitionGroup: null }; // allows for nested Transitions\n };\n\n Transition.prototype.componentDidMount = function componentDidMount() {\n this.updateStatus(true);\n };\n\n Transition.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {\n var _ref = this.pendingState || this.state,\n status = _ref.status;\n\n if (nextProps.in) {\n if (status === UNMOUNTED) {\n this.setState({ status: EXITED });\n }\n if (status !== ENTERING && status !== ENTERED) {\n this.nextStatus = ENTERING;\n }\n } else {\n if (status === ENTERING || status === ENTERED) {\n this.nextStatus = EXITING;\n }\n }\n };\n\n Transition.prototype.componentDidUpdate = function componentDidUpdate() {\n this.updateStatus();\n };\n\n Transition.prototype.componentWillUnmount = function componentWillUnmount() {\n this.cancelNextCallback();\n };\n\n Transition.prototype.getTimeouts = function getTimeouts() {\n var timeout = this.props.timeout;\n\n var exit = void 0,\n enter = void 0,\n appear = void 0;\n\n exit = enter = appear = timeout;\n\n if (timeout != null && typeof timeout !== 'number') {\n exit = timeout.exit;\n enter = timeout.enter;\n appear = timeout.appear;\n }\n return { exit: exit, enter: enter, appear: appear };\n };\n\n Transition.prototype.updateStatus = function updateStatus() {\n var mounting = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n\n var nextStatus = this.nextStatus;\n\n if (nextStatus !== null) {\n this.nextStatus = null;\n // nextStatus will always be ENTERING or EXITING.\n this.cancelNextCallback();\n var node = _reactDom2.default.findDOMNode(this);\n\n if (nextStatus === ENTERING) {\n this.performEnter(node, mounting);\n } else {\n this.performExit(node);\n }\n } else if (this.props.unmountOnExit && this.state.status === EXITED) {\n this.setState({ status: UNMOUNTED });\n }\n };\n\n Transition.prototype.performEnter = function performEnter(node, mounting) {\n var _this2 = this;\n\n var enter = this.props.enter;\n\n var appearing = this.context.transitionGroup ? this.context.transitionGroup.isMounting : mounting;\n\n var timeouts = this.getTimeouts();\n\n // no enter animation skip right to ENTERED\n // if we are mounting and running this it means appear _must_ be set\n if (!mounting && !enter) {\n this.safeSetState({ status: ENTERED }, function () {\n _this2.props.onEntered(node);\n });\n return;\n }\n\n this.props.onEnter(node, appearing);\n\n this.safeSetState({ status: ENTERING }, function () {\n _this2.props.onEntering(node, appearing);\n\n // FIXME: appear timeout?\n _this2.onTransitionEnd(node, timeouts.enter, function () {\n _this2.safeSetState({ status: ENTERED }, function () {\n _this2.props.onEntered(node, appearing);\n });\n });\n });\n };\n\n Transition.prototype.performExit = function performExit(node) {\n var _this3 = this;\n\n var exit = this.props.exit;\n\n var timeouts = this.getTimeouts();\n\n // no exit animation skip right to EXITED\n if (!exit) {\n this.safeSetState({ status: EXITED }, function () {\n _this3.props.onExited(node);\n });\n return;\n }\n this.props.onExit(node);\n\n this.safeSetState({ status: EXITING }, function () {\n _this3.props.onExiting(node);\n\n _this3.onTransitionEnd(node, timeouts.exit, function () {\n _this3.safeSetState({ status: EXITED }, function () {\n _this3.props.onExited(node);\n });\n });\n });\n };\n\n Transition.prototype.cancelNextCallback = function cancelNextCallback() {\n if (this.nextCallback !== null) {\n this.nextCallback.cancel();\n this.nextCallback = null;\n }\n };\n\n Transition.prototype.safeSetState = function safeSetState(nextState, callback) {\n var _this4 = this;\n\n // We need to track pending updates for instances where a cWRP fires quickly\n // after cDM and before the state flushes, which would double trigger a\n // transition\n this.pendingState = nextState;\n\n // This shouldn't be necessary, but there are weird race conditions with\n // setState callbacks and unmounting in testing, so always make sure that\n // we can cancel any pending setState callbacks after we unmount.\n callback = this.setNextCallback(callback);\n this.setState(nextState, function () {\n _this4.pendingState = null;\n callback();\n });\n };\n\n Transition.prototype.setNextCallback = function setNextCallback(callback) {\n var _this5 = this;\n\n var active = true;\n\n this.nextCallback = function (event) {\n if (active) {\n active = false;\n _this5.nextCallback = null;\n\n callback(event);\n }\n };\n\n this.nextCallback.cancel = function () {\n active = false;\n };\n\n return this.nextCallback;\n };\n\n Transition.prototype.onTransitionEnd = function onTransitionEnd(node, timeout, handler) {\n this.setNextCallback(handler);\n\n if (node) {\n if (this.props.addEndListener) {\n this.props.addEndListener(node, this.nextCallback);\n }\n if (timeout != null) {\n setTimeout(this.nextCallback, timeout);\n }\n } else {\n setTimeout(this.nextCallback, 0);\n }\n };\n\n Transition.prototype.render = function render() {\n var status = this.state.status;\n if (status === UNMOUNTED) {\n return null;\n }\n\n var _props = this.props,\n children = _props.children,\n childProps = _objectWithoutProperties(_props, ['children']);\n // filter props for Transtition\n\n\n delete childProps.in;\n delete childProps.mountOnEnter;\n delete childProps.unmountOnExit;\n delete childProps.appear;\n delete childProps.enter;\n delete childProps.exit;\n delete childProps.timeout;\n delete childProps.addEndListener;\n delete childProps.onEnter;\n delete childProps.onEntering;\n delete childProps.onEntered;\n delete childProps.onExit;\n delete childProps.onExiting;\n delete childProps.onExited;\n\n if (typeof children === 'function') {\n return children(status, childProps);\n }\n\n var child = _react2.default.Children.only(children);\n return _react2.default.cloneElement(child, childProps);\n };\n\n return Transition;\n}(_react2.default.Component);\n\nTransition.contextTypes = {\n transitionGroup: PropTypes.object\n};\nTransition.childContextTypes = {\n transitionGroup: function transitionGroup() {}\n};\n\n\nTransition.propTypes = process.env.NODE_ENV !== \"production\" ? {\n /**\n * A `function` child can be used instead of a React element.\n * This function is called with the current transition status\n * ('entering', 'entered', 'exiting', 'exited', 'unmounted'), which can be used\n * to apply context specific props to a component.\n *\n * ```jsx\n * \n * {(status) => (\n * \n * )}\n * \n * ```\n */\n children: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.element.isRequired]).isRequired,\n\n /**\n * Show the component; triggers the enter or exit states\n */\n in: PropTypes.bool,\n\n /**\n * By default the child component is mounted immediately along with\n * the parent `Transition` component. If you want to \"lazy mount\" the component on the\n * first `in={true}` you can set `mountOnEnter`. After the first enter transition the component will stay\n * mounted, even on \"exited\", unless you also specify `unmountOnExit`.\n */\n mountOnEnter: PropTypes.bool,\n\n /**\n * By default the child component stays mounted after it reaches the `'exited'` state.\n * Set `unmountOnExit` if you'd prefer to unmount the component after it finishes exiting.\n */\n unmountOnExit: PropTypes.bool,\n\n /**\n * Normally a component is not transitioned if it is shown when the `` component mounts.\n * If you want to transition on the first mount set `appear` to `true`, and the\n * component will transition in as soon as the `` mounts.\n *\n * > Note: there are no specific \"appear\" states. `appear` only adds an additional `enter` transition.\n */\n appear: PropTypes.bool,\n\n /**\n * Enable or disable enter transitions.\n */\n enter: PropTypes.bool,\n\n /**\n * Enable or disable exit transitions.\n */\n exit: PropTypes.bool,\n\n /**\n * The duration of the transition, in milliseconds.\n * Required unless `addEndListener` is provided\n *\n * You may specify a single timeout for all transitions like: `timeout={500}`,\n * or individually like:\n *\n * ```jsx\n * timeout={{\n * enter: 300,\n * exit: 500,\n * }}\n * ```\n *\n * @type {number | { enter?: number, exit?: number }}\n */\n timeout: function timeout(props) {\n for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n var pt = _PropTypes.timeoutsShape;\n if (!props.addEndListener) pt = pt.isRequired;\n return pt.apply(undefined, [props].concat(args));\n },\n\n /**\n * Add a custom transition end trigger. Called with the transitioning\n * DOM node and a `done` callback. Allows for more fine grained transition end\n * logic. **Note:** Timeouts are still used as a fallback if provided.\n *\n * ```jsx\n * addEndListener={(node, done) => {\n * // use the css transitionend event to mark the finish of a transition\n * node.addEventListener('transitionend', done, false);\n * }}\n * ```\n */\n addEndListener: PropTypes.func,\n\n /**\n * Callback fired before the \"entering\" status is applied. An extra parameter\n * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount\n *\n * @type Function(node: HtmlElement, isAppearing: bool) -> void\n */\n onEnter: PropTypes.func,\n\n /**\n * Callback fired after the \"entering\" status is applied. An extra parameter\n * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount\n *\n * @type Function(node: HtmlElement, isAppearing: bool)\n */\n onEntering: PropTypes.func,\n\n /**\n * Callback fired after the \"entered\" status is applied. An extra parameter\n * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount\n *\n * @type Function(node: HtmlElement, isAppearing: bool) -> void\n */\n onEntered: PropTypes.func,\n\n /**\n * Callback fired before the \"exiting\" status is applied.\n *\n * @type Function(node: HtmlElement) -> void\n */\n onExit: PropTypes.func,\n\n /**\n * Callback fired after the \"exiting\" status is applied.\n *\n * @type Function(node: HtmlElement) -> void\n */\n onExiting: PropTypes.func,\n\n /**\n * Callback fired after the \"exited\" status is applied.\n *\n * @type Function(node: HtmlElement) -> void\n */\n onExited: PropTypes.func\n} : {};\n\n// Name the function so it is clearer in the documentation\nfunction noop() {}\n\nTransition.defaultProps = {\n in: false,\n mountOnEnter: false,\n unmountOnExit: false,\n appear: false,\n enter: true,\n exit: true,\n\n onEnter: noop,\n onEntering: noop,\n onEntered: noop,\n\n onExit: noop,\n onExiting: noop,\n onExited: noop\n};\n\nTransition.UNMOUNTED = 0;\nTransition.EXITED = 1;\nTransition.ENTERING = 2;\nTransition.ENTERED = 3;\nTransition.EXITING = 4;\n\nexports.default = Transition;","import React from 'react';\nimport PropTypes from 'prop-types';\n\nfunction CloseButton({ closeToast, type, ariaLabel }) {\n return (\n \n ✖\n \n );\n}\n\nCloseButton.propTypes = {\n closeToast: PropTypes.func,\n arialLabel: PropTypes.string\n};\n\nCloseButton.defaultProps = {\n ariaLabel: 'close'\n};\n\nexport default CloseButton;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport cx from 'classnames';\n\nimport { TYPE } from './../utils/constant';\n\nfunction ProgressBar({\n delay,\n isRunning,\n closeToast,\n type,\n hide,\n className,\n rtl\n}) {\n const style = {\n animationDuration: `${delay}ms`,\n animationPlayState: isRunning ? 'running' : 'paused',\n opacity: hide ? 0 : 1\n };\n\n const classNames = cx(\n 'Toastify__progress-bar',\n `Toastify__progress-bar--${type}`,\n {\n 'Toastify__progress-bar--rtl': rtl\n },\n className\n );\n\n return (\n
\n );\n}\n\nProgressBar.propTypes = {\n /**\n * The animation delay which determine when to close the toast\n */\n delay: PropTypes.number.isRequired,\n\n /**\n * Whether or not the animation is running or paused\n */\n isRunning: PropTypes.bool.isRequired,\n\n /**\n * Func to close the current toast\n */\n closeToast: PropTypes.func.isRequired,\n\n /**\n * Support rtl content\n */\n rtl: PropTypes.bool.isRequired,\n\n /**\n * Optional type : info, success ...\n */\n type: PropTypes.string,\n\n /**\n * Hide or not the progress bar\n */\n hide: PropTypes.bool,\n\n /**\n * Optionnal className\n */\n className: PropTypes.oneOfType([PropTypes.string, PropTypes.object])\n};\n\nProgressBar.defaultProps = {\n type: TYPE.DEFAULT,\n hide: false\n};\n\nexport default ProgressBar;\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport cx from 'classnames';\n\nimport ProgressBar from './ProgressBar';\nimport { POSITION, TYPE } from './../utils/constant';\nimport {\n falseOrElement,\n falseOrDelay,\n objectValues\n} from './../utils/propValidator';\n\nfunction getX(e) {\n return e.targetTouches && e.targetTouches.length >= 1\n ? e.targetTouches[0].clientX\n : e.clientX;\n}\n\nfunction getY(e) {\n return e.targetTouches && e.targetTouches.length >= 1\n ? e.targetTouches[0].clientY\n : e.clientY;\n}\n\nconst noop = () => { };\n\nclass Toast extends Component {\n static propTypes = {\n closeButton: falseOrElement.isRequired,\n autoClose: falseOrDelay.isRequired,\n children: PropTypes.node.isRequired,\n closeToast: PropTypes.func.isRequired,\n position: PropTypes.oneOf(objectValues(POSITION)).isRequired,\n pauseOnHover: PropTypes.bool.isRequired,\n closeOnClick: PropTypes.bool.isRequired,\n transition: PropTypes.func.isRequired,\n isDocumentHidden: PropTypes.bool.isRequired,\n rtl: PropTypes.bool.isRequired,\n hideProgressBar: PropTypes.bool.isRequired,\n draggable: PropTypes.bool.isRequired,\n draggablePercent: PropTypes.number.isRequired,\n in: PropTypes.bool,\n onExited: PropTypes.func,\n onOpen: PropTypes.func,\n onClose: PropTypes.func,\n type: PropTypes.oneOf(objectValues(TYPE)),\n className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]),\n bodyClassName: PropTypes.oneOfType([PropTypes.string, PropTypes.object]),\n progressClassName: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.object\n ]),\n updateId: PropTypes.number,\n ariaLabel: PropTypes.string\n };\n\n static defaultProps = {\n type: TYPE.DEFAULT,\n in: true,\n onOpen: noop,\n onClose: noop,\n className: null,\n bodyClassName: null,\n progressClassName: null,\n updateId: null,\n role: 'alert'\n };\n\n state = {\n isRunning: true,\n preventExitTransition: false\n };\n\n flag = {\n canCloseOnClick: true,\n canDrag: false\n };\n\n drag = {\n start: 0,\n x: 0,\n y: 0,\n deltaX: 0,\n removalDistance: 0\n };\n\n ref = null;\n\n componentDidMount() {\n this.props.onOpen(this.props.children.props);\n if (this.props.draggable) {\n this.bindDragEvents();\n }\n }\n\n bindDragEvents() {\n document.addEventListener('mousemove', this.onDragMove);\n document.addEventListener('mouseup', this.onDragEnd);\n\n document.addEventListener('touchmove', this.onDragMove);\n document.addEventListener('touchend', this.onDragEnd);\n }\n\n unbindDragEvents() {\n document.removeEventListener('mousemove', this.onDragMove);\n document.removeEventListener('mouseup', this.onDragEnd);\n\n document.removeEventListener('touchmove', this.onDragMove);\n document.removeEventListener('touchend', this.onDragEnd);\n }\n\n componentDidUpdate(prevProps) {\n if (prevProps.draggable !== this.props.draggable) {\n this.props.draggable ? this.bindDragEvents() : this.unbindDragEvents();\n }\n }\n\n componentWillUnmount() {\n this.props.onClose(this.props.children.props);\n if (this.props.draggable) {\n this.unbindDragEvents();\n }\n }\n\n pauseToast = () => {\n this.setState({ isRunning: false });\n };\n\n playToast = () => {\n this.setState({ isRunning: true });\n };\n\n onDragStart = e => {\n this.flag.canCloseOnClick = true;\n this.flag.canDrag = true;\n\n this.ref.style.transition = '';\n\n this.drag.start = this.drag.x = getX(e.nativeEvent);\n this.drag.removalDistance =\n this.ref.offsetWidth * (this.props.draggablePercent / 100);\n };\n\n onDragMove = e => {\n if (this.flag.canDrag) {\n if (this.state.isRunning) {\n this.pauseToast();\n }\n\n this.drag.x = getX(e);\n this.drag.deltaX = this.drag.x - this.drag.start;\n\n // prevent false positif during a toast click\n this.drag.start !== this.drag.x && (this.flag.canCloseOnClick = false);\n\n this.ref.style.transform = `translateX(${this.drag.deltaX}px)`;\n this.ref.style.opacity =\n 1 - Math.abs(this.drag.deltaX / this.drag.removalDistance);\n }\n };\n\n onDragEnd = e => {\n if (this.flag.canDrag) {\n this.flag.canDrag = false;\n\n if (Math.abs(this.drag.deltaX) > this.drag.removalDistance) {\n this.setState(\n {\n preventExitTransition: true\n },\n this.props.closeToast\n );\n return;\n }\n\n this.drag.y = getY(e);\n this.ref.style.transition = 'transform 0.2s, opacity 0.2s';\n this.ref.style.transform = 'translateX(0)';\n this.ref.style.opacity = 1;\n }\n };\n\n onDragTransitionEnd = () => {\n const { top, bottom, left, right } = this.ref.getBoundingClientRect();\n\n if (\n this.props.pauseOnHover &&\n this.drag.x >= left &&\n this.drag.x <= right &&\n this.drag.y >= top &&\n this.drag.y <= bottom\n ) {\n this.pauseToast();\n } else {\n this.playToast();\n }\n };\n\n render() {\n const {\n closeButton,\n children,\n autoClose,\n pauseOnHover,\n closeOnClick,\n type,\n hideProgressBar,\n closeToast,\n transition: Transition,\n position,\n onExited,\n className,\n bodyClassName,\n progressClassName,\n updateId,\n role,\n rtl\n } = this.props;\n\n const toastProps = {\n className: cx(\n 'Toastify__toast',\n `Toastify__toast--${type}`,\n {\n 'Toastify__toast--rtl': rtl\n },\n className\n )\n };\n\n if (autoClose && pauseOnHover) {\n toastProps.onMouseEnter = this.pauseToast;\n toastProps.onMouseLeave = this.playToast;\n }\n\n // prevent toast from closing when user drags the toast\n if (closeOnClick) {\n toastProps.onClick = () => this.flag.canCloseOnClick && closeToast();\n }\n\n return (\n \n (this.ref = ref)}\n onMouseDown={this.onDragStart}\n onTouchStart={this.onDragStart}\n onTransitionEnd={this.onDragTransitionEnd}\n >\n \n {children}\n
\n {closeButton !== false && closeButton}\n {autoClose !== false && (\n \n )}\n
\n \n );\n }\n}\n\nexport default Toast;\n","'use strict';\n\nexports.__esModule = true;\nexports.getChildMapping = getChildMapping;\nexports.mergeChildMappings = mergeChildMappings;\n\nvar _react = require('react');\n\n/**\n * Given `this.props.children`, return an object mapping key to child.\n *\n * @param {*} children `this.props.children`\n * @return {object} Mapping of key to child\n */\nfunction getChildMapping(children, mapFn) {\n var mapper = function mapper(child) {\n return mapFn && (0, _react.isValidElement)(child) ? mapFn(child) : child;\n };\n\n var result = Object.create(null);\n if (children) _react.Children.map(children, function (c) {\n return c;\n }).forEach(function (child) {\n // run the map function here instead so that the key is the computed one\n result[child.key] = mapper(child);\n });\n return result;\n}\n\n/**\n * When you're adding or removing children some may be added or removed in the\n * same render pass. We want to show *both* since we want to simultaneously\n * animate elements in and out. This function takes a previous set of keys\n * and a new set of keys and merges them with its best guess of the correct\n * ordering. In the future we may expose some of the utilities in\n * ReactMultiChild to make this easy, but for now React itself does not\n * directly have this concept of the union of prevChildren and nextChildren\n * so we implement it here.\n *\n * @param {object} prev prev children as returned from\n * `ReactTransitionChildMapping.getChildMapping()`.\n * @param {object} next next children as returned from\n * `ReactTransitionChildMapping.getChildMapping()`.\n * @return {object} a key set that contains all keys in `prev` and all keys\n * in `next` in a reasonable order.\n */\nfunction mergeChildMappings(prev, next) {\n prev = prev || {};\n next = next || {};\n\n function getValueForKey(key) {\n return key in next ? next[key] : prev[key];\n }\n\n // For each key of `next`, the list of keys to insert before that key in\n // the combined list\n var nextKeysPending = Object.create(null);\n\n var pendingKeys = [];\n for (var prevKey in prev) {\n if (prevKey in next) {\n if (pendingKeys.length) {\n nextKeysPending[prevKey] = pendingKeys;\n pendingKeys = [];\n }\n } else {\n pendingKeys.push(prevKey);\n }\n }\n\n var i = void 0;\n var childMapping = {};\n for (var nextKey in next) {\n if (nextKeysPending[nextKey]) {\n for (i = 0; i < nextKeysPending[nextKey].length; i++) {\n var pendingNextKey = nextKeysPending[nextKey][i];\n childMapping[nextKeysPending[nextKey][i]] = getValueForKey(pendingNextKey);\n }\n }\n childMapping[nextKey] = getValueForKey(nextKey);\n }\n\n // Finally, add the keys which didn't appear before any key in `next`\n for (i = 0; i < pendingKeys.length; i++) {\n childMapping[pendingKeys[i]] = getValueForKey(pendingKeys[i]);\n }\n\n return childMapping;\n}","'use strict';\n\nexports.__esModule = true;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _propTypes = require('prop-types');\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _ChildMapping = require('./utils/ChildMapping');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar values = Object.values || function (obj) {\n return Object.keys(obj).map(function (k) {\n return obj[k];\n });\n};\n\nvar propTypes = {\n /**\n * `` renders a `
` by default. You can change this\n * behavior by providing a `component` prop.\n * If you use React v16+ and would like to avoid a wrapping `
` element\n * you can pass in `component={null}`. This is useful if the wrapping div\n * borks your css styles.\n */\n component: _propTypes2.default.any,\n /**\n * A set of `` components, that are toggled `in` and out as they\n * leave. the `` will inject specific transition props, so\n * remember to spread them through if you are wrapping the `` as\n * with our `` example.\n */\n children: _propTypes2.default.node,\n\n /**\n * A convenience prop that enables or disables appear animations\n * for all children. Note that specifying this will override any defaults set\n * on individual children Transitions.\n */\n appear: _propTypes2.default.bool,\n /**\n * A convenience prop that enables or disables enter animations\n * for all children. Note that specifying this will override any defaults set\n * on individual children Transitions.\n */\n enter: _propTypes2.default.bool,\n /**\n * A convenience prop that enables or disables exit animations\n * for all children. Note that specifying this will override any defaults set\n * on individual children Transitions.\n */\n exit: _propTypes2.default.bool,\n\n /**\n * You may need to apply reactive updates to a child as it is exiting.\n * This is generally done by using `cloneElement` however in the case of an exiting\n * child the element has already been removed and not accessible to the consumer.\n *\n * If you do need to update a child as it leaves you can provide a `childFactory`\n * to wrap every child, even the ones that are leaving.\n *\n * @type Function(child: ReactElement) -> ReactElement\n */\n childFactory: _propTypes2.default.func\n};\n\nvar defaultProps = {\n component: 'div',\n childFactory: function childFactory(child) {\n return child;\n }\n};\n\n/**\n * The `` component manages a set of `` components\n * in a list. Like with the `` component, ``, is a\n * state machine for managing the mounting and unmounting of components over\n * time.\n *\n * Consider the example below using the `Fade` CSS transition from before.\n * As items are removed or added to the TodoList the `in` prop is toggled\n * automatically by the ``. You can use _any_ ``\n * component in a ``, not just css.\n *\n * ## Example\n *\n * \n *\n * Note that `` does not define any animation behavior!\n * Exactly _how_ a list item animates is up to the individual ``\n * components. This means you can mix and match animations across different\n * list items.\n */\n\nvar TransitionGroup = function (_React$Component) {\n _inherits(TransitionGroup, _React$Component);\n\n function TransitionGroup(props, context) {\n _classCallCheck(this, TransitionGroup);\n\n // Initial children should all be entering, dependent on appear\n var _this = _possibleConstructorReturn(this, _React$Component.call(this, props, context));\n\n _this.state = {\n children: (0, _ChildMapping.getChildMapping)(props.children, function (child) {\n return (0, _react.cloneElement)(child, {\n onExited: _this.handleExited.bind(_this, child),\n in: true,\n appear: _this.getProp(child, 'appear'),\n enter: _this.getProp(child, 'enter'),\n exit: _this.getProp(child, 'exit')\n });\n })\n };\n return _this;\n }\n\n TransitionGroup.prototype.getChildContext = function getChildContext() {\n return {\n transitionGroup: { isMounting: !this.appeared }\n };\n };\n // use child config unless explictly set by the Group\n\n\n TransitionGroup.prototype.getProp = function getProp(child, prop) {\n var props = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.props;\n\n return props[prop] != null ? props[prop] : child.props[prop];\n };\n\n TransitionGroup.prototype.componentDidMount = function componentDidMount() {\n this.appeared = true;\n };\n\n TransitionGroup.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {\n var _this2 = this;\n\n var prevChildMapping = this.state.children;\n var nextChildMapping = (0, _ChildMapping.getChildMapping)(nextProps.children);\n\n var children = (0, _ChildMapping.mergeChildMappings)(prevChildMapping, nextChildMapping);\n\n Object.keys(children).forEach(function (key) {\n var child = children[key];\n\n if (!(0, _react.isValidElement)(child)) return;\n\n var hasPrev = key in prevChildMapping;\n var hasNext = key in nextChildMapping;\n\n var prevChild = prevChildMapping[key];\n var isLeaving = (0, _react.isValidElement)(prevChild) && !prevChild.props.in;\n\n // item is new (entering)\n if (hasNext && (!hasPrev || isLeaving)) {\n // console.log('entering', key)\n children[key] = (0, _react.cloneElement)(child, {\n onExited: _this2.handleExited.bind(_this2, child),\n in: true,\n exit: _this2.getProp(child, 'exit', nextProps),\n enter: _this2.getProp(child, 'enter', nextProps)\n });\n }\n // item is old (exiting)\n else if (!hasNext && hasPrev && !isLeaving) {\n // console.log('leaving', key)\n children[key] = (0, _react.cloneElement)(child, { in: false });\n }\n // item hasn't changed transition states\n // copy over the last transition props;\n else if (hasNext && hasPrev && (0, _react.isValidElement)(prevChild)) {\n // console.log('unchanged', key)\n children[key] = (0, _react.cloneElement)(child, {\n onExited: _this2.handleExited.bind(_this2, child),\n in: prevChild.props.in,\n exit: _this2.getProp(child, 'exit', nextProps),\n enter: _this2.getProp(child, 'enter', nextProps)\n });\n }\n });\n\n this.setState({ children: children });\n };\n\n TransitionGroup.prototype.handleExited = function handleExited(child, node) {\n var currentChildMapping = (0, _ChildMapping.getChildMapping)(this.props.children);\n\n if (child.key in currentChildMapping) return;\n\n if (child.props.onExited) {\n child.props.onExited(node);\n }\n\n this.setState(function (state) {\n var children = _extends({}, state.children);\n\n delete children[child.key];\n return { children: children };\n });\n };\n\n TransitionGroup.prototype.render = function render() {\n var _props = this.props,\n Component = _props.component,\n childFactory = _props.childFactory,\n props = _objectWithoutProperties(_props, ['component', 'childFactory']);\n\n var children = values(this.state.children).map(childFactory);\n\n delete props.appear;\n delete props.enter;\n delete props.exit;\n\n if (Component === null) {\n return children;\n }\n return _react2.default.createElement(\n Component,\n props,\n children\n );\n };\n\n return TransitionGroup;\n}(_react2.default.Component);\n\nTransitionGroup.childContextTypes = {\n transitionGroup: _propTypes2.default.object.isRequired\n};\n\n\nTransitionGroup.propTypes = process.env.NODE_ENV !== \"production\" ? propTypes : {};\nTransitionGroup.defaultProps = defaultProps;\n\nexports.default = TransitionGroup;\nmodule.exports = exports['default'];","import React, { Component, isValidElement, cloneElement } from 'react';\nimport PropTypes from 'prop-types';\nimport cx from 'classnames';\nimport TransitionGroup from 'react-transition-group/TransitionGroup';\n\nimport Toast from './Toast';\nimport CloseButton from './CloseButton';\nimport { Bounce } from './Transitions';\nimport { POSITION, ACTION } from './../utils/constant';\nimport EventManager from './../utils/EventManager';\nimport {\n falseOrDelay,\n falseOrElement,\n isValidDelay,\n objectValues\n} from './../utils/propValidator';\n\nclass ToastContainer extends Component {\n static propTypes = {\n /**\n * Set toast position\n */\n position: PropTypes.oneOf(objectValues(POSITION)),\n\n /**\n * Disable or set autoClose delay\n */\n autoClose: falseOrDelay,\n\n /**\n * Disable or set a custom react element for the close button\n */\n closeButton: falseOrElement,\n\n /**\n * Hide or not progress bar when autoClose is enabled\n */\n hideProgressBar: PropTypes.bool,\n\n /**\n * Pause toast duration on hover\n */\n pauseOnHover: PropTypes.bool,\n\n /**\n * Dismiss toast on click\n */\n closeOnClick: PropTypes.bool,\n\n /**\n * Newest on top\n */\n newestOnTop: PropTypes.bool,\n\n /**\n * An optional className\n */\n className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]),\n\n /**\n * An optional style\n */\n style: PropTypes.object,\n\n /**\n * An optional className for the toast\n */\n toastClassName: PropTypes.oneOfType([PropTypes.string, PropTypes.object]),\n\n /**\n * An optional className for the toast body\n */\n bodyClassName: PropTypes.oneOfType([PropTypes.string, PropTypes.object]),\n\n /**\n * An optional className for the toast progress bar\n */\n progressClassName: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.object\n ]),\n\n /**\n * Define enter and exit transition using react-transition-group\n */\n transition: PropTypes.func,\n\n /**\n * Support rtl display\n */\n rtl: PropTypes.bool,\n\n /**\n * Allow toast to be draggable\n */\n draggable: PropTypes.bool,\n\n /**\n * The percentage of the toast's width it takes for a drag to dismiss a toast\n */\n draggablePercent: PropTypes.number,\n\n /**\n * ⚠️ NOT WORKING ATM, has been disabled until I fix it ⚠️\n * pause on document visibility change\n */\n pauseOnVisibilityChange: PropTypes.bool\n };\n\n static defaultProps = {\n position: POSITION.TOP_RIGHT,\n transition: Bounce,\n rtl: false,\n pauseOnVisibilityChange: true,\n autoClose: 5000,\n hideProgressBar: false,\n closeButton: ,\n pauseOnHover: true,\n closeOnClick: true,\n newestOnTop: false,\n draggable: true,\n draggablePercent: 80,\n className: null,\n style: null,\n toastClassName: null,\n bodyClassName: null,\n progressClassName: null\n };\n\n /**\n * Hold toast ids\n */\n state = {\n toast: [],\n isDocumentHidden: false\n };\n\n /**\n * Hold toast's informations:\n * - what to render\n * - position\n * - raw content\n * - options\n */\n collection = {};\n\n componentDidMount() {\n const { SHOW, CLEAR, MOUNTED } = ACTION;\n EventManager.on(SHOW, (content, options) => this.show(content, options))\n .on(CLEAR, id => (id !== null ? this.removeToast(id) : this.clear()))\n .emit(MOUNTED, this);\n\n //this.props.pauseOnVisibilityChange &&\n // document.addEventListener('visibilitychange', this.isDocumentHidden);\n }\n\n componentWillUnmount() {\n EventManager.off(ACTION.SHOW);\n EventManager.off(ACTION.CLEAR);\n\n // this.props.pauseOnVisibilityChange &&\n // document.removeEventListener('visibilitychange', this.isDocumentHidden);\n }\n\n //isDocumentHidden = () => this.setState({ isDocumentHidden: document.hidden });\n\n isToastActive = id => this.state.toast.indexOf(parseInt(id, 10)) !== -1;\n\n removeToast(id) {\n this.setState(\n {\n toast: this.state.toast.filter(v => v !== parseInt(id, 10))\n },\n this.dispatchChange\n );\n }\n\n dispatchChange() {\n EventManager.emit(ACTION.ON_CHANGE, this.state.toast.length);\n }\n\n makeCloseButton(toastClose, toastId, type) {\n let closeButton = this.props.closeButton;\n\n if (isValidElement(toastClose) || toastClose === false) {\n closeButton = toastClose;\n }\n\n return closeButton === false\n ? false\n : cloneElement(closeButton, {\n closeToast: () => this.removeToast(toastId),\n type: type\n });\n }\n\n getAutoCloseDelay(toastAutoClose) {\n return toastAutoClose === false || isValidDelay(toastAutoClose)\n ? toastAutoClose\n : this.props.autoClose;\n }\n\n canBeRendered(content) {\n return (\n isValidElement(content) ||\n typeof content === 'string' ||\n typeof content === 'number' ||\n typeof content === 'function'\n );\n }\n\n parseClassName(prop){\n if (typeof prop === 'string') {\n return prop;\n } else if(prop !== null && typeof prop === 'object' && 'toString' in prop) {\n return prop.toString()\n }\n\n return null;\n }\n\n show(content, options) {\n if (!this.canBeRendered(content)) {\n throw new Error(\n `The element you provided cannot be rendered. You provided an element of type ${typeof content}`\n );\n }\n const toastId = options.toastId;\n const closeToast = () => this.removeToast(toastId);\n const toastOptions = {\n id: toastId,\n type: options.type,\n closeToast: closeToast,\n updateId: options.updateId,\n rtl: this.props.rtl,\n position: options.position || this.props.position,\n transition: options.transition || this.props.transition,\n className: this.parseClassName(options.className || this.props.toastClassName),\n bodyClassName: this.parseClassName(options.bodyClassName || this.props.bodyClassName),\n closeButton: this.makeCloseButton(\n options.closeButton,\n toastId,\n options.type\n ),\n pauseOnHover:\n options.pauseOnHover !== null\n ? options.pauseOnHover\n : this.props.pauseOnHover,\n draggable:\n options.draggable !== null ? options.draggable : this.props.draggable,\n draggablePercent:\n options.draggable !== null\n ? options.draggablePercent\n : this.props.draggablePercent,\n closeOnClick:\n options.closeOnClick !== null\n ? options.closeOnClick\n : this.props.closeOnClick,\n progressClassName:\n this.parseClassName(options.progressClassName || this.props.progressClassName),\n autoClose: this.getAutoCloseDelay(\n options.autoClose !== false\n ? parseInt(options.autoClose, 10)\n : options.autoClose\n ),\n hideProgressBar:\n typeof options.hideProgressBar === 'boolean'\n ? options.hideProgressBar\n : this.props.hideProgressBar\n };\n\n typeof options.onOpen === 'function' &&\n (toastOptions.onOpen = options.onOpen);\n\n typeof options.onClose === 'function' &&\n (toastOptions.onClose = options.onClose);\n\n // add closeToast function to react component only\n if (\n isValidElement(content) &&\n typeof content.type !== 'string' &&\n typeof content.type !== 'number'\n ) {\n content = cloneElement(content, {\n closeToast\n });\n } else if (typeof content === 'function') {\n content = content({ closeToast });\n }\n\n this.collection = {\n ...this.collection,\n [toastId]: {\n position: toastOptions.position,\n options: toastOptions,\n content: content\n }\n };\n\n this.setState(\n {\n toast:\n toastOptions.updateId !== null\n ? [...this.state.toast]\n : [...this.state.toast, toastId]\n },\n this.dispatchChange\n );\n }\n\n makeToast(content, options) {\n return (\n \n {content}\n \n );\n }\n\n clear() {\n this.setState({ toast: [] });\n }\n\n renderToast() {\n const toastToRender = {};\n const { className, style, newestOnTop } = this.props;\n const collection = newestOnTop\n ? Object.keys(this.collection).reverse()\n : Object.keys(this.collection);\n\n // group toast by position\n collection.forEach(toastId => {\n const toast = this.collection[toastId];\n toastToRender[toast.position] || (toastToRender[toast.position] = []);\n\n if (this.state.toast.indexOf(parseInt(toastId, 10)) !== -1) {\n toastToRender[toast.position].push(\n this.makeToast(toast.content, toast.options)\n );\n } else {\n toastToRender[toast.position].push(null);\n delete this.collection[toastId];\n }\n });\n\n return Object.keys(toastToRender).map(position => {\n const disablePointer =\n toastToRender[position].length === 1 &&\n toastToRender[position][0] === null;\n const props = {\n className: cx(\n 'Toastify__toast-container',\n `Toastify__toast-container--${position}`,\n { 'Toastify__toast-container--rtl': this.props.rtl },\n this.parseClassName(className)\n ),\n style: disablePointer\n ? { ...style, pointerEvents: 'none' }\n : { ...style }\n };\n\n return (\n \n {toastToRender[position]}\n \n );\n });\n }\n\n render() {\n return
{this.renderToast()}
;\n }\n}\n\nexport default ToastContainer;\n","import ToastContainer from './components/ToastContainer';\nimport { Bounce, Slide, Zoom, Flip } from './components/Transitions';\nimport toaster from './toaster';\nimport cssTransition from './utils/cssTransition';\n\nexport {\n ToastContainer,\n toaster as toast,\n cssTransition,\n Bounce,\n Slide,\n Zoom,\n Flip\n};\n"],"sourceRoot":""} \ No newline at end of file