{"version":3,"sources":["webpack:///./src/features/AddAccount/AddAccountFlow.tsx","webpack:///./src/features/AddAccount/AddAccountForm.reducer.tsx","webpack:///./src/features/AddAccount/stories.tsx","webpack:///./node_modules/react-transition-group/esm/TransitionGroupContext.js","webpack:///./node_modules/react-transition-group/esm/Transition.js","webpack:///./node_modules/react-transition-group/esm/CSSTransition.js","webpack:///./node_modules/react-transition-group/esm/utils/ChildMapping.js","webpack:///./node_modules/react-transition-group/esm/TransitionGroup.js","webpack:///./node_modules/react-transition-group/esm/ReplaceTransition.js"],"names":["getStory","storyName","getStories","filter","selected","name","getStorySteps","toUpperCase","steps","getWalletInfo","WALLETS_CONFIG","isValidWalletId","id","Object","values","WalletId","includes","withRouter","history","match","dispatch","useDispatch","step","setStep","useState","formData","updateFormState","useReducer","formReducer","initialState","accountType","isDefaultView","undefined","addr","accountData","length","useEffect","network","addNewAccounts","networkId","newAccounts","push","ROUTE_PATHS","DASHBOARD","path","walletId","params","type","ActionType","SELECT_ACCOUNT_TYPE","payload","goToStart","useUpdateEffect","replace","ADD_ACCOUNT","toLowerCase","RESET_FORM","goToNextStep","nextStep","Math","min","goToPreviousStep","onWalletSelection","ExtendedContentPanel","width","TransitionGroup","CSSTransition","classNames","timeout","WalletList","wallets","onSelect","showHeader","Step","onBack","stepper","current","total","wallet","onUnlock","ON_UNLOCK","formDispatch","renderStep","UBIQ_NETWORK","label","action","SELECT_NETWORK","handleUnlock","SET_LABEL","SET_DERIVATION_PATH","derivationPath","walletType","VIEW_ONLY","WEB3","map","payloadItem","address","getAddress","WALLETCONNECT","LEDGER_NANO_S","dPath","getPath","TREZOR","index","toString","LEDGER_NANO_S_NEW","TREZOR_NEW","GRIDPLUS","Error","a","IS_WEB_AND_PRODUCTION","IS_PROD","IS_STAGING","Web3ProviderDecrypt","NetworkSelectPanel","withWalletConnect","WalletConnectDecrypt","LegderUnlock","TrezorUnlock","GridPlusUnlock","ViewOnlyDecrypt","createContext","_React$Component","Transition","props","context","_this","call","this","initialStatus","appear","isMounting","enter","appearStatus","in","unmountOnExit","mountOnEnter","state","status","nextCallback","getDerivedStateFromProps","_ref","prevState","_proto","prototype","componentDidMount","updateStatus","componentDidUpdate","prevProps","nextStatus","componentWillUnmount","cancelNextCallback","getTimeouts","exit","mounting","node","findDOMNode","performEnter","performExit","setState","_this2","appearing","timeouts","enterTimeout","onEnter","safeSetState","onEntering","onTransitionEnd","onEntered","_this3","onExit","onExiting","onExited","cancel","nextState","callback","setNextCallback","_this4","active","event","handler","doesNotHaveTimeoutOrListener","addEndListener","setTimeout","render","_this$props","children","childProps","createElement","TransitionGroupContext","Provider","value","child","Children","only","cloneElement","Component","noop","contextType","propTypes","defaultProps","UNMOUNTED","EXITED","ENTERING","ENTERED","EXITING","classes","split","forEach","c","_len","arguments","args","Array","_key","apply","concat","className","getClassNames","removeClasses","activeClassName","reflowAndAddClass","appearClassName","doneClassName","enterClassName","isStringClassNames","_this$getClassNames6","scrollTop","getChildMapping","mapFn","result","create","key","mapper","getProp","prop","getNextChildMapping","nextProps","prevChildMapping","nextChildMapping","prev","next","getValueForKey","i","nextKeysPending","pendingKeys","prevKey","childMapping","nextKey","pendingNextKey","mergeChildMappings","keys","hasPrev","hasNext","prevChild","isLeaving","bind","obj","k","handleExited","contextValue","firstRender","mounted","currentChildMapping","component","childFactory","ReplaceTransition","_args","handleEnter","_len2","_key2","handleLifecycle","handleEntering","_len3","_key3","handleEntered","_len4","_key4","handleExit","_len5","_key5","handleExiting","_len6","_key6","_len7","_key7","idx","originalArgs","_child$props","toArray","inProp","_React$Children$toArr","first","second"],"mappings":"sNAAA,WAEA,QACA,UAEA,QACA,QACA,QACA,QACA,QACA,QAEA,UACA,UACA,S,OAEO,MAAMA,EAAYC,IAChB,IAAAC,cAAaC,OAAQC,GAAaA,EAASC,OAASJ,GAAW,G,aAGjE,MAAMK,EAAiBL,GACrBD,EAASC,EAAUM,eAA2BC,M,kBAGhD,MAAMC,EAAiBR,GACrBS,iBAAeT,EAAUM,e,kB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IAAK,SACLpE,QAASpC,KAAKsJ,WACdhH,WAAYtC,KAAKyJ,cACjBjH,UAAWxC,KAAKmI,iBAIbO,EAvGT,CAwGE,IAAMtE,WAER,EAAkBG,UAMd,GACW","file":"AddAccountFlow.d2dad87220b6d174b357.js","sourcesContent":["import { useEffect, useReducer, useState } from 'react';\n\nimport { withRouter } from 'react-router-dom';\nimport { CSSTransition, TransitionGroup } from 'react-transition-group';\n\nimport { ExtendedContentPanel, WalletList } from '@components';\nimport { IWalletConfig, ROUTE_PATHS, WALLETS_CONFIG } from '@config';\nimport { useDispatch } from '@store';\nimport { addNewAccounts } from '@store/account.slice';\nimport { IStory, WalletId } from '@types';\nimport { useUpdateEffect } from '@vendor';\n\nimport { formReducer, initialState } from './AddAccountForm.reducer';\nimport { getStories } from './stories';\nimport { FormDataActionType as ActionType } from './types';\n\nexport const getStory = (storyName: WalletId): IStory => {\n  return getStories().filter((selected) => selected.name === storyName)[0];\n};\n\nexport const getStorySteps = (storyName: WalletId) => {\n  return getStory(storyName.toUpperCase() as WalletId).steps;\n};\n\nexport const getWalletInfo = (storyName: WalletId): IWalletConfig => {\n  return WALLETS_CONFIG[storyName.toUpperCase() as WalletId];\n};\n\nexport const isValidWalletId = (id: WalletId | string | undefined) => {\n  return !!(id && Object.values(WalletId).includes(id as WalletId));\n};\n\n/*\n  Flow to add an account to database. The default view of the component\n  displays a list of wallets (e.g. stories) that each posses their own number\n  of steps.\n    - AddAccountFlow handles the stepper\n    - AddAccountFormProvider handles the form state and is accessed by each story.\n*/\nconst AddAccountFlow = withRouter(({ history, match }) => {\n  const dispatch = useDispatch();\n  const [step, setStep] = useState(0); // The current Step inside the Wallet Story.\n  const [formData, updateFormState] = useReducer(formReducer, initialState); // The data that we want to save at the end.\n\n  const storyName: WalletId = formData.accountType; // The Wallet Story that we are tracking.\n  const isDefaultView = storyName === undefined;\n  const addr = formData.accountData.length > 0 ? formData.accountData[0] : '';\n  // Try to add an account after unlocking the wallet\n  // If we have completed the form, and add account fails we return to dashboard\n  useEffect(() => {\n    const { network, accountData, accountType } = formData;\n    if (addr && accountData) {\n      dispatch(addNewAccounts({ networkId: network, accountType, newAccounts: accountData }));\n      history.push(ROUTE_PATHS.DASHBOARD.path);\n    }\n  }, [addr]);\n\n  // If there is a valid walletName parameter in the URL, update state and let router effect redirect to that wallet\n  useEffect(() => {\n    const { walletId } = match.params; // Read the walletName parameter from the URL\n    if (!walletId) {\n      return;\n    } else if (!isValidWalletId(walletId.toUpperCase())) {\n      goToStart();\n    } else if (walletId.toUpperCase() !== storyName) {\n      updateFormState({\n        type: ActionType.SELECT_ACCOUNT_TYPE,\n        payload: { accountType: walletId.toUpperCase() }\n      });\n    }\n  }, [match.params]);\n\n  // Update the url when we select a specific story. Since the storyName is always undefined on first mount,\n  // we run the effect only on update.\n  useUpdateEffect(() => {\n    isValidWalletId(storyName)\n      ? history.replace(`${ROUTE_PATHS.ADD_ACCOUNT.path}/${storyName.toLowerCase()}`)\n      : history.replace(`${ROUTE_PATHS.ADD_ACCOUNT.path}`);\n  }, [formData.accountType]);\n\n  const goToStart = () => {\n    setStep(0);\n    updateFormState({ type: ActionType.RESET_FORM, payload: '' });\n  };\n\n  const goToNextStep = () => {\n    const nextStep = Math.min(step + 1, getStorySteps(storyName).length - 1);\n    setStep(nextStep);\n  };\n\n  const goToPreviousStep = () => {\n    if (step === 0) return goToStart();\n    setStep(step - 1);\n  };\n\n  const onWalletSelection = (name: WalletId) => {\n    updateFormState({ type: ActionType.SELECT_ACCOUNT_TYPE, payload: { accountType: name } });\n  };\n\n  const renderDefault = () => {\n    return (\n      <ExtendedContentPanel width=\"810px\">\n        <TransitionGroup>\n          <CSSTransition classNames=\"DecryptContent\" timeout={500}>\n            <WalletList wallets={getStories()} onSelect={onWalletSelection} showHeader={true} />\n          </CSSTransition>\n        </TransitionGroup>\n      </ExtendedContentPanel>\n    );\n  };\n\n  const renderStep = () => {\n    const steps = getStorySteps(storyName);\n    const Step = steps[step];\n\n    return (\n      <ExtendedContentPanel\n        onBack={goToPreviousStep}\n        stepper={steps.length > 1 ? { current: step + 1, total: steps.length } : undefined}\n        width=\"810px\"\n      >\n        <TransitionGroup>\n          <CSSTransition classNames=\"DecryptContent\" timeout={500}>\n            <Step\n              wallet={getWalletInfo(storyName)}\n              goToStart={goToStart}\n              goToNextStep={goToNextStep}\n              goToPreviousStep={goToPreviousStep}\n              onUnlock={(payload: any) => updateFormState({ type: ActionType.ON_UNLOCK, payload })}\n              formData={formData}\n              formDispatch={updateFormState}\n            />\n          </CSSTransition>\n        </TransitionGroup>\n      </ExtendedContentPanel>\n    );\n  };\n\n  return <>{isDefaultView ? renderDefault() : renderStep()}</>;\n});\n\nexport default AddAccountFlow;\n","import { UBIQ_NETWORK } from '@config';\nimport { FormData, IAccountAdditionData, WalletId } from '@types';\n\nimport { FormDataActionType as ActionType, FormDataAction } from './types';\n\nexport const initialState: FormData = {\n  network: UBIQ_NETWORK,\n  accountType: undefined,\n  accountData: [] as IAccountAdditionData[],\n  label: 'New Account'\n};\n\nexport const formReducer = (formData: FormData, action: FormDataAction) => {\n  switch (action.type) {\n    case ActionType.SELECT_NETWORK:\n      return { ...formData, network: action.payload.network };\n    case ActionType.SELECT_ACCOUNT_TYPE:\n      return { ...formData, accountType: action.payload.accountType };\n    case ActionType.ON_UNLOCK:\n      return { ...formData, accountData: handleUnlock(formData.accountType, action.payload) };\n    case ActionType.SET_LABEL:\n      return { ...formData, label: action.payload.label };\n    case ActionType.SET_DERIVATION_PATH:\n      return { ...formData, derivationPath: action.payload.derivationPath };\n    case ActionType.RESET_FORM:\n      return initialState;\n    default:\n      return formData;\n  }\n};\n\nconst handleUnlock = (walletType: WalletId | undefined, payload: any) => {\n  const wallets = (() => {\n    switch (walletType) {\n      case WalletId.VIEW_ONLY:\n        return [payload];\n      case WalletId.WEB3:\n        return payload.map((payloadItem: any) => ({\n          address: payloadItem.getAddress(),\n          derivationPath: ''\n        }));\n      case WalletId.WALLETCONNECT:\n        return [\n          {\n            address: payload.address,\n            derivationPath: ''\n          }\n        ];\n      case WalletId.LEDGER_NANO_S:\n        return [\n          {\n            address: payload.address,\n            dPath: payload.getPath()\n          }\n        ];\n      case WalletId.TREZOR:\n        return [\n          {\n            address: payload.address,\n            derivationPath: payload.path || payload.dPath + '/' + payload.index.toString()\n          }\n        ];\n      case WalletId.LEDGER_NANO_S_NEW:\n      case WalletId.TREZOR_NEW:\n      case WalletId.GRIDPLUS:\n        return payload;\n      default:\n        throw new Error(\n          `[AddAccountReducer]: UNLOCK with wallet ${walletType} and payload ${payload} is invalid`\n        );\n    }\n  })();\n  return wallets.map((a: any) => ({\n    ...a,\n    dPath: a.derivationPath || a.dPath\n  })) as IAccountAdditionData[];\n};\n","import {\n  GridPlusUnlock,\n  LegderUnlock,\n  TrezorUnlock,\n  ViewOnlyDecrypt,\n  WalletConnectDecrypt,\n  Web3ProviderDecrypt\n} from '@components';\nimport { withWalletConnect } from '@services/WalletService';\nimport { IStory, WalletId } from '@types';\nimport { IS_PROD, IS_STAGING } from '@utils';\n\nimport { NetworkSelectPanel } from './components';\n\n// This const is used to disable non supported wallets\nexport const IS_WEB_AND_PRODUCTION: boolean = IS_PROD && !IS_STAGING;\n\nexport const getStories = (): IStory[] => [\n  {\n    name: WalletId.WEB3,\n    steps: [Web3ProviderDecrypt]\n  },\n  {\n    name: WalletId.WALLETCONNECT,\n    steps: [NetworkSelectPanel, withWalletConnect(WalletConnectDecrypt)]\n  },\n  {\n    name: WalletId.LEDGER_NANO_S_NEW,\n    steps: [NetworkSelectPanel, LegderUnlock]\n  },\n  {\n    name: WalletId.TREZOR_NEW,\n    steps: [NetworkSelectPanel, TrezorUnlock]\n  },\n  {\n    name: WalletId.GRIDPLUS,\n    steps: [NetworkSelectPanel, GridPlusUnlock]\n  },\n  {\n    name: WalletId.VIEW_ONLY,\n    steps: [NetworkSelectPanel, ViewOnlyDecrypt]\n  }\n];\n","import React from 'react';\nexport default React.createContext(null);","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport * as PropTypes from 'prop-types';\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport { timeoutsShape } from './utils/PropTypes';\nimport TransitionGroupContext from './TransitionGroupContext';\nexport var UNMOUNTED = 'unmounted';\nexport var EXITED = 'exited';\nexport var ENTERING = 'entering';\nexport var ENTERED = 'entered';\nexport var EXITING = 'exiting';\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 * ---\n *\n * **Note**: `Transition` is a platform-agnostic base component. If you're using\n * transitions in CSS, you'll probably want to use\n * [`CSSTransition`](https://reactcommunity.org/react-transition-group/css-transition)\n * instead. It inherits all the features of `Transition`, but contains\n * additional features necessary to play nice with CSS transitions (hence the\n * name of the component).\n *\n * ---\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\n * components. It's up to you to give meaning and effect to those states. For\n * example we can add styles to a component when it enters or exits:\n *\n * ```jsx\n * import { Transition } from 'react-transition-group';\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: 1 },\n *   entered:  { opacity: 1 },\n *   exiting:  { opacity: 0 },\n *   exited:  { opacity: 0 },\n * };\n *\n * const Fade = ({ in: inProp }) => (\n *   <Transition in={inProp} timeout={duration}>\n *     {state => (\n *       <div style={{\n *         ...defaultStyle,\n *         ...transitionStyles[state]\n *       }}>\n *         I'm a fade Transition!\n *       </div>\n *     )}\n *   </Transition>\n * );\n * ```\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\n * begins the \"Enter\" stage. During this stage, the component will shift from\n * its current transition state, to `'entering'` for the duration of the\n * transition and then to the `'entered'` stage once it's complete. Let's take\n * the following example (we'll use the\n * [useState](https://reactjs.org/docs/hooks-reference.html#usestate) hook):\n *\n * ```jsx\n * function App() {\n *   const [inProp, setInProp] = useState(false);\n *   return (\n *     <div>\n *       <Transition in={inProp} timeout={500}>\n *         {state => (\n *           // ...\n *         )}\n *       </Transition>\n *       <button onClick={() => setInProp(true)}>\n *         Click to Enter\n *       </button>\n *     </div>\n *   );\n * }\n * ```\n *\n * When the button is clicked the component will shift to the `'entering'` state\n * and stay there for 500ms (the value of `timeout`) before it finally switches\n * to `'entered'`.\n *\n * When `in` is `false` the same thing happens except the state moves from\n * `'exiting'` to `'exited'`.\n */\n\nvar Transition =\n/*#__PURE__*/\nfunction (_React$Component) {\n  _inheritsLoose(Transition, _React$Component);\n\n  function Transition(props, context) {\n    var _this;\n\n    _this = _React$Component.call(this, props, context) || this;\n    var parentGroup = context; // In the context of a TransitionGroup all enters are really appears\n\n    var appear = parentGroup && !parentGroup.isMounting ? props.enter : props.appear;\n    var initialStatus;\n    _this.appearStatus = null;\n\n    if (props.in) {\n      if (appear) {\n        initialStatus = EXITED;\n        _this.appearStatus = 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 = {\n      status: initialStatus\n    };\n    _this.nextCallback = null;\n    return _this;\n  }\n\n  Transition.getDerivedStateFromProps = function getDerivedStateFromProps(_ref, prevState) {\n    var nextIn = _ref.in;\n\n    if (nextIn && prevState.status === UNMOUNTED) {\n      return {\n        status: EXITED\n      };\n    }\n\n    return null;\n  }; // getSnapshotBeforeUpdate(prevProps) {\n  //   let nextStatus = null\n  //   if (prevProps !== this.props) {\n  //     const { status } = this.state\n  //     if (this.props.in) {\n  //       if (status !== ENTERING && status !== ENTERED) {\n  //         nextStatus = ENTERING\n  //       }\n  //     } else {\n  //       if (status === ENTERING || status === ENTERED) {\n  //         nextStatus = EXITING\n  //       }\n  //     }\n  //   }\n  //   return { nextStatus }\n  // }\n\n\n  var _proto = Transition.prototype;\n\n  _proto.componentDidMount = function componentDidMount() {\n    this.updateStatus(true, this.appearStatus);\n  };\n\n  _proto.componentDidUpdate = function componentDidUpdate(prevProps) {\n    var nextStatus = null;\n\n    if (prevProps !== this.props) {\n      var status = this.state.status;\n\n      if (this.props.in) {\n        if (status !== ENTERING && status !== ENTERED) {\n          nextStatus = ENTERING;\n        }\n      } else {\n        if (status === ENTERING || status === ENTERED) {\n          nextStatus = EXITING;\n        }\n      }\n    }\n\n    this.updateStatus(false, nextStatus);\n  };\n\n  _proto.componentWillUnmount = function componentWillUnmount() {\n    this.cancelNextCallback();\n  };\n\n  _proto.getTimeouts = function getTimeouts() {\n    var timeout = this.props.timeout;\n    var exit, enter, appear;\n    exit = enter = appear = timeout;\n\n    if (timeout != null && typeof timeout !== 'number') {\n      exit = timeout.exit;\n      enter = timeout.enter; // TODO: remove fallback for next major\n\n      appear = timeout.appear !== undefined ? timeout.appear : enter;\n    }\n\n    return {\n      exit: exit,\n      enter: enter,\n      appear: appear\n    };\n  };\n\n  _proto.updateStatus = function updateStatus(mounting, nextStatus) {\n    if (mounting === void 0) {\n      mounting = false;\n    }\n\n    if (nextStatus !== null) {\n      // nextStatus will always be ENTERING or EXITING.\n      this.cancelNextCallback();\n      var node = ReactDOM.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({\n        status: UNMOUNTED\n      });\n    }\n  };\n\n  _proto.performEnter = function performEnter(node, mounting) {\n    var _this2 = this;\n\n    var enter = this.props.enter;\n    var appearing = this.context ? this.context.isMounting : mounting;\n    var timeouts = this.getTimeouts();\n    var enterTimeout = appearing ? timeouts.appear : timeouts.enter; // no enter animation skip right to ENTERED\n    // if we are mounting and running this it means appear _must_ be set\n\n    if (!mounting && !enter) {\n      this.safeSetState({\n        status: ENTERED\n      }, function () {\n        _this2.props.onEntered(node);\n      });\n      return;\n    }\n\n    this.props.onEnter(node, appearing);\n    this.safeSetState({\n      status: ENTERING\n    }, function () {\n      _this2.props.onEntering(node, appearing);\n\n      _this2.onTransitionEnd(node, enterTimeout, function () {\n        _this2.safeSetState({\n          status: ENTERED\n        }, function () {\n          _this2.props.onEntered(node, appearing);\n        });\n      });\n    });\n  };\n\n  _proto.performExit = function performExit(node) {\n    var _this3 = this;\n\n    var exit = this.props.exit;\n    var timeouts = this.getTimeouts(); // no exit animation skip right to EXITED\n\n    if (!exit) {\n      this.safeSetState({\n        status: EXITED\n      }, function () {\n        _this3.props.onExited(node);\n      });\n      return;\n    }\n\n    this.props.onExit(node);\n    this.safeSetState({\n      status: EXITING\n    }, function () {\n      _this3.props.onExiting(node);\n\n      _this3.onTransitionEnd(node, timeouts.exit, function () {\n        _this3.safeSetState({\n          status: EXITED\n        }, function () {\n          _this3.props.onExited(node);\n        });\n      });\n    });\n  };\n\n  _proto.cancelNextCallback = function cancelNextCallback() {\n    if (this.nextCallback !== null) {\n      this.nextCallback.cancel();\n      this.nextCallback = null;\n    }\n  };\n\n  _proto.safeSetState = function safeSetState(nextState, callback) {\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, callback);\n  };\n\n  _proto.setNextCallback = function setNextCallback(callback) {\n    var _this4 = this;\n\n    var active = true;\n\n    this.nextCallback = function (event) {\n      if (active) {\n        active = false;\n        _this4.nextCallback = null;\n        callback(event);\n      }\n    };\n\n    this.nextCallback.cancel = function () {\n      active = false;\n    };\n\n    return this.nextCallback;\n  };\n\n  _proto.onTransitionEnd = function onTransitionEnd(node, timeout, handler) {\n    this.setNextCallback(handler);\n    var doesNotHaveTimeoutOrListener = timeout == null && !this.props.addEndListener;\n\n    if (!node || doesNotHaveTimeoutOrListener) {\n      setTimeout(this.nextCallback, 0);\n      return;\n    }\n\n    if (this.props.addEndListener) {\n      this.props.addEndListener(node, this.nextCallback);\n    }\n\n    if (timeout != null) {\n      setTimeout(this.nextCallback, timeout);\n    }\n  };\n\n  _proto.render = function render() {\n    var status = this.state.status;\n\n    if (status === UNMOUNTED) {\n      return null;\n    }\n\n    var _this$props = this.props,\n        children = _this$props.children,\n        childProps = _objectWithoutPropertiesLoose(_this$props, [\"children\"]); // 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      // allows for nested Transitions\n      return React.createElement(TransitionGroupContext.Provider, {\n        value: null\n      }, children(status, childProps));\n    }\n\n    var child = React.Children.only(children);\n    return (// allows for nested Transitions\n      React.createElement(TransitionGroupContext.Provider, {\n        value: null\n      }, React.cloneElement(child, childProps))\n    );\n  };\n\n  return Transition;\n}(React.Component);\n\nTransition.contextType = TransitionGroupContext;\nTransition.propTypes = process.env.NODE_ENV !== \"production\" ? {\n  /**\n   * A `function` child can be used instead of a React element. This function is\n   * called with the current transition status (`'entering'`, `'entered'`,\n   * `'exiting'`, `'exited'`, `'unmounted'`), which can be used to apply context\n   * specific props to a component.\n   *\n   * ```jsx\n   * <Transition in={this.state.in} timeout={150}>\n   *   {state => (\n   *     <MyComponent className={`fade fade-${state}`} />\n   *   )}\n   * </Transition>\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 `<Transition>` 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 `<Transition>` 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:\n   *\n   * ```jsx\n   * timeout={500}\n   * ```\n   *\n   * or individually:\n   *\n   * ```jsx\n   * timeout={{\n   *  appear: 500,\n   *  enter: 300,\n   *  exit: 500,\n   * }}\n   * ```\n   *\n   * - `appear` defaults to the value of `enter`\n   * - `enter` defaults to `0`\n   * - `exit` defaults to `0`\n   *\n   * @type {number | { enter?: number, exit?: number, appear?: number }}\n   */\n  timeout: function timeout(props) {\n    var pt = timeoutsShape;\n    if (!props.addEndListener) pt = pt.isRequired;\n\n    for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n      args[_key - 1] = arguments[_key];\n    }\n\n    return pt.apply(void 0, [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 // Name the function so it is clearer in the documentation\n\n} : {};\n\nfunction noop() {}\n\nTransition.defaultProps = {\n  in: false,\n  mountOnEnter: false,\n  unmountOnExit: false,\n  appear: false,\n  enter: true,\n  exit: true,\n  onEnter: noop,\n  onEntering: noop,\n  onEntered: noop,\n  onExit: noop,\n  onExiting: noop,\n  onExited: noop\n};\nTransition.UNMOUNTED = 0;\nTransition.EXITED = 1;\nTransition.ENTERING = 2;\nTransition.ENTERED = 3;\nTransition.EXITING = 4;\nexport default Transition;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport * as PropTypes from 'prop-types';\nimport addOneClass from 'dom-helpers/class/addClass';\nimport removeOneClass from 'dom-helpers/class/removeClass';\nimport React from 'react';\nimport Transition from './Transition';\nimport { classNamesShape } from './utils/PropTypes';\n\nvar addClass = function addClass(node, classes) {\n  return node && classes && classes.split(' ').forEach(function (c) {\n    return addOneClass(node, c);\n  });\n};\n\nvar removeClass = function removeClass(node, classes) {\n  return node && classes && classes.split(' ').forEach(function (c) {\n    return removeOneClass(node, c);\n  });\n};\n/**\n * A transition component inspired by the excellent\n * [ng-animate](http://www.nganimate.org/) library, you should use it if you're\n * using CSS transitions or animations. It's built upon the\n * [`Transition`](https://reactcommunity.org/react-transition-group/transition)\n * component, so it inherits all of its props.\n *\n * `CSSTransition` applies a pair of class names during the `appear`, `enter`,\n * and `exit` states of the transition. The first class is applied and then a\n * second `*-active` class in order to activate the CSSS transition. After the\n * transition, matching `*-done` class names are applied to persist the\n * transition state.\n *\n * ```jsx\n * function App() {\n *   const [inProp, setInProp] = useState(false);\n *   return (\n *     <div>\n *       <CSSTransition in={inProp} timeout={200} classNames=\"my-node\">\n *         <div>\n *           {\"I'll receive my-node-* classes\"}\n *         </div>\n *       </CSSTransition>\n *       <button type=\"button\" onClick={() => setInProp(true)}>\n *         Click to Enter\n *       </button>\n *     </div>\n *   );\n * }\n * ```\n *\n * When the `in` prop is set to `true`, the child component will first receive\n * the class `example-enter`, then the `example-enter-active` will be added in\n * the next tick. `CSSTransition` [forces a\n * reflow](https://github.com/reactjs/react-transition-group/blob/5007303e729a74be66a21c3e2205e4916821524b/src/CSSTransition.js#L208-L215)\n * between before adding the `example-enter-active`. This is an important trick\n * because it allows us to transition between `example-enter` and\n * `example-enter-active` even though they were added immediately one after\n * another. Most notably, this is what makes it possible for us to animate\n * _appearance_.\n *\n * ```css\n * .my-node-enter {\n *   opacity: 0;\n * }\n * .my-node-enter-active {\n *   opacity: 1;\n *   transition: opacity 200ms;\n * }\n * .my-node-exit {\n *   opacity: 1;\n * }\n * .my-node-exit-active {\n *   opacity: 0;\n *   transition: opacity 200ms;\n * }\n * ```\n *\n * `*-active` classes represent which styles you want to animate **to**.\n */\n\n\nvar CSSTransition =\n/*#__PURE__*/\nfunction (_React$Component) {\n  _inheritsLoose(CSSTransition, _React$Component);\n\n  function CSSTransition() {\n    var _this;\n\n    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n      args[_key] = arguments[_key];\n    }\n\n    _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n\n    _this.onEnter = function (node, appearing) {\n      var _this$getClassNames = _this.getClassNames(appearing ? 'appear' : 'enter'),\n          className = _this$getClassNames.className;\n\n      _this.removeClasses(node, 'exit');\n\n      addClass(node, className);\n\n      if (_this.props.onEnter) {\n        _this.props.onEnter(node, appearing);\n      }\n    };\n\n    _this.onEntering = function (node, appearing) {\n      var _this$getClassNames2 = _this.getClassNames(appearing ? 'appear' : 'enter'),\n          activeClassName = _this$getClassNames2.activeClassName;\n\n      _this.reflowAndAddClass(node, activeClassName);\n\n      if (_this.props.onEntering) {\n        _this.props.onEntering(node, appearing);\n      }\n    };\n\n    _this.onEntered = function (node, appearing) {\n      var appearClassName = _this.getClassNames('appear').doneClassName;\n\n      var enterClassName = _this.getClassNames('enter').doneClassName;\n\n      var doneClassName = appearing ? appearClassName + \" \" + enterClassName : enterClassName;\n\n      _this.removeClasses(node, appearing ? 'appear' : 'enter');\n\n      addClass(node, doneClassName);\n\n      if (_this.props.onEntered) {\n        _this.props.onEntered(node, appearing);\n      }\n    };\n\n    _this.onExit = function (node) {\n      var _this$getClassNames3 = _this.getClassNames('exit'),\n          className = _this$getClassNames3.className;\n\n      _this.removeClasses(node, 'appear');\n\n      _this.removeClasses(node, 'enter');\n\n      addClass(node, className);\n\n      if (_this.props.onExit) {\n        _this.props.onExit(node);\n      }\n    };\n\n    _this.onExiting = function (node) {\n      var _this$getClassNames4 = _this.getClassNames('exit'),\n          activeClassName = _this$getClassNames4.activeClassName;\n\n      _this.reflowAndAddClass(node, activeClassName);\n\n      if (_this.props.onExiting) {\n        _this.props.onExiting(node);\n      }\n    };\n\n    _this.onExited = function (node) {\n      var _this$getClassNames5 = _this.getClassNames('exit'),\n          doneClassName = _this$getClassNames5.doneClassName;\n\n      _this.removeClasses(node, 'exit');\n\n      addClass(node, doneClassName);\n\n      if (_this.props.onExited) {\n        _this.props.onExited(node);\n      }\n    };\n\n    _this.getClassNames = function (type) {\n      var classNames = _this.props.classNames;\n      var isStringClassNames = typeof classNames === 'string';\n      var prefix = isStringClassNames && classNames ? classNames + '-' : '';\n      var className = isStringClassNames ? prefix + type : classNames[type];\n      var activeClassName = isStringClassNames ? className + '-active' : classNames[type + 'Active'];\n      var doneClassName = isStringClassNames ? className + '-done' : classNames[type + 'Done'];\n      return {\n        className: className,\n        activeClassName: activeClassName,\n        doneClassName: doneClassName\n      };\n    };\n\n    return _this;\n  }\n\n  var _proto = CSSTransition.prototype;\n\n  _proto.removeClasses = function removeClasses(node, type) {\n    var _this$getClassNames6 = this.getClassNames(type),\n        className = _this$getClassNames6.className,\n        activeClassName = _this$getClassNames6.activeClassName,\n        doneClassName = _this$getClassNames6.doneClassName;\n\n    className && removeClass(node, className);\n    activeClassName && removeClass(node, activeClassName);\n    doneClassName && removeClass(node, doneClassName);\n  };\n\n  _proto.reflowAndAddClass = function reflowAndAddClass(node, className) {\n    // This is for to force a repaint,\n    // which is necessary in order to transition styles when adding a class name.\n    if (className) {\n      /* eslint-disable no-unused-expressions */\n      node && node.scrollTop;\n      /* eslint-enable no-unused-expressions */\n\n      addClass(node, className);\n    }\n  };\n\n  _proto.render = function render() {\n    var props = _extends({}, this.props);\n\n    delete props.classNames;\n    return React.createElement(Transition, _extends({}, props, {\n      onEnter: this.onEnter,\n      onEntered: this.onEntered,\n      onEntering: this.onEntering,\n      onExit: this.onExit,\n      onExiting: this.onExiting,\n      onExited: this.onExited\n    }));\n  };\n\n  return CSSTransition;\n}(React.Component);\n\nCSSTransition.defaultProps = {\n  classNames: ''\n};\nCSSTransition.propTypes = process.env.NODE_ENV !== \"production\" ? _extends({}, Transition.propTypes, {\n  /**\n   * The animation classNames applied to the component as it enters, exits or\n   * has finished the transition. A single name can be provided and it will be\n   * suffixed for each stage: e.g.\n   *\n   * `classNames=\"fade\"` applies `fade-enter`, `fade-enter-active`,\n   * `fade-enter-done`, `fade-exit`, `fade-exit-active`, `fade-exit-done`,\n   * `fade-appear`, `fade-appear-active`, and `fade-appear-done`.\n   *\n   * **Note**: `fade-appear-done` and `fade-enter-done` will _both_ be applied.\n   * This allows you to define different behavior for when appearing is done and\n   * when regular entering is done, using selectors like\n   * `.fade-enter-done:not(.fade-appear-done)`. For example, you could apply an\n   * epic entrance animation when element first appears in the DOM using\n   * [Animate.css](https://daneden.github.io/animate.css/). Otherwise you can\n   * simply use `fade-enter-done` for defining both cases.\n   *\n   * Each individual classNames can also be specified independently like:\n   *\n   * ```js\n   * classNames={{\n   *  appear: 'my-appear',\n   *  appearActive: 'my-active-appear',\n   *  appearDone: 'my-done-appear',\n   *  enter: 'my-enter',\n   *  enterActive: 'my-active-enter',\n   *  enterDone: 'my-done-enter',\n   *  exit: 'my-exit',\n   *  exitActive: 'my-active-exit',\n   *  exitDone: 'my-done-exit',\n   * }}\n   * ```\n   *\n   * If you want to set these classes using CSS Modules:\n   *\n   * ```js\n   * import styles from './styles.css';\n   * ```\n   *\n   * you might want to use camelCase in your CSS file, that way could simply\n   * spread them instead of listing them one by one:\n   *\n   * ```js\n   * classNames={{ ...styles }}\n   * ```\n   *\n   * @type {string | {\n   *  appear?: string,\n   *  appearActive?: string,\n   *  appearDone?: string,\n   *  enter?: string,\n   *  enterActive?: string,\n   *  enterDone?: string,\n   *  exit?: string,\n   *  exitActive?: string,\n   *  exitDone?: string,\n   * }}\n   */\n  classNames: classNamesShape,\n\n  /**\n   * A `<Transition>` callback fired immediately after the 'enter' or 'appear' class is\n   * applied.\n   *\n   * @type Function(node: HtmlElement, isAppearing: bool)\n   */\n  onEnter: PropTypes.func,\n\n  /**\n   * A `<Transition>` callback fired immediately after the 'enter-active' or\n   * 'appear-active' class is applied.\n   *\n   * @type Function(node: HtmlElement, isAppearing: bool)\n   */\n  onEntering: PropTypes.func,\n\n  /**\n   * A `<Transition>` callback fired immediately after the 'enter' or\n   * 'appear' classes are **removed** and the `done` class is added to the DOM node.\n   *\n   * @type Function(node: HtmlElement, isAppearing: bool)\n   */\n  onEntered: PropTypes.func,\n\n  /**\n   * A `<Transition>` callback fired immediately after the 'exit' class is\n   * applied.\n   *\n   * @type Function(node: HtmlElement)\n   */\n  onExit: PropTypes.func,\n\n  /**\n   * A `<Transition>` callback fired immediately after the 'exit-active' is applied.\n   *\n   * @type Function(node: HtmlElement)\n   */\n  onExiting: PropTypes.func,\n\n  /**\n   * A `<Transition>` callback fired immediately after the 'exit' classes\n   * are **removed** and the `exit-done` class is added to the DOM node.\n   *\n   * @type Function(node: HtmlElement)\n   */\n  onExited: PropTypes.func\n}) : {};\nexport default CSSTransition;","import { Children, cloneElement, isValidElement } from 'react';\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 */\n\nexport function getChildMapping(children, mapFn) {\n  var mapper = function mapper(child) {\n    return mapFn && isValidElement(child) ? mapFn(child) : child;\n  };\n\n  var result = Object.create(null);\n  if (children) 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 * 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 */\n\nexport function mergeChildMappings(prev, next) {\n  prev = prev || {};\n  next = next || {};\n\n  function getValueForKey(key) {\n    return key in next ? next[key] : prev[key];\n  } // For each key of `next`, the list of keys to insert before that key in\n  // the combined list\n\n\n  var nextKeysPending = Object.create(null);\n  var pendingKeys = [];\n\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;\n  var childMapping = {};\n\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\n    childMapping[nextKey] = getValueForKey(nextKey);\n  } // Finally, add the keys which didn't appear before any key in `next`\n\n\n  for (i = 0; i < pendingKeys.length; i++) {\n    childMapping[pendingKeys[i]] = getValueForKey(pendingKeys[i]);\n  }\n\n  return childMapping;\n}\n\nfunction getProp(child, prop, props) {\n  return props[prop] != null ? props[prop] : child.props[prop];\n}\n\nexport function getInitialChildMapping(props, onExited) {\n  return getChildMapping(props.children, function (child) {\n    return cloneElement(child, {\n      onExited: onExited.bind(null, child),\n      in: true,\n      appear: getProp(child, 'appear', props),\n      enter: getProp(child, 'enter', props),\n      exit: getProp(child, 'exit', props)\n    });\n  });\n}\nexport function getNextChildMapping(nextProps, prevChildMapping, onExited) {\n  var nextChildMapping = getChildMapping(nextProps.children);\n  var children = mergeChildMappings(prevChildMapping, nextChildMapping);\n  Object.keys(children).forEach(function (key) {\n    var child = children[key];\n    if (!isValidElement(child)) return;\n    var hasPrev = key in prevChildMapping;\n    var hasNext = key in nextChildMapping;\n    var prevChild = prevChildMapping[key];\n    var isLeaving = isValidElement(prevChild) && !prevChild.props.in; // item is new (entering)\n\n    if (hasNext && (!hasPrev || isLeaving)) {\n      // console.log('entering', key)\n      children[key] = cloneElement(child, {\n        onExited: onExited.bind(null, child),\n        in: true,\n        exit: getProp(child, 'exit', nextProps),\n        enter: getProp(child, 'enter', nextProps)\n      });\n    } else if (!hasNext && hasPrev && !isLeaving) {\n      // item is old (exiting)\n      // console.log('leaving', key)\n      children[key] = cloneElement(child, {\n        in: false\n      });\n    } else if (hasNext && hasPrev && isValidElement(prevChild)) {\n      // item hasn't changed transition states\n      // copy over the last transition props;\n      // console.log('unchanged', key)\n      children[key] = cloneElement(child, {\n        onExited: onExited.bind(null, child),\n        in: prevChild.props.in,\n        exit: getProp(child, 'exit', nextProps),\n        enter: getProp(child, 'enter', nextProps)\n      });\n    }\n  });\n  return children;\n}","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport PropTypes from 'prop-types';\nimport React from 'react';\nimport TransitionGroupContext from './TransitionGroupContext';\nimport { getChildMapping, getInitialChildMapping, getNextChildMapping } from './utils/ChildMapping';\n\nvar values = Object.values || function (obj) {\n  return Object.keys(obj).map(function (k) {\n    return obj[k];\n  });\n};\n\nvar defaultProps = {\n  component: 'div',\n  childFactory: function childFactory(child) {\n    return child;\n  }\n  /**\n   * The `<TransitionGroup>` component manages a set of transition components\n   * (`<Transition>` and `<CSSTransition>`) in a list. Like with the transition\n   * components, `<TransitionGroup>` is a state machine for managing the mounting\n   * and unmounting of components over time.\n   *\n   * Consider the example below. As items are removed or added to the TodoList the\n   * `in` prop is toggled automatically by the `<TransitionGroup>`.\n   *\n   * Note that `<TransitionGroup>`  does not define any animation behavior!\n   * Exactly _how_ a list item animates is up to the individual transition\n   * component. This means you can mix and match animations across different list\n   * items.\n   */\n\n};\n\nvar TransitionGroup =\n/*#__PURE__*/\nfunction (_React$Component) {\n  _inheritsLoose(TransitionGroup, _React$Component);\n\n  function TransitionGroup(props, context) {\n    var _this;\n\n    _this = _React$Component.call(this, props, context) || this;\n\n    var handleExited = _this.handleExited.bind(_assertThisInitialized(_assertThisInitialized(_this))); // Initial children should all be entering, dependent on appear\n\n\n    _this.state = {\n      contextValue: {\n        isMounting: true\n      },\n      handleExited: handleExited,\n      firstRender: true\n    };\n    return _this;\n  }\n\n  var _proto = TransitionGroup.prototype;\n\n  _proto.componentDidMount = function componentDidMount() {\n    this.mounted = true;\n    this.setState({\n      contextValue: {\n        isMounting: false\n      }\n    });\n  };\n\n  _proto.componentWillUnmount = function componentWillUnmount() {\n    this.mounted = false;\n  };\n\n  TransitionGroup.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps, _ref) {\n    var prevChildMapping = _ref.children,\n        handleExited = _ref.handleExited,\n        firstRender = _ref.firstRender;\n    return {\n      children: firstRender ? getInitialChildMapping(nextProps, handleExited) : getNextChildMapping(nextProps, prevChildMapping, handleExited),\n      firstRender: false\n    };\n  };\n\n  _proto.handleExited = function handleExited(child, node) {\n    var currentChildMapping = getChildMapping(this.props.children);\n    if (child.key in currentChildMapping) return;\n\n    if (child.props.onExited) {\n      child.props.onExited(node);\n    }\n\n    if (this.mounted) {\n      this.setState(function (state) {\n        var children = _extends({}, state.children);\n\n        delete children[child.key];\n        return {\n          children: children\n        };\n      });\n    }\n  };\n\n  _proto.render = function render() {\n    var _this$props = this.props,\n        Component = _this$props.component,\n        childFactory = _this$props.childFactory,\n        props = _objectWithoutPropertiesLoose(_this$props, [\"component\", \"childFactory\"]);\n\n    var contextValue = this.state.contextValue;\n    var children = values(this.state.children).map(childFactory);\n    delete props.appear;\n    delete props.enter;\n    delete props.exit;\n\n    if (Component === null) {\n      return React.createElement(TransitionGroupContext.Provider, {\n        value: contextValue\n      }, children);\n    }\n\n    return React.createElement(TransitionGroupContext.Provider, {\n      value: contextValue\n    }, React.createElement(Component, props, children));\n  };\n\n  return TransitionGroup;\n}(React.Component);\n\nTransitionGroup.propTypes = process.env.NODE_ENV !== \"production\" ? {\n  /**\n   * `<TransitionGroup>` renders a `<div>` 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 `<div>` element\n   * you can pass in `component={null}`. This is useful if the wrapping div\n   * borks your css styles.\n   */\n  component: PropTypes.any,\n\n  /**\n   * A set of `<Transition>` components, that are toggled `in` and out as they\n   * leave. the `<TransitionGroup>` will inject specific transition props, so\n   * remember to spread them through if you are wrapping the `<Transition>` as\n   * with our `<Fade>` example.\n   *\n   * While this component is meant for multiple `Transition` or `CSSTransition`\n   * children, sometimes you may want to have a single transition child with\n   * content that you want to be transitioned out and in when you change it\n   * (e.g. routes, images etc.) In that case you can change the `key` prop of\n   * the transition child as you change its content, this will cause\n   * `TransitionGroup` to transition the child out and back in.\n   */\n  children: PropTypes.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: PropTypes.bool,\n\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: PropTypes.bool,\n\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: PropTypes.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: PropTypes.func\n} : {};\nTransitionGroup.defaultProps = defaultProps;\nexport default TransitionGroup;","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport PropTypes from 'prop-types';\nimport React from 'react';\nimport { findDOMNode } from 'react-dom';\nimport TransitionGroup from './TransitionGroup';\n/**\n * The `<ReplaceTransition>` component is a specialized `Transition` component\n * that animates between two children.\n *\n * ```jsx\n * <ReplaceTransition in>\n *   <Fade><div>I appear first</div></Fade>\n *   <Fade><div>I replace the above</div></Fade>\n * </ReplaceTransition>\n * ```\n */\n\nvar ReplaceTransition =\n/*#__PURE__*/\nfunction (_React$Component) {\n  _inheritsLoose(ReplaceTransition, _React$Component);\n\n  function ReplaceTransition() {\n    var _this;\n\n    for (var _len = arguments.length, _args = new Array(_len), _key = 0; _key < _len; _key++) {\n      _args[_key] = arguments[_key];\n    }\n\n    _this = _React$Component.call.apply(_React$Component, [this].concat(_args)) || this;\n\n    _this.handleEnter = function () {\n      for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n        args[_key2] = arguments[_key2];\n      }\n\n      return _this.handleLifecycle('onEnter', 0, args);\n    };\n\n    _this.handleEntering = function () {\n      for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n        args[_key3] = arguments[_key3];\n      }\n\n      return _this.handleLifecycle('onEntering', 0, args);\n    };\n\n    _this.handleEntered = function () {\n      for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {\n        args[_key4] = arguments[_key4];\n      }\n\n      return _this.handleLifecycle('onEntered', 0, args);\n    };\n\n    _this.handleExit = function () {\n      for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {\n        args[_key5] = arguments[_key5];\n      }\n\n      return _this.handleLifecycle('onExit', 1, args);\n    };\n\n    _this.handleExiting = function () {\n      for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {\n        args[_key6] = arguments[_key6];\n      }\n\n      return _this.handleLifecycle('onExiting', 1, args);\n    };\n\n    _this.handleExited = function () {\n      for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {\n        args[_key7] = arguments[_key7];\n      }\n\n      return _this.handleLifecycle('onExited', 1, args);\n    };\n\n    return _this;\n  }\n\n  var _proto = ReplaceTransition.prototype;\n\n  _proto.handleLifecycle = function handleLifecycle(handler, idx, originalArgs) {\n    var _child$props;\n\n    var children = this.props.children;\n    var child = React.Children.toArray(children)[idx];\n    if (child.props[handler]) (_child$props = child.props)[handler].apply(_child$props, originalArgs);\n    if (this.props[handler]) this.props[handler](findDOMNode(this));\n  };\n\n  _proto.render = function render() {\n    var _this$props = this.props,\n        children = _this$props.children,\n        inProp = _this$props.in,\n        props = _objectWithoutPropertiesLoose(_this$props, [\"children\", \"in\"]);\n\n    var _React$Children$toArr = React.Children.toArray(children),\n        first = _React$Children$toArr[0],\n        second = _React$Children$toArr[1];\n\n    delete props.onEnter;\n    delete props.onEntering;\n    delete props.onEntered;\n    delete props.onExit;\n    delete props.onExiting;\n    delete props.onExited;\n    return React.createElement(TransitionGroup, props, inProp ? React.cloneElement(first, {\n      key: 'first',\n      onEnter: this.handleEnter,\n      onEntering: this.handleEntering,\n      onEntered: this.handleEntered\n    }) : React.cloneElement(second, {\n      key: 'second',\n      onEnter: this.handleExit,\n      onEntering: this.handleExiting,\n      onEntered: this.handleExited\n    }));\n  };\n\n  return ReplaceTransition;\n}(React.Component);\n\nReplaceTransition.propTypes = process.env.NODE_ENV !== \"production\" ? {\n  in: PropTypes.bool.isRequired,\n  children: function children(props, propName) {\n    if (React.Children.count(props[propName]) !== 2) return new Error(\"\\\"\" + propName + \"\\\" must be exactly two transition components.\");\n    return null;\n  }\n} : {};\nexport default ReplaceTransition;"],"sourceRoot":""}