UNPKG

react-router

Version:
2 lines • 48.8 kB
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react")):"function"==typeof define&&define.amd?define(["react"],e):"object"==typeof exports?exports.ReactRouter=e(require("react")):t.ReactRouter=e(t.React)}(this,function(t){return function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return t[r].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){"use strict";function r(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function o(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0,e.propTypes=e.createServerRenderContext=e.matchPattern=e.StaticRouter=e.ServerRouter=e.MemoryRouter=e.HashRouter=e.BrowserRouter=e.Redirect=e.NavigationPrompt=e.Miss=e.Match=e.Link=void 0;var i=n(17),a=o(i),c=n(19),u=o(c),s=n(22),f=o(s),l=n(23),p=o(l),h=n(24),d=o(h),y=n(15),v=o(y),b=n(16),m=o(b),g=n(21),w=o(g),O=n(25),x=o(O),P=n(3),_=o(P),T=n(12),j=o(T),R=n(26),E=o(R),C=n(2),M=r(C);e.Link=a.default,e.Match=u.default,e.Miss=f.default,e.NavigationPrompt=p.default,e.Redirect=d.default,e.BrowserRouter=v.default,e.HashRouter=m.default,e.MemoryRouter=w.default,e.ServerRouter=x.default,e.StaticRouter=_.default,e.matchPattern=j.default,e.createServerRenderContext=E.default,e.propTypes=M},function(e,n){e.exports=t},function(t,e,n){"use strict";e.__esModule=!0,e.routerContext=e.historyContext=e.location=e.history=e.matchContext=e.action=void 0;var r=n(1),o=e.action=r.PropTypes.oneOf(["PUSH","REPLACE","POP"]),i=(e.matchContext=r.PropTypes.shape({addMatch:r.PropTypes.func.isRequired,removeMatch:r.PropTypes.func.isRequired}),e.history=r.PropTypes.shape({listen:r.PropTypes.func.isRequired,listenBefore:r.PropTypes.func.isRequired,push:r.PropTypes.func.isRequired,replace:r.PropTypes.func.isRequired,go:r.PropTypes.func.isRequired}),e.location=r.PropTypes.shape({pathname:r.PropTypes.string.isRequired,search:r.PropTypes.string.isRequired,hash:r.PropTypes.string.isRequired,state:r.PropTypes.any,key:r.PropTypes.string}));e.historyContext=r.PropTypes.shape({action:o.isRequired,location:i.isRequired,push:r.PropTypes.func.isRequired,replace:r.PropTypes.func.isRequired,go:r.PropTypes.func.isRequired,goBack:r.PropTypes.func.isRequired,goForward:r.PropTypes.func.isRequired,canGo:r.PropTypes.func,block:r.PropTypes.func.isRequired}),e.routerContext=r.PropTypes.shape({transitionTo:r.PropTypes.func.isRequired,replaceWith:r.PropTypes.func.isRequired,blockTransitions:r.PropTypes.func.isRequired,createHref:r.PropTypes.func.isRequired})},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}e.__esModule=!0;var c=n(1),u=r(c),s=n(33),f=n(11),l=r(f),p=n(5),h=n(18),d=n(2),y=function(t){return(0,s.stringify)(t).replace(/%20/g,"+")},v=function(t){function e(){var n,r,a;o(this,e);for(var c=arguments.length,u=Array(c),s=0;s<c;s++)u[s]=arguments[s];return n=r=i(this,t.call.apply(t,[this].concat(u))),r.transitionTo=function(t){r.props.onPush(r.createLocation(t))},r.replaceWith=function(t){r.props.onReplace(r.createLocation(t))},r.blockTransitions=function(t){return r.props.blockTransitions(t)},r.createHref=function(t){var e=(0,h.createRouterPath)(t,r.props.stringifyQuery);return r.props.basename&&(e="/"===e?r.props.basename:e.length>=2&&"/"===e.charAt(0)&&"?"===e.charAt(1)?r.props.basename+e.substring(1):r.props.basename+e),r.props.createHref(e)},r.state={location:null},a=n,i(r,a)}return a(e,t),e.prototype.createLocation=function(t){var e=this.props,n=e.parseQueryString,r=e.stringifyQuery;return(0,h.createRouterLocation)(t,n,r)},e.prototype.getRouterContext=function(){return{transitionTo:this.transitionTo,replaceWith:this.replaceWith,blockTransitions:this.blockTransitions,createHref:this.createHref}},e.prototype.getChildContext=function(){return{router:this.getRouterContext()}},e.prototype.componentWillMount=function(){this.setState({location:this.createLocation(this.props.location)})},e.prototype.componentWillReceiveProps=function(t){var e=this.createLocation(t.location);(0,h.locationsAreEqual)(this.state.location,e)||this.setState({location:e})},e.prototype.render=function(){var t=this.state.location,e=this.props,n=e.action,r=e.children;return u.default.createElement(p.LocationBroadcast,{value:t},u.default.createElement(l.default,null,"function"==typeof r?r({action:n,location:t,router:this.getRouterContext()}):u.default.Children.only(r)))},e}(u.default.Component);v.defaultProps={stringifyQuery:y,parseQueryString:s.parse,createHref:function(t){return t}},v.childContextTypes={router:d.routerContext.isRequired},e.default=v},function(t,e){"use strict";e.__esModule=!0;e.addLeadingSlash=function(t){return"/"===t.charAt(0)?t:"/"+t},e.stripLeadingSlash=function(t){return"/"===t.charAt(0)?t.substr(1):t},e.stripPrefix=function(t,e){return 0===t.indexOf(e)?t.substr(e.length):t},e.parsePath=function(t){var e=t||"/",n="",r="",o=e.indexOf("#");o!==-1&&(r=e.substr(o),e=e.substr(0,o));var i=e.indexOf("?");return i!==-1&&(n=e.substr(i),e=e.substr(0,i)),{pathname:e,search:"?"===n?"":n,hash:"#"===r?"":r}},e.createPath=function(t){var e=t.pathname,n=t.search,r=t.hash,o=e||"/";return n&&"?"!==n&&(o+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(o+="#"===r.charAt(0)?r:"#"+r),o}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0,e.LocationSubscriber=e.LocationBroadcast=void 0;var o=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},i=n(1),a=r(i),c=n(36),u="location";e.LocationBroadcast=function(t){return a.default.createElement(c.Broadcast,o({},t,{channel:u}))},e.LocationSubscriber=function(t){return a.default.createElement(c.Subscriber,o({},t,{channel:u}))}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0,e.locationsAreEqual=e.createLocation=void 0;var o=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},i=n(37),a=r(i),c=n(39),u=r(c),s=n(4);e.createLocation=function(t,e,n,r){var i=void 0;return"string"==typeof t?(i=(0,s.parsePath)(t),i.state=e):(i=o({},t),void 0===i.pathname&&(i.pathname=""),i.search?"?"!==i.search.charAt(0)&&(i.search="?"+i.search):i.search="",i.hash?"#"!==i.hash.charAt(0)&&(i.hash="#"+i.hash):i.hash="",void 0!==e&&void 0===i.state&&(i.state=e)),i.key=n,r&&(i.pathname?"/"!==i.pathname.charAt(0)&&(i.pathname=(0,a.default)(i.pathname,r.pathname)):i.pathname=r.pathname),i},e.locationsAreEqual=function(t,e){return t.pathname===e.pathname&&t.search===e.search&&t.hash===e.hash&&t.key===e.key&&(0,u.default)(t.state,e.state)}},function(t,e,n){"use strict";var r=function(t,e,n,r,o,i,a,c){if(!t){var u;if(void 0===e)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var s=[n,r,o,i,a,c],f=0;u=new Error(e.replace(/%s/g,function(){return s[f++]})),u.name="Invariant Violation"}throw u.framesToPop=1,u}};t.exports=r},function(t,e,n){"use strict";var r=function(){};t.exports=r},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}e.__esModule=!0;var c=n(1),u=r(c),s=n(2),f=function(t){function e(){return o(this,e),i(this,t.apply(this,arguments))}return a(e,t),e.prototype.getChildContext=function(){return{history:this.history}},e.prototype.componentWillMount=function(){var t=this,e=this.props,n=e.createHistory,r=e.historyOptions;this.history=n(r),this.unlisten=this.history.listen(function(){return t.forceUpdate()})},e.prototype.componentWillUnmount=function(){this.unlisten()},e.prototype.render=function(){var t=this.history,e=t.location,n=t.action;return this.props.children({history:t,location:e,action:n})},e}(u.default.Component);f.childContextTypes={history:s.historyContext.isRequired},e.default=f},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var o=n(8),i=(r(o),function(){var t=null,e=function(e){return t=e,function(){t===e&&(t=null)}},n=function(e,n,r,o){if(null!=t){var i="function"==typeof t?t(e,n):t;"string"==typeof i?"function"==typeof r?r(i,o):o(!0):o(i!==!1)}else o(!0)},r=[],o=function(t){return r.push(t),function(){r=r.filter(function(e){return e!==t})}},i=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return r.forEach(function(t){return t.apply(void 0,e)})};return{setPrompt:e,confirmTransitionTo:n,appendListener:o,notifyListeners:i}});e.default=i},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}e.__esModule=!0;var c=n(1),u=r(c),s=n(2),f=function(t){function e(n){o(this,e);var r=i(this,t.call(this,n));return r.addMatch=function(t){r.matches.push(t)},r.removeMatch=function(t){r.matches.splice(r.matches.indexOf(t),1)},r.matches=[],r.subscribers=[],r.hasMatches=null,r.serverRouterIndex=null,r}return a(e,t),e.prototype.getChildContext=function(){var t=this;return{match:{addMatch:this.addMatch,removeMatch:this.removeMatch,matches:this.matches,parent:this.props.match,serverRouterIndex:this.serverRouterIndex,subscribe:function(e){return t.subscribers.push(e),function(){t.subscribers.splice(t.subscribers.indexOf(e),1)}}}}},e.prototype.componentDidUpdate=function(){this.notifySubscribers()},e.prototype.componentWillMount=function(){var t=this.context.serverRouter;t&&(this.serverRouterIndex=t.registerMatchContext(this.matches))},e.prototype.componentDidMount=function(){this.notifySubscribers()},e.prototype.notifySubscribers=function(){var t=this;this.subscribers.length&&(this.hasMatches=0!==this.matches.length,this.subscribers.forEach(function(e){return e(t.hasMatches)}))},e.prototype.render=function(){return this.props.children},e}(u.default.Component);f.childContextTypes={match:s.matchContext.isRequired},f.contextTypes={serverRouter:c.PropTypes.object},e.default=f},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var o=n(32),i=r(o),a=n(20),c=r(a),u={true:new c.default,false:new c.default},s=function(t,e){var n=e?"true":"false",r=u[n].get(t);if(!r){var o=[],a=(0,i.default)(t,o,{end:e,strict:!0});r={keys:o,regex:a},u[n].set(t,r)}return r},f=function(t,e,n){return e.slice(1).filter(function(t){return void 0!==t}).reduce(function(t,e,r){return t[n[r].name]=decodeURIComponent(e),t},{})},l=function(t,e,n,r){var o=!n&&"/"===t;if(o)return{params:null,isExact:"/"===e.pathname,pathname:"/"};r&&"/"!==t.charAt(0)&&(t=r.pathname+("/"!==r.pathname.charAt(r.pathname.length-1)?"/":"")+t);var i=s(t,n),a=i.regex.exec(e.pathname);if(a){var c=f(t,a,i.keys),u=a[0],l=u===e.pathname;return{params:c,isExact:l,pathname:u}}return null};e.default=l},function(t,e){"use strict";e.__esModule=!0;e.addEventListener=function(t,e,n){return t.addEventListener?t.addEventListener(e,n,!1):t.attachEvent("on"+e,n)},e.removeEventListener=function(t,e,n){return t.removeEventListener?t.removeEventListener(e,n,!1):t.detachEvent("on"+e,n)},e.getConfirmation=function(t,e){return e(window.confirm(t))},e.supportsHistory=function(){var t=window.navigator.userAgent;return(t.indexOf("Android 2.")===-1&&t.indexOf("Android 4.0")===-1||t.indexOf("Mobile Safari")===-1||t.indexOf("Chrome")!==-1||t.indexOf("Windows Phone")!==-1)&&(window.history&&"pushState"in window.history)},e.supportsPopStateOnHashChange=function(){return window.navigator.userAgent.indexOf("Trident")===-1},e.supportsGoWithoutReloadUsingHash=function(){return window.navigator.userAgent.indexOf("Firefox")===-1}},function(t,e){"use strict";e.__esModule=!0;e.canUseDOM=!("undefined"==typeof window||!window.document||!window.document.createElement)},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}e.__esModule=!0;var i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},a=n(1),c=r(a),u=n(27),s=r(u),f=n(3),l=r(f),p=n(9),h=r(p),d=function(t){var e=t.basename,n=t.forceRefresh,r=t.getUserConfirmation,a=t.keyLength,u=o(t,["basename","forceRefresh","getUserConfirmation","keyLength"]);return c.default.createElement(h.default,{createHistory:s.default,historyOptions:{basename:e,forceRefresh:n,getUserConfirmation:r,keyLength:a}},function(t){var n=t.history,r=t.action,o=t.location;return c.default.createElement(l.default,i({action:r,location:o,basename:e,onPush:n.push,onReplace:n.replace,blockTransitions:n.block},u))})};e.default=d},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}e.__esModule=!0;var i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},a=n(1),c=r(a),u=n(28),s=r(u),f=n(9),l=r(f),p=n(4),h=n(3),d=r(h),y=function(t){return function(e){var n=void 0;switch(t){case"hashbang":n="!"===e.charAt(0)?e:"!/"+(0,p.stripLeadingSlash)(e);break;case"noslash":n=(0,p.stripLeadingSlash)(e);break;case"slash":default:n=(0,p.addLeadingSlash)(e)}return"#"+n}},v=function(t){var e=t.basename,n=t.getUserConfirmation,r=t.hashType,a=o(t,["basename","getUserConfirmation","hashType"]);return c.default.createElement(l.default,{createHistory:s.default,historyOptions:{basename:e,getUserConfirmation:n,hashType:r}},function(t){var n=t.history,o=t.action,u=t.location;return c.default.createElement(d.default,i({action:o,location:u,basename:e,onPush:n.push,onReplace:n.replace,blockTransitions:n.block,createHref:y(r)},a))})};e.default=v},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function c(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}e.__esModule=!0;var u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},f=n(1),l=r(f),p=n(5),h=n(2),d=function(t){function e(){var n,r,o;i(this,e);for(var c=arguments.length,u=Array(c),s=0;s<c;s++)u[s]=arguments[s];return n=r=a(this,t.call.apply(t,[this].concat(u))),r.handleClick=function(t){r.props.onClick&&r.props.onClick(t),t.defaultPrevented||r.props.target||g(t)||!m(t)||(t.preventDefault(),r.handleTransition())},r.handleTransition=function(){var t=r.context.router,e=r.props,n=e.to,o=e.replace,i=o?t.replaceWith:t.transitionTo;i(n)},o=n,a(r,o)}return c(e,t),e.prototype.render=function(){var t=this,e=this.context.router,n=this.props,r=n.to,i=n.style,a=n.activeStyle,c=n.className,u=n.activeClassName,f=n.isActive,h=(n.activeOnlyWhenExact,n.replace,n.children),d=o(n,["to","style","activeStyle","className","activeClassName","isActive","activeOnlyWhenExact","replace","children"]);return l.default.createElement(p.LocationSubscriber,null,function(n){var o=f(n,y(r),t.props);return"function"==typeof h?h({isActive:o,location:n,href:e?e.createHref(r):r,onClick:t.handleClick,transition:t.handleTransition}):l.default.createElement("a",s({},d,{href:e?e.createHref(r):r,onClick:t.handleClick,style:o?s({},i,a):i,className:o?[c,u].join(" ").trim():c,children:h}))})},e}(l.default.Component);d.defaultProps={replace:!1,activeOnlyWhenExact:!1,className:"",activeClassName:"",style:{},activeStyle:{},isActive:function(t,e,n){return v(e.pathname,t.pathname,n.activeOnlyWhenExact)&&b(e.query,t.query)}},d.contextTypes={router:h.routerContext.isRequired};var y=function(t){return"object"===("undefined"==typeof t?"undefined":u(t))?t:{pathname:t}},v=function(t,e,n){return n?e===t:0===e.indexOf(t)},b=function(t,e){return null==e?null==t:null==t||w(t,e)},m=function(t){return 0===t.button},g=function(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)},w=function t(e,n){if(e==n)return!0;if(null==e||null==n)return!1;if(Array.isArray(e))return Array.isArray(n)&&e.length===n.length&&e.every(function(e,r){return t(e,n[r])});if("object"===("undefined"==typeof e?"undefined":u(e))){for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r))if(void 0===e[r]){if(void 0!==n[r])return!1}else{if(!Object.prototype.hasOwnProperty.call(n,r))return!1;if(!t(e[r],n[r]))return!1}return!0}return String(e)===String(n)};e.default=d},function(t,e,n){"use strict";e.__esModule=!0,e.createRouterPath=e.createRouterLocation=e.locationsAreEqual=void 0;var r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},o=n(6);Object.defineProperty(e,"locationsAreEqual",{enumerable:!0,get:function(){return o.locationsAreEqual}});var i=n(4);e.createRouterLocation=function(t,e,n){if("string"==typeof t){var r=(0,i.parsePath)(t);return r.query=""!==r.search?e(r.search):null,r}return{pathname:t.pathname||"",search:t.search||(t.query?"?"+n(t.query):""),hash:t.hash||"",state:t.state||null,query:t.query||(t.search?e(t.search):null),key:t.key}},e.createRouterPath=function(t,e){return"string"==typeof t?t:(0,i.createPath)(r({},t,{search:t.search||(t.query?"?"+e(t.query):"")}))}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}e.__esModule=!0;var c=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},u=n(1),s=r(u),f=n(11),l=r(f),p=n(12),h=r(p),d=n(5),y=function(t){function e(){return o(this,e),i(this,t.apply(this,arguments))}return a(e,t),e.prototype.registerMatch=function(){var t=this.context.match,e=this.props.match;e&&t&&t.addMatch(e)},e.prototype.componentWillMount=function(){this.context.serverRouter&&this.registerMatch()},e.prototype.componentDidMount=function(){this.context.serverRouter||this.registerMatch()},e.prototype.componentDidUpdate=function(t){var e=this.context.match;e&&(t.match&&!this.props.match?e.removeMatch(t.match):!t.match&&this.props.match&&e.addMatch(this.props.match))},e.prototype.componentWillUnmount=function(){this.props.match&&this.context.match.removeMatch(this.props.match)},e.prototype.render=function(){return s.default.Children.only(this.props.children)},e}(s.default.Component);y.contextTypes={match:u.PropTypes.object,serverRouter:u.PropTypes.object};var v=function(t){function e(){return o(this,e),i(this,t.apply(this,arguments))}return a(e,t),e.prototype.render=function(){var t=this;return s.default.createElement(d.LocationSubscriber,null,function(e){var n=t.props,r=n.children,o=n.render,i=n.component,a=n.pattern,u=n.exactly,f=t.context.match,p=f&&f.parent,d=(0,h.default)(a,e,u,p),v=c({},d,{location:e,pattern:a});return s.default.createElement(y,{match:d},s.default.createElement(l.default,{match:d},r?r(c({matched:!!d},v)):d?o?o(v):s.default.createElement(i,v):null))})},e}(s.default.Component);v.defaultProps={exactly:!1},v.contextTypes={match:u.PropTypes.object},e.default=v},function(t,e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0;var r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},o={limit:200},i=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};n(this,t),this.cache={},this.cachedKeys=[];var i=r({},o,e);this.options=i}return t.prototype.set=function(t,e){void 0===this.cache[t]&&this.cachedKeys.push(t),this.cache[t]=e,this.checkCacheLimit()},t.prototype.get=function(t){return this.cache[t]},t.prototype.checkCacheLimit=function(){if(this.cachedKeys.length>this.options.limit){var t=this.cachedKeys.shift();delete this.cache[t]}},t}();e.default=i},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}e.__esModule=!0;var i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},a=n(1),c=r(a),u=n(29),s=r(u),f=n(3),l=r(f),p=n(9),h=r(p),d=function(t){var e=t.getUserConfirmation,n=t.initialEntries,r=t.initialIndex,a=t.keyLength,u=o(t,["getUserConfirmation","initialEntries","initialIndex","keyLength"]);return c.default.createElement(h.default,{createHistory:s.default,historyOptions:{getUserConfirmation:e,initialEntries:n,initialIndex:r,keyLength:a}},function(t){var e=t.history,n=t.action,r=t.location;return c.default.createElement(l.default,i({action:n,location:r,onPush:e.push,onReplace:e.replace,blockTransitions:e.block},u))})};e.default=d},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}e.__esModule=!0;var c=n(1),u=r(c),s=n(5),f=function(t){function e(n,r){o(this,e);var a=i(this,t.call(this,n,r));return r.match&&!r.serverRouter&&(a.unsubscribe=a.context.match.subscribe(function(t){a.setState({noMatchesInContext:!t})})),r.serverRouter&&r.serverRouter.registerMissPresence(r.match.serverRouterIndex),a.state={noMatchesInContext:!1},a}return a(e,t),e.prototype.componentWillUnmount=function(){this.unsubscribe&&this.unsubscribe()},e.prototype.render=function(){var t=this;return u.default.createElement(s.LocationSubscriber,null,function(e){var n=t.props,r=n.render,o=n.component,i=t.state.noMatchesInContext,a=t.context,c=a.serverRouter,s=a.match,f=c&&c.missedAtIndex(s.serverRouterIndex);return i||f?r?r({location:e}):u.default.createElement(o,{location:e}):null})},e}(u.default.Component);f.contextTypes={match:c.PropTypes.object,serverRouter:c.PropTypes.object},e.default=f},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}e.__esModule=!0;var c=n(1),u=r(c),s=n(2),f=function(t){function e(){return o(this,e),i(this,t.apply(this,arguments))}return a(e,t),e.prototype.block=function(){this.teardownPrompt||(this.teardownPrompt=this.context.history.block(this.props.message))},e.prototype.unblock=function(){this.teardownPrompt&&(this.teardownPrompt(),this.teardownPrompt=null)},e.prototype.componentWillMount=function(){this.props.when&&this.block()},e.prototype.componentWillReceiveProps=function(t){t.when?this.block():this.unblock()},e.prototype.componentWillUnmount=function(){this.unblock()},e.prototype.render=function(){return null},e}(u.default.Component);f.contextTypes={history:s.historyContext.isRequired},f.defaultProps={when:!0},e.default=f},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}e.__esModule=!0;var c=n(1),u=r(c),s=n(2),f=function(t){function e(){return o(this,e),i(this,t.apply(this,arguments))}return a(e,t),e.prototype.componentWillMount=function(){this.context.serverRouter&&this.redirect()},e.prototype.componentDidMount=function(){this.redirect()},e.prototype.redirect=function(){var t=this.context.router,e=this.props,n=e.to,r=e.push;if(t){var o=r?t.transitionTo:t.replaceWith;o(n)}},e.prototype.render=function(){return null},e}(u.default.Component);f.defaultProps={push:!1},f.contextTypes={router:s.routerContext,serverRouter:c.PropTypes.object},e.default=f},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function c(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}e.__esModule=!0;var u=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},s=n(1),f=r(s),l=n(3),p=r(l),h=function(t){function e(){return i(this,e),a(this,t.apply(this,arguments))}return c(e,t),e.prototype.getChildContext=function(){return{serverRouter:this.props.context}},e.prototype.render=function(){var t=this.props,e=t.context,n=t.location,r=t.basename,i=o(t,["context","location","basename"]),a=function(t){e.setRedirect(t)};return f.default.createElement(p.default,u({action:"POP",location:n,basename:r,onReplace:a,onPush:a},i))},e}(f.default.Component);h.childContextTypes={serverRouter:s.PropTypes.object.isRequired},e.default=h},function(t,e){"use strict";e.__esModule=!0;var n=function(){},r=function(){var t=!1,e=null,r=[],o=t?n:function(t){e||(e=t)},i=t?n:function(t){return r.push({hasMissComponent:!1,matchesByIdentity:t})-1},a=t?n:function(t){r[t].hasMissComponent=!0},c=function(){t=!0;var n=r.some(function(t,e){return u(e)});return{redirect:e,missed:n}},u=function(t){var e=r[t];return 0===e.matchesByIdentity.length&&e.hasMissComponent};return{setRedirect:o,registerMatchContext:i,registerMissPresence:a,getResult:c,missedAtIndex:u}};e.default=r},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var o=("function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}),i=n(8),a=(r(i),n(7)),c=r(a),u=n(6),s=n(4),f=n(10),l=r(f),p=n(14),h=n(13),d="popstate",y="hashchange",v=function(){try{return window.history.state||{}}catch(t){return{}}},b=function(){var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];p.canUseDOM?void 0:(0,c.default)(!1);var e=window.history,n=(0,h.supportsHistory)(),r=!(0,h.supportsPopStateOnHashChange)(),i=t.basename,a=void 0===i?"":i,f=t.forceRefresh,b=void 0!==f&&f,m=t.getUserConfirmation,g=void 0===m?h.getConfirmation:m,w=t.keyLength,O=void 0===w?6:w,x=function(t){var e=t||{},n=e.key,r=e.state,i=window.location,c=i.pathname,u=i.search,f=i.hash,l=c+u+f;return a&&(l=(0,s.stripPrefix)(l,a)),o({},(0,s.parsePath)(l),{state:r,key:n})},P=function(){return Math.random().toString(36).substr(2,O)},_=(0,l.default)(),T=function(t){o(K,t),K.length=e.length,_.notifyListeners(K.location,K.action)},j=function(t){void 0!==t.state&&C(x(t.state))},R=function(){C(x(v()))},E=!1,C=function(t){E?(E=!1,T()):!function(){var e="POP";_.confirmTransitionTo(t,e,g,function(n){n?T({action:e,location:t}):M(t)})}()},M=function(t){var e=K.location,n=k.indexOf(e.key);n===-1&&(n=0);var r=k.indexOf(t.key);r===-1&&(r=0);var o=n-r;o&&(E=!0,q(o))},S=x(v()),k=[S.key],L=function(t,r){var o="PUSH",i=(0,u.createLocation)(t,r,P(),K.location); _.confirmTransitionTo(i,o,g,function(t){if(t){var r=a+(0,s.createPath)(i),c=i.key,u=i.state;if(n)if(e.pushState({key:c,state:u},null,r),b)window.location.href=r;else{var f=k.indexOf(K.location.key),l=k.slice(0,f===-1?0:f+1);l.push(i.key),k=l,T({action:o,location:i})}else window.location.href=r}})},A=function(t,r){var o="REPLACE",i=(0,u.createLocation)(t,r,P(),K.location);_.confirmTransitionTo(i,o,g,function(t){if(t){var r=a+(0,s.createPath)(i),c=i.key,u=i.state;if(n)if(e.replaceState({key:c,state:u},null,r),b)window.location.replace(r);else{var f=k.indexOf(K.location.key);f!==-1&&(k[f]=i.key),T({action:o,location:i})}else window.location.replace(r)}})},q=function(t){e.go(t)},U=function(){return q(-1)},I=function(){return q(1)},W=0,H=function(t){W+=t,1===W?((0,h.addEventListener)(window,d,j),r&&(0,h.addEventListener)(window,y,R)):0===W&&((0,h.removeEventListener)(window,d,j),r&&(0,h.removeEventListener)(window,y,R))},B=!1,N=function(){var t=!(arguments.length<=0||void 0===arguments[0])&&arguments[0],e=_.setPrompt(t);return B||(H(1),B=!0),function(){return B&&(B=!1,H(-1)),e()}},D=function(t){var e=_.appendListener(t);return H(1),function(){return H(-1),e()}},K={length:e.length,action:"POP",location:S,push:L,replace:A,go:q,goBack:U,goForward:I,block:N,listen:D};return K};e.default=b},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var o=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},i=n(8),a=(r(i),n(7)),c=r(a),u=n(6),s=n(4),f=n(10),l=r(f),p=n(14),h=n(13),d="hashchange",y={hashbang:{encodePath:function(t){return"!"===t.charAt(0)?t:"!/"+(0,s.stripLeadingSlash)(t)},decodePath:function(t){return"!"===t.charAt(0)?t.substr(1):t}},noslash:{encodePath:s.stripLeadingSlash,decodePath:s.addLeadingSlash},slash:{encodePath:s.addLeadingSlash,decodePath:s.addLeadingSlash}},v=function(){var t=window.location.href,e=t.indexOf("#");return e===-1?"":t.substring(e+1)},b=function(t){return window.location.hash=t},m=function(t){var e=window.location.href.indexOf("#");window.location.replace(window.location.href.slice(0,e>=0?e:0)+"#"+t)},g=function(){var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];p.canUseDOM?void 0:(0,c.default)(!1);var e=window.history,n=((0,h.supportsGoWithoutReloadUsingHash)(),t.basename),r=void 0===n?"":n,i=t.getUserConfirmation,a=void 0===i?h.getConfirmation:i,f=t.hashType,g=void 0===f?"slash":f,w=y[g],O=w.encodePath,x=w.decodePath,P=function(){var t=x(v());return r&&(t=(0,s.stripPrefix)(t,r)),(0,s.parsePath)(t)},_=(0,l.default)(),T=function(t){o(F,t),F.length=e.length,_.notifyListeners(F.location,F.action)},j=!1,R=null,E=function(){var t=v(),e=O(t);if(t!==e)m(e);else{var n=P(),r=F.location;if(!j&&(0,u.locationsAreEqual)(r,n))return;if(R===(0,s.createPath)(n))return;R=null,C(n)}},C=function(t){j?(j=!1,T()):!function(){var e="POP";_.confirmTransitionTo(t,e,a,function(n){n?T({action:e,location:t}):M(t)})}()},M=function(t){var e=F.location,n=A.lastIndexOf((0,s.createPath)(e));n===-1&&(n=0);var r=A.lastIndexOf((0,s.createPath)(t));r===-1&&(r=0);var o=n-r;o&&(j=!0,I(o))},S=v(),k=O(S);S!==k&&m(k);var L=P(),A=[(0,s.createPath)(L)],q=function(t,e){var n="PUSH",o=(0,u.createLocation)(t,void 0,void 0,F.location);_.confirmTransitionTo(o,n,a,function(t){if(t){var e=(0,s.createPath)(o),i=O(r+e),a=v()!==i;if(a){R=e,b(i);var c=A.lastIndexOf((0,s.createPath)(F.location)),u=A.slice(0,c===-1?0:c+1);u.push(e),A=u,T({action:n,location:o})}else T()}})},U=function(t,e){var n="REPLACE",o=(0,u.createLocation)(t,void 0,void 0,F.location);_.confirmTransitionTo(o,n,a,function(t){if(t){var e=(0,s.createPath)(o),i=O(r+e),a=v()!==i;a&&(R=e,m(i));var c=A.indexOf((0,s.createPath)(F.location));c!==-1&&(A[c]=e),T({action:n,location:o})}})},I=function(t){e.go(t)},W=function(){return I(-1)},H=function(){return I(1)},B=0,N=function(t){B+=t,1===B?(0,h.addEventListener)(window,d,E):0===B&&(0,h.removeEventListener)(window,d,E)},D=!1,K=function(){var t=!(arguments.length<=0||void 0===arguments[0])&&arguments[0],e=_.setPrompt(t);return D||(N(1),D=!0),function(){return D&&(D=!1,N(-1)),e()}},$=function(t){var e=_.appendListener(t);return N(1),function(){return N(-1),e()}},F={length:e.length,action:"POP",location:L,push:q,replace:U,go:I,goBack:W,goForward:H,block:K,listen:$};return F};e.default=g},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var o=("function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}),i=n(8),a=(r(i),n(6)),c=n(10),u=r(c),s=function(t,e,n){return Math.min(Math.max(t,e),n)},f=function(){var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],e=t.getUserConfirmation,n=t.initialEntries,r=void 0===n?["/"]:n,i=t.initialIndex,c=void 0===i?0:i,f=t.keyLength,l=void 0===f?6:f,p=(0,u.default)(),h=function(t){o(T,t),T.length=T.entries.length,p.notifyListeners(T.location,T.action)},d=function(){return Math.random().toString(36).substr(2,l)},y=s(c,0,r.length-1),v=r.map(function(t,e){return"string"==typeof t?(0,a.createLocation)(t,void 0,e?d():void 0):(0,a.createLocation)(t,void 0,e?t.key||d():void 0)}),b=function(t,n){var r="PUSH",o=(0,a.createLocation)(t,n,d(),T.location);p.confirmTransitionTo(o,r,e,function(t){if(t){var e=T.index,n=e+1,i=T.entries.slice(0);i.length>n?i.splice(n,i.length-n,o):i.push(o),h({action:r,location:o,index:n,entries:i})}})},m=function(t,n){var r="REPLACE",o=(0,a.createLocation)(t,n,d(),T.location);p.confirmTransitionTo(o,r,e,function(t){t&&(T.entries[T.index]=o,h({action:r,location:o}))})},g=function(t){var n=s(T.index+t,0,T.entries.length-1),r="POP",o=T.entries[n];p.confirmTransitionTo(o,r,e,function(t){t?h({action:r,location:o,index:n}):h()})},w=function(){return g(-1)},O=function(){return g(1)},x=function(t){var e=T.index+t;return e>=0&&e<T.entries.length},P=function(){var t=!(arguments.length<=0||void 0===arguments[0])&&arguments[0];return p.setPrompt(t)},_=function(t){return p.appendListener(t)},T={length:v.length,action:"POP",location:v[y],index:y,entries:v,push:b,replace:m,go:g,goBack:w,goForward:O,canGo:x,block:P,listen:_};return T};e.default=f},function(t,e){t.exports=Array.isArray||function(t){return"[object Array]"==Object.prototype.toString.call(t)}},function(t,e){"use strict";function n(t){if(null===t||void 0===t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}function r(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},n=0;n<10;n++)e["_"+String.fromCharCode(n)]=n;var r=Object.getOwnPropertyNames(e).map(function(t){return e[t]});if("0123456789"!==r.join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach(function(t){o[t]=t}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(t){return!1}}var o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;t.exports=r()?Object.assign:function(t,e){for(var r,a,c=n(t),u=1;u<arguments.length;u++){r=Object(arguments[u]);for(var s in r)o.call(r,s)&&(c[s]=r[s]);if(Object.getOwnPropertySymbols){a=Object.getOwnPropertySymbols(r);for(var f=0;f<a.length;f++)i.call(r,a[f])&&(c[a[f]]=r[a[f]])}}return c}},function(t,e,n){function r(t,e){for(var n,r=[],o=0,i=0,a="",c=e&&e.delimiter||"/";null!=(n=m.exec(t));){var f=n[0],l=n[1],p=n.index;if(a+=t.slice(i,p),i=p+f.length,l)a+=l[1];else{var h=t[i],d=n[2],y=n[3],v=n[4],b=n[5],g=n[6],w=n[7];a&&(r.push(a),a="");var O=null!=d&&null!=h&&h!==d,x="+"===g||"*"===g,P="?"===g||"*"===g,_=n[2]||c,T=v||b;r.push({name:y||o++,prefix:d||"",delimiter:_,optional:P,repeat:x,partial:O,asterisk:!!w,pattern:T?s(T):w?".*":"[^"+u(_)+"]+?"})}}return i<t.length&&(a+=t.substr(i)),a&&r.push(a),r}function o(t,e){return c(r(t,e))}function i(t){return encodeURI(t).replace(/[\/?#]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})}function a(t){return encodeURI(t).replace(/[?#]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})}function c(t){for(var e=new Array(t.length),n=0;n<t.length;n++)"object"==typeof t[n]&&(e[n]=new RegExp("^(?:"+t[n].pattern+")$"));return function(n,r){for(var o="",c=n||{},u=r||{},s=u.pretty?i:encodeURIComponent,f=0;f<t.length;f++){var l=t[f];if("string"!=typeof l){var p,h=c[l.name];if(null==h){if(l.optional){l.partial&&(o+=l.prefix);continue}throw new TypeError('Expected "'+l.name+'" to be defined')}if(b(h)){if(!l.repeat)throw new TypeError('Expected "'+l.name+'" to not repeat, but received `'+JSON.stringify(h)+"`");if(0===h.length){if(l.optional)continue;throw new TypeError('Expected "'+l.name+'" to not be empty')}for(var d=0;d<h.length;d++){if(p=s(h[d]),!e[f].test(p))throw new TypeError('Expected all "'+l.name+'" to match "'+l.pattern+'", but received `'+JSON.stringify(p)+"`");o+=(0===d?l.prefix:l.delimiter)+p}}else{if(p=l.asterisk?a(h):s(h),!e[f].test(p))throw new TypeError('Expected "'+l.name+'" to match "'+l.pattern+'", but received "'+p+'"');o+=l.prefix+p}}else o+=l}return o}}function u(t){return t.replace(/([.+*?=^!:${}()[\]|\/\\])/g,"\\$1")}function s(t){return t.replace(/([=!:$\/()])/g,"\\$1")}function f(t,e){return t.keys=e,t}function l(t){return t.sensitive?"":"i"}function p(t,e){var n=t.source.match(/\((?!\?)/g);if(n)for(var r=0;r<n.length;r++)e.push({name:r,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,asterisk:!1,pattern:null});return f(t,e)}function h(t,e,n){for(var r=[],o=0;o<t.length;o++)r.push(v(t[o],e,n).source);var i=new RegExp("(?:"+r.join("|")+")",l(n));return f(i,e)}function d(t,e,n){return y(r(t,n),e,n)}function y(t,e,n){b(e)||(n=e||n,e=[]),n=n||{};for(var r=n.strict,o=n.end!==!1,i="",a=0;a<t.length;a++){var c=t[a];if("string"==typeof c)i+=u(c);else{var s=u(c.prefix),p="(?:"+c.pattern+")";e.push(c),c.repeat&&(p+="(?:"+s+p+")*"),p=c.optional?c.partial?s+"("+p+")?":"(?:"+s+"("+p+"))?":s+"("+p+")",i+=p}}var h=u(n.delimiter||"/"),d=i.slice(-h.length)===h;return r||(i=(d?i.slice(0,-h.length):i)+"(?:"+h+"(?=$))?"),i+=o?"$":r&&d?"":"(?="+h+"|$)",f(new RegExp("^"+i,l(n)),e)}function v(t,e,n){return b(e)||(n=e||n,e=[]),n=n||{},t instanceof RegExp?p(t,e):b(t)?h(t,e,n):d(t,e,n)}var b=n(30);t.exports=v,t.exports.parse=r,t.exports.compile=o,t.exports.tokensToFunction=c,t.exports.tokensToRegExp=y;var m=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g")},function(t,e,n){"use strict";function r(t,e){return e.encode?e.strict?o(t):encodeURIComponent(t):t}var o=n(38),i=n(31);e.extract=function(t){return t.split("?")[1]||""},e.parse=function(t){var e=Object.create(null);return"string"!=typeof t?e:(t=t.trim().replace(/^(\?|#|&)/,""))?(t.split("&").forEach(function(t){var n=t.replace(/\+/g," ").split("="),r=n.shift(),o=n.length>0?n.join("="):void 0;r=decodeURIComponent(r),o=void 0===o?null:decodeURIComponent(o),void 0===e[r]?e[r]=o:Array.isArray(e[r])?e[r].push(o):e[r]=[e[r],o]}),e):e},e.stringify=function(t,e){var n={encode:!0,strict:!0};return e=i(n,e),t?Object.keys(t).sort().map(function(n){var o=t[n];if(void 0===o)return"";if(null===o)return r(n,e);if(Array.isArray(o)){var i=[];return o.slice().forEach(function(t){void 0!==t&&(null===t?i.push(r(n,e)):i.push(r(n,e)+"="+r(t,e)))}),i.join("&")}return r(n,e)+"="+r(o,e)}).filter(function(t){return t.length>0}).join("&"):""}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}e.__esModule=!0;var c=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},u=n(7),s=r(u),f=n(1),l=r(f),p=function(t){var e=[],n=t;return{publish:function(t){n=t,e.forEach(function(t){return t(n)})},subscribe:function(t){return e.push(t),t(n),function(){return e=e.filter(function(e){return e!==t})}}}},h=function(t){function e(){var n,r,a;o(this,e);for(var c=arguments.length,u=Array(c),s=0;s<c;s++)u[s]=arguments[s];return n=r=i(this,t.call.apply(t,[this].concat(u))),r.broadcast=p(r.props.value),a=n,i(r,a)}return a(e,t),e.prototype.getBroadcastsContext=function(){var t,e=this.props.channel,n=this.context.broadcasts;return c({},n,(t={},t[e]=this.broadcast.subscribe,t))},e.prototype.getChildContext=function(){return{broadcasts:this.getBroadcastsContext()}},e.prototype.componentWillReceiveProps=function(t){this.props.channel!==t.channel?(0,s.default)(!1):void 0,this.props.value!==t.value&&this.broadcast.publish(t.value)},e.prototype.render=function(){return l.default.Children.only(this.props.children)},e}(l.default.Component);h.contextTypes={broadcasts:f.PropTypes.object},h.childContextTypes={broadcasts:f.PropTypes.object.isRequired},e.default=h},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}e.__esModule=!0;var c=n(7),u=r(c),s=n(1),f=r(s),l=function(t){function e(){var n,r,a;o(this,e);for(var c=arguments.length,u=Array(c),s=0;s<c;s++)u[s]=arguments[s];return n=r=i(this,t.call.apply(t,[this].concat(u))),r.state={value:null},a=n,i(r,a)}return a(e,t),e.prototype.componentWillMount=function(){var t=this,e=this.props.channel;if(this.context.broadcasts){var n=this.context.broadcasts[e];"function"!=typeof n?(0,u.default)(!1):void 0,this.unsubscribe=n(function(e){t.setState({value:e})})}},e.prototype.componentWillUnmount=function(){this.unsubscribe&&this.unsubscribe()},e.prototype.render=function(){return this.props.children(this.state.value)},e}(f.default.Component);l.contextTypes={broadcasts:f.default.PropTypes.object},e.default=l},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0,e.Subscriber=e.Broadcast=void 0;var o=n(34),i=r(o),a=n(35),c=r(a);e.Broadcast=i.default,e.Subscriber=c.default},function(t,e){"use strict";var n=function(t){return"/"===t.charAt(0)},r=function(t,e){for(var n=e,r=n+1,o=t.length;r<o;n+=1,r+=1)t[n]=t[r];t.pop()},o=function(t){var e=arguments.length<=1||void 0===arguments[1]?"":arguments[1],o=t&&t.split("/")||[],i=e&&e.split("/")||[],a=t&&n(t),c=e&&n(e),u=a||c;if(t&&n(t)?i=o:o.length&&(i.pop(),i=i.concat(o)),!i.length)return"/";var s=void 0;if(i.length){var f=i[i.length-1];s="."===f||".."===f||""===f}else s=!1;for(var l=0,p=i.length;p>=0;p--){var h=i[p];"."===h?r(i,p):".."===h?(r(i,p),l++):l&&(r(i,p),l--)}if(!u)for(;l--;l)i.unshift("..");!u||""===i[0]||i[0]&&n(i[0])||i.unshift("");var d=i.join("/");return s&&"/"!==d.substr(-1)&&(d+="/"),d};t.exports=o},function(t,e){"use strict";t.exports=function(t){return encodeURIComponent(t).replace(/[!'()*]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})}},function(t,e){"use strict";e.__esModule=!0;var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r=function t(e,r){if(e===r)return!0;if(null==e||null==r)return!1;if(Array.isArray(e))return!(!Array.isArray(r)||e.length!==r.length)&&e.every(function(e,n){return t(e,r[n])});var o="undefined"==typeof e?"undefined":n(e),i="undefined"==typeof r?"undefined":n(r);if(o!==i)return!1;if("object"===o){var a=e.valueOf(),c=r.valueOf();if(a!==e||c!==r)return t(a,c);var u=Object.keys(e),s=Object.keys(r);return u.length===s.length&&u.every(function(n){return t(e[n],r[n])})}return!1};e.default=r}])});