{"version":3,"sources":["webpack:///./node_modules/prop-types/factoryWithThrowingShims.js","webpack:///./node_modules/prop-types/lib/ReactPropTypesSecret.js","webpack:///./node_modules/create-react-context/lib/index.js","webpack:///./node_modules/create-react-context/lib/implementation.js","webpack:///./node_modules/gud/index.js","webpack:///./node_modules/warning/warning.js","webpack:///./node_modules/serialize-query-params/esm/withDefault.js","webpack:///./node_modules/serialize-query-params/esm/serialize.js","webpack:///./node_modules/serialize-query-params/esm/params.js","webpack:///./node_modules/serialize-query-params/esm/updateLocation.js","webpack:///./node_modules/use-query-params/esm/shallowEqual.js","webpack:///./node_modules/use-query-params/esm/helpers.js","webpack:///./node_modules/use-query-params/esm/updateUrlQuery.js","webpack:///./node_modules/use-query-params/esm/LocationProvider.js","webpack:///./node_modules/use-query-params/esm/memoizedQueryParser.js","webpack:///./node_modules/use-query-params/esm/useQueryParam.js","webpack:///./node_modules/use-query-params/esm/QueryParams.js","webpack:///./node_modules/use-query-params/esm/QueryParamProvider.js","webpack:///./node_modules/use-query-params/esm/index.js","webpack:///./node_modules/query-string/index.js","webpack:///./node_modules/prop-types/index.js","webpack:///./node_modules/react-lifecycles-compat/react-lifecycles-compat.es.js","webpack:///./node_modules/@reach/router/es/lib/utils.js","webpack:///./node_modules/@reach/router/es/lib/history.js","webpack:///./node_modules/@reach/router/es/index.js","webpack:///./node_modules/query-string/node_modules/strict-uri-encode/index.js","webpack:///./node_modules/decode-uri-component/index.js","webpack:///./node_modules/split-on-first/index.js","webpack:///./node_modules/invariant/browser.js"],"names":["ReactPropTypesSecret","emptyFunction","emptyFunctionWithReset","resetWarningCache","module","exports","shim","props","propName","componentName","location","propFullName","secret","err","Error","name","getShim","isRequired","ReactPropTypes","array","bool","func","number","object","string","symbol","any","arrayOf","element","elementType","instanceOf","node","objectOf","oneOf","oneOfType","shape","exact","checkPropTypes","PropTypes","__esModule","_react2","_interopRequireDefault","_implementation2","obj","default","createContext","_react","_propTypes2","_gud2","_classCallCheck","instance","Constructor","TypeError","_possibleConstructorReturn","self","call","ReferenceError","_inherits","subClass","superClass","prototype","Object","create","constructor","value","enumerable","writable","configurable","setPrototypeOf","__proto__","createEventEmitter","handlers","on","handler","push","off","filter","h","get","set","newValue","changedBits","forEach","defaultValue","calculateChangedBits","_Provider$childContex","_Consumer$contextType","contextProp","Provider","_Component","_temp","_this","this","_len","arguments","length","args","Array","_key","apply","concat","emitter","getChildContext","_ref","componentWillReceiveProps","nextProps","oldValue","x","y","render","children","Component","childContextTypes","Consumer","_Component2","_temp2","_this2","_len2","_key2","state","getValue","onUpdate","observedBits","setState","componentDidMount","context","componentWillUnmount","isArray","contextTypes","key","global","warning","__assign","assign","t","s","i","n","p","hasOwnProperty","withDefault","param","includeNull","decode","_i","decodedValue","undefined","getEncodedValue","input","allowEmptyString","str","decodeNumber","numStr","decodeArray","arr","getEncodedValueArray","StringParam","encode","String","NumberParam","num","ArrayParam","split","map","d","encodeURIComponent","updateLocation","encodedQuery","stringifyOptions","encodedSearchString","transformSearchString","search","href","url","Date","now","query","is","shallowEqual","objA","objB","equalMap","_a","_b","keysA","keys","keysB","isEqual","equals","useUpdateRefIfShallowNew","ref","hasNew","current","getSSRSafeSearchString","window","pathname","createLocationWithChanges","queryReplacements","updateType","encodedQueryReplacements","currQuery","updateInLocation","LocationContext","getLocation","setLocation","useLocationContext","LocationProvider","history","locationRef","replace","updateUrlQuery","initialSearchString","cachedSearchString","cachedParsedQuery","sharedMemoizedQueryParser","newSearchString","getLatestDecodedValue","paramConfig","paramConfigRef","encodedValueCacheRef","decodedValueCacheRef","hasNewParamConfig","isValueEqual","parsedQuery","hasNewEncodedValue","encodedValue","newDecodedValue","useQueryParam","newEncodedValue","latestValue","cachedWindowHistory","cachedAdaptedWindowHistory","cachedReachHistory","cachedAdaptedReachHistory","adaptReachHistory","adaptedReachHistory","navigate","protocol","host","getLocationProps","adaptedWindowHistory","replaceState","pushState","adaptWindowHistory","QueryParamProvider","ReactRouterRoute","reachHistory","stringifyOptionsRef","stringifyOptionsCached","routeProps","strictUriEncode","require","decodeComponent","splitOnFirst","options","strict","removeHash","hashStart","indexOf","slice","extract","queryStart","parseValue","parseNumbers","Number","isNaN","trim","parseBooleans","toLowerCase","parse","formatter","result","arrayFormat","accumulator","exec","parserForArrayFormat","sort","ret","k","reduce","Boolean","keysSorter","a","b","stringify","index","skipNull","join","encoderForArrayFormat","objectCopy","parseUrl","stringifyUrl","queryFromUrl","parsedQueryFromUrl","hash","getHash","queryString","componentWillMount","getDerivedStateFromProps","prevState","bind","componentWillUpdate","nextState","prevProps","__reactInternalSnapshotFlag","__reactInternalSnapshot","getSnapshotBeforeUpdate","__suppressDeprecationWarning","source","listeners","transitioning","resolveTransition","startsWith","substr","routes","uri","match","default_","uriPathname","uriSegments","segmentize","isRootUri","ranked","rankRoutes","l","missed","route","params","routeSegments","path","max","Math","routeSegment","uriSegment","isSplat","decodeURIComponent","dynamicMatch","paramRe","reservedNames","resolve","to","base","_to$split","toPathname","toQuery","basePathname","toSegments","baseSegments","addQuery","allSegments","segments","segment","pop","insertParams","isDynamic","test","rankRoute","score","isRootSegment","SEGMENT_POINTS","_extends","target","_source$location","origin","hostname","port","canUseDOM","URL","encodeURI","decodeURI","document","createElement","globalHistory","initialPath","searchIndex","initialLocation","stack","states","addEventListener","fn","removeEventListener","_","_uri$split","_uri$split$","_uri$split2","_uri$split2$","go","newIndex","createMemorySource","_onTransitionComplete","listen","listener","popstateListener","action","_ref$replace","e","transition","Promise","res","_objectWithoutProperties","Ctx","displayName","_React$Component","getContext","refs","unlisten","_props$history","componentDidCatch","error","info","isRedirect","_navigate","componentDidUpdate","then","requestAnimationFrame","unmounted","defaultProps","BaseContext","baseuri","basepath","baseContext","locationContext","_React$PureComponent","RouterImpl","_props","_navigate2","primary","_props$component","component","domProps","Children","toArray","child","clone","cloneElement","FocusWrapper","wrapperProps","PureComponent","FocusContext","_ref3","requestFocus","initialRender","focusHandlerCount","_React$Component2","FocusHandlerImpl","_this4","shouldFocus","focus","myURIChanged","navigatedUpToMe","contains","activeElement","_this5","_props2","style","_props2$component","Comp","outline","tabIndex","isReactComponent","foundWillMountName","foundWillReceivePropsName","foundWillUpdateName","UNSAFE_componentWillMount","UNSAFE_componentWillReceiveProps","UNSAFE_componentWillUpdate","newApiName","maybeSnapshot","snapshot","polyfill","forwardRef","RedirectRequest","C","_ref4","innerRef","_ref5","_ref6","_props$getProps","getProps","anchorProps","encodedHref","isCurrent","isPartiallyCurrent","onClick","event","shouldNavigate","preventDefault","shouldReplace","_location$state","restState","obj1","obj2","obj1Keys","every","o","_React$Component3","RedirectImpl","_props3","_props3$replace","from","noThrow","resolvedTo","_props4","redirectTo","_ref7","stripSlashes","createRoute","type","Fragment","elementPath","defaultPrevented","button","metaKey","altKey","ctrlKey","shiftKey","singleMatcher","RegExp","multiMatcher","decodeComponents","components","left","right","tokens","encodedURI","replaceMap","entries","customDecodeURIComponent","separator","separatorIndex","condition","format","c","f","argIndex","framesToPop"],"mappings":"0FASA,IAAIA,EAAuB,EAAQ,KAEnC,SAASC,KACT,SAASC,KACTA,EAAuBC,kBAAoBF,EAE3CG,EAAOC,QAAU,WACf,SAASC,EAAKC,EAAOC,EAAUC,EAAeC,EAAUC,EAAcC,GACpE,GAAIA,IAAWZ,EAAf,CAIA,IAAIa,EAAM,IAAIC,MACZ,mLAKF,MADAD,EAAIE,KAAO,sBACLF,GAGR,SAASG,IACP,OAAOV,EAFTA,EAAKW,WAAaX,EAMlB,IAAIY,EAAiB,CACnBC,MAAOb,EACPc,KAAMd,EACNe,KAAMf,EACNgB,OAAQhB,EACRiB,OAAQjB,EACRkB,OAAQlB,EACRmB,OAAQnB,EAERoB,IAAKpB,EACLqB,QAASX,EACTY,QAAStB,EACTuB,YAAavB,EACbwB,WAAYd,EACZe,KAAMzB,EACN0B,SAAUhB,EACViB,MAAOjB,EACPkB,UAAWlB,EACXmB,MAAOnB,EACPoB,MAAOpB,EAEPqB,eAAgBnC,EAChBC,kBAAmBF,GAKrB,OAFAiB,EAAeoB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O,CAAC0L,EAAGC,EAAGyP,EAAGhX,EAAGuO,EAAG0I,GACvBC,EAAW,GACf9H,EAAQ,IAAI1Y,MACVqgB,EAAOlU,QAAQ,OAAO,WAAa,OAAOjH,EAAKsb,UAE3CvgB,KAAO,sBAIf,MADAyY,EAAM+H,YAAc,EACd/H","file":"vendors~document-list~partner-casestudies-list~partner-items-listing-filter~partner-projects-all-lis~0817acad-01c8538ec8ce0f5cc7a6.js","sourcesContent":["/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nfunction emptyFunction() {}\nfunction emptyFunctionWithReset() {}\nemptyFunctionWithReset.resetWarningCache = emptyFunction;\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n elementType: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim,\n\n checkPropTypes: emptyFunctionWithReset,\n resetWarningCache: emptyFunction\n };\n\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","'use strict';\n\nexports.__esModule = true;\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _implementation = require('./implementation');\n\nvar _implementation2 = _interopRequireDefault(_implementation);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = _react2.default.createContext || _implementation2.default;\nmodule.exports = exports['default'];","'use strict';\n\nexports.__esModule = true;\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _propTypes = require('prop-types');\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nvar _gud = require('gud');\n\nvar _gud2 = _interopRequireDefault(_gud);\n\nvar _warning = require('warning');\n\nvar _warning2 = _interopRequireDefault(_warning);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\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 MAX_SIGNED_31_BIT_INT = 1073741823;\n\n// Inlined Object.is polyfill.\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\nfunction objectIs(x, y) {\n if (x === y) {\n return x !== 0 || 1 / x === 1 / y;\n } else {\n return x !== x && y !== y;\n }\n}\n\nfunction createEventEmitter(value) {\n var handlers = [];\n return {\n on: function on(handler) {\n handlers.push(handler);\n },\n off: function off(handler) {\n handlers = handlers.filter(function (h) {\n return h !== handler;\n });\n },\n get: function get() {\n return value;\n },\n set: function set(newValue, changedBits) {\n value = newValue;\n handlers.forEach(function (handler) {\n return handler(value, changedBits);\n });\n }\n };\n}\n\nfunction onlyChild(children) {\n return Array.isArray(children) ? children[0] : children;\n}\n\nfunction createReactContext(defaultValue, calculateChangedBits) {\n var _Provider$childContex, _Consumer$contextType;\n\n var contextProp = '__create-react-context-' + (0, _gud2.default)() + '__';\n\n var Provider = function (_Component) {\n _inherits(Provider, _Component);\n\n function Provider() {\n var _temp, _this, _ret;\n\n _classCallCheck(this, Provider);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, _Component.call.apply(_Component, [this].concat(args))), _this), _this.emitter = createEventEmitter(_this.props.value), _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n Provider.prototype.getChildContext = function getChildContext() {\n var _ref;\n\n return _ref = {}, _ref[contextProp] = this.emitter, _ref;\n };\n\n Provider.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {\n if (this.props.value !== nextProps.value) {\n var oldValue = this.props.value;\n var newValue = nextProps.value;\n var changedBits = void 0;\n\n if (objectIs(oldValue, newValue)) {\n changedBits = 0; // No change\n } else {\n changedBits = typeof calculateChangedBits === 'function' ? calculateChangedBits(oldValue, newValue) : MAX_SIGNED_31_BIT_INT;\n if (process.env.NODE_ENV !== 'production') {\n (0, _warning2.default)((changedBits & MAX_SIGNED_31_BIT_INT) === changedBits, 'calculateChangedBits: Expected the return value to be a ' + '31-bit integer. Instead received: %s', changedBits);\n }\n\n changedBits |= 0;\n\n if (changedBits !== 0) {\n this.emitter.set(nextProps.value, changedBits);\n }\n }\n }\n };\n\n Provider.prototype.render = function render() {\n return this.props.children;\n };\n\n return Provider;\n }(_react.Component);\n\n Provider.childContextTypes = (_Provider$childContex = {}, _Provider$childContex[contextProp] = _propTypes2.default.object.isRequired, _Provider$childContex);\n\n var Consumer = function (_Component2) {\n _inherits(Consumer, _Component2);\n\n function Consumer() {\n var _temp2, _this2, _ret2;\n\n _classCallCheck(this, Consumer);\n\n for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n return _ret2 = (_temp2 = (_this2 = _possibleConstructorReturn(this, _Component2.call.apply(_Component2, [this].concat(args))), _this2), _this2.state = {\n value: _this2.getValue()\n }, _this2.onUpdate = function (newValue, changedBits) {\n var observedBits = _this2.observedBits | 0;\n if ((observedBits & changedBits) !== 0) {\n _this2.setState({ value: _this2.getValue() });\n }\n }, _temp2), _possibleConstructorReturn(_this2, _ret2);\n }\n\n Consumer.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {\n var observedBits = nextProps.observedBits;\n\n this.observedBits = observedBits === undefined || observedBits === null ? MAX_SIGNED_31_BIT_INT // Subscribe to all changes by default\n : observedBits;\n };\n\n Consumer.prototype.componentDidMount = function componentDidMount() {\n if (this.context[contextProp]) {\n this.context[contextProp].on(this.onUpdate);\n }\n var observedBits = this.props.observedBits;\n\n this.observedBits = observedBits === undefined || observedBits === null ? MAX_SIGNED_31_BIT_INT // Subscribe to all changes by default\n : observedBits;\n };\n\n Consumer.prototype.componentWillUnmount = function componentWillUnmount() {\n if (this.context[contextProp]) {\n this.context[contextProp].off(this.onUpdate);\n }\n };\n\n Consumer.prototype.getValue = function getValue() {\n if (this.context[contextProp]) {\n return this.context[contextProp].get();\n } else {\n return defaultValue;\n }\n };\n\n Consumer.prototype.render = function render() {\n return onlyChild(this.props.children)(this.state.value);\n };\n\n return Consumer;\n }(_react.Component);\n\n Consumer.contextTypes = (_Consumer$contextType = {}, _Consumer$contextType[contextProp] = _propTypes2.default.object, _Consumer$contextType);\n\n\n return {\n Provider: Provider,\n Consumer: Consumer\n };\n}\n\nexports.default = createReactContext;\nmodule.exports = exports['default'];","// @flow\n'use strict';\n\nvar key = '__global_unique_id__';\n\nmodule.exports = function() {\n return global[key] = (global[key] || 0) + 1;\n};\n","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\n/**\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\nvar __DEV__ = process.env.NODE_ENV !== 'production';\n\nvar warning = function() {};\n\nif (__DEV__) {\n var printWarning = function printWarning(format, args) {\n var len = arguments.length;\n args = new Array(len > 1 ? len - 1 : 0);\n for (var key = 1; key < len; key++) {\n args[key - 1] = arguments[key];\n }\n var argIndex = 0;\n var message = 'Warning: ' +\n format.replace(/%s/g, function() {\n return args[argIndex++];\n });\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n }\n\n warning = function(condition, format, args) {\n var len = arguments.length;\n args = new Array(len > 2 ? len - 2 : 0);\n for (var key = 2; key < len; key++) {\n args[key - 2] = arguments[key];\n }\n if (format === undefined) {\n throw new Error(\n '`warning(condition, format, ...args)` requires a warning ' +\n 'message argument'\n );\n }\n if (!condition) {\n printWarning.apply(null, [format].concat(args));\n }\n };\n}\n\nmodule.exports = warning;\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nexport function withDefault(param, defaultValue, includeNull) {\n if (includeNull === void 0) { includeNull = true; }\n var decodeWithDefault = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var decodedValue = param.decode.apply(param, args);\n if (decodedValue === undefined) {\n return defaultValue;\n }\n if (includeNull) {\n if (decodedValue === null) {\n return defaultValue;\n }\n else {\n return decodedValue;\n }\n }\n return decodedValue;\n };\n return __assign(__assign({}, param), { decode: decodeWithDefault });\n}\nexport default withDefault;\n","var __spreadArrays = (this && this.__spreadArrays) || function () {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n};\n/**\n * Interprets an encoded string and returns either the string or null/undefined if not available.\n * Ignores array inputs (takes just first element in array)\n * @param input encoded string\n */\nfunction getEncodedValue(input, allowEmptyString) {\n if (input == null) {\n return input;\n }\n // '' or []\n if (input.length === 0 &&\n (!allowEmptyString || (allowEmptyString && input !== ''))) {\n return null;\n }\n var str = input instanceof Array ? input[0] : input;\n if (str == null) {\n return str;\n }\n if (!allowEmptyString && str === '') {\n return null;\n }\n return str;\n}\n/**\n * Interprets an encoded string and return null/undefined or an array with\n * the encoded string contents\n * @param input encoded string\n */\nfunction getEncodedValueArray(input) {\n if (input == null) {\n return input;\n }\n return input instanceof Array ? input : input === '' ? [] : [input];\n}\n/**\n * Encodes a date as a string in YYYY-MM-DD format.\n *\n * @param {Date} date\n * @return {String} the encoded date\n */\nexport function encodeDate(date) {\n if (date == null) {\n return date;\n }\n var year = date.getFullYear();\n var month = date.getMonth() + 1;\n var day = date.getDate();\n return year + \"-\" + (month < 10 ? \"0\" + month : month) + \"-\" + (day < 10 ? \"0\" + day : day);\n}\n/**\n * Converts a date in the format 'YYYY-mm-dd...' into a proper date, because\n * new Date() does not do that correctly. The date can be as complete or incomplete\n * as necessary (aka, '2015', '2015-10', '2015-10-01').\n * It will not work for dates that have times included in them.\n *\n * If an array is provided, only the first entry is used.\n *\n * @param {String} input String date form like '2015-10-01'\n * @return {Date} parsed date\n */\nexport function decodeDate(input) {\n var dateString = getEncodedValue(input);\n if (dateString == null)\n return dateString;\n var parts = dateString.split('-');\n // may only be a year so won't even have a month\n if (parts[1] != null) {\n parts[1] -= 1; // Note: months are 0-based\n }\n else {\n // just a year, set the month and day to the first\n parts[1] = 0;\n parts[2] = 1;\n }\n var decoded = new (Date.bind.apply(Date, __spreadArrays([void 0], parts)))();\n if (isNaN(decoded.getTime())) {\n return null;\n }\n return decoded;\n}\n/**\n * Encodes a date as a string in ISO 8601 (\"2019-05-28T10:58:40Z\") format.\n *\n * @param {Date} date\n * @return {String} the encoded date\n */\nexport function encodeDateTime(date) {\n if (date == null) {\n return date;\n }\n return date.toISOString();\n}\n/**\n * Converts a date in the https://en.wikipedia.org/wiki/ISO_8601 format.\n * For allowed inputs see specs:\n * - https://tools.ietf.org/html/rfc2822#page-14\n * - http://www.ecma-international.org/ecma-262/5.1/#sec-15.9.1.15\n *\n * If an array is provided, only the first entry is used.\n *\n * @param {String} input String date form like '1995-12-17T03:24:00'\n * @return {Date} parsed date\n */\nexport function decodeDateTime(input) {\n var dateString = getEncodedValue(input);\n if (dateString == null)\n return dateString;\n var decoded = new Date(dateString);\n if (isNaN(decoded.getTime())) {\n return null;\n }\n return decoded;\n}\n/**\n * Encodes a boolean as a string. true -> \"1\", false -> \"0\".\n *\n * @param {Boolean} bool\n * @return {String} the encoded boolean\n */\nexport function encodeBoolean(bool) {\n if (bool == null) {\n return bool;\n }\n return bool ? '1' : '0';\n}\n/**\n * Decodes a boolean from a string. \"1\" -> true, \"0\" -> false.\n * Everything else maps to undefined.\n *\n * If an array is provided, only the first entry is used.\n *\n * @param {String} input the encoded boolean string\n * @return {Boolean} the boolean value\n */\nexport function decodeBoolean(input) {\n var boolStr = getEncodedValue(input);\n if (boolStr == null)\n return boolStr;\n if (boolStr === '1') {\n return true;\n }\n else if (boolStr === '0') {\n return false;\n }\n return null;\n}\n/**\n * Encodes a number as a string.\n *\n * @param {Number} num\n * @return {String} the encoded number\n */\nexport function encodeNumber(num) {\n if (num == null) {\n return num;\n }\n return String(num);\n}\n/**\n * Decodes a number from a string. If the number is invalid,\n * it returns undefined.\n *\n * If an array is provided, only the first entry is used.\n *\n * @param {String} input the encoded number string\n * @return {Number} the number value\n */\nexport function decodeNumber(input) {\n var numStr = getEncodedValue(input);\n if (numStr == null)\n return numStr;\n if (numStr === '')\n return null;\n var result = +numStr;\n return result;\n}\n/**\n * Encodes a string while safely handling null and undefined values.\n *\n * @param {String} str a string to encode\n * @return {String} the encoded string\n */\nexport function encodeString(str) {\n if (str == null) {\n return str;\n }\n return String(str);\n}\n/**\n * Decodes a string while safely handling null and undefined values.\n *\n * If an array is provided, only the first entry is used.\n *\n * @param {String} input the encoded string\n * @return {String} the string value\n */\nexport function decodeString(input) {\n var str = getEncodedValue(input, true);\n if (str == null)\n return str;\n return String(str);\n}\n/**\n * Encodes anything as a JSON string.\n *\n * @param {Any} any The thing to be encoded\n * @return {String} The JSON string representation of any\n */\nexport function encodeJson(any) {\n if (any == null) {\n return any;\n }\n return JSON.stringify(any);\n}\n/**\n * Decodes a JSON string into javascript\n *\n * If an array is provided, only the first entry is used.\n *\n * @param {String} input The JSON string representation\n * @return {Any} The javascript representation\n */\nexport function decodeJson(input) {\n var jsonStr = getEncodedValue(input);\n if (jsonStr == null)\n return jsonStr;\n var result = null;\n try {\n result = JSON.parse(jsonStr);\n }\n catch (e) {\n /* ignore errors, returning undefined */\n }\n return result;\n}\n/**\n * Encodes an array as a JSON string.\n *\n * @param {Array} array The array to be encoded\n * @return {String[]} The array of strings to be put in the URL\n * as repeated query parameters\n */\nexport function encodeArray(array) {\n if (array == null) {\n return array;\n }\n return array;\n}\n/**\n * Decodes an array or singular value and returns it as an array\n * or undefined if falsy. Filters out undefined values.\n *\n * @param {String | Array} input The input value\n * @return {Array} The javascript representation\n */\nexport function decodeArray(input) {\n var arr = getEncodedValueArray(input);\n if (arr == null)\n return arr;\n return arr;\n}\n/**\n * Encodes a numeric array as a JSON string.\n *\n * @param {Array} array The array to be encoded\n * @return {String[]} The array of strings to be put in the URL\n * as repeated query parameters\n */\nexport function encodeNumericArray(array) {\n if (array == null) {\n return array;\n }\n return array.map(String);\n}\n/**\n * Decodes an array or singular value and returns it as an array\n * or undefined if falsy. Filters out undefined and NaN values.\n *\n * @param {String | Array} input The input value\n * @return {Array} The javascript representation\n */\nexport function decodeNumericArray(input) {\n var arr = decodeArray(input);\n if (arr == null)\n return arr;\n return arr.map(function (d) { return (d === '' || d == null ? null : +d); });\n}\n/**\n * Encodes an array as a delimited string. For example,\n * ['a', 'b'] -> 'a_b' with entrySeparator='_'\n *\n * @param array The array to be encoded\n * @param entrySeparator The string used to delimit entries\n * @return The array as a string with elements joined by the\n * entry separator\n */\nexport function encodeDelimitedArray(array, entrySeparator) {\n if (entrySeparator === void 0) { entrySeparator = '_'; }\n if (array == null) {\n return array;\n }\n return array.join(entrySeparator);\n}\n/**\n * Decodes a delimited string into javascript array. For example,\n * 'a_b' -> ['a', 'b'] with entrySeparator='_'\n *\n * If an array is provided as input, only the first entry is used.\n *\n * @param {String} input The JSON string representation\n * @param entrySeparator The array as a string with elements joined by the\n * entry separator\n * @return {Array} The javascript representation\n */\nexport function decodeDelimitedArray(input, entrySeparator) {\n if (entrySeparator === void 0) { entrySeparator = '_'; }\n var arrayStr = getEncodedValue(input, true);\n if (arrayStr == null)\n return arrayStr;\n if (arrayStr === '')\n return [];\n return arrayStr.split(entrySeparator);\n}\n/**\n * Encodes a numeric array as a delimited string. (alias of encodeDelimitedArray)\n * For example, [1, 2] -> '1_2' with entrySeparator='_'\n *\n * @param {Array} array The array to be encoded\n * @return {String} The JSON string representation of array\n */\nexport var encodeDelimitedNumericArray = encodeDelimitedArray;\n/**\n * Decodes a delimited string into javascript array where all entries are numbers\n * For example, '1_2' -> [1, 2] with entrySeparator='_'\n *\n * If an array is provided as input, only the first entry is used.\n *\n * @param {String} jsonStr The JSON string representation\n * @return {Array} The javascript representation\n */\nexport function decodeDelimitedNumericArray(arrayStr, entrySeparator) {\n if (entrySeparator === void 0) { entrySeparator = '_'; }\n var decoded = decodeDelimitedArray(arrayStr, entrySeparator);\n if (decoded == null)\n return decoded;\n return decoded.map(function (d) { return (d === '' || d == null ? null : +d); });\n}\n/**\n * Encode simple objects as readable strings. Works only for simple,\n * flat objects where values are numbers, strings.\n *\n * For example { foo: bar, boo: baz } -> \"foo-bar_boo-baz\"\n *\n * @param {Object} object The object to encode\n * @param {String} keyValSeparator=\"-\" The separator between keys and values\n * @param {String} entrySeparator=\"_\" The separator between entries\n * @return {String} The encoded object\n */\nexport function encodeObject(obj, keyValSeparator, entrySeparator) {\n if (keyValSeparator === void 0) { keyValSeparator = '-'; }\n if (entrySeparator === void 0) { entrySeparator = '_'; }\n if (obj == null)\n return obj; // null or undefined\n if (!Object.keys(obj).length)\n return ''; // {} case\n return Object.keys(obj)\n .map(function (key) { return \"\" + key + keyValSeparator + obj[key]; })\n .join(entrySeparator);\n}\n/**\n * Decodes a simple object to javascript. Currently works only for simple,\n * flat objects where values are strings.\n *\n * For example \"foo-bar_boo-baz\" -> { foo: bar, boo: baz }\n *\n * If an array is provided as input, only the first entry is used.\n *\n * @param {String} input The object string to decode\n * @param {String} keyValSeparator=\"-\" The separator between keys and values\n * @param {String} entrySeparator=\"_\" The separator between entries\n * @return {Object} The javascript object\n */\nexport function decodeObject(input, keyValSeparator, entrySeparator) {\n if (keyValSeparator === void 0) { keyValSeparator = '-'; }\n if (entrySeparator === void 0) { entrySeparator = '_'; }\n var objStr = getEncodedValue(input, true);\n if (objStr == null)\n return objStr;\n if (objStr === '')\n return {};\n var obj = {};\n var keyValSeparatorRegExp = new RegExp(keyValSeparator + \"(.*)\");\n objStr.split(entrySeparator).forEach(function (entryStr) {\n var _a = entryStr.split(keyValSeparatorRegExp), key = _a[0], value = _a[1];\n obj[key] = value;\n });\n return obj;\n}\n/**\n * Encode simple objects as readable strings. Alias of encodeObject.\n *\n * For example { foo: 123, boo: 521 } -> \"foo-123_boo-521\"\n *\n * @param {Object} object The object to encode\n * @param {String} keyValSeparator=\"-\" The separator between keys and values\n * @param {String} entrySeparator=\"_\" The separator between entries\n * @return {String} The encoded object\n */\nexport var encodeNumericObject = encodeObject;\n/**\n * Decodes a simple object to javascript where all values are numbers.\n * Currently works only for simple, flat objects.\n *\n * For example \"foo-123_boo-521\" -> { foo: 123, boo: 521 }\n *\n * If an array is provided as input, only the first entry is used.\n *\n * @param {String} input The object string to decode\n * @param {String} keyValSeparator=\"-\" The separator between keys and values\n * @param {String} entrySeparator=\"_\" The separator between entries\n * @return {Object} The javascript object\n */\nexport function decodeNumericObject(input, keyValSeparator, entrySeparator) {\n if (keyValSeparator === void 0) { keyValSeparator = '-'; }\n if (entrySeparator === void 0) { entrySeparator = '_'; }\n var decoded = decodeObject(input, keyValSeparator, entrySeparator);\n if (decoded == null)\n return decoded;\n // convert to numbers\n var decodedNumberObj = {};\n for (var _i = 0, _a = Object.keys(decoded); _i < _a.length; _i++) {\n var key = _a[_i];\n decodedNumberObj[key] = decodeNumber(decoded[key]);\n }\n return decodedNumberObj;\n}\n","import * as Serialize from './serialize';\n/**\n * String values\n */\nexport var StringParam = {\n encode: Serialize.encodeString,\n decode: Serialize.decodeString,\n};\n/**\n * Numbers (integers or floats)\n */\nexport var NumberParam = {\n encode: Serialize.encodeNumber,\n decode: Serialize.decodeNumber,\n};\n/**\n * For flat objects where values are strings\n */\nexport var ObjectParam = {\n encode: Serialize.encodeObject,\n decode: Serialize.decodeObject,\n};\n/**\n * For flat arrays of strings, filters out undefined values during decode\n */\nexport var ArrayParam = {\n encode: Serialize.encodeArray,\n decode: Serialize.decodeArray,\n};\n/**\n * For flat arrays of strings, filters out undefined values during decode\n */\nexport var NumericArrayParam = {\n encode: Serialize.encodeNumericArray,\n decode: Serialize.decodeNumericArray,\n};\n/**\n * For any type of data, encoded via JSON.stringify\n */\nexport var JsonParam = {\n encode: Serialize.encodeJson,\n decode: Serialize.decodeJson,\n};\n/**\n * For simple dates (YYYY-MM-DD)\n */\nexport var DateParam = {\n encode: Serialize.encodeDate,\n decode: Serialize.decodeDate,\n equals: function (valueA, valueB) {\n if (valueA === valueB)\n return true;\n if (valueA == null || valueB == null)\n return valueA === valueB;\n // ignore time of day\n return (valueA.getFullYear() === valueB.getFullYear() &&\n valueA.getMonth() === valueB.getMonth() &&\n valueA.getDate() === valueB.getDate());\n },\n};\n/**\n * For dates in simplified extended ISO format (YYYY-MM-DDTHH:mm:ss.sssZ or ±YYYYYY-MM-DDTHH:mm:ss.sssZ)\n */\nexport var DateTimeParam = {\n encode: Serialize.encodeDateTime,\n decode: Serialize.decodeDateTime,\n equals: function (valueA, valueB) {\n if (valueA === valueB)\n return true;\n if (valueA == null || valueB == null)\n return valueA === valueB;\n return valueA.valueOf() === valueB.valueOf();\n },\n};\n/**\n * For boolean values: 1 = true, 0 = false\n */\nexport var BooleanParam = {\n encode: Serialize.encodeBoolean,\n decode: Serialize.decodeBoolean,\n};\n/**\n * For flat objects where the values are numbers\n */\nexport var NumericObjectParam = {\n encode: Serialize.encodeNumericObject,\n decode: Serialize.decodeNumericObject,\n};\n/**\n * For flat arrays of strings, filters out undefined values during decode\n */\nexport var DelimitedArrayParam = {\n encode: Serialize.encodeDelimitedArray,\n decode: Serialize.decodeDelimitedArray,\n};\n/**\n * For flat arrays where the values are numbers, filters out undefined values during decode\n */\nexport var DelimitedNumericArrayParam = {\n encode: Serialize.encodeDelimitedNumericArray,\n decode: Serialize.decodeDelimitedNumericArray,\n};\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport { stringify, parse as parseQueryString, parseUrl, } from 'query-string';\n/**\n * An example of a transformSearchString function that undoes encoding of\n * common JSON characters that are technically allowed in URLs.\n */\nvar JSON_SAFE_CHARS = \"{}[],\\\":\"\n .split('')\n .map(function (d) { return [d, encodeURIComponent(d)]; });\nexport function transformSearchStringJsonSafe(searchString) {\n var str = searchString;\n for (var _i = 0, JSON_SAFE_CHARS_1 = JSON_SAFE_CHARS; _i < JSON_SAFE_CHARS_1.length; _i++) {\n var _a = JSON_SAFE_CHARS_1[_i], char = _a[0], code = _a[1];\n str = str.replace(new RegExp('\\\\' + code, 'g'), char);\n }\n return str;\n}\n/**\n * Update a location, wiping out parameters not included in encodedQuery\n * If a param is set to undefined it will be removed from the URL.\n */\nexport function updateLocation(encodedQuery, location, stringifyOptions) {\n var encodedSearchString = stringify(encodedQuery, stringifyOptions);\n if (stringifyOptions && stringifyOptions.transformSearchString) {\n encodedSearchString = stringifyOptions.transformSearchString(encodedSearchString);\n }\n var search = encodedSearchString.length ? \"?\" + encodedSearchString : '';\n var href = parseUrl(location.href || '').url + search;\n var newLocation = __assign(__assign({}, location), { key: \"\" + Date.now(), // needed for some routers (e.g. react-router)\n href: href,\n search: search, query: encodedQuery });\n return newLocation;\n}\n/**\n * Update a location while retaining existing parameters.\n * If a param is set to undefined it will be removed from the URL.\n */\nexport function updateInLocation(encodedQueryReplacements, location, stringifyOptions) {\n // if a query is there, use it, otherwise parse the search string\n var currQuery = location.query || parseQueryString(location.search);\n var newQuery = __assign(__assign({}, currQuery), encodedQueryReplacements);\n return updateLocation(newQuery, location, stringifyOptions);\n}\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license at\n * https://github.com/facebook/fbjs/blob/master/LICENSE\n */\n/*eslint-disable no-self-compare */\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n/**\n * inlined Object.is polyfill to avoid requiring consumers ship their own\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n */\nfunction is(x, y) {\n // SameValue algorithm\n if (x === y) {\n // Steps 1-5, 7-10\n // Steps 6.b-6.e: +0 != -0\n // Added the nonzero y check to make Flow happy, but it is redundant\n return x !== 0 || y !== 0 || 1 / x === 1 / y;\n }\n else {\n // Step 6.a: NaN == NaN\n return x !== x && y !== y;\n }\n}\n/**\n * Performs equality by iterating through keys on an object and returning false\n * when any key has values which are not strictly equal between the arguments.\n * Returns true when the values of all keys are strictly equal.\n\n * @pbeshai modification of shallowEqual to take into consideration a map providing\n * equals functions\n */\nexport default function shallowEqual(objA, objB, equalMap) {\n var _a, _b;\n if (is(objA, objB)) {\n return true;\n }\n if (typeof objA !== 'object' ||\n objA === null ||\n typeof objB !== 'object' ||\n objB === null) {\n return false;\n }\n var keysA = Object.keys(objA);\n var keysB = Object.keys(objB);\n if (keysA.length !== keysB.length) {\n return false;\n }\n // Test for A's keys different from B.\n for (var i = 0; i < keysA.length; i++) {\n var isEqual = (_b = (_a = equalMap === null || equalMap === void 0 ? void 0 : equalMap[keysA[i]]) === null || _a === void 0 ? void 0 : _a.equals) !== null && _b !== void 0 ? _b : is;\n if (!hasOwnProperty.call(objB, keysA[i]) ||\n !isEqual(objA[keysA[i]], objB[keysA[i]])) {\n return false;\n }\n }\n return true;\n}\n","import * as React from 'react';\nimport { extract } from 'query-string';\nimport shallowEqual from './shallowEqual';\nexport function useUpdateRefIfShallowNew(ref, newValue, isEqual) {\n if (isEqual === void 0) { isEqual = shallowEqual; }\n var hasNew = ((ref.current == null || newValue == null) && ref.current === newValue) ||\n !isEqual(ref.current, newValue);\n React.useEffect(function () {\n if (hasNew) {\n ref.current = newValue;\n }\n }, [ref, newValue, hasNew]);\n}\nexport function getSSRSafeSearchString(location) {\n // handle checking SSR (#13)\n if (typeof location === 'object') {\n // in browser\n if (typeof window !== 'undefined') {\n return location.search;\n }\n else {\n return extract(\"\" + location.pathname + (location.search ? location.search : ''));\n }\n }\n return '';\n}\n","import { updateLocation, updateInLocation, } from 'serialize-query-params';\n/**\n * Creates a new location object containing the specified query changes.\n * If replaceIn or pushIn are used as the updateType, then parameters\n * not specified in queryReplacements are retained. If replace or push\n * are used, only the values in queryReplacements will be available.\n * The default is pushIn.\n */\nexport function createLocationWithChanges(queryReplacements, location, updateType, stringifyOptions) {\n if (updateType === void 0) { updateType = 'pushIn'; }\n switch (updateType) {\n case 'replace':\n case 'push':\n return updateLocation(queryReplacements, location, stringifyOptions);\n case 'replaceIn':\n case 'pushIn':\n default:\n return updateInLocation(queryReplacements, location, stringifyOptions);\n }\n}\n/**\n * Updates the URL to the new location.\n */\nexport function updateUrlQuery(history, location, updateType) {\n if (updateType === void 0) { updateType = 'pushIn'; }\n switch (updateType) {\n case 'pushIn':\n case 'push':\n history.push(location);\n break;\n case 'replaceIn':\n case 'replace':\n default:\n history.replace(location);\n break;\n }\n}\n","import * as React from 'react';\nimport { updateUrlQuery, createLocationWithChanges } from './updateUrlQuery';\nexport var LocationContext = React.createContext({\n location: {},\n getLocation: function () { return ({}); },\n setLocation: function () { },\n});\nexport function useLocationContext() {\n var context = React.useContext(LocationContext);\n if (process.env.NODE_ENV === 'development' && context === undefined) {\n throw new Error('useQueryParams must be used within a QueryParamProvider');\n }\n return context;\n}\n/**\n * An internal-only context provider which provides down the most\n * recent location object and a callback to update the history.\n */\nexport function LocationProvider(_a) {\n var history = _a.history, location = _a.location, children = _a.children, stringifyOptions = _a.stringifyOptions;\n var locationRef = React.useRef(location);\n React.useEffect(function () {\n locationRef.current = location;\n }, [location]);\n // TODO: we can probably simplify this now that we are reading location from history\n var getLocation = React.useCallback(function () { return locationRef.current; }, [\n locationRef,\n ]);\n var setLocation = React.useCallback(function (queryReplacements, updateType) {\n // A ref is needed here to stop setLocation updating constantly (see #46)\n locationRef.current = createLocationWithChanges(queryReplacements, history == null || history.location == null\n ? locationRef.current\n : history.location, updateType, stringifyOptions);\n if (history) {\n updateUrlQuery(history, locationRef.current, updateType);\n }\n }, [history, stringifyOptions]);\n return (React.createElement(LocationContext.Provider, { value: { location: location, getLocation: getLocation, setLocation: setLocation } }, children));\n}\n","import { parse as parseQueryString } from 'query-string';\nexport var makeMemoizedQueryParser = function (initialSearchString) {\n var cachedSearchString = initialSearchString;\n var cachedParsedQuery = parseQueryString(cachedSearchString || '');\n return function (newSearchString) {\n if (cachedSearchString !== newSearchString) {\n cachedSearchString = newSearchString;\n cachedParsedQuery = parseQueryString(cachedSearchString);\n }\n return cachedParsedQuery;\n };\n};\nexport var sharedMemoizedQueryParser = makeMemoizedQueryParser();\n","import * as React from 'react';\nimport { StringParam } from 'serialize-query-params';\nimport { getSSRSafeSearchString, useUpdateRefIfShallowNew } from './helpers';\nimport { useLocationContext } from './LocationProvider';\nimport { sharedMemoizedQueryParser } from './memoizedQueryParser';\nimport shallowEqual from './shallowEqual';\n/**\n * Helper to get the latest decoded value with smart caching.\n * Abstracted into its own function to allow re-use in a functional setter (#26)\n */\nfunction getLatestDecodedValue(location, name, paramConfig, paramConfigRef, encodedValueCacheRef, decodedValueCacheRef) {\n var _a;\n // check if we have a new param config\n var hasNewParamConfig = !shallowEqual(paramConfigRef.current, paramConfig);\n var isValueEqual = (_a = paramConfig.equals) !== null && _a !== void 0 ? _a : shallowEqual;\n // read in the parsed query\n var parsedQuery = sharedMemoizedQueryParser(getSSRSafeSearchString(location) // get the latest location object\n );\n // read in the encoded string value (we have to check cache if available because\n // sometimes the query string changes so we get a new parsedQuery but this value\n // didn't change, so we should avoid generating a new array or whatever value)\n var hasNewEncodedValue = !shallowEqual(encodedValueCacheRef.current, parsedQuery[name]);\n var encodedValue = hasNewEncodedValue\n ? parsedQuery[name]\n : encodedValueCacheRef.current;\n // only decode if we have changes to encoded value or the config.\n // check for undefined to handle initial case\n if (!hasNewEncodedValue &&\n !hasNewParamConfig &&\n decodedValueCacheRef.current !== undefined) {\n return decodedValueCacheRef.current;\n }\n var newDecodedValue = paramConfig.decode(encodedValue);\n var hasNewDecodedValue = ((decodedValueCacheRef.current == null || newDecodedValue == null) &&\n decodedValueCacheRef.current === newDecodedValue) ||\n !isValueEqual(decodedValueCacheRef.current, newDecodedValue);\n // if we have a new decoded value use it, otherwise use cached\n return hasNewDecodedValue\n ? newDecodedValue\n : decodedValueCacheRef.current;\n}\n/**\n * Given a query param name and query parameter configuration ({ encode, decode })\n * return the decoded value and a setter for updating it.\n *\n * The setter takes two arguments (newValue, updateType) where updateType\n * is one of 'replace' | 'replaceIn' | 'push' | 'pushIn', defaulting to\n * 'pushIn'.\n *\n * You may optionally pass in a rawQuery object, otherwise the query is derived\n * from the location available in the context.\n *\n * D = decoded type\n * D2 = return value from decode (typically same as D)\n */\nexport var useQueryParam = function (name, paramConfig) {\n if (paramConfig === void 0) { paramConfig = StringParam; }\n var _a = useLocationContext(), location = _a.location, getLocation = _a.getLocation, setLocation = _a.setLocation;\n // read in the raw query\n var parsedQuery = sharedMemoizedQueryParser(getSSRSafeSearchString(location));\n // make caches\n var encodedValueCacheRef = React.useRef();\n var paramConfigRef = React.useRef(paramConfig);\n var decodedValueCacheRef = React.useRef();\n var decodedValue = getLatestDecodedValue(location, name, paramConfig, paramConfigRef, encodedValueCacheRef, decodedValueCacheRef);\n // update cached values in a useEffect\n useUpdateRefIfShallowNew(encodedValueCacheRef, parsedQuery[name]);\n useUpdateRefIfShallowNew(paramConfigRef, paramConfig);\n useUpdateRefIfShallowNew(decodedValueCacheRef, decodedValue, paramConfig.equals);\n // create the setter, memoizing via useCallback\n var setValue = React.useCallback(function setValueCallback(newValue, updateType) {\n var _a;\n var newEncodedValue;\n // allow functional updates #26\n if (typeof newValue === 'function') {\n // get latest decoded value to pass as a fresh arg to the setter fn\n var latestValue = getLatestDecodedValue(getLocation(), name, paramConfig, paramConfigRef, encodedValueCacheRef, decodedValueCacheRef);\n decodedValueCacheRef.current = latestValue; // keep cache in sync\n newEncodedValue = paramConfig.encode(newValue(latestValue));\n }\n else {\n newEncodedValue = paramConfig.encode(newValue);\n }\n // update the URL\n setLocation((_a = {}, _a[name] = newEncodedValue, _a), updateType);\n }, [paramConfig, name, setLocation, getLocation]);\n return [decodedValue, setValue];\n};\n","import useQueryParams from './useQueryParams';\nexport var QueryParams = function (_a) {\n var config = _a.config, children = _a.children;\n var _b = useQueryParams(config), query = _b[0], setQuery = _b[1];\n return children({ query: query, setQuery: setQuery });\n};\nexport default QueryParams;\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport * as React from 'react';\nimport { LocationProvider } from './LocationProvider';\nimport shallowEqual from './shallowEqual';\n// we use a lazy caching solution to prevent #46 from happening\nvar cachedWindowHistory;\nvar cachedAdaptedWindowHistory;\n/**\n * Adapts standard DOM window history to work with our\n * { replace, push } interface.\n *\n * @param history Standard history provided by DOM\n */\nfunction adaptWindowHistory(history) {\n if (history === cachedWindowHistory && cachedAdaptedWindowHistory != null) {\n return cachedAdaptedWindowHistory;\n }\n var adaptedWindowHistory = {\n replace: function (location) {\n history.replaceState(location.state, '', location.protocol + \"//\" + location.host + location.pathname + location.search);\n },\n push: function (location) {\n history.pushState(location.state, '', location.protocol + \"//\" + location.host + location.pathname + location.search);\n },\n get location() {\n return window.location;\n },\n };\n cachedWindowHistory = history;\n cachedAdaptedWindowHistory = adaptedWindowHistory;\n return adaptedWindowHistory;\n}\n// we use a lazy caching solution to prevent #46 from happening\nvar cachedReachHistory;\nvar cachedAdaptedReachHistory;\n/**\n * Adapts @reach/router history to work with our\n * { replace, push } interface.\n *\n * @param history globalHistory from @reach/router\n */\nfunction adaptReachHistory(history) {\n if (history === cachedReachHistory && cachedAdaptedReachHistory != null) {\n return cachedAdaptedReachHistory;\n }\n var adaptedReachHistory = {\n replace: function (location) {\n history.navigate(location.protocol + \"//\" + location.host + location.pathname + location.search, { replace: true });\n },\n push: function (location) {\n history.navigate(location.protocol + \"//\" + location.host + location.pathname + location.search, { replace: false });\n },\n get location() {\n return history.location;\n },\n };\n cachedReachHistory = history;\n cachedAdaptedReachHistory = adaptedReachHistory;\n return adaptedReachHistory;\n}\n/**\n * Helper to produce the context value falling back to\n * window history and location if not provided.\n */\nexport function getLocationProps(_a) {\n var _b = _a === void 0 ? {} : _a, history = _b.history, location = _b.location;\n var hasWindow = typeof window !== 'undefined';\n if (hasWindow) {\n if (!history) {\n history = adaptWindowHistory(window.history);\n }\n if (!location) {\n location = window.location;\n }\n }\n if (!location) {\n throw new Error(\"\\n Could not read the location. Is the router wired up correctly?\\n \");\n }\n return { history: history, location: location };\n}\n/**\n * Context provider for query params to have access to the\n * active routing system, enabling updates to the URL.\n */\nexport function QueryParamProvider(_a) {\n var children = _a.children, ReactRouterRoute = _a.ReactRouterRoute, reachHistory = _a.reachHistory, history = _a.history, location = _a.location, stringifyOptions = _a.stringifyOptions;\n // cache the stringify options object so we users can just do\n // \n var stringifyOptionsRef = React.useRef(stringifyOptions);\n var hasNewStringifyOptions = !shallowEqual(stringifyOptionsRef.current, stringifyOptions);\n var stringifyOptionsCached = hasNewStringifyOptions\n ? stringifyOptions\n : stringifyOptionsRef.current;\n React.useEffect(function () {\n stringifyOptionsRef.current = stringifyOptionsCached;\n }, [stringifyOptionsCached]);\n // if we have React Router, use it to get the context value\n if (ReactRouterRoute) {\n return (React.createElement(ReactRouterRoute, null, function (routeProps) {\n return (React.createElement(LocationProvider, __assign({ stringifyOptions: stringifyOptionsCached }, getLocationProps(routeProps)), children));\n }));\n }\n // if we are using reach router, use its history\n if (reachHistory) {\n return (React.createElement(LocationProvider, __assign({ stringifyOptions: stringifyOptionsCached }, getLocationProps({\n history: adaptReachHistory(reachHistory),\n location: location,\n })), children));\n }\n // neither reach nor react-router, so allow manual overrides\n return (React.createElement(LocationProvider, __assign({ stringifyOptions: stringifyOptionsCached }, getLocationProps({ history: history, location: location })), children));\n}\nexport default QueryParamProvider;\n","export * from 'serialize-query-params';\nexport { useQueryParam } from './useQueryParam';\nexport { useQueryParams } from './useQueryParams';\nexport { withQueryParams, withQueryParamsMapped, } from './withQueryParams';\nexport { QueryParams } from './QueryParams';\nexport { QueryParamProvider } from './QueryParamProvider';\n","'use strict';\nconst strictUriEncode = require('strict-uri-encode');\nconst decodeComponent = require('decode-uri-component');\nconst splitOnFirst = require('split-on-first');\n\nfunction encoderForArrayFormat(options) {\n\tswitch (options.arrayFormat) {\n\t\tcase 'index':\n\t\t\treturn key => (result, value) => {\n\t\t\t\tconst index = result.length;\n\t\t\t\tif (value === undefined || (options.skipNull && value === null)) {\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\n\t\t\t\tif (value === null) {\n\t\t\t\t\treturn [...result, [encode(key, options), '[', index, ']'].join('')];\n\t\t\t\t}\n\n\t\t\t\treturn [\n\t\t\t\t\t...result,\n\t\t\t\t\t[encode(key, options), '[', encode(index, options), ']=', encode(value, options)].join('')\n\t\t\t\t];\n\t\t\t};\n\n\t\tcase 'bracket':\n\t\t\treturn key => (result, value) => {\n\t\t\t\tif (value === undefined || (options.skipNull && value === null)) {\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\n\t\t\t\tif (value === null) {\n\t\t\t\t\treturn [...result, [encode(key, options), '[]'].join('')];\n\t\t\t\t}\n\n\t\t\t\treturn [...result, [encode(key, options), '[]=', encode(value, options)].join('')];\n\t\t\t};\n\n\t\tcase 'comma':\n\t\t\treturn key => (result, value) => {\n\t\t\t\tif (value === null || value === undefined || value.length === 0) {\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\n\t\t\t\tif (result.length === 0) {\n\t\t\t\t\treturn [[encode(key, options), '=', encode(value, options)].join('')];\n\t\t\t\t}\n\n\t\t\t\treturn [[result, encode(value, options)].join(',')];\n\t\t\t};\n\n\t\tdefault:\n\t\t\treturn key => (result, value) => {\n\t\t\t\tif (value === undefined || (options.skipNull && value === null)) {\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\n\t\t\t\tif (value === null) {\n\t\t\t\t\treturn [...result, encode(key, options)];\n\t\t\t\t}\n\n\t\t\t\treturn [...result, [encode(key, options), '=', encode(value, options)].join('')];\n\t\t\t};\n\t}\n}\n\nfunction parserForArrayFormat(options) {\n\tlet result;\n\n\tswitch (options.arrayFormat) {\n\t\tcase 'index':\n\t\t\treturn (key, value, accumulator) => {\n\t\t\t\tresult = /\\[(\\d*)\\]$/.exec(key);\n\n\t\t\t\tkey = key.replace(/\\[\\d*\\]$/, '');\n\n\t\t\t\tif (!result) {\n\t\t\t\t\taccumulator[key] = value;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (accumulator[key] === undefined) {\n\t\t\t\t\taccumulator[key] = {};\n\t\t\t\t}\n\n\t\t\t\taccumulator[key][result[1]] = value;\n\t\t\t};\n\n\t\tcase 'bracket':\n\t\t\treturn (key, value, accumulator) => {\n\t\t\t\tresult = /(\\[\\])$/.exec(key);\n\t\t\t\tkey = key.replace(/\\[\\]$/, '');\n\n\t\t\t\tif (!result) {\n\t\t\t\t\taccumulator[key] = value;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (accumulator[key] === undefined) {\n\t\t\t\t\taccumulator[key] = [value];\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\taccumulator[key] = [].concat(accumulator[key], value);\n\t\t\t};\n\n\t\tcase 'comma':\n\t\t\treturn (key, value, accumulator) => {\n\t\t\t\tconst isArray = typeof value === 'string' && value.split('').indexOf(',') > -1;\n\t\t\t\tconst newValue = isArray ? value.split(',') : value;\n\t\t\t\taccumulator[key] = newValue;\n\t\t\t};\n\n\t\tdefault:\n\t\t\treturn (key, value, accumulator) => {\n\t\t\t\tif (accumulator[key] === undefined) {\n\t\t\t\t\taccumulator[key] = value;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\taccumulator[key] = [].concat(accumulator[key], value);\n\t\t\t};\n\t}\n}\n\nfunction encode(value, options) {\n\tif (options.encode) {\n\t\treturn options.strict ? strictUriEncode(value) : encodeURIComponent(value);\n\t}\n\n\treturn value;\n}\n\nfunction decode(value, options) {\n\tif (options.decode) {\n\t\treturn decodeComponent(value);\n\t}\n\n\treturn value;\n}\n\nfunction keysSorter(input) {\n\tif (Array.isArray(input)) {\n\t\treturn input.sort();\n\t}\n\n\tif (typeof input === 'object') {\n\t\treturn keysSorter(Object.keys(input))\n\t\t\t.sort((a, b) => Number(a) - Number(b))\n\t\t\t.map(key => input[key]);\n\t}\n\n\treturn input;\n}\n\nfunction removeHash(input) {\n\tconst hashStart = input.indexOf('#');\n\tif (hashStart !== -1) {\n\t\tinput = input.slice(0, hashStart);\n\t}\n\n\treturn input;\n}\n\nfunction getHash(url) {\n\tlet hash = '';\n\tconst hashStart = url.indexOf('#');\n\tif (hashStart !== -1) {\n\t\thash = url.slice(hashStart);\n\t}\n\n\treturn hash;\n}\n\nfunction extract(input) {\n\tinput = removeHash(input);\n\tconst queryStart = input.indexOf('?');\n\tif (queryStart === -1) {\n\t\treturn '';\n\t}\n\n\treturn input.slice(queryStart + 1);\n}\n\nfunction parseValue(value, options) {\n\tif (options.parseNumbers && !Number.isNaN(Number(value)) && (typeof value === 'string' && value.trim() !== '')) {\n\t\tvalue = Number(value);\n\t} else if (options.parseBooleans && value !== null && (value.toLowerCase() === 'true' || value.toLowerCase() === 'false')) {\n\t\tvalue = value.toLowerCase() === 'true';\n\t}\n\n\treturn value;\n}\n\nfunction parse(input, options) {\n\toptions = Object.assign({\n\t\tdecode: true,\n\t\tsort: true,\n\t\tarrayFormat: 'none',\n\t\tparseNumbers: false,\n\t\tparseBooleans: false\n\t}, options);\n\n\tconst formatter = parserForArrayFormat(options);\n\n\t// Create an object with no prototype\n\tconst ret = Object.create(null);\n\n\tif (typeof input !== 'string') {\n\t\treturn ret;\n\t}\n\n\tinput = input.trim().replace(/^[?#&]/, '');\n\n\tif (!input) {\n\t\treturn ret;\n\t}\n\n\tfor (const param of input.split('&')) {\n\t\tlet [key, value] = splitOnFirst(options.decode ? param.replace(/\\+/g, ' ') : param, '=');\n\n\t\t// Missing `=` should be `null`:\n\t\t// http://w3.org/TR/2012/WD-url-20120524/#collect-url-parameters\n\t\tvalue = value === undefined ? null : decode(value, options);\n\t\tformatter(decode(key, options), value, ret);\n\t}\n\n\tfor (const key of Object.keys(ret)) {\n\t\tconst value = ret[key];\n\t\tif (typeof value === 'object' && value !== null) {\n\t\t\tfor (const k of Object.keys(value)) {\n\t\t\t\tvalue[k] = parseValue(value[k], options);\n\t\t\t}\n\t\t} else {\n\t\t\tret[key] = parseValue(value, options);\n\t\t}\n\t}\n\n\tif (options.sort === false) {\n\t\treturn ret;\n\t}\n\n\treturn (options.sort === true ? Object.keys(ret).sort() : Object.keys(ret).sort(options.sort)).reduce((result, key) => {\n\t\tconst value = ret[key];\n\t\tif (Boolean(value) && typeof value === 'object' && !Array.isArray(value)) {\n\t\t\t// Sort object keys, not values\n\t\t\tresult[key] = keysSorter(value);\n\t\t} else {\n\t\t\tresult[key] = value;\n\t\t}\n\n\t\treturn result;\n\t}, Object.create(null));\n}\n\nexports.extract = extract;\nexports.parse = parse;\n\nexports.stringify = (object, options) => {\n\tif (!object) {\n\t\treturn '';\n\t}\n\n\toptions = Object.assign({\n\t\tencode: true,\n\t\tstrict: true,\n\t\tarrayFormat: 'none'\n\t}, options);\n\n\tconst formatter = encoderForArrayFormat(options);\n\n\tconst objectCopy = Object.assign({}, object);\n\tif (options.skipNull) {\n\t\tfor (const key of Object.keys(objectCopy)) {\n\t\t\tif (objectCopy[key] === undefined || objectCopy[key] === null) {\n\t\t\t\tdelete objectCopy[key];\n\t\t\t}\n\t\t}\n\t}\n\n\tconst keys = Object.keys(objectCopy);\n\n\tif (options.sort !== false) {\n\t\tkeys.sort(options.sort);\n\t}\n\n\treturn keys.map(key => {\n\t\tconst value = object[key];\n\n\t\tif (value === undefined) {\n\t\t\treturn '';\n\t\t}\n\n\t\tif (value === null) {\n\t\t\treturn encode(key, options);\n\t\t}\n\n\t\tif (Array.isArray(value)) {\n\t\t\treturn value\n\t\t\t\t.reduce(formatter(key), [])\n\t\t\t\t.join('&');\n\t\t}\n\n\t\treturn encode(key, options) + '=' + encode(value, options);\n\t}).filter(x => x.length > 0).join('&');\n};\n\nexports.parseUrl = (input, options) => {\n\treturn {\n\t\turl: removeHash(input).split('?')[0] || '',\n\t\tquery: parse(extract(input), options)\n\t};\n};\n\nexports.stringifyUrl = (input, options) => {\n\tconst url = removeHash(input.url).split('?')[0] || '';\n\tconst queryFromUrl = exports.extract(input.url);\n\tconst parsedQueryFromUrl = exports.parse(queryFromUrl);\n\tconst hash = getHash(input.url);\n\tconst query = Object.assign(parsedQueryFromUrl, input.query);\n\tlet queryString = exports.stringify(query, options);\n\tif (queryString) {\n\t\tqueryString = `?${queryString}`;\n\t}\n\n\treturn `${url}${queryString}${hash}`;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactIs = require('react-is');\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nfunction componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n}\n\nfunction componentWillReceiveProps(nextProps) {\n // Call this.constructor.gDSFP to support sub-classes.\n // Use the setState() updater to ensure state isn't stale in certain edge cases.\n function updater(prevState) {\n var state = this.constructor.getDerivedStateFromProps(nextProps, prevState);\n return state !== null && state !== undefined ? state : null;\n }\n // Binding \"this\" is important for shallow renderer support.\n this.setState(updater.bind(this));\n}\n\nfunction componentWillUpdate(nextProps, nextState) {\n try {\n var prevProps = this.props;\n var prevState = this.state;\n this.props = nextProps;\n this.state = nextState;\n this.__reactInternalSnapshotFlag = true;\n this.__reactInternalSnapshot = this.getSnapshotBeforeUpdate(\n prevProps,\n prevState\n );\n } finally {\n this.props = prevProps;\n this.state = prevState;\n }\n}\n\n// React may warn about cWM/cWRP/cWU methods being deprecated.\n// Add a flag to suppress these warnings for this special case.\ncomponentWillMount.__suppressDeprecationWarning = true;\ncomponentWillReceiveProps.__suppressDeprecationWarning = true;\ncomponentWillUpdate.__suppressDeprecationWarning = true;\n\nfunction polyfill(Component) {\n var prototype = Component.prototype;\n\n if (!prototype || !prototype.isReactComponent) {\n throw new Error('Can only polyfill class components');\n }\n\n if (\n typeof Component.getDerivedStateFromProps !== 'function' &&\n typeof prototype.getSnapshotBeforeUpdate !== 'function'\n ) {\n return Component;\n }\n\n // If new component APIs are defined, \"unsafe\" lifecycles won't be called.\n // Error if any of these lifecycles are present,\n // Because they would work differently between older and newer (16.3+) versions of React.\n var foundWillMountName = null;\n var foundWillReceivePropsName = null;\n var foundWillUpdateName = null;\n if (typeof prototype.componentWillMount === 'function') {\n foundWillMountName = 'componentWillMount';\n } else if (typeof prototype.UNSAFE_componentWillMount === 'function') {\n foundWillMountName = 'UNSAFE_componentWillMount';\n }\n if (typeof prototype.componentWillReceiveProps === 'function') {\n foundWillReceivePropsName = 'componentWillReceiveProps';\n } else if (typeof prototype.UNSAFE_componentWillReceiveProps === 'function') {\n foundWillReceivePropsName = 'UNSAFE_componentWillReceiveProps';\n }\n if (typeof prototype.componentWillUpdate === 'function') {\n foundWillUpdateName = 'componentWillUpdate';\n } else if (typeof prototype.UNSAFE_componentWillUpdate === 'function') {\n foundWillUpdateName = 'UNSAFE_componentWillUpdate';\n }\n if (\n foundWillMountName !== null ||\n foundWillReceivePropsName !== null ||\n foundWillUpdateName !== null\n ) {\n var componentName = Component.displayName || Component.name;\n var newApiName =\n typeof Component.getDerivedStateFromProps === 'function'\n ? 'getDerivedStateFromProps()'\n : 'getSnapshotBeforeUpdate()';\n\n throw Error(\n 'Unsafe legacy lifecycles will not be called for components using new component APIs.\\n\\n' +\n componentName +\n ' uses ' +\n newApiName +\n ' but also contains the following legacy lifecycles:' +\n (foundWillMountName !== null ? '\\n ' + foundWillMountName : '') +\n (foundWillReceivePropsName !== null\n ? '\\n ' + foundWillReceivePropsName\n : '') +\n (foundWillUpdateName !== null ? '\\n ' + foundWillUpdateName : '') +\n '\\n\\nThe above lifecycles should be removed. Learn more about this warning here:\\n' +\n 'https://fb.me/react-async-component-lifecycle-hooks'\n );\n }\n\n // React <= 16.2 does not support static getDerivedStateFromProps.\n // As a workaround, use cWM and cWRP to invoke the new static lifecycle.\n // Newer versions of React will ignore these lifecycles if gDSFP exists.\n if (typeof Component.getDerivedStateFromProps === 'function') {\n prototype.componentWillMount = componentWillMount;\n prototype.componentWillReceiveProps = componentWillReceiveProps;\n }\n\n // React <= 16.2 does not support getSnapshotBeforeUpdate.\n // As a workaround, use cWU to invoke the new lifecycle.\n // Newer versions of React will ignore that lifecycle if gSBU exists.\n if (typeof prototype.getSnapshotBeforeUpdate === 'function') {\n if (typeof prototype.componentDidUpdate !== 'function') {\n throw new Error(\n 'Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype'\n );\n }\n\n prototype.componentWillUpdate = componentWillUpdate;\n\n var componentDidUpdate = prototype.componentDidUpdate;\n\n prototype.componentDidUpdate = function componentDidUpdatePolyfill(\n prevProps,\n prevState,\n maybeSnapshot\n ) {\n // 16.3+ will not execute our will-update method;\n // It will pass a snapshot value to did-update though.\n // Older versions will require our polyfilled will-update value.\n // We need to handle both cases, but can't just check for the presence of \"maybeSnapshot\",\n // Because for <= 15.x versions this might be a \"prevContext\" object.\n // We also can't just check \"__reactInternalSnapshot\",\n // Because get-snapshot might return a falsy value.\n // So check for the explicit __reactInternalSnapshotFlag flag to determine behavior.\n var snapshot = this.__reactInternalSnapshotFlag\n ? this.__reactInternalSnapshot\n : maybeSnapshot;\n\n componentDidUpdate.call(this, prevProps, prevState, snapshot);\n };\n }\n\n return Component;\n}\n\nexport { polyfill };\n","import invariant from \"invariant\";\n\n////////////////////////////////////////////////////////////////////////////////\n// startsWith(string, search) - Check if `string` starts with `search`\nvar startsWith = function startsWith(string, search) {\n return string.substr(0, search.length) === search;\n};\n\n////////////////////////////////////////////////////////////////////////////////\n// pick(routes, uri)\n//\n// Ranks and picks the best route to match. Each segment gets the highest\n// amount of points, then the type of segment gets an additional amount of\n// points where\n//\n// static > dynamic > splat > root\n//\n// This way we don't have to worry about the order of our routes, let the\n// computers do it.\n//\n// A route looks like this\n//\n// { path, default, value }\n//\n// And a returned match looks like:\n//\n// { route, params, uri }\n//\n// I know, I should use TypeScript not comments for these types.\nvar pick = function pick(routes, uri) {\n var match = void 0;\n var default_ = void 0;\n\n var _uri$split = uri.split(\"?\"),\n uriPathname = _uri$split[0];\n\n var uriSegments = segmentize(uriPathname);\n var isRootUri = uriSegments[0] === \"\";\n var ranked = rankRoutes(routes);\n\n for (var i = 0, l = ranked.length; i < l; i++) {\n var missed = false;\n var route = ranked[i].route;\n\n if (route.default) {\n default_ = {\n route: route,\n params: {},\n uri: uri\n };\n continue;\n }\n\n var routeSegments = segmentize(route.path);\n var params = {};\n var max = Math.max(uriSegments.length, routeSegments.length);\n var index = 0;\n\n for (; index < max; index++) {\n var routeSegment = routeSegments[index];\n var uriSegment = uriSegments[index];\n\n if (isSplat(routeSegment)) {\n // Hit a splat, just grab the rest, and return a match\n // uri: /files/documents/work\n // route: /files/*\n var param = routeSegment.slice(1) || \"*\";\n params[param] = uriSegments.slice(index).map(decodeURIComponent).join(\"/\");\n break;\n }\n\n if (uriSegment === undefined) {\n // URI is shorter than the route, no match\n // uri: /users\n // route: /users/:userId\n missed = true;\n break;\n }\n\n var dynamicMatch = paramRe.exec(routeSegment);\n\n if (dynamicMatch && !isRootUri) {\n var matchIsNotReserved = reservedNames.indexOf(dynamicMatch[1]) === -1;\n !matchIsNotReserved ? process.env.NODE_ENV !== \"production\" ? invariant(false, \" dynamic segment \\\"\" + dynamicMatch[1] + \"\\\" is a reserved name. Please use a different name in path \\\"\" + route.path + \"\\\".\") : invariant(false) : void 0;\n var value = decodeURIComponent(uriSegment);\n params[dynamicMatch[1]] = value;\n } else if (routeSegment !== uriSegment) {\n // Current segments don't match, not dynamic, not splat, so no match\n // uri: /users/123/settings\n // route: /users/:id/profile\n missed = true;\n break;\n }\n }\n\n if (!missed) {\n match = {\n route: route,\n params: params,\n uri: \"/\" + uriSegments.slice(0, index).join(\"/\")\n };\n break;\n }\n }\n\n return match || default_ || null;\n};\n\n////////////////////////////////////////////////////////////////////////////////\n// match(path, uri) - Matches just one path to a uri, also lol\nvar match = function match(path, uri) {\n return pick([{ path: path }], uri);\n};\n\n////////////////////////////////////////////////////////////////////////////////\n// resolve(to, basepath)\n//\n// Resolves URIs as though every path is a directory, no files. Relative URIs\n// in the browser can feel awkward because not only can you be \"in a directory\"\n// you can be \"at a file\", too. For example\n//\n// browserSpecResolve('foo', '/bar/') => /bar/foo\n// browserSpecResolve('foo', '/bar') => /foo\n//\n// But on the command line of a file system, it's not as complicated, you can't\n// `cd` from a file, only directories. This way, links have to know less about\n// their current path. To go deeper you can do this:\n//\n// \n// // instead of\n// \n//\n// Just like `cd`, if you want to go deeper from the command line, you do this:\n//\n// cd deeper\n// # not\n// cd $(pwd)/deeper\n//\n// By treating every path as a directory, linking to relative paths should\n// require less contextual information and (fingers crossed) be more intuitive.\nvar resolve = function resolve(to, base) {\n // /foo/bar, /baz/qux => /foo/bar\n if (startsWith(to, \"/\")) {\n return to;\n }\n\n var _to$split = to.split(\"?\"),\n toPathname = _to$split[0],\n toQuery = _to$split[1];\n\n var _base$split = base.split(\"?\"),\n basePathname = _base$split[0];\n\n var toSegments = segmentize(toPathname);\n var baseSegments = segmentize(basePathname);\n\n // ?a=b, /users?b=c => /users?a=b\n if (toSegments[0] === \"\") {\n return addQuery(basePathname, toQuery);\n }\n\n // profile, /users/789 => /users/789/profile\n if (!startsWith(toSegments[0], \".\")) {\n var pathname = baseSegments.concat(toSegments).join(\"/\");\n return addQuery((basePathname === \"/\" ? \"\" : \"/\") + pathname, toQuery);\n }\n\n // ./ /users/123 => /users/123\n // ../ /users/123 => /users\n // ../.. /users/123 => /\n // ../../one /a/b/c/d => /a/b/one\n // .././one /a/b/c/d => /a/b/c/one\n var allSegments = baseSegments.concat(toSegments);\n var segments = [];\n for (var i = 0, l = allSegments.length; i < l; i++) {\n var segment = allSegments[i];\n if (segment === \"..\") segments.pop();else if (segment !== \".\") segments.push(segment);\n }\n\n return addQuery(\"/\" + segments.join(\"/\"), toQuery);\n};\n\n////////////////////////////////////////////////////////////////////////////////\n// insertParams(path, params)\nvar insertParams = function insertParams(path, params) {\n var segments = segmentize(path);\n return \"/\" + segments.map(function (segment) {\n var match = paramRe.exec(segment);\n return match ? params[match[1]] : segment;\n }).join(\"/\");\n};\n\nvar validateRedirect = function validateRedirect(from, to) {\n var filter = function filter(segment) {\n return isDynamic(segment);\n };\n var fromString = segmentize(from).filter(filter).sort().join(\"/\");\n var toString = segmentize(to).filter(filter).sort().join(\"/\");\n return fromString === toString;\n};\n\n////////////////////////////////////////////////////////////////////////////////\n// Junk\nvar paramRe = /^:(.+)/;\n\nvar SEGMENT_POINTS = 4;\nvar STATIC_POINTS = 3;\nvar DYNAMIC_POINTS = 2;\nvar SPLAT_PENALTY = 1;\nvar ROOT_POINTS = 1;\n\nvar isRootSegment = function isRootSegment(segment) {\n return segment === \"\";\n};\nvar isDynamic = function isDynamic(segment) {\n return paramRe.test(segment);\n};\nvar isSplat = function isSplat(segment) {\n return segment && segment[0] === \"*\";\n};\n\nvar rankRoute = function rankRoute(route, index) {\n var score = route.default ? 0 : segmentize(route.path).reduce(function (score, segment) {\n score += SEGMENT_POINTS;\n if (isRootSegment(segment)) score += ROOT_POINTS;else if (isDynamic(segment)) score += DYNAMIC_POINTS;else if (isSplat(segment)) score -= SEGMENT_POINTS + SPLAT_PENALTY;else score += STATIC_POINTS;\n return score;\n }, 0);\n return { route: route, score: score, index: index };\n};\n\nvar rankRoutes = function rankRoutes(routes) {\n return routes.map(rankRoute).sort(function (a, b) {\n return a.score < b.score ? 1 : a.score > b.score ? -1 : a.index - b.index;\n });\n};\n\nvar segmentize = function segmentize(uri) {\n return uri\n // strip starting/ending slashes\n .replace(/(^\\/+|\\/+$)/g, \"\").split(\"/\");\n};\n\nvar addQuery = function addQuery(pathname, query) {\n return pathname + (query ? \"?\" + query : \"\");\n};\n\nvar reservedNames = [\"uri\", \"path\"];\n\n/**\n * Shallow compares two objects.\n * @param {Object} obj1 The first object to compare.\n * @param {Object} obj2 The second object to compare.\n */\nvar shallowCompare = function shallowCompare(obj1, obj2) {\n var obj1Keys = Object.keys(obj1);\n return obj1Keys.length === Object.keys(obj2).length && obj1Keys.every(function (key) {\n return obj2.hasOwnProperty(key) && obj1[key] === obj2[key];\n });\n};\n\n////////////////////////////////////////////////////////////////////////////////\nexport { startsWith, pick, match, resolve, insertParams, validateRedirect, shallowCompare };","var _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 getLocation = function getLocation(source) {\n var _source$location = source.location,\n search = _source$location.search,\n hash = _source$location.hash,\n href = _source$location.href,\n origin = _source$location.origin,\n protocol = _source$location.protocol,\n host = _source$location.host,\n hostname = _source$location.hostname,\n port = _source$location.port;\n var pathname = source.location.pathname;\n\n\n if (!pathname && href && canUseDOM) {\n var url = new URL(href);\n pathname = url.pathname;\n }\n\n return {\n pathname: encodeURI(decodeURI(pathname)),\n search: search,\n hash: hash,\n href: href,\n origin: origin,\n protocol: protocol,\n host: host,\n hostname: hostname,\n port: port,\n state: source.history.state,\n key: source.history.state && source.history.state.key || \"initial\"\n };\n};\n\nvar createHistory = function createHistory(source, options) {\n var listeners = [];\n var location = getLocation(source);\n var transitioning = false;\n var resolveTransition = function resolveTransition() {};\n\n return {\n get location() {\n return location;\n },\n\n get transitioning() {\n return transitioning;\n },\n\n _onTransitionComplete: function _onTransitionComplete() {\n transitioning = false;\n resolveTransition();\n },\n listen: function listen(listener) {\n listeners.push(listener);\n\n var popstateListener = function popstateListener() {\n location = getLocation(source);\n listener({ location: location, action: \"POP\" });\n };\n\n source.addEventListener(\"popstate\", popstateListener);\n\n return function () {\n source.removeEventListener(\"popstate\", popstateListener);\n listeners = listeners.filter(function (fn) {\n return fn !== listener;\n });\n };\n },\n navigate: function navigate(to) {\n var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n state = _ref.state,\n _ref$replace = _ref.replace,\n replace = _ref$replace === undefined ? false : _ref$replace;\n\n if (typeof to === \"number\") {\n source.history.go(to);\n } else {\n state = _extends({}, state, { key: Date.now() + \"\" });\n // try...catch iOS Safari limits to 100 pushState calls\n try {\n if (transitioning || replace) {\n source.history.replaceState(state, null, to);\n } else {\n source.history.pushState(state, null, to);\n }\n } catch (e) {\n source.location[replace ? \"replace\" : \"assign\"](to);\n }\n }\n\n location = getLocation(source);\n transitioning = true;\n var transition = new Promise(function (res) {\n return resolveTransition = res;\n });\n listeners.forEach(function (listener) {\n return listener({ location: location, action: \"PUSH\" });\n });\n return transition;\n }\n };\n};\n\n////////////////////////////////////////////////////////////////////////////////\n// Stores history entries in memory for testing or other platforms like Native\nvar createMemorySource = function createMemorySource() {\n var initialPath = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : \"/\";\n\n var searchIndex = initialPath.indexOf(\"?\");\n var initialLocation = {\n pathname: searchIndex > -1 ? initialPath.substr(0, searchIndex) : initialPath,\n search: searchIndex > -1 ? initialPath.substr(searchIndex) : \"\"\n };\n var index = 0;\n var stack = [initialLocation];\n var states = [null];\n\n return {\n get location() {\n return stack[index];\n },\n addEventListener: function addEventListener(name, fn) {},\n removeEventListener: function removeEventListener(name, fn) {},\n\n history: {\n get entries() {\n return stack;\n },\n get index() {\n return index;\n },\n get state() {\n return states[index];\n },\n pushState: function pushState(state, _, uri) {\n var _uri$split = uri.split(\"?\"),\n pathname = _uri$split[0],\n _uri$split$ = _uri$split[1],\n search = _uri$split$ === undefined ? \"\" : _uri$split$;\n\n index++;\n stack.push({ pathname: pathname, search: search.length ? \"?\" + search : search });\n states.push(state);\n },\n replaceState: function replaceState(state, _, uri) {\n var _uri$split2 = uri.split(\"?\"),\n pathname = _uri$split2[0],\n _uri$split2$ = _uri$split2[1],\n search = _uri$split2$ === undefined ? \"\" : _uri$split2$;\n\n stack[index] = { pathname: pathname, search: search };\n states[index] = state;\n },\n go: function go(to) {\n var newIndex = index + to;\n\n if (newIndex < 0 || newIndex > states.length - 1) {\n return;\n }\n\n index = newIndex;\n }\n }\n };\n};\n\n////////////////////////////////////////////////////////////////////////////////\n// global history - uses window.history as the source if available, otherwise a\n// memory history\nvar canUseDOM = !!(typeof window !== \"undefined\" && window.document && window.document.createElement);\nvar getSource = function getSource() {\n return canUseDOM ? window : createMemorySource();\n};\n\nvar globalHistory = createHistory(getSource());\nvar navigate = globalHistory.navigate;\n\n////////////////////////////////////////////////////////////////////////////////\n\nexport { globalHistory, navigate, createHistory, createMemorySource };","var _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\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\n/* eslint-disable jsx-a11y/anchor-has-content */\nimport React, { useContext } from \"react\";\nimport PropTypes from \"prop-types\";\nimport invariant from \"invariant\";\nimport createContext from \"create-react-context\";\nimport { polyfill } from \"react-lifecycles-compat\";\nimport { startsWith, pick, resolve, match, insertParams, validateRedirect, shallowCompare } from \"./lib/utils\";\nimport { globalHistory, navigate, createHistory, createMemorySource } from \"./lib/history\";\n\n////////////////////////////////////////////////////////////////////////////////\n\nvar createNamedContext = function createNamedContext(name, defaultValue) {\n var Ctx = createContext(defaultValue);\n Ctx.displayName = name;\n return Ctx;\n};\n\n////////////////////////////////////////////////////////////////////////////////\n// Location Context/Provider\nvar LocationContext = createNamedContext(\"Location\");\n\n// sets up a listener if there isn't one already so apps don't need to be\n// wrapped in some top level provider\nvar Location = function Location(_ref) {\n var children = _ref.children;\n return React.createElement(\n LocationContext.Consumer,\n null,\n function (context) {\n return context ? children(context) : React.createElement(\n LocationProvider,\n null,\n children\n );\n }\n );\n};\n\nvar LocationProvider = function (_React$Component) {\n _inherits(LocationProvider, _React$Component);\n\n function LocationProvider() {\n var _temp, _this, _ret;\n\n _classCallCheck(this, LocationProvider);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.state = {\n context: _this.getContext(),\n refs: { unlisten: null }\n }, _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n LocationProvider.prototype.getContext = function getContext() {\n var _props$history = this.props.history,\n navigate = _props$history.navigate,\n location = _props$history.location;\n\n return { navigate: navigate, location: location };\n };\n\n LocationProvider.prototype.componentDidCatch = function componentDidCatch(error, info) {\n if (isRedirect(error)) {\n var _navigate = this.props.history.navigate;\n\n _navigate(error.uri, { replace: true });\n } else {\n throw error;\n }\n };\n\n LocationProvider.prototype.componentDidUpdate = function componentDidUpdate(prevProps, prevState) {\n if (prevState.context.location !== this.state.context.location) {\n this.props.history._onTransitionComplete();\n }\n };\n\n LocationProvider.prototype.componentDidMount = function componentDidMount() {\n var _this2 = this;\n\n var refs = this.state.refs,\n history = this.props.history;\n\n history._onTransitionComplete();\n refs.unlisten = history.listen(function () {\n Promise.resolve().then(function () {\n // TODO: replace rAF with react deferred update API when it's ready https://github.com/facebook/react/issues/13306\n requestAnimationFrame(function () {\n if (!_this2.unmounted) {\n _this2.setState(function () {\n return { context: _this2.getContext() };\n });\n }\n });\n });\n });\n };\n\n LocationProvider.prototype.componentWillUnmount = function componentWillUnmount() {\n var refs = this.state.refs;\n\n this.unmounted = true;\n refs.unlisten();\n };\n\n LocationProvider.prototype.render = function render() {\n var context = this.state.context,\n children = this.props.children;\n\n return React.createElement(\n LocationContext.Provider,\n { value: context },\n typeof children === \"function\" ? children(context) : children || null\n );\n };\n\n return LocationProvider;\n}(React.Component);\n\n////////////////////////////////////////////////////////////////////////////////\n\n\nLocationProvider.defaultProps = {\n history: globalHistory\n};\nprocess.env.NODE_ENV !== \"production\" ? LocationProvider.propTypes = {\n history: PropTypes.object.isRequired\n} : void 0;\nvar ServerLocation = function ServerLocation(_ref2) {\n var url = _ref2.url,\n children = _ref2.children;\n\n var searchIndex = url.indexOf(\"?\");\n var searchExists = searchIndex > -1;\n var pathname = void 0;\n var search = \"\";\n var hash = \"\";\n\n if (searchExists) {\n pathname = url.substring(0, searchIndex);\n search = url.substring(searchIndex);\n } else {\n pathname = url;\n }\n\n return React.createElement(\n LocationContext.Provider,\n {\n value: {\n location: {\n pathname: pathname,\n search: search,\n hash: hash\n },\n navigate: function navigate() {\n throw new Error(\"You can't call navigate on the server.\");\n }\n }\n },\n children\n );\n};\n////////////////////////////////////////////////////////////////////////////////\n// Sets baseuri and basepath for nested routers and links\nvar BaseContext = createNamedContext(\"Base\", { baseuri: \"/\", basepath: \"/\" });\n\n////////////////////////////////////////////////////////////////////////////////\n// The main event, welcome to the show everybody.\nvar Router = function Router(props) {\n return React.createElement(\n BaseContext.Consumer,\n null,\n function (baseContext) {\n return React.createElement(\n Location,\n null,\n function (locationContext) {\n return React.createElement(RouterImpl, _extends({}, baseContext, locationContext, props));\n }\n );\n }\n );\n};\n\nvar RouterImpl = function (_React$PureComponent) {\n _inherits(RouterImpl, _React$PureComponent);\n\n function RouterImpl() {\n _classCallCheck(this, RouterImpl);\n\n return _possibleConstructorReturn(this, _React$PureComponent.apply(this, arguments));\n }\n\n RouterImpl.prototype.render = function render() {\n var _props = this.props,\n location = _props.location,\n _navigate2 = _props.navigate,\n basepath = _props.basepath,\n primary = _props.primary,\n children = _props.children,\n baseuri = _props.baseuri,\n _props$component = _props.component,\n component = _props$component === undefined ? \"div\" : _props$component,\n domProps = _objectWithoutProperties(_props, [\"location\", \"navigate\", \"basepath\", \"primary\", \"children\", \"baseuri\", \"component\"]);\n\n var routes = React.Children.toArray(children).reduce(function (array, child) {\n var routes = createRoute(basepath)(child);\n return array.concat(routes);\n }, []);\n var pathname = location.pathname;\n\n\n var match = pick(routes, pathname);\n\n if (match) {\n var params = match.params,\n uri = match.uri,\n route = match.route,\n element = match.route.value;\n\n // remove the /* from the end for child routes relative paths\n\n basepath = route.default ? basepath : route.path.replace(/\\*$/, \"\");\n\n var props = _extends({}, params, {\n uri: uri,\n location: location,\n navigate: function navigate(to, options) {\n return _navigate2(resolve(to, uri), options);\n }\n });\n\n var clone = React.cloneElement(element, props, element.props.children ? React.createElement(\n Router,\n { location: location, primary: primary },\n element.props.children\n ) : undefined);\n\n // using 'div' for < 16.3 support\n var FocusWrapper = primary ? FocusHandler : component;\n // don't pass any props to 'div'\n var wrapperProps = primary ? _extends({ uri: uri, location: location, component: component }, domProps) : domProps;\n\n return React.createElement(\n BaseContext.Provider,\n { value: { baseuri: uri, basepath: basepath } },\n React.createElement(\n FocusWrapper,\n wrapperProps,\n clone\n )\n );\n } else {\n // Not sure if we want this, would require index routes at every level\n // warning(\n // false,\n // `\\n\\nNothing matched:\\n\\t${\n // location.pathname\n // }\\n\\nPaths checked: \\n\\t${routes\n // .map(route => route.path)\n // .join(\n // \"\\n\\t\"\n // )}\\n\\nTo get rid of this warning, add a default NotFound component as child of Router:\n // \\n\\tlet NotFound = () =>
Not Found!
\n // \\n\\t\\n\\t \\n\\t {/* ... */}\\n\\t`\n // );\n return null;\n }\n };\n\n return RouterImpl;\n}(React.PureComponent);\n\nRouterImpl.defaultProps = {\n primary: true\n};\n\n\nvar FocusContext = createNamedContext(\"Focus\");\n\nvar FocusHandler = function FocusHandler(_ref3) {\n var uri = _ref3.uri,\n location = _ref3.location,\n component = _ref3.component,\n domProps = _objectWithoutProperties(_ref3, [\"uri\", \"location\", \"component\"]);\n\n return React.createElement(\n FocusContext.Consumer,\n null,\n function (requestFocus) {\n return React.createElement(FocusHandlerImpl, _extends({}, domProps, {\n component: component,\n requestFocus: requestFocus,\n uri: uri,\n location: location\n }));\n }\n );\n};\n\n// don't focus on initial render\nvar initialRender = true;\nvar focusHandlerCount = 0;\n\nvar FocusHandlerImpl = function (_React$Component2) {\n _inherits(FocusHandlerImpl, _React$Component2);\n\n function FocusHandlerImpl() {\n var _temp2, _this4, _ret2;\n\n _classCallCheck(this, FocusHandlerImpl);\n\n for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n return _ret2 = (_temp2 = (_this4 = _possibleConstructorReturn(this, _React$Component2.call.apply(_React$Component2, [this].concat(args))), _this4), _this4.state = {}, _this4.requestFocus = function (node) {\n if (!_this4.state.shouldFocus && node) {\n node.focus();\n }\n }, _temp2), _possibleConstructorReturn(_this4, _ret2);\n }\n\n FocusHandlerImpl.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps, prevState) {\n var initial = prevState.uri == null;\n if (initial) {\n return _extends({\n shouldFocus: true\n }, nextProps);\n } else {\n var myURIChanged = nextProps.uri !== prevState.uri;\n var navigatedUpToMe = prevState.location.pathname !== nextProps.location.pathname && nextProps.location.pathname === nextProps.uri;\n return _extends({\n shouldFocus: myURIChanged || navigatedUpToMe\n }, nextProps);\n }\n };\n\n FocusHandlerImpl.prototype.componentDidMount = function componentDidMount() {\n focusHandlerCount++;\n this.focus();\n };\n\n FocusHandlerImpl.prototype.componentWillUnmount = function componentWillUnmount() {\n focusHandlerCount--;\n if (focusHandlerCount === 0) {\n initialRender = true;\n }\n };\n\n FocusHandlerImpl.prototype.componentDidUpdate = function componentDidUpdate(prevProps, prevState) {\n if (prevProps.location !== this.props.location && this.state.shouldFocus) {\n this.focus();\n }\n };\n\n FocusHandlerImpl.prototype.focus = function focus() {\n if (process.env.NODE_ENV === \"test\") {\n // getting cannot read property focus of null in the tests\n // and that bit of global `initialRender` state causes problems\n // should probably figure it out!\n return;\n }\n\n var requestFocus = this.props.requestFocus;\n\n\n if (requestFocus) {\n requestFocus(this.node);\n } else {\n if (initialRender) {\n initialRender = false;\n } else if (this.node) {\n // React polyfills [autofocus] and it fires earlier than cDM,\n // so we were stealing focus away, this line prevents that.\n if (!this.node.contains(document.activeElement)) {\n this.node.focus();\n }\n }\n }\n };\n\n FocusHandlerImpl.prototype.render = function render() {\n var _this5 = this;\n\n var _props2 = this.props,\n children = _props2.children,\n style = _props2.style,\n requestFocus = _props2.requestFocus,\n _props2$component = _props2.component,\n Comp = _props2$component === undefined ? \"div\" : _props2$component,\n uri = _props2.uri,\n location = _props2.location,\n domProps = _objectWithoutProperties(_props2, [\"children\", \"style\", \"requestFocus\", \"component\", \"uri\", \"location\"]);\n\n return React.createElement(\n Comp,\n _extends({\n style: _extends({ outline: \"none\" }, style),\n tabIndex: \"-1\",\n ref: function ref(n) {\n return _this5.node = n;\n }\n }, domProps),\n React.createElement(\n FocusContext.Provider,\n { value: this.requestFocus },\n this.props.children\n )\n );\n };\n\n return FocusHandlerImpl;\n}(React.Component);\n\npolyfill(FocusHandlerImpl);\n\nvar k = function k() {};\n\n////////////////////////////////////////////////////////////////////////////////\nvar forwardRef = React.forwardRef;\n\nif (typeof forwardRef === \"undefined\") {\n forwardRef = function forwardRef(C) {\n return C;\n };\n}\n\nvar Link = forwardRef(function (_ref4, ref) {\n var innerRef = _ref4.innerRef,\n props = _objectWithoutProperties(_ref4, [\"innerRef\"]);\n\n return React.createElement(\n BaseContext.Consumer,\n null,\n function (_ref5) {\n var basepath = _ref5.basepath,\n baseuri = _ref5.baseuri;\n return React.createElement(\n Location,\n null,\n function (_ref6) {\n var location = _ref6.location,\n navigate = _ref6.navigate;\n\n var to = props.to,\n state = props.state,\n replace = props.replace,\n _props$getProps = props.getProps,\n getProps = _props$getProps === undefined ? k : _props$getProps,\n anchorProps = _objectWithoutProperties(props, [\"to\", \"state\", \"replace\", \"getProps\"]);\n\n var href = resolve(to, baseuri);\n var encodedHref = encodeURI(href);\n var isCurrent = location.pathname === encodedHref;\n var isPartiallyCurrent = startsWith(location.pathname, encodedHref);\n\n return React.createElement(\"a\", _extends({\n ref: ref || innerRef,\n \"aria-current\": isCurrent ? \"page\" : undefined\n }, anchorProps, getProps({ isCurrent: isCurrent, isPartiallyCurrent: isPartiallyCurrent, href: href, location: location }), {\n href: href,\n onClick: function onClick(event) {\n if (anchorProps.onClick) anchorProps.onClick(event);\n if (shouldNavigate(event)) {\n event.preventDefault();\n var shouldReplace = replace;\n if (typeof replace !== \"boolean\" && isCurrent) {\n var _location$state = _extends({}, location.state),\n key = _location$state.key,\n restState = _objectWithoutProperties(_location$state, [\"key\"]);\n\n shouldReplace = shallowCompare(_extends({}, state), restState);\n }\n navigate(href, {\n state: state,\n replace: shouldReplace\n });\n }\n }\n }));\n }\n );\n }\n );\n});\n\nLink.displayName = \"Link\";\n\nprocess.env.NODE_ENV !== \"production\" ? Link.propTypes = {\n to: PropTypes.string.isRequired\n} : void 0;\n\n////////////////////////////////////////////////////////////////////////////////\nfunction RedirectRequest(uri) {\n this.uri = uri;\n}\n\nvar isRedirect = function isRedirect(o) {\n return o instanceof RedirectRequest;\n};\n\nvar redirectTo = function redirectTo(to) {\n throw new RedirectRequest(to);\n};\n\nvar RedirectImpl = function (_React$Component3) {\n _inherits(RedirectImpl, _React$Component3);\n\n function RedirectImpl() {\n _classCallCheck(this, RedirectImpl);\n\n return _possibleConstructorReturn(this, _React$Component3.apply(this, arguments));\n }\n\n // Support React < 16 with this hook\n RedirectImpl.prototype.componentDidMount = function componentDidMount() {\n var _props3 = this.props,\n navigate = _props3.navigate,\n to = _props3.to,\n from = _props3.from,\n _props3$replace = _props3.replace,\n replace = _props3$replace === undefined ? true : _props3$replace,\n state = _props3.state,\n noThrow = _props3.noThrow,\n baseuri = _props3.baseuri,\n props = _objectWithoutProperties(_props3, [\"navigate\", \"to\", \"from\", \"replace\", \"state\", \"noThrow\", \"baseuri\"]);\n\n Promise.resolve().then(function () {\n var resolvedTo = resolve(to, baseuri);\n navigate(insertParams(resolvedTo, props), { replace: replace, state: state });\n });\n };\n\n RedirectImpl.prototype.render = function render() {\n var _props4 = this.props,\n navigate = _props4.navigate,\n to = _props4.to,\n from = _props4.from,\n replace = _props4.replace,\n state = _props4.state,\n noThrow = _props4.noThrow,\n baseuri = _props4.baseuri,\n props = _objectWithoutProperties(_props4, [\"navigate\", \"to\", \"from\", \"replace\", \"state\", \"noThrow\", \"baseuri\"]);\n\n var resolvedTo = resolve(to, baseuri);\n if (!noThrow) redirectTo(insertParams(resolvedTo, props));\n return null;\n };\n\n return RedirectImpl;\n}(React.Component);\n\nvar Redirect = function Redirect(props) {\n return React.createElement(\n BaseContext.Consumer,\n null,\n function (_ref7) {\n var baseuri = _ref7.baseuri;\n return React.createElement(\n Location,\n null,\n function (locationContext) {\n return React.createElement(RedirectImpl, _extends({}, locationContext, { baseuri: baseuri }, props));\n }\n );\n }\n );\n};\n\nprocess.env.NODE_ENV !== \"production\" ? Redirect.propTypes = {\n from: PropTypes.string,\n to: PropTypes.string.isRequired\n} : void 0;\n\n////////////////////////////////////////////////////////////////////////////////\nvar Match = function Match(_ref8) {\n var path = _ref8.path,\n children = _ref8.children;\n return React.createElement(\n BaseContext.Consumer,\n null,\n function (_ref9) {\n var baseuri = _ref9.baseuri;\n return React.createElement(\n Location,\n null,\n function (_ref10) {\n var navigate = _ref10.navigate,\n location = _ref10.location;\n\n var resolvedPath = resolve(path, baseuri);\n var result = match(resolvedPath, location.pathname);\n return children({\n navigate: navigate,\n location: location,\n match: result ? _extends({}, result.params, {\n uri: result.uri,\n path: path\n }) : null\n });\n }\n );\n }\n );\n};\n\n////////////////////////////////////////////////////////////////////////////////\n// Hooks\n\nvar useLocation = function useLocation() {\n var context = useContext(LocationContext);\n\n if (!context) {\n throw new Error(\"useLocation hook was used but a LocationContext.Provider was not found in the parent tree. Make sure this is used in a component that is a child of Router\");\n }\n\n return context.location;\n};\n\nvar useNavigate = function useNavigate() {\n var context = useContext(LocationContext);\n\n if (!context) {\n throw new Error(\"useNavigate hook was used but a LocationContext.Provider was not found in the parent tree. Make sure this is used in a component that is a child of Router\");\n }\n\n return context.navigate;\n};\n\nvar useParams = function useParams() {\n var context = useContext(BaseContext);\n\n if (!context) {\n throw new Error(\"useParams hook was used but a LocationContext.Provider was not found in the parent tree. Make sure this is used in a component that is a child of Router\");\n }\n\n var location = useLocation();\n\n var results = match(context.basepath, location.pathname);\n\n return results ? results.params : null;\n};\n\nvar useMatch = function useMatch(path) {\n if (!path) {\n throw new Error(\"useMatch(path: string) requires an argument of a string to match against\");\n }\n var context = useContext(BaseContext);\n\n if (!context) {\n throw new Error(\"useMatch hook was used but a LocationContext.Provider was not found in the parent tree. Make sure this is used in a component that is a child of Router\");\n }\n\n var location = useLocation();\n\n var resolvedPath = resolve(path, context.baseuri);\n var result = match(resolvedPath, location.pathname);\n return result ? _extends({}, result.params, {\n uri: result.uri,\n path: path\n }) : null;\n};\n\n////////////////////////////////////////////////////////////////////////////////\n// Junk\nvar stripSlashes = function stripSlashes(str) {\n return str.replace(/(^\\/+|\\/+$)/g, \"\");\n};\n\nvar createRoute = function createRoute(basepath) {\n return function (element) {\n if (!element) {\n return null;\n }\n\n if (element.type === React.Fragment && element.props.children) {\n return React.Children.map(element.props.children, createRoute(basepath));\n }\n !(element.props.path || element.props.default || element.type === Redirect) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \": Children of must have a `path` or `default` prop, or be a ``. None found on element type `\" + element.type + \"`\") : invariant(false) : void 0;\n\n !!(element.type === Redirect && (!element.props.from || !element.props.to)) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \" requires both \\\"from\\\" and \\\"to\\\" props when inside a .\") : invariant(false) : void 0;\n\n !!(element.type === Redirect && !validateRedirect(element.props.from, element.props.to)) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \" has mismatched dynamic segments, ensure both paths have the exact same dynamic segments.\") : invariant(false) : void 0;\n\n if (element.props.default) {\n return { value: element, default: true };\n }\n\n var elementPath = element.type === Redirect ? element.props.from : element.props.path;\n\n var path = elementPath === \"/\" ? basepath : stripSlashes(basepath) + \"/\" + stripSlashes(elementPath);\n\n return {\n value: element,\n default: element.props.default,\n path: element.props.children ? stripSlashes(path) + \"/*\" : path\n };\n };\n};\n\nvar shouldNavigate = function shouldNavigate(event) {\n return !event.defaultPrevented && event.button === 0 && !(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey);\n};\n\n////////////////////////////////////////////////////////////////////////\nexport { Link, Location, LocationProvider, Match, Redirect, Router, ServerLocation, createHistory, createMemorySource, isRedirect, navigate, redirectTo, globalHistory, match as matchPath, useLocation, useNavigate, useParams, useMatch };","'use strict';\nmodule.exports = str => encodeURIComponent(str).replace(/[!'()*]/g, x => `%${x.charCodeAt(0).toString(16).toUpperCase()}`);\n","'use strict';\nvar token = '%[a-f0-9]{2}';\nvar singleMatcher = new RegExp(token, 'gi');\nvar multiMatcher = new RegExp('(' + token + ')+', 'gi');\n\nfunction decodeComponents(components, split) {\n\ttry {\n\t\t// Try to decode the entire string first\n\t\treturn decodeURIComponent(components.join(''));\n\t} catch (err) {\n\t\t// Do nothing\n\t}\n\n\tif (components.length === 1) {\n\t\treturn components;\n\t}\n\n\tsplit = split || 1;\n\n\t// Split the array in 2 parts\n\tvar left = components.slice(0, split);\n\tvar right = components.slice(split);\n\n\treturn Array.prototype.concat.call([], decodeComponents(left), decodeComponents(right));\n}\n\nfunction decode(input) {\n\ttry {\n\t\treturn decodeURIComponent(input);\n\t} catch (err) {\n\t\tvar tokens = input.match(singleMatcher);\n\n\t\tfor (var i = 1; i < tokens.length; i++) {\n\t\t\tinput = decodeComponents(tokens, i).join('');\n\n\t\t\ttokens = input.match(singleMatcher);\n\t\t}\n\n\t\treturn input;\n\t}\n}\n\nfunction customDecodeURIComponent(input) {\n\t// Keep track of all the replacements and prefill the map with the `BOM`\n\tvar replaceMap = {\n\t\t'%FE%FF': '\\uFFFD\\uFFFD',\n\t\t'%FF%FE': '\\uFFFD\\uFFFD'\n\t};\n\n\tvar match = multiMatcher.exec(input);\n\twhile (match) {\n\t\ttry {\n\t\t\t// Decode as big chunks as possible\n\t\t\treplaceMap[match[0]] = decodeURIComponent(match[0]);\n\t\t} catch (err) {\n\t\t\tvar result = decode(match[0]);\n\n\t\t\tif (result !== match[0]) {\n\t\t\t\treplaceMap[match[0]] = result;\n\t\t\t}\n\t\t}\n\n\t\tmatch = multiMatcher.exec(input);\n\t}\n\n\t// Add `%C2` at the end of the map to make sure it does not replace the combinator before everything else\n\treplaceMap['%C2'] = '\\uFFFD';\n\n\tvar entries = Object.keys(replaceMap);\n\n\tfor (var i = 0; i < entries.length; i++) {\n\t\t// Replace all decoded components\n\t\tvar key = entries[i];\n\t\tinput = input.replace(new RegExp(key, 'g'), replaceMap[key]);\n\t}\n\n\treturn input;\n}\n\nmodule.exports = function (encodedURI) {\n\tif (typeof encodedURI !== 'string') {\n\t\tthrow new TypeError('Expected `encodedURI` to be of type `string`, got `' + typeof encodedURI + '`');\n\t}\n\n\ttry {\n\t\tencodedURI = encodedURI.replace(/\\+/g, ' ');\n\n\t\t// Try the built in decoder first\n\t\treturn decodeURIComponent(encodedURI);\n\t} catch (err) {\n\t\t// Fallback to a more advanced decoder\n\t\treturn customDecodeURIComponent(encodedURI);\n\t}\n};\n","'use strict';\n\nmodule.exports = (string, separator) => {\n\tif (!(typeof string === 'string' && typeof separator === 'string')) {\n\t\tthrow new TypeError('Expected the arguments to be of type `string`');\n\t}\n\n\tif (separator === '') {\n\t\treturn [string];\n\t}\n\n\tconst separatorIndex = string.indexOf(separator);\n\n\tif (separatorIndex === -1) {\n\t\treturn [string];\n\t}\n\n\treturn [\n\t\tstring.slice(0, separatorIndex),\n\t\tstring.slice(separatorIndex + separator.length)\n\t];\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\n/**\n * Use invariant() to assert state which your program assumes to be true.\n *\n * Provide sprintf-style format (only %s is supported) and arguments\n * to provide information about what broke and what you were\n * expecting.\n *\n * The invariant message will be stripped in production, but the invariant\n * will remain to ensure logic does not differ in production.\n */\n\nvar invariant = function(condition, format, a, b, c, d, e, f) {\n if (process.env.NODE_ENV !== 'production') {\n if (format === undefined) {\n throw new Error('invariant requires an error message argument');\n }\n }\n\n if (!condition) {\n var error;\n if (format === undefined) {\n error = new Error(\n 'Minified exception occurred; use the non-minified dev environment ' +\n 'for the full error message and additional helpful warnings.'\n );\n } else {\n var args = [a, b, c, d, e, f];\n var argIndex = 0;\n error = new Error(\n format.replace(/%s/g, function() { return args[argIndex++]; })\n );\n error.name = 'Invariant Violation';\n }\n\n error.framesToPop = 1; // we don't care about invariant's own frame\n throw error;\n }\n};\n\nmodule.exports = invariant;\n"],"sourceRoot":""}