{"version":3,"sources":["webpack:///./node_modules/connected-react-router/esm/middleware.js","webpack:///./node_modules/connected-react-router/esm/actions.js","webpack:///./node_modules/connected-react-router/esm/selectors.js","webpack:///./node_modules/connected-react-router/esm/ConnectedRouter.js","webpack:///./node_modules/connected-react-router/esm/reducer.js","webpack:///./node_modules/connected-react-router/esm/structure/plain/index.js","webpack:///./node_modules/connected-react-router/esm/structure/plain/getIn.js","webpack:///./node_modules/connected-react-router/esm/index.js"],"names":["_toConsumableArray","arr","Array","isArray","i","arr2","length","_arrayWithoutHoles","iter","Symbol","iterator","Object","prototype","toString","call","from","_iterableToArray","TypeError","_nonIterableSpread","history","store","next","action","type","_action$payload","payload","method","args","apply","LOCATION_CHANGE","onLocationChanged","location","isFirstRendering","arguments","undefined","CALL_HISTORY_METHOD","updateLocation","_len","_key","push","_typeof","obj","constructor","structure","getIn","toJS","getRouter","state","value","router","getLocation","getAction","getSearch","getHash","createMatchSelector","path","lastPathname","lastMatch","pathname","match","url","_extends","assign","target","source","key","hasOwnProperty","this","_defineProperties","props","descriptor","enumerable","configurable","writable","defineProperty","_possibleConstructorReturn","self","ReferenceError","_assertThisInitialized","_getPrototypeOf","o","setPrototypeOf","getPrototypeOf","__proto__","_setPrototypeOf","p","ConnectedRouter","_PureComponent","_this","instance","Constructor","_classCallCheck","inTimeTravelling","unsubscribe","subscribe","_getLocation","getState","pathnameInStore","searchInStore","search","hashInStore","hash","_history$location","pathnameInHistory","searchInHistory","hashInHistory","handleLocationChange","unlisten","listen","protoProps","staticProps","subClass","superClass","create","_inherits","_this$props","children","createElement","propTypes","shape","func","isRequired","string","object","basename","oneOfType","node","ConnectedRouterWithContext","Context","context","Consumer","_ref","dispatch","_slicedToArray","_arrayWithHoles","_arr","_n","_d","_e","_s","_i","done","err","_iterableToArrayLimit","_nonIterableRest","_objectSpread","ownKeys","keys","getOwnPropertySymbols","concat","filter","sym","getOwnPropertyDescriptor","forEach","_defineProperty","injectQuery","searchQuery","query","substring","split","reduce","acc","curr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Y,EAAMC,cAAc,EAAMC,UAAU,IAAkBhC,EAAIwB,GAAOjB,EAAgBP,EAG3M,IAYe,EAZC,CACd2H,OAAQ,SAAgBpH,GACtB,OAAOA,GAETJ,MCRU,SAAeG,EAAOQ,GAChC,IAAKR,EACH,OAAOA,EAGT,IAAIzC,EAASiD,EAAKjD,OAElB,GAAKA,EAAL,CAMA,IAFA,IAAIiK,EAASxH,EAEJ3C,EAAI,EAAGA,EAAIE,GAAYiK,IAAUnK,EACxCmK,EAASA,EAAOhH,EAAKnD,IAGvB,OAAOmK,IDRPF,MAAO,SAAetH,EAAOtB,GAC3B,OAXJ,SAAuBsC,GAAU,IAAK,IAAI3D,EAAI,EAAGA,EAAI6B,UAAU3B,OAAQF,IAAK,CAAE,IAAI4D,EAAyB,MAAhB/B,UAAU7B,GAAa6B,UAAU7B,GAAK,GAAQ8I,EAAUvI,OAAOwI,KAAKnF,GAAqD,mBAAjCrD,OAAOyI,wBAAwCF,EAAUA,EAAQG,OAAO1I,OAAOyI,sBAAsBpF,GAAQsF,QAAO,SAAUC,GAAO,OAAO5I,OAAO6I,yBAAyBxF,EAAQuF,GAAKhF,gBAAmB2E,EAAQO,SAAQ,SAAUxF,GAAO,EAAgBF,EAAQE,EAAKD,EAAOC,OAAa,OAAOF,EAW7c,CAAc,GAAIhB,EAAOtB,IAElCoB,KAAM,SAAcG,GAClB,OAAOA,IEdX,oEAMO,IAAI,EAEX,EAAsBwH,GACXC,EAEX,EAAoBD,GAEhB,EAEJ,EAAgBA,GACE,EAAiBtH,YACnB,EAAiBC,UACnB,EAAiBE,QACf,EAAiBD,UACP,EAAiBE","file":"npm.connected-react-router.c920b4ddeb9b68365139.js","sourcesContent":["function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance\"); }\n\nfunction _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === \"[object Arguments]\") return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } }\n\nimport { CALL_HISTORY_METHOD } from './actions';\n/**\n * This middleware captures CALL_HISTORY_METHOD actions to redirect to the\n * provided history object. This will prevent these actions from reaching your\n * reducer or any middleware that comes after this one.\n */\n\nvar routerMiddleware = function routerMiddleware(history) {\n return function (store) {\n return function (next) {\n return function (action) {\n // eslint-disable-line no-unused-vars\n if (action.type !== CALL_HISTORY_METHOD) {\n return next(action);\n }\n\n var _action$payload = action.payload,\n method = _action$payload.method,\n args = _action$payload.args;\n history[method].apply(history, _toConsumableArray(args));\n };\n };\n };\n};\n\nexport default routerMiddleware;","/**\n * This action type will be dispatched when your history\n * receives a location change.\n */\nexport var LOCATION_CHANGE = '@@router/LOCATION_CHANGE';\nexport var onLocationChanged = function onLocationChanged(location, action) {\n var isFirstRendering = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n return {\n type: LOCATION_CHANGE,\n payload: {\n location: location,\n action: action,\n isFirstRendering: isFirstRendering\n }\n };\n};\n/**\n * This action type will be dispatched by the history actions below.\n * If you're writing a middleware to watch for navigation events, be sure to\n * look for actions of this type.\n */\n\nexport var CALL_HISTORY_METHOD = '@@router/CALL_HISTORY_METHOD';\n\nvar updateLocation = function updateLocation(method) {\n return function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return {\n type: CALL_HISTORY_METHOD,\n payload: {\n method: method,\n args: args\n }\n };\n };\n};\n/**\n * These actions correspond to the history API.\n * The associated routerMiddleware will capture these events before they get to\n * your reducer and reissue them as the matching function on your history.\n */\n\n\nexport var push = updateLocation('push');\nexport var replace = updateLocation('replace');\nexport var go = updateLocation('go');\nexport var goBack = updateLocation('goBack');\nexport var goForward = updateLocation('goForward');\nexport var routerActions = {\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward\n};","function _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nimport { matchPath } from \"react-router\";\n\nvar createSelectors = function createSelectors(structure) {\n var getIn = structure.getIn,\n toJS = structure.toJS;\n\n var isRouter = function isRouter(value) {\n return value != null && _typeof(value) === 'object' && getIn(value, ['location']) && getIn(value, ['action']);\n };\n\n var getRouter = function getRouter(state) {\n var router = toJS(getIn(state, ['router']));\n\n if (!isRouter(router)) {\n throw 'Could not find router reducer in state tree, it must be mounted under \"router\"';\n }\n\n return router;\n };\n\n var getLocation = function getLocation(state) {\n return toJS(getIn(getRouter(state), ['location']));\n };\n\n var getAction = function getAction(state) {\n return toJS(getIn(getRouter(state), ['action']));\n };\n\n var getSearch = function getSearch(state) {\n return toJS(getIn(getRouter(state), ['location', 'search']));\n };\n\n var getHash = function getHash(state) {\n return toJS(getIn(getRouter(state), ['location', 'hash']));\n }; // It only makes sense to recalculate the `matchPath` whenever the pathname\n // of the location changes. That's why `createMatchSelector` memoizes\n // the latest result based on the location's pathname.\n\n\n var createMatchSelector = function createMatchSelector(path) {\n var lastPathname = null;\n var lastMatch = null;\n return function (state) {\n var _ref = getLocation(state) || {},\n pathname = _ref.pathname;\n\n if (pathname === lastPathname) {\n return lastMatch;\n }\n\n lastPathname = pathname;\n var match = matchPath(pathname, path);\n\n if (!match || !lastMatch || match.url !== lastMatch.url) {\n lastMatch = match;\n }\n\n return lastMatch;\n };\n };\n\n return {\n getLocation: getLocation,\n getAction: getAction,\n getRouter: getRouter,\n getSearch: getSearch,\n getHash: getHash,\n createMatchSelector: createMatchSelector\n };\n};\n\nexport default createSelectors;","function _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nimport React, { PureComponent } from 'react';\nimport PropTypes from 'prop-types';\nimport { connect, ReactReduxContext } from 'react-redux';\nimport { Router } from 'react-router';\nimport { onLocationChanged as _onLocationChanged } from './actions';\nimport createSelectors from './selectors';\n\nvar createConnectedRouter = function createConnectedRouter(structure) {\n var _createSelectors = createSelectors(structure),\n getLocation = _createSelectors.getLocation;\n /*\n * ConnectedRouter listens to a history object passed from props.\n * When history is changed, it dispatches action to redux store.\n * Then, store will pass props to component to render.\n * This creates uni-directional flow from history->store->router->components.\n */\n\n\n var ConnectedRouter =\n /*#__PURE__*/\n function (_PureComponent) {\n _inherits(ConnectedRouter, _PureComponent);\n\n function ConnectedRouter(props) {\n var _this;\n\n _classCallCheck(this, ConnectedRouter);\n\n _this = _possibleConstructorReturn(this, _getPrototypeOf(ConnectedRouter).call(this, props));\n var store = props.store,\n history = props.history,\n onLocationChanged = props.onLocationChanged;\n _this.inTimeTravelling = false; // Subscribe to store changes to check if we are in time travelling\n\n _this.unsubscribe = store.subscribe(function () {\n // Extract store's location\n var _getLocation = getLocation(store.getState()),\n pathnameInStore = _getLocation.pathname,\n searchInStore = _getLocation.search,\n hashInStore = _getLocation.hash; // Extract history's location\n\n\n var _history$location = history.location,\n pathnameInHistory = _history$location.pathname,\n searchInHistory = _history$location.search,\n hashInHistory = _history$location.hash; // If we do time travelling, the location in store is changed but location in history is not changed\n\n if (props.history.action === 'PUSH' && (pathnameInHistory !== pathnameInStore || searchInHistory !== searchInStore || hashInHistory !== hashInStore)) {\n _this.inTimeTravelling = true; // Update history's location to match store's location\n\n history.push({\n pathname: pathnameInStore,\n search: searchInStore,\n hash: hashInStore\n });\n }\n });\n\n var handleLocationChange = function handleLocationChange(location, action) {\n var isFirstRendering = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n\n // Dispatch onLocationChanged except when we're in time travelling\n if (!_this.inTimeTravelling) {\n onLocationChanged(location, action, isFirstRendering);\n } else {\n _this.inTimeTravelling = false;\n }\n }; // Listen to history changes\n\n\n _this.unlisten = history.listen(handleLocationChange); // Dispatch a location change action for the initial location.\n // This makes it backward-compatible with react-router-redux.\n // But, we add `isFirstRendering` to `true` to prevent double-rendering.\n\n handleLocationChange(history.location, history.action, true);\n return _this;\n }\n\n _createClass(ConnectedRouter, [{\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n this.unlisten();\n this.unsubscribe();\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this$props = this.props,\n history = _this$props.history,\n children = _this$props.children;\n return React.createElement(Router, {\n history: history\n }, children);\n }\n }]);\n\n return ConnectedRouter;\n }(PureComponent);\n\n ConnectedRouter.propTypes = {\n store: PropTypes.shape({\n getState: PropTypes.func.isRequired,\n subscribe: PropTypes.func.isRequired\n }).isRequired,\n history: PropTypes.shape({\n action: PropTypes.string.isRequired,\n listen: PropTypes.func.isRequired,\n location: PropTypes.object.isRequired,\n push: PropTypes.func.isRequired\n }).isRequired,\n basename: PropTypes.string,\n children: PropTypes.oneOfType([PropTypes.func, PropTypes.node]),\n onLocationChanged: PropTypes.func.isRequired\n };\n\n var mapDispatchToProps = function mapDispatchToProps(dispatch) {\n return {\n onLocationChanged: function onLocationChanged(location, action, isFirstRendering) {\n return dispatch(_onLocationChanged(location, action, isFirstRendering));\n }\n };\n };\n\n var ConnectedRouterWithContext = function ConnectedRouterWithContext(props) {\n var Context = props.context || ReactReduxContext;\n\n if (Context == null) {\n throw 'Please upgrade to react-redux v6';\n }\n\n return React.createElement(Context.Consumer, null, function (_ref) {\n var store = _ref.store;\n return React.createElement(ConnectedRouter, _extends({\n store: store\n }, props));\n });\n };\n\n ConnectedRouterWithContext.propTypes = {\n context: PropTypes.object\n };\n return connect(null, mapDispatchToProps)(ConnectedRouterWithContext);\n};\n\nexport default createConnectedRouter;","function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); }\n\nfunction _iterableToArrayLimit(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { LOCATION_CHANGE } from './actions';\n/**\n * Adds query to location.\n * Utilises the search prop of location to construct query.\n */\n\nvar injectQuery = function injectQuery(location) {\n var searchQuery = location && location.search;\n\n if (typeof searchQuery !== 'string' || searchQuery.length === 0) {\n return _objectSpread({}, location, {\n query: {}\n });\n } // Ignore the `?` part of the search string e.g. ?username=codejockie\n\n\n var search = searchQuery.substring(1); // Split the query string on `&` e.g. ?username=codejockie&name=Kennedy\n\n var queries = search.split('&'); // Contruct query\n\n var query = queries.reduce(function (acc, currentQuery) {\n // Split on `=`, to get key and value\n var _currentQuery$split = currentQuery.split('='),\n _currentQuery$split2 = _slicedToArray(_currentQuery$split, 2),\n queryKey = _currentQuery$split2[0],\n queryValue = _currentQuery$split2[1];\n\n return _objectSpread({}, acc, _defineProperty({}, queryKey, queryValue));\n }, {});\n return _objectSpread({}, location, {\n query: query\n });\n};\n\nvar createConnectRouter = function createConnectRouter(structure) {\n var fromJS = structure.fromJS,\n merge = structure.merge;\n\n var createRouterReducer = function createRouterReducer(history) {\n var initialRouterState = fromJS({\n location: injectQuery(history.location),\n action: history.action\n });\n /*\n * This reducer will update the state with the most recent location history\n * has transitioned to.\n */\n\n return function () {\n var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialRouterState;\n\n var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n type = _ref.type,\n payload = _ref.payload;\n\n if (type === LOCATION_CHANGE) {\n var location = payload.location,\n action = payload.action,\n isFirstRendering = payload.isFirstRendering; // Don't update the state ref for the first rendering\n // to prevent the double-rendering issue on initilization\n\n return isFirstRendering ? state : merge(state, {\n location: fromJS(injectQuery(location)),\n action: action\n });\n }\n\n return state;\n };\n };\n\n return createRouterReducer;\n};\n\nexport default createConnectRouter;","function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport getIn from './getIn';\nvar structure = {\n fromJS: function fromJS(value) {\n return value;\n },\n getIn: getIn,\n merge: function merge(state, payload) {\n return _objectSpread({}, state, payload);\n },\n toJS: function toJS(value) {\n return value;\n }\n};\nexport default structure;","/* Code from github.com/erikras/redux-form by Erik Rasmussen */\nvar getIn = function getIn(state, path) {\n if (!state) {\n return state;\n }\n\n var length = path.length;\n\n if (!length) {\n return undefined;\n }\n\n var result = state;\n\n for (var i = 0; i < length && !!result; ++i) {\n result = result[path[i]];\n }\n\n return result;\n};\n\nexport default getIn;","import createConnectedRouter from \"./ConnectedRouter\";\nimport createConnectRouter from \"./reducer\";\nimport createSelectors from \"./selectors\";\nimport plainStructure from \"./structure/plain\";\nexport { LOCATION_CHANGE, CALL_HISTORY_METHOD, onLocationChanged, push, replace, go, goBack, goForward, routerActions } from \"./actions\";\nexport { default as routerMiddleware } from \"./middleware\";\nexport var ConnectedRouter =\n/*#__PURE__*/\ncreateConnectedRouter(plainStructure);\nexport var connectRouter =\n/*#__PURE__*/\ncreateConnectRouter(plainStructure);\n\nvar _createSelectors =\n/*#__PURE__*/\ncreateSelectors(plainStructure),\n getLocation = _createSelectors.getLocation,\n getAction = _createSelectors.getAction,\n getHash = _createSelectors.getHash,\n getSearch = _createSelectors.getSearch,\n createMatchSelector = _createSelectors.createMatchSelector;\n\nexport { getLocation, getAction, getHash, getSearch, createMatchSelector };"],"sourceRoot":""}