{"version":3,"sources":["../../src/index.tsx","../../../../../../../Users/work/Sites/hyla-center/frontend/node_modules/@reach/router/es/lib/utils.js","../../../../../../../Users/work/Sites/hyla-center/frontend/node_modules/@reach/router/es/lib/history.js","../../../../../../../Users/work/Sites/hyla-center/frontend/node_modules/@reach/router/es/index.js"],"names":["useIsomorphicLayoutEffect","canUseDOM","React","useEffect","checkStyles","noop","window","self","assignRef","ref","value","isFunction","getOwnerDocument","element","isString","useForkedRef","refs","useMemo","usePrevious","useRef","wrapEvent","theirHandler","ourHandler","event","children","type","mountNode","portalNode","forceUpdate","useState","ownerDocument","createPortal","forwardRef","style","border","clip","height","margin","overflow","padding","position","width","whiteSpace","wordWrap","keys","polite","assertive","elements","liveRegions","Alert","regionType","props","ownRef","child","prevType","mirror","mounted","createMirror","useMirrorEffects","key","mount","renderAlerts","node","doc","update","unmount","renderTimer","Object","render","role","PropTypes","func","DialogOverlay","isOpen","forwardedRef","DialogInner","allowPinchZoom","dangerouslyBypassFocusLock","dangerouslyBypassScrollLock","initialFocusRef","onClick","onDismiss","onKeyDown","onMouseDown","unstable_lockFocusAcrossFrames","mouseDownTarget","overlayNode","activateFocusLock","useCallback","dialogNode","originalValues","rootNodes","Array","attr","originalValue","createAriaHider","autoFocus","returnFocus","onActivation","disabled","crossFrame","enabled","DialogContent","tabIndex","Dialog","startsWith","string","search","substr","length","pick","routes","uri","match","default_","uriPathname","split","uriSegments","segmentize","isRootUri","ranked","rankRoutes","i","l","missed","route","default","params","routeSegments","path","max","Math","index","routeSegment","uriSegment","isSplat","slice","map","decodeURIComponent","join","undefined","dynamicMatch","paramRe","exec","reservedNames","indexOf","invariant","resolve","to","base","_to$split","toPathname","toQuery","basePathname","toSegments","baseSegments","addQuery","pathname","concat","allSegments","segments","segment","pop","push","insertParams","_path$split","pathBase","_path$split$","query","constructedPath","_params$location","location","_params$location$sear","searchSplit","isDynamic","test","rankRoute","score","reduce","isRootSegment","SEGMENT_POINTS","sort","a","b","replace","_len","arguments","_key","filter","q","_extends","assign","target","source","prototype","hasOwnProperty","call","getLocation","_source$location","hash","href","origin","protocol","host","hostname","port","URL","encodeURI","decodeURI","state","history","document","createElement","globalHistory","options","listeners","transitioning","resolveTransition","_onTransitionComplete","listen","listener","popstateListener","action","addEventListener","removeEventListener","fn","navigate","_ref","_ref$replace","go","Date","now","replaceState","pushState","e","transition","Promise","res","forEach","createHistory","initialPath","searchIndex","initialLocation","stack","states","name","entries","_","_uri$split","_uri$split$","_uri$split2","_uri$split2$","newIndex","createMemorySource","_objectWithoutProperties","obj","_classCallCheck","instance","Constructor","TypeError","_possibleConstructorReturn","ReferenceError","_inherits","subClass","superClass","create","constructor","enumerable","writable","configurable","setPrototypeOf","__proto__","createNamedContext","defaultValue","Ctx","createContext","displayName","LocationContext","Location","Consumer","context","LocationProvider","_React$Component","_temp","_this","this","args","apply","getContext","unlisten","_props$history","componentDidCatch","error","info","isRedirect","_navigate","componentDidUpdate","prevProps","prevState","componentDidMount","_this2","then","requestAnimationFrame","unmounted","setState","componentWillUnmount","Provider","Component","defaultProps","BaseContext","baseuri","basepath","Router","baseContext","locationContext","RouterImpl","_React$PureComponent","_props","_navigate2","primary","_props$component","component","domProps","Children","toArray","array","createRoute","clone","cloneElement","FocusWrapper","FocusHandler","wrapperProps","PureComponent","FocusContext","_ref3","requestFocus","FocusHandlerImpl","initialRender","focusHandlerCount","_React$Component2","_temp2","_this4","_len2","_key2","shouldFocus","focus","getDerivedStateFromProps","nextProps","myURIChanged","navigatedUpToMe","contains","activeElement","_this5","_props2","_props2$component","Comp","outline","n","polyfill","k","C","Link","_ref4","innerRef","_ref5","_ref6","_props$getProps","getProps","anchorProps","encodedHref","isCurrent","isPartiallyCurrent","shouldNavigate","preventDefault","shouldReplace","_location$state","restState","obj1","obj2","obj1Keys","every","shallowCompare","RedirectRequest","o","RedirectImpl","_React$Component3","_props3","_props3$replace","from","noThrow","resolvedTo","_props4","redirectTo","Redirect","_ref7","useLocation","useContext","Error","useNavigate","stripSlashes","str","Fragment","validateRedirect","elementPath","defaultPrevented","button","metaKey","altKey","ctrlKey","shiftKey"],"mappings":"yYA2DaA,G,OAA4BC,IACrCC,IAD8C,gBAE9CA,IAAMC,WAgBNC,EAA6CC,EAiD/C,4BAAgCC,aAAhC,YAEI,0BAA8BC,WAA9B,W,SAWUC,EACdC,EACAC,GAEA,SAAID,EACF,GAAEE,EAAJ,GACEF,UAEA,IACEA,YACA,SACA,MAAM,mDAAN,M,SAcUR,IACZ,QACA,8BACAK,OADA,WAEAA,gBAHF,e,SAgIcM,EACdC,GAEE,OAAKA,GAAWA,EAAXA,cACHA,EADGA,cAEHZ,IAAS,SAFb,K,SA0CcU,EAAWD,GACzB,SAAUA,GAAV,qBAAmB,qB,SA0BLI,EAASJ,GACvB,wBAAO,E,SAeOL,K,SA+NAU,I,2BACXC,6CAEH,OAAOC,mBAAQ,WACb,OAAI,SAAW,yBAASR,KACtB,KAEK,YACLO,WAAa,YACXR,EAAS,EAATA,SANQ,UAAd,I,SAkBcU,EAA6BR,GAC3C,IAAMD,EAAMU,iBAAZ,MAIA,OAHAhB,qBAAU,WACRM,cACC,CAFHN,IAGOM,EAAP,Q,SA6DcW,EACdC,EACAC,GAEA,OAAO,YAEL,GADAD,GAAgBA,EAAhBA,IACKE,EAAL,iBACE,OAAOD,EAAP,M,0EApqBgC,Y,IAAGE,a,IAAUC,kBAAO,iBACpDC,EAAYP,iBAAhB,MACIQ,EAAaR,iBAAjB,MACOS,EAAeC,qBAAfD,GAkBP,OAhBA5B,aAA0B,WAExB,GAAK0B,EAAL,SAGA,IAAMI,EAAgBJ,UAAtB,cAIA,OAHAC,iBAAqBG,QAArBH,IAAqBG,OAArBH,EAAqBG,gBAArBH,GACAG,mBAAgCH,EAAhCG,SACAF,MACO,WACDD,WAAsBA,UAA1B,eACEA,yCAAkDA,EAAlDA,aAGH,CAdH3B,IAgBO2B,UACLI,uBAAY,EAAWJ,EADlBA,SAGL,0BAAMlB,IAAKiB,M,sGA1BQM,sBA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CAAiBrY,EAAQsC,MAAMiV,KAAMvX,EAAQsC,MAAMiG,KAA4OF,KAAU,GAEtUrI,EAAQsC,MAAM2E,QAChB,MAAO,CAAEpH,MAAOG,EAASiH,SAAS,GAGpC,IAAIqR,EAActY,EAAQY,OAASgX,EAAW5X,EAAQsC,MAAMiV,KAAOvX,EAAQsC,MAAM8E,KAE7EA,EAAuB,MAAhBkR,EAAsB5F,EAAWwF,EAAaxF,GAAY,IAAMwF,EAAaI,GAExF,MAAO,CACLzY,MAAOG,EACPiH,QAASjH,EAAQsC,MAAM2E,QACvBG,KAAMpH,EAAQsC,MAAM3B,SAAWuX,EAAa9Q,GAAQ,KAAOA,KAK7DmP,GAAiB,SAAwB7V,GAC3C,OAAQA,EAAM6X,kBAAqC,IAAjB7X,EAAM8X,UAAkB9X,EAAM+X,SAAW/X,EAAMgY,QAAUhY,EAAMiY,SAAWjY,EAAMkY","file":"static/js/reach.f4e37d31.chunk.js","sourcesContent":["/* eslint-disable jsx-a11y/no-static-element-interactions */\n\n/**\n * Welcome to @reach/dialog!\n *\n * An accessible dialog or \"modal\" window.\n *\n * @see Docs https://reacttraining.com/reach-ui/dialog\n * @see Source https://github.com/reach/reach-ui/tree/main/packages/dialog\n * @see WAI-ARIA https://www.w3.org/TR/wai-aria-practices-1.2/#dialog_modal\n */\n\nimport React, { forwardRef, useCallback, useEffect, useRef } from \"react\";\nimport Portal from \"@reach/portal\";\nimport {\n checkStyles,\n getOwnerDocument,\n isString,\n noop,\n useForkedRef,\n wrapEvent,\n} from \"@reach/utils\";\nimport FocusLock from \"react-focus-lock\";\nimport { RemoveScroll } from \"react-remove-scroll\";\nimport PropTypes from \"prop-types\";\n\nconst overlayPropTypes = {\n allowPinchZoom: PropTypes.bool,\n dangerouslyBypassFocusLock: PropTypes.bool,\n dangerouslyBypassScrollLock: PropTypes.bool,\n // TODO:\n initialFocusRef: () => null,\n onDismiss: PropTypes.func,\n};\n\n////////////////////////////////////////////////////////////////////////////////\n\n/**\n * DialogOverlay\n *\n * Low-level component if you need more control over the styles or rendering of\n * the dialog overlay.\n *\n * Note: You must render a `DialogContent` inside.\n *\n * @see Docs https://reacttraining.com/reach-ui/dialog#dialogoverlay\n */\nexport const DialogOverlay = forwardRef(\n function DialogOverlay({ isOpen = true, ...props }, forwardedRef) {\n useEffect(() => checkStyles(\"dialog\"), []);\n\n // We want to ignore the immediate focus of a tooltip so it doesn't pop\n // up again when the menu closes, only pops up when focus returns again\n // to the tooltip (like native OS tooltips).\n useEffect(() => {\n if (isOpen) {\n // @ts-ignore\n window.__REACH_DISABLE_TOOLTIPS = true;\n } else {\n window.requestAnimationFrame(() => {\n // Wait a frame so that this doesn't fire before tooltip does\n // @ts-ignore\n window.__REACH_DISABLE_TOOLTIPS = false;\n });\n }\n }, [isOpen]);\n\n return isOpen ? (\n \n \n \n ) : null;\n }\n);\n\nif (__DEV__) {\n DialogOverlay.displayName = \"DialogOverlay\";\n DialogOverlay.propTypes = {\n ...overlayPropTypes,\n isOpen: PropTypes.bool,\n };\n}\n\nexport type DialogOverlayProps = DialogProps & {\n /**\n * By default the dialog locks the focus inside it. Normally this is what you\n * want. This prop is provided so that this feature can be disabled. This,\n * however, is strongly discouraged.\n *\n * The reason it is provided is not to disable the focus lock entirely.\n * Rather, there are certain situations where you may need more control on how\n * the focus lock works. This should be complemented by setting up a focus\n * lock yourself that would allow more flexibility for your specific use case.\n *\n * If you do set this prop to `true`, make sure you set up your own\n * `FocusLock` component. You can likely use\n * `react-focus-lock`, which is what Reach uses internally by default. It has\n * various settings to allow more customization, but it takes care of a lot of\n * hard work that you probably don't want or need to do.\n *\n * @see Docs https://reacttraining.com/reach-ui/dialog#dialogoverlay-dangerouslybypassfocuslock\n * @see https://github.com/theKashey/react-focus-lock\n * @see https://github.com/reach/reach-ui/issues/615\n */\n dangerouslyBypassFocusLock?: boolean;\n /**\n * By default the dialog locks scrolling with `react-remove-scroll`, which\n * also injecs some styles on the body element to remove the scrollbar while\n * maintaining its gap to prevent jank when the dialog's open state is\n * toggled. This is almost always what you want in a dialog, but in some cases\n * you may have the need to customize this behavior further.\n *\n * This prop will disable `react-remove-scroll` and allow you to compose your\n * own scroll lock component to meet your needs. Like the\n * `dangerouslyBypassFocusLock` prop, this is generally discouraged and should\n * only be used if a proper fallback for managing scroll behavior is provided.\n *\n * @see Docs https://reacttraining.com/reach-ui/dialog#dialogoverlay-dangerouslybypassscrolllock\n * @see https://github.com/theKashey/react-remove-scroll\n */\n dangerouslyBypassScrollLock?: boolean;\n};\n\n////////////////////////////////////////////////////////////////////////////////\n\n/**\n * DialogInner\n */\nconst DialogInner = forwardRef(\n function DialogInner(\n {\n allowPinchZoom,\n dangerouslyBypassFocusLock = false,\n dangerouslyBypassScrollLock = false,\n initialFocusRef,\n onClick,\n onDismiss = noop,\n onKeyDown,\n onMouseDown,\n unstable_lockFocusAcrossFrames = true,\n ...props\n },\n forwardedRef\n ) {\n const mouseDownTarget = useRef(null);\n const overlayNode = useRef(null);\n const ref = useForkedRef(overlayNode, forwardedRef);\n\n const activateFocusLock = useCallback(() => {\n if (initialFocusRef && initialFocusRef.current) {\n initialFocusRef.current.focus();\n }\n }, [initialFocusRef]);\n\n function handleClick(event: React.MouseEvent) {\n if (mouseDownTarget.current === event.target) {\n event.stopPropagation();\n onDismiss(event);\n }\n }\n\n function handleKeyDown(event: React.KeyboardEvent) {\n if (event.key === \"Escape\") {\n event.stopPropagation();\n onDismiss(event);\n }\n }\n\n function handleMouseDown(event: React.MouseEvent) {\n mouseDownTarget.current = event.target;\n }\n\n useEffect(\n () =>\n overlayNode.current ? createAriaHider(overlayNode.current) : void null,\n []\n );\n\n return (\n \n \n \n \n \n );\n }\n);\n\nif (__DEV__) {\n DialogOverlay.displayName = \"DialogOverlay\";\n DialogOverlay.propTypes = {\n ...overlayPropTypes,\n };\n}\n\n////////////////////////////////////////////////////////////////////////////////\n\n/**\n * DialogContent\n *\n * Low-level component if you need more control over the styles or rendering of\n * the dialog content.\n *\n * Note: Must be a child of `DialogOverlay`.\n *\n * Note: You only need to use this when you are also styling `DialogOverlay`,\n * otherwise you can use the high-level `Dialog` component and pass the props\n * to it. Any props passed to `Dialog` component (besides `isOpen` and\n * `onDismiss`) will be spread onto `DialogContent`.\n *\n * @see Docs https://reacttraining.com/reach-ui/dialog#dialogcontent\n */\nexport const DialogContent = forwardRef(\n function DialogContent({ onClick, onKeyDown, ...props }, forwardedRef) {\n return (\n {\n event.stopPropagation();\n })}\n />\n );\n }\n);\n\n/**\n * @see Docs https://reacttraining.com/reach-ui/dialog#dialogcontent-props\n */\nexport type DialogContentProps = {\n /**\n * Accepts any renderable content.\n *\n * @see Docs https://reacttraining.com/reach-ui/dialog#dialogcontent-children\n */\n children?: React.ReactNode;\n} & React.HTMLAttributes;\n\nif (__DEV__) {\n DialogContent.displayName = \"DialogContent\";\n DialogContent.propTypes = {\n \"aria-label\": ariaLabelType,\n \"aria-labelledby\": ariaLabelType,\n };\n}\n\n////////////////////////////////////////////////////////////////////////////////\n\n/**\n * Dialog\n *\n * High-level component to render a modal dialog window over the top of the page\n * (or another dialog).\n *\n * @see Docs https://reacttraining.com/reach-ui/dialog#dialog\n */\nexport const Dialog = forwardRef(function Dialog(\n {\n allowPinchZoom = false,\n initialFocusRef,\n isOpen,\n onDismiss = noop,\n ...props\n },\n forwardedRef\n) {\n return (\n \n \n \n );\n});\n\n/**\n * @see Docs https://reacttraining.com/reach-ui/dialog#dialog-props\n */\nexport type DialogProps = {\n /**\n * Handle zoom/pinch gestures on iOS devices when scroll locking is enabled.\n * Defaults to `false`.\n *\n * @see Docs https://reacttraining.com/reach-ui/dialog#dialog-allowpinchzoom\n */\n allowPinchZoom?: boolean;\n /**\n * Accepts any renderable content.\n *\n * @see Docs https://reacttraining.com/reach-ui/dialog#dialog-children\n */\n children?: React.ReactNode;\n\n /**\n * By default the first focusable element will receive focus when the dialog\n * opens but you can provide a ref to focus instead.\n *\n * @see Docs https://reacttraining.com/reach-ui/dialog#dialog-initialfocusref\n */\n initialFocusRef?: React.RefObject;\n /**\n * Controls whether or not the dialog is open.\n *\n * @see Docs https://reacttraining.com/reach-ui/dialog#dialog-isopen\n */\n isOpen?: boolean;\n /**\n * This function is called whenever the user hits \"Escape\" or clicks outside\n * the dialog. _It's important to close the dialog `onDismiss`_.\n *\n * The only time you shouldn't close the dialog on dismiss is when the dialog\n * requires a choice and none of them are \"cancel\". For example, perhaps two\n * records need to be merged and the user needs to pick the surviving record.\n * Neither choice is less destructive than the other, so in these cases you\n * may want to alert the user they need to a make a choice on dismiss instead\n * of closing the dialog.\n *\n * @see Docs https://reacttraining.com/reach-ui/dialog#dialog-ondismiss\n */\n onDismiss?: (event?: React.SyntheticEvent) => void;\n /**\n * By default, React Focus Lock prevents focus from being moved outside of the\n * locked element even if the thing trying to take focus is in another frame.\n * Normally this is what you want, as an iframe is typically going to be a\n * part of your page content. But in some situations, like when using Code\n * Sandbox, you can't use any of the controls or the editor in the sandbox\n * while dialog is open because of the focus lock.\n *\n * This prop may have some negative side effects and unintended consequences,\n * and it opens questions about how we might distinguish frames that *should*\n * steal focus from those that shouldn't. Perhaps it's best for app devs to\n * decide, and if they use this prop we should advise them to imperatively\n * assign a -1 tabIndex to other iframes that are a part of the page content\n * when the dialog is open.\n *\n * https://github.com/reach/reach-ui/issues/536\n */\n unstable_lockFocusAcrossFrames?: boolean;\n} & React.HTMLAttributes;\n\nif (__DEV__) {\n Dialog.displayName = \"Dialog\";\n Dialog.propTypes = {\n isOpen: PropTypes.bool,\n onDismiss: PropTypes.func,\n \"aria-label\": ariaLabelType,\n \"aria-labelledby\": ariaLabelType,\n };\n}\n\nexport default Dialog;\n\n////////////////////////////////////////////////////////////////////////////////\nfunction createAriaHider(dialogNode: HTMLElement) {\n let originalValues: any[] = [];\n let rootNodes: HTMLElement[] = [];\n let ownerDocument = getOwnerDocument(dialogNode) || document;\n\n if (!dialogNode) {\n if (__DEV__) {\n console.warn(\n \"A ref has not yet been attached to a dialog node when attempting to call `createAriaHider`.\"\n );\n }\n return noop;\n }\n\n Array.prototype.forEach.call(\n ownerDocument.querySelectorAll(\"body > *\"),\n (node) => {\n const portalNode = dialogNode.parentNode?.parentNode?.parentNode;\n if (node === portalNode) {\n return;\n }\n let attr = node.getAttribute(\"aria-hidden\");\n let alreadyHidden = attr !== null && attr !== \"false\";\n if (alreadyHidden) {\n return;\n }\n originalValues.push(attr);\n rootNodes.push(node);\n node.setAttribute(\"aria-hidden\", \"true\");\n }\n );\n\n return () => {\n rootNodes.forEach((node, index) => {\n let originalValue = originalValues[index];\n if (originalValue === null) {\n node.removeAttribute(\"aria-hidden\");\n } else {\n node.setAttribute(\"aria-hidden\", originalValue);\n }\n });\n };\n}\n\nfunction ariaLabelType(\n props: { [key: string]: any },\n propName: string,\n compName: string,\n location: string,\n propFullName: string\n) {\n const details =\n \"\\nSee https://www.w3.org/TR/wai-aria/#aria-label for details.\";\n if (!props[\"aria-label\"] && !props[\"aria-labelledby\"]) {\n return new Error(\n `A <${compName}> must have either an \\`aria-label\\` or \\`aria-labelledby\\` prop.\n ${details}`\n );\n }\n if (props[\"aria-label\"] && props[\"aria-labelledby\"]) {\n return new Error(\n \"You provided both `aria-label` and `aria-labelledby` props to a <\" +\n compName +\n \">. If the a label for this component is visible on the screen, that label's component should be given a unique ID prop, and that ID should be passed as the `aria-labelledby` prop into <\" +\n compName +\n \">. If the label cannot be determined programmatically from the content of the element, an alternative label should be provided as the `aria-label` prop, which will be used as an `aria-label` on the HTML tag.\" +\n details\n );\n } else if (props[propName] != null && !isString(props[propName])) {\n return new Error(\n `Invalid prop \\`${propName}\\` supplied to \\`${compName}\\`. Expected \\`string\\`, received \\`${\n Array.isArray(propFullName) ? \"array\" : typeof propFullName\n }\\`.`\n );\n }\n return null;\n}\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)\n\nvar insertParams = function insertParams(path, params) {\n var _path$split = path.split(\"?\"),\n pathBase = _path$split[0],\n _path$split$ = _path$split[1],\n query = _path$split$ === undefined ? \"\" : _path$split$;\n\n var segments = segmentize(pathBase);\n var constructedPath = \"/\" + segments.map(function (segment) {\n var match = paramRe.exec(segment);\n return match ? params[match[1]] : segment;\n }).join(\"/\");\n var _params$location = params.location;\n _params$location = _params$location === undefined ? {} : _params$location;\n var _params$location$sear = _params$location.search,\n search = _params$location$sear === undefined ? \"\" : _params$location$sear;\n\n var searchSplit = search.split(\"?\")[1] || \"\";\n constructedPath = addQuery(constructedPath, query, searchSplit);\n return constructedPath;\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) {\n for (var _len = arguments.length, query = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n query[_key - 1] = arguments[_key];\n }\n\n query = query.filter(function (q) {\n return q && q.length > 0;\n });\n return pathname + (query && query.length > 0 ? \"?\" + query.join(\"&\") : \"\");\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 };"],"sourceRoot":""}