hyper-router 1.0.alpha1.8 → 2.4.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,33 +0,0 @@
1
- module Hyperstack
2
- module Internal
3
- module Router
4
- module ClassMethods
5
- def history(*args)
6
- if args.count.positive?
7
- @__history_type = args.first
8
- elsif @__history_type
9
- @__history ||= send(:"#{@__history_type}_history")
10
- end
11
- end
12
-
13
- def location
14
- Hyperstack::Router::Location.new(`#{history.to_n}.location`)
15
- end
16
-
17
- private
18
-
19
- def browser_history
20
- @__browser_history ||= React::Router::History.current.create_browser_history
21
- end
22
-
23
- def hash_history(*args)
24
- @__hash_history ||= React::Router::History.current.create_hash_history(*args)
25
- end
26
-
27
- def memory_history(*args)
28
- @__memory_history ||= React::Router::History.current.create_memory_history(*args)
29
- end
30
- end
31
- end
32
- end
33
- end
@@ -1,74 +0,0 @@
1
- # rubocop:disable Style/MethodName
2
- module Hyperstack
3
- module Internal
4
- module Router
5
- module Helpers
6
- def Link(to, opts = {}, &children)
7
- opts[:to] = {}.tap do |hash|
8
- hash[:pathname] = to
9
- hash[:search] = opts.delete(:search) if opts[:search]
10
- hash[:hash] = opts.delete(:hash) if opts[:hash]
11
- end.to_n
12
- React::Router::DOM::Link(opts, &children)
13
- end
14
-
15
- def NavLink(to, opts = {}, &children)
16
- opts[:to] = to.to_n
17
- if (%i[active_class active_style active] & opts.keys).any?
18
- opts[:activeClassName] = opts.delete(:active_class).to_n if opts[:active_class]
19
- opts[:activeStyle] = opts.delete(:active_style).to_n if opts[:active_style]
20
- opts[:isActive] = opts.delete(:active).to_n if opts[:active]
21
- State::Mapper.observed! Hyperstack::Router::Location
22
- end
23
- React::Router::DOM::NavLink(opts, &children)
24
- end
25
-
26
- def Redirect(to, opts = {})
27
- opts[:to] = to.to_n
28
- status = opts.delete(:status)
29
- status ||= 302
30
- `#{IsomorphicMethods.ctx}.status = #{status}`
31
- React::Router::Redirect(opts)
32
- end
33
-
34
- def format_params(e, *)
35
- {
36
- match: Hyperstack::Router::Match.new(`#{e}.match`),
37
- location: Hyperstack::Router::Location.new(`#{e}.location`),
38
- history: Hyperstack::Router::History.new(`#{e}.history`)
39
- }
40
- end
41
-
42
- def Route(to, opts = {}, &block)
43
- Hyperstack::Internal::State::Mapper.observed! Hyperstack::Router::Location
44
-
45
- opts[:path] = to.to_n
46
-
47
- if opts[:mounts]
48
- component = opts.delete(:mounts)
49
-
50
- opts[:component] = lambda do |*e|
51
- route_params = format_params(*e)
52
-
53
- Hyperstack::Component::ReactAPI.create_element(component, route_params).to_n
54
- end
55
- end
56
-
57
- if block
58
- opts[:render] = lambda do |*e|
59
- route_params = format_params(*e)
60
-
61
- yield(*route_params.values).to_n
62
- end
63
- end
64
-
65
- React::Router::Route(opts)
66
- end
67
-
68
- def Switch(&children)
69
- React::Router::Switch(&children)
70
- end
71
- end
72
- end
73
- end
74
- end
@@ -1,15 +0,0 @@
1
- module Hyperstack
2
- module Internal
3
- module Router
4
- module InstanceMethods
5
- def history
6
- self.class.history
7
- end
8
-
9
- def location
10
- self.class.location
11
- end
12
- end
13
- end
14
- end
15
- end
@@ -1,26 +0,0 @@
1
- module Hyperstack
2
- module Internal
3
- module Router
4
- class IsomorphicMethods
5
- include Hyperstack::Component::IsomorphicHelpers
6
-
7
- def self.ctx
8
- @ctx ||= `{}`
9
- end
10
-
11
- prerender_footer do |_controller|
12
- next unless on_opal_server?
13
- ctx_as_hash = Hash.new(@ctx)
14
- @ctx = `{}`
15
- raise "Hyperstack::Internal::Component::Redirect #{ctx_as_hash[:url]} status: #{ctx_as_hash[:status]}" if ctx_as_hash[:url]
16
- end
17
-
18
- isomorphic_method(:request_fullpath) do |f|
19
- f.when_on_client { `window.location.pathname` }
20
- f.send_to_server
21
- f.when_on_server { f.context.controller.request.fullpath }
22
- end
23
- end
24
- end
25
- end
26
- end
@@ -1,76 +0,0 @@
1
- module Hyperstack
2
- module Router
3
- class NoHistoryError < StandardError; end
4
-
5
- def __hyperstack_router_wrapper(&block)
6
- if Hyperstack::Component::IsomorphicHelpers.on_opal_server?
7
- ->() { __hyperstack_prerender_router(&block) }
8
- else
9
- ->() { __hyperstack_render_router(&block) }
10
- end
11
- end
12
-
13
- def __eval_block(block)
14
- result = instance_eval(&block)
15
- if result.is_a?(String) ||
16
- (result.respond_to?(:acts_as_string?) && result.acts_as_string?)
17
- # hyper-mesh DummyValues respond to acts_as_string, and must
18
- # be converted to spans INSIDE the parent, otherwise the waiting_on_resources
19
- # flag will get set in the wrong context
20
- result = Hyperstack::Internal::Component::RenderingContext
21
- .render(:span) { result.to_s }
22
- end
23
- result
24
- end
25
-
26
- def __hyperstack_render_router(&block)
27
- instance_eval do
28
- self.class.history :browser unless history
29
- React::Router::Router(history: history.to_n) do
30
- __eval_block(block)
31
- end
32
- end
33
- end
34
-
35
- def __hyperstack_prerender_router(&block)
36
- instance_eval do
37
- pathname, search = Hyperstack::Internal::Router::IsomorphicMethods.request_fullpath.split('?', 2)
38
- location = { pathname: pathname, search: search ? "?#{search}" : '' }.to_n
39
- React::Router::StaticRouter(
40
- location: location,
41
- context: Hyperstack::Internal::Router::IsomorphicMethods.ctx
42
- ) do
43
- __eval_block(block)
44
- end
45
- end
46
- end
47
-
48
- def self.included(base)
49
- base.extend(Hyperstack::Internal::Router::ClassMethods)
50
-
51
- base.include(Hyperstack::Internal::Router::Helpers)
52
-
53
- base.class_eval do
54
-
55
- def history
56
- self.class.history
57
- end
58
-
59
- def location
60
- self.class.location
61
- end
62
-
63
- after_mount do
64
- @_react_router_unlisten = history.listen do |location, _action|
65
- Hyperstack::Internal::State::Mapper.mutated! Hyperstack::Router::Location
66
- end
67
- end
68
-
69
- before_unmount do
70
- @_react_router_unlisten.call if @_react_router_unlisten
71
- end
72
- end
73
-
74
- end
75
- end
76
- end
@@ -1,27 +0,0 @@
1
- module Hyperstack
2
- module Router
3
- module Helpers
4
- def match
5
- @_match_param
6
- end
7
-
8
- def location
9
- @_location_param
10
- end
11
-
12
- def history
13
- @_history_param
14
- end
15
-
16
- def self.included(base)
17
- base.include(Hyperstack::Internal::Router::Helpers)
18
-
19
- base.class_eval do
20
- param :match, default: nil, alias: :_match_param
21
- param :location, default: nil, alias: :_location_param
22
- param :history, default: nil, alias: :_history_param
23
- end
24
- end
25
- end
26
- end
27
- end
@@ -1,48 +0,0 @@
1
- module Hyperstack
2
- module Router
3
- class History
4
- include Native::Wrapper
5
-
6
- def initialize(native)
7
- @native = native
8
- end
9
-
10
- def to_n
11
- @native
12
- end
13
-
14
- def location
15
- Location.new(`#{@native}.location`)
16
- end
17
-
18
- def block(message = nil)
19
- if message
20
- native_block(message.to_n)
21
- else
22
- native_block do |location, action|
23
- yield Location.new(location), action
24
- end
25
- end
26
- end
27
-
28
- def listen
29
- native_listen do |location, action|
30
- yield Location.new(location), action
31
- end
32
- end
33
-
34
- alias_native :action
35
- alias_native :native_block, :block
36
- alias_native :create_href, :createHref
37
- alias_native :entries
38
- alias_native :go
39
- alias_native :go_back, :goBack
40
- alias_native :go_forward, :goForward
41
- alias_native :index
42
- alias_native :length
43
- alias_native :native_listen, :listen
44
- alias_native :push, :push
45
- alias_native :replace, :replace
46
- end
47
- end
48
- end
@@ -1,31 +0,0 @@
1
- module Hyperstack
2
- module Router
3
- class Location
4
- include Native::Wrapper
5
-
6
- def initialize(native)
7
- @native = native
8
- end
9
-
10
- def to_n
11
- @native
12
- end
13
-
14
- def query
15
- return {} if search.blank?
16
-
17
- Hash[search[1..-1].split('&').map { |part|
18
- name, value = part.split('=')
19
-
20
- [`decodeURIComponent(#{name})`, `decodeURIComponent(#{value})`]
21
- }]
22
- end
23
-
24
- alias_native :pathname
25
- alias_native :search
26
- alias_native :hash
27
- alias_native :state
28
- alias_native :key
29
- end
30
- end
31
- end
@@ -1,20 +0,0 @@
1
- module Hyperstack
2
- module Router
3
- class Match
4
- include Native::Wrapper
5
-
6
- def initialize(native)
7
- @native = native
8
- end
9
-
10
- def to_n
11
- @native
12
- end
13
-
14
- alias_native :params
15
- alias_native :is_exact, :isExact
16
- alias_native :path
17
- alias_native :url
18
- end
19
- end
20
- end
@@ -1,4 +0,0 @@
1
- # rubocop:disable Style/FileName
2
- require 'src/react-router.min.js'
3
- require 'src/react-router-dom.min.js'
4
- require 'src/history.min.js'
@@ -1,3 +0,0 @@
1
- module HyperRouter
2
- VERSION = '1.0.alpha1.8'
3
- end
@@ -1,7 +0,0 @@
1
- module React
2
- class Router
3
- class DOM < Hyperstack::Component::NativeLibrary
4
- imports 'ReactRouterDOM'
5
- end
6
- end
7
- end
@@ -1,25 +0,0 @@
1
- module React
2
- class Router
3
- class History
4
- include Native::Wrapper
5
-
6
- def self.current
7
- new(`History`)
8
- end
9
-
10
- def initialize(native)
11
- @native = native
12
- end
13
-
14
- def to_n
15
- @native
16
- end
17
-
18
- alias_native :create_browser_history, :createBrowserHistory
19
- alias_native :create_hash_history, :createHashHistory
20
- alias_native :create_location, :createLocation
21
- alias_native :create_memory_history, :createMemoryHistory
22
- alias_native :create_path, :createPath
23
- end
24
- end
25
- end
@@ -1 +0,0 @@
1
- !function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.History=n():t.History=n()}(this,function(){return function(t){function n(o){if(e[o])return e[o].exports;var r=e[o]={exports:{},id:o,loaded:!1};return t[o].call(r.exports,r,r.exports,n),r.loaded=!0,r.exports}var e={};return n.m=t,n.c=e,n.p="",n(0)}([function(t,n,e){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}n.__esModule=!0,n.createPath=n.parsePath=n.locationsAreEqual=n.createLocation=n.createMemoryHistory=n.createHashHistory=n.createBrowserHistory=void 0;var r=e(2);Object.defineProperty(n,"createLocation",{enumerable:!0,get:function(){return r.createLocation}}),Object.defineProperty(n,"locationsAreEqual",{enumerable:!0,get:function(){return r.locationsAreEqual}});var i=e(1);Object.defineProperty(n,"parsePath",{enumerable:!0,get:function(){return i.parsePath}}),Object.defineProperty(n,"createPath",{enumerable:!0,get:function(){return i.createPath}});var a=e(7),c=o(a),u=e(8),s=o(u),f=e(9),l=o(f);n.createBrowserHistory=c.default,n.createHashHistory=s.default,n.createMemoryHistory=l.default},function(t,n){"use strict";n.__esModule=!0;var e=(n.addLeadingSlash=function(t){return"/"===t.charAt(0)?t:"/"+t},n.stripLeadingSlash=function(t){return"/"===t.charAt(0)?t.substr(1):t},n.hasBasename=function(t,n){return new RegExp("^"+n+"(\\/|\\?|#|$)","i").test(t)});n.stripBasename=function(t,n){return e(t,n)?t.substr(n.length):t},n.stripTrailingSlash=function(t){return"/"===t.charAt(t.length-1)?t.slice(0,-1):t},n.parsePath=function(t){var n=t||"/",e="",o="",r=n.indexOf("#");r!==-1&&(o=n.substr(r),n=n.substr(0,r));var i=n.indexOf("?");return i!==-1&&(e=n.substr(i),n=n.substr(0,i)),{pathname:n,search:"?"===e?"":e,hash:"#"===o?"":o}},n.createPath=function(t){var n=t.pathname,e=t.search,o=t.hash,r=n||"/";return e&&"?"!==e&&(r+="?"===e.charAt(0)?e:"?"+e),o&&"#"!==o&&(r+="#"===o.charAt(0)?o:"#"+o),r}},function(t,n,e){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}n.__esModule=!0,n.locationsAreEqual=n.createLocation=void 0;var r=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}return t},i=e(10),a=o(i),c=e(11),u=o(c),s=e(1);n.createLocation=function(t,n,e,o){var i=void 0;"string"==typeof t?(i=(0,s.parsePath)(t),i.state=n):(i=r({},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!==n&&void 0===i.state&&(i.state=n));try{i.pathname=decodeURI(i.pathname)}catch(t){throw t instanceof URIError?new URIError('Pathname "'+i.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):t}return e&&(i.key=e),o?i.pathname?"/"!==i.pathname.charAt(0)&&(i.pathname=(0,a.default)(i.pathname,o.pathname)):i.pathname=o.pathname:i.pathname||(i.pathname="/"),i},n.locationsAreEqual=function(t,n){return t.pathname===n.pathname&&t.search===n.search&&t.hash===n.hash&&t.key===n.key&&(0,u.default)(t.state,n.state)}},function(t,n,e){"use strict";var o=function(){};t.exports=o},function(t,n,e){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}n.__esModule=!0;var r=e(3),i=(o(r),function(){var t=null,n=function(n){return t=n,function(){t===n&&(t=null)}},e=function(n,e,o,r){if(null!=t){var i="function"==typeof t?t(n,e):t;"string"==typeof i?"function"==typeof o?o(i,r):r(!0):r(i!==!1)}else r(!0)},o=[],r=function(t){var n=!0,e=function(){n&&t.apply(void 0,arguments)};return o.push(e),function(){n=!1,o=o.filter(function(t){return t!==e})}},i=function(){for(var t=arguments.length,n=Array(t),e=0;e<t;e++)n[e]=arguments[e];o.forEach(function(t){return t.apply(void 0,n)})};return{setPrompt:n,confirmTransitionTo:e,appendListener:r,notifyListeners:i}});n.default=i},function(t,n){"use strict";n.__esModule=!0;n.canUseDOM=!("undefined"==typeof window||!window.document||!window.document.createElement),n.addEventListener=function(t,n,e){return t.addEventListener?t.addEventListener(n,e,!1):t.attachEvent("on"+n,e)},n.removeEventListener=function(t,n,e){return t.removeEventListener?t.removeEventListener(n,e,!1):t.detachEvent("on"+n,e)},n.getConfirmation=function(t,n){return n(window.confirm(t))},n.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)},n.supportsPopStateOnHashChange=function(){return window.navigator.userAgent.indexOf("Trident")===-1},n.supportsGoWithoutReloadUsingHash=function(){return window.navigator.userAgent.indexOf("Firefox")===-1},n.isExtraneousPopstateEvent=function(t){return void 0===t.state&&navigator.userAgent.indexOf("CriOS")===-1}},function(t,n,e){"use strict";var o=function(t,n,e,o,r,i,a,c){if(!t){var u;if(void 0===n)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var s=[e,o,r,i,a,c],f=0;u=new Error(n.replace(/%s/g,function(){return s[f++]})),u.name="Invariant Violation"}throw u.framesToPop=1,u}};t.exports=o},function(t,n,e){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}n.__esModule=!0;var r=("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},Object.assign||function(t){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}return t}),i=e(3),a=(o(i),e(6)),c=o(a),u=e(2),s=e(1),f=e(4),l=o(f),d=e(5),h="popstate",p="hashchange",v=function(){try{return window.history.state||{}}catch(t){return{}}},y=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};d.canUseDOM?void 0:(0,c.default)(!1);var n=window.history,e=(0,d.supportsHistory)(),o=!(0,d.supportsPopStateOnHashChange)(),i=t.forceRefresh,a=void 0!==i&&i,f=t.getUserConfirmation,y=void 0===f?d.getConfirmation:f,g=t.keyLength,m=void 0===g?6:g,w=t.basename?(0,s.stripTrailingSlash)((0,s.addLeadingSlash)(t.basename)):"",b=function(t){var n=t||{},e=n.key,o=n.state,r=window.location,i=r.pathname,a=r.search,c=r.hash,f=i+a+c;return w&&(f=(0,s.stripBasename)(f,w)),(0,u.createLocation)(f,o,e)},P=function(){return Math.random().toString(36).substr(2,m)},O=(0,l.default)(),L=function(t){r(G,t),G.length=n.length,O.notifyListeners(G.location,G.action)},x=function(t){(0,d.isExtraneousPopstateEvent)(t)||_(b(t.state))},S=function(){_(b(v()))},E=!1,_=function(t){if(E)E=!1,L();else{var n="POP";O.confirmTransitionTo(t,n,y,function(e){e?L({action:n,location:t}):A(t)})}},A=function(t){var n=G.location,e=M.indexOf(n.key);e===-1&&(e=0);var o=M.indexOf(t.key);o===-1&&(o=0);var r=e-o;r&&(E=!0,U(r))},k=b(v()),M=[k.key],T=function(t){return w+(0,s.createPath)(t)},H=function(t,o){var r="PUSH",i=(0,u.createLocation)(t,o,P(),G.location);O.confirmTransitionTo(i,r,y,function(t){if(t){var o=T(i),c=i.key,u=i.state;if(e)if(n.pushState({key:c,state:u},null,o),a)window.location.href=o;else{var s=M.indexOf(G.location.key),f=M.slice(0,s===-1?0:s+1);f.push(i.key),M=f,L({action:r,location:i})}else window.location.href=o}})},j=function(t,o){var r="REPLACE",i=(0,u.createLocation)(t,o,P(),G.location);O.confirmTransitionTo(i,r,y,function(t){if(t){var o=T(i),c=i.key,u=i.state;if(e)if(n.replaceState({key:c,state:u},null,o),a)window.location.replace(o);else{var s=M.indexOf(G.location.key);s!==-1&&(M[s]=i.key),L({action:r,location:i})}else window.location.replace(o)}})},U=function(t){n.go(t)},C=function(){return U(-1)},R=function(){return U(1)},B=0,I=function(t){B+=t,1===B?((0,d.addEventListener)(window,h,x),o&&(0,d.addEventListener)(window,p,S)):0===B&&((0,d.removeEventListener)(window,h,x),o&&(0,d.removeEventListener)(window,p,S))},q=!1,F=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=O.setPrompt(t);return q||(I(1),q=!0),function(){return q&&(q=!1,I(-1)),n()}},D=function(t){var n=O.appendListener(t);return I(1),function(){I(-1),n()}},G={length:n.length,action:"POP",location:k,createHref:T,push:H,replace:j,go:U,goBack:C,goForward:R,block:F,listen:D};return G};n.default=y},function(t,n,e){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}n.__esModule=!0;var r=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}return t},i=e(3),a=(o(i),e(6)),c=o(a),u=e(2),s=e(1),f=e(4),l=o(f),d=e(5),h="hashchange",p={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,n=t.indexOf("#");return n===-1?"":t.substring(n+1)},y=function(t){return window.location.hash=t},g=function(t){var n=window.location.href.indexOf("#");window.location.replace(window.location.href.slice(0,n>=0?n:0)+"#"+t)},m=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};d.canUseDOM?void 0:(0,c.default)(!1);var n=window.history,e=((0,d.supportsGoWithoutReloadUsingHash)(),t.getUserConfirmation),o=void 0===e?d.getConfirmation:e,i=t.hashType,a=void 0===i?"slash":i,f=t.basename?(0,s.stripTrailingSlash)((0,s.addLeadingSlash)(t.basename)):"",m=p[a],w=m.encodePath,b=m.decodePath,P=function(){var t=b(v());return f&&(t=(0,s.stripBasename)(t,f)),(0,u.createLocation)(t)},O=(0,l.default)(),L=function(t){r(V,t),V.length=n.length,O.notifyListeners(V.location,V.action)},x=!1,S=null,E=function(){var t=v(),n=w(t);if(t!==n)g(n);else{var e=P(),o=V.location;if(!x&&(0,u.locationsAreEqual)(o,e))return;if(S===(0,s.createPath)(e))return;S=null,_(e)}},_=function(t){if(x)x=!1,L();else{var n="POP";O.confirmTransitionTo(t,n,o,function(e){e?L({action:n,location:t}):A(t)})}},A=function(t){var n=V.location,e=H.lastIndexOf((0,s.createPath)(n));e===-1&&(e=0);var o=H.lastIndexOf((0,s.createPath)(t));o===-1&&(o=0);var r=e-o;r&&(x=!0,R(r))},k=v(),M=w(k);k!==M&&g(M);var T=P(),H=[(0,s.createPath)(T)],j=function(t){return"#"+w(f+(0,s.createPath)(t))},U=function(t,n){var e="PUSH",r=(0,u.createLocation)(t,void 0,void 0,V.location);O.confirmTransitionTo(r,e,o,function(t){if(t){var n=(0,s.createPath)(r),o=w(f+n),i=v()!==o;if(i){S=n,y(o);var a=H.lastIndexOf((0,s.createPath)(V.location)),c=H.slice(0,a===-1?0:a+1);c.push(n),H=c,L({action:e,location:r})}else L()}})},C=function(t,n){var e="REPLACE",r=(0,u.createLocation)(t,void 0,void 0,V.location);O.confirmTransitionTo(r,e,o,function(t){if(t){var n=(0,s.createPath)(r),o=w(f+n),i=v()!==o;i&&(S=n,g(o));var a=H.indexOf((0,s.createPath)(V.location));a!==-1&&(H[a]=n),L({action:e,location:r})}})},R=function(t){n.go(t)},B=function(){return R(-1)},I=function(){return R(1)},q=0,F=function(t){q+=t,1===q?(0,d.addEventListener)(window,h,E):0===q&&(0,d.removeEventListener)(window,h,E)},D=!1,G=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=O.setPrompt(t);return D||(F(1),D=!0),function(){return D&&(D=!1,F(-1)),n()}},W=function(t){var n=O.appendListener(t);return F(1),function(){F(-1),n()}},V={length:n.length,action:"POP",location:T,createHref:j,push:U,replace:C,go:R,goBack:B,goForward:I,block:G,listen:W};return V};n.default=m},function(t,n,e){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}n.__esModule=!0;var r=("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},Object.assign||function(t){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}return t}),i=e(3),a=(o(i),e(1)),c=e(2),u=e(4),s=o(u),f=function(t,n,e){return Math.min(Math.max(t,n),e)},l=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.getUserConfirmation,e=t.initialEntries,o=void 0===e?["/"]:e,i=t.initialIndex,u=void 0===i?0:i,l=t.keyLength,d=void 0===l?6:l,h=(0,s.default)(),p=function(t){r(_,t),_.length=_.entries.length,h.notifyListeners(_.location,_.action)},v=function(){return Math.random().toString(36).substr(2,d)},y=f(u,0,o.length-1),g=o.map(function(t){return"string"==typeof t?(0,c.createLocation)(t,void 0,v()):(0,c.createLocation)(t,void 0,t.key||v())}),m=a.createPath,w=function(t,e){var o="PUSH",r=(0,c.createLocation)(t,e,v(),_.location);h.confirmTransitionTo(r,o,n,function(t){if(t){var n=_.index,e=n+1,i=_.entries.slice(0);i.length>e?i.splice(e,i.length-e,r):i.push(r),p({action:o,location:r,index:e,entries:i})}})},b=function(t,e){var o="REPLACE",r=(0,c.createLocation)(t,e,v(),_.location);h.confirmTransitionTo(r,o,n,function(t){t&&(_.entries[_.index]=r,p({action:o,location:r}))})},P=function(t){var e=f(_.index+t,0,_.entries.length-1),o="POP",r=_.entries[e];h.confirmTransitionTo(r,o,n,function(t){t?p({action:o,location:r,index:e}):p()})},O=function(){return P(-1)},L=function(){return P(1)},x=function(t){var n=_.index+t;return n>=0&&n<_.entries.length},S=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return h.setPrompt(t)},E=function(t){return h.appendListener(t)},_={length:g.length,action:"POP",location:g[y],index:y,entries:g,createHref:m,push:w,replace:b,go:P,goBack:O,goForward:L,canGo:x,block:S,listen:E};return _};n.default=l},function(t,n){"use strict";function e(t){return"/"===t.charAt(0)}function o(t,n){for(var e=n,o=e+1,r=t.length;o<r;e+=1,o+=1)t[e]=t[o];t.pop()}function r(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=t&&t.split("/")||[],i=n&&n.split("/")||[],a=t&&e(t),c=n&&e(n),u=a||c;if(t&&e(t)?i=r:r.length&&(i.pop(),i=i.concat(r)),!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,d=i.length;d>=0;d--){var h=i[d];"."===h?o(i,d):".."===h?(o(i,d),l++):l&&(o(i,d),l--)}if(!u)for(;l--;l)i.unshift("..");!u||""===i[0]||i[0]&&e(i[0])||i.unshift("");var p=i.join("/");return s&&"/"!==p.substr(-1)&&(p+="/"),p}n.__esModule=!0,n.default=r,t.exports=n.default},function(t,n){"use strict";function e(t,n){if(t===n)return!0;if(null==t||null==n)return!1;if(Array.isArray(t))return Array.isArray(n)&&t.length===n.length&&t.every(function(t,o){return e(t,n[o])});var r="undefined"==typeof t?"undefined":o(t),i="undefined"==typeof n?"undefined":o(n);if(r!==i)return!1;if("object"===r){var a=t.valueOf(),c=n.valueOf();if(a!==t||c!==n)return e(a,c);var u=Object.keys(t),s=Object.keys(n);return u.length===s.length&&u.every(function(o){return e(t[o],n[o])})}return!1}n.__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&&t!==Symbol.prototype?"symbol":typeof t};n.default=e,t.exports=n.default}])});
@@ -1 +0,0 @@
1
- !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],e):e(t.ReactRouterDOM={},t.React)}(this,function(t,e){"use strict";function n(t){return t&&t.__esModule?t.default:t}function o(t,e){return e={exports:{}},t(e,e.exports),e.exports}function r(t){return function(){return t}}function i(t){return"/"===t.charAt(0)}function a(t,e){for(var n=e,o=n+1,r=t.length;o<r;n+=1,o+=1)t[n]=t[o];t.pop()}function c(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=t&&t.split("/")||[],o=e&&e.split("/")||[],r=t&&i(t),c=e&&i(e),s=r||c;if(t&&i(t)?o=n:n.length&&(o.pop(),o=o.concat(n)),!o.length)return"/";var u=void 0;if(o.length){var p=o[o.length-1];u="."===p||".."===p||""===p}else u=!1;for(var l=0,f=o.length;f>=0;f--){var h=o[f];"."===h?a(o,f):".."===h?(a(o,f),l++):l&&(a(o,f),l--)}if(!s)for(;l--;l)o.unshift("..");!s||""===o[0]||o[0]&&i(o[0])||o.unshift("");var d=o.join("/");return u&&"/"!==d.substr(-1)&&(d+="/"),d}function s(t,e){if(t===e)return!0;if(null==t||null==e)return!1;if(Array.isArray(t))return Array.isArray(e)&&t.length===e.length&&t.every(function(t,n){return s(t,e[n])});var n=void 0===t?"undefined":ct(t);if(n!==(void 0===e?"undefined":ct(e)))return!1;if("object"===n){var o=t.valueOf(),r=e.valueOf();if(o!==t||r!==e)return s(o,r);var i=Object.keys(t),a=Object.keys(e);return i.length===a.length&&i.every(function(n){return s(t[n],e[n])})}return!1}function u(t){return function(){return t}}function p(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(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 f(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)}function h(t){return"/"===t.charAt(0)}function d(t,e){for(var n=e,o=n+1,r=t.length;o<r;n+=1,o+=1)t[n]=t[o];t.pop()}function y(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=t&&t.split("/")||[],o=e&&e.split("/")||[],r=t&&h(t),i=e&&h(e),a=r||i;if(t&&h(t)?o=n:n.length&&(o.pop(),o=o.concat(n)),!o.length)return"/";var c=void 0;if(o.length){var s=o[o.length-1];c="."===s||".."===s||""===s}else c=!1;for(var u=0,p=o.length;p>=0;p--){var l=o[p];"."===l?d(o,p):".."===l?(d(o,p),u++):u&&(d(o,p),u--)}if(!a)for(;u--;u)o.unshift("..");!a||""===o[0]||o[0]&&h(o[0])||o.unshift("");var f=o.join("/");return c&&"/"!==f.substr(-1)&&(f+="/"),f}function v(t,e){if(t===e)return!0;if(null==t||null==e)return!1;if(Array.isArray(t))return Array.isArray(e)&&t.length===e.length&&t.every(function(t,n){return v(t,e[n])});var n=void 0===t?"undefined":Ft(t);if(n!==(void 0===e?"undefined":Ft(e)))return!1;if("object"===n){var o=t.valueOf(),r=e.valueOf();if(o!==t||r!==e)return v(o,r);var i=Object.keys(t),a=Object.keys(e);return i.length===a.length&&i.every(function(n){return v(t[n],e[n])})}return!1}function m(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function b(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 g(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)}function w(t,e){for(var n,o=[],r=0,i=0,a="",c=e&&e.delimiter||"/";null!=(n=oe.exec(t));){var s=n[0],u=n[1],p=n.index;if(a+=t.slice(i,p),i=p+s.length,u)a+=u[1];else{var l=t[i],f=n[2],h=n[3],d=n[4],y=n[5],v=n[6],m=n[7];a&&(o.push(a),a="");var b=null!=f&&null!=l&&l!==f,g="+"===v||"*"===v,w="?"===v||"*"===v,O=n[2]||c,P=d||y;o.push({name:h||r++,prefix:f||"",delimiter:O,optional:w,repeat:g,partial:b,asterisk:!!m,pattern:P?E(P):m?".*":"[^"+R(O)+"]+?"})}}return i<t.length&&(a+=t.substr(i)),a&&o.push(a),o}function O(t){return encodeURI(t).replace(/[\/?#]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})}function P(t){return encodeURI(t).replace(/[?#]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})}function x(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,o){for(var r="",i=n||{},a=(o||{}).pretty?O:encodeURIComponent,c=0;c<t.length;c++){var s=t[c];if("string"!=typeof s){var u,p=i[s.name];if(null==p){if(s.optional){s.partial&&(r+=s.prefix);continue}throw new TypeError('Expected "'+s.name+'" to be defined')}if(Xt(p)){if(!s.repeat)throw new TypeError('Expected "'+s.name+'" to not repeat, but received `'+JSON.stringify(p)+"`");if(0===p.length){if(s.optional)continue;throw new TypeError('Expected "'+s.name+'" to not be empty')}for(var l=0;l<p.length;l++){if(u=a(p[l]),!e[c].test(u))throw new TypeError('Expected all "'+s.name+'" to match "'+s.pattern+'", but received `'+JSON.stringify(u)+"`");r+=(0===l?s.prefix:s.delimiter)+u}}else{if(u=s.asterisk?P(p):a(p),!e[c].test(u))throw new TypeError('Expected "'+s.name+'" to match "'+s.pattern+'", but received "'+u+'"');r+=s.prefix+u}}else r+=s}return r}}function R(t){return t.replace(/([.+*?=^!:${}()[\]|\/\\])/g,"\\$1")}function E(t){return t.replace(/([=!:$\/()])/g,"\\$1")}function j(t,e){return t.keys=e,t}function T(t){return t.sensitive?"":"i"}function S(t,e){var n=t.source.match(/\((?!\?)/g);if(n)for(var o=0;o<n.length;o++)e.push({name:o,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,asterisk:!1,pattern:null});return j(t,e)}function _(t,e,n){for(var o=[],r=0;r<t.length;r++)o.push(A(t[r],e,n).source);return j(new RegExp("(?:"+o.join("|")+")",T(n)),e)}function C(t,e,n){return k(w(t,n),e,n)}function k(t,e,n){Xt(e)||(n=e||n,e=[]);for(var o=(n=n||{}).strict,r=!1!==n.end,i="",a=0;a<t.length;a++){var c=t[a];if("string"==typeof c)i+=R(c);else{var s=R(c.prefix),u="(?:"+c.pattern+")";e.push(c),c.repeat&&(u+="(?:"+s+u+")*"),i+=u=c.optional?c.partial?s+"("+u+")?":"(?:"+s+"("+u+"))?":s+"("+u+")"}}var p=R(n.delimiter||"/"),l=i.slice(-p.length)===p;return o||(i=(l?i.slice(0,-p.length):i)+"(?:"+p+"(?=$))?"),i+=r?"$":o&&l?"":"(?="+p+"|$)",j(new RegExp("^"+i,T(n)),e)}function A(t,e,n){return Xt(e)||(n=e||n,e=[]),n=n||{},t instanceof RegExp?S(t,e):Xt(t)?_(t,e,n):C(t,e,n)}function L(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function M(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 U(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)}function q(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function H(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 I(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)}function Y(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function B(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 W(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)}function N(t,e){var n={};for(var o in t)e.indexOf(o)>=0||Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=t[o]);return n}function D(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function F(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 $(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)}function V(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function z(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 K(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)}function G(t,e){var n={};for(var o in t)e.indexOf(o)>=0||Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=t[o]);return n}e=e&&e.hasOwnProperty("default")?e.default:e;var J=function(){},Q=J,X=function(){};X.thatReturns=r,X.thatReturnsFalse=r(!1),X.thatReturnsTrue=r(!0),X.thatReturnsNull=r(null),X.thatReturnsThis=function(){return this},X.thatReturnsArgument=function(t){return t};var Z=X,tt=function(t){},et=function(t,e,n,o,r,i,a,c){if(tt(e),!t){var s;if(void 0===e)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,o,r,i,a,c],p=0;(s=new Error(e.replace(/%s/g,function(){return u[p++]}))).name="Invariant Violation"}throw s.framesToPop=1,s}},nt="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",ot=function(){function t(t,e,n,o,r,i){i!==nt&&et(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function e(){return t}t.isRequired=t;var n={array:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e};return n.checkPropTypes=Z,n.PropTypes=n,n},rt=o(function(t){t.exports=ot()}),it=function(t,e,n,o,r,i,a,c){if(!t){var s;if(void 0===e)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,o,r,i,a,c],p=0;(s=new Error(e.replace(/%s/g,function(){return u[p++]}))).name="Invariant Violation"}throw s.framesToPop=1,s}},at=Object.freeze({default:c}),ct="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},st=Object.freeze({default:s}),ut=o(function(t,e){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};var n=e.hasBasename=function(t,e){return new RegExp("^"+e+"(\\/|\\?|#|$)","i").test(t)};e.stripBasename=function(t,e){return n(t,e)?t.substr(e.length):t},e.stripTrailingSlash=function(t){return"/"===t.charAt(t.length-1)?t.slice(0,-1):t},e.parsePath=function(t){var e=t||"/",n="",o="",r=e.indexOf("#");-1!==r&&(o=e.substr(r),e=e.substr(0,r));var i=e.indexOf("?");return-1!==i&&(n=e.substr(i),e=e.substr(0,i)),{pathname:e,search:"?"===n?"":n,hash:"#"===o?"":o}},e.createPath=function(t){var e=t.pathname,n=t.search,o=t.hash,r=e||"/";return n&&"?"!==n&&(r+="?"===n.charAt(0)?n:"?"+n),o&&"#"!==o&&(r+="#"===o.charAt(0)?o:"#"+o),r}}),pt=at&&c||at,lt=st&&s||st,ft=o(function(t,e){function n(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 o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},r=n(pt),i=n(lt);e.createLocation=function(t,e,n,i){var a=void 0;"string"==typeof t?(a=(0,ut.parsePath)(t)).state=e:(void 0===(a=o({},t)).pathname&&(a.pathname=""),a.search?"?"!==a.search.charAt(0)&&(a.search="?"+a.search):a.search="",a.hash?"#"!==a.hash.charAt(0)&&(a.hash="#"+a.hash):a.hash="",void 0!==e&&void 0===a.state&&(a.state=e));try{a.pathname=decodeURI(a.pathname)}catch(t){throw t instanceof URIError?new URIError('Pathname "'+a.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):t}return n&&(a.key=n),i?a.pathname?"/"!==a.pathname.charAt(0)&&(a.pathname=(0,r.default)(a.pathname,i.pathname)):a.pathname=i.pathname:a.pathname||(a.pathname="/"),a},e.locationsAreEqual=function(t,e){return t.pathname===e.pathname&&t.search===e.search&&t.hash===e.hash&&t.key===e.key&&(0,i.default)(t.state,e.state)}}),ht=o(function(t,e){e.__esModule=!0;var n=function(t){return t&&t.__esModule?t:{default:t}}(Q);e.default=function(){var t=null,e=[];return{setPrompt:function(e){return(0,n.default)(null==t,"A history supports only one prompt at a time"),t=e,function(){t===e&&(t=null)}},confirmTransitionTo:function(e,o,r,i){if(null!=t){var a="function"==typeof t?t(e,o):t;"string"==typeof a?"function"==typeof r?r(a,i):((0,n.default)(!1,"A history needs a getUserConfirmation function in order to use a prompt message"),i(!0)):i(!1!==a)}else i(!0)},appendListener:function(t){var n=!0,o=function(){n&&t.apply(void 0,arguments)};return e.push(o),function(){n=!1,e=e.filter(function(t){return t!==o})}},notifyListeners:function(){for(var t=arguments.length,n=Array(t),o=0;o<t;o++)n[o]=arguments[o];e.forEach(function(t){return t.apply(void 0,n)})}}}}),dt=o(function(t,e){e.__esModule=!0;e.canUseDOM=!("undefined"==typeof window||!window.document||!window.document.createElement),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(-1===t.indexOf("Android 2.")&&-1===t.indexOf("Android 4.0")||-1===t.indexOf("Mobile Safari")||-1!==t.indexOf("Chrome")||-1!==t.indexOf("Windows Phone"))&&(window.history&&"pushState"in window.history)},e.supportsPopStateOnHashChange=function(){return-1===window.navigator.userAgent.indexOf("Trident")},e.supportsGoWithoutReloadUsingHash=function(){return-1===window.navigator.userAgent.indexOf("Firefox")},e.isExtraneousPopstateEvent=function(t){return void 0===t.state&&-1===navigator.userAgent.indexOf("CriOS")}}),yt=n(o(function(t,e){function n(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&&t!==Symbol.prototype?"symbol":typeof t},r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},i=n(Q),a=n(it),c=n(ht),s=function(){try{return window.history.state||{}}catch(t){return{}}};e.default=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,a.default)(dt.canUseDOM,"Browser history needs a DOM");var e=window.history,n=(0,dt.supportsHistory)(),u=!(0,dt.supportsPopStateOnHashChange)(),p=t.forceRefresh,l=void 0!==p&&p,f=t.getUserConfirmation,h=void 0===f?dt.getConfirmation:f,d=t.keyLength,y=void 0===d?6:d,v=t.basename?(0,ut.stripTrailingSlash)((0,ut.addLeadingSlash)(t.basename)):"",m=function(t){var e=t||{},n=e.key,o=e.state,r=window.location,a=r.pathname+r.search+r.hash;return(0,i.default)(!v||(0,ut.hasBasename)(a,v),'You are attempting to use a basename on a page whose URL path does not begin with the basename. Expected path "'+a+'" to begin with "'+v+'".'),v&&(a=(0,ut.stripBasename)(a,v)),(0,ft.createLocation)(a,o,n)},b=function(){return Math.random().toString(36).substr(2,y)},g=(0,c.default)(),w=function(t){r(L,t),L.length=e.length,g.notifyListeners(L.location,L.action)},O=function(t){(0,dt.isExtraneousPopstateEvent)(t)||R(m(t.state))},P=function(){R(m(s()))},x=!1,R=function(t){x?(x=!1,w()):g.confirmTransitionTo(t,"POP",h,function(e){e?w({action:"POP",location:t}):E(t)})},E=function(t){var e=L.location,n=T.indexOf(e.key);-1===n&&(n=0);var o=T.indexOf(t.key);-1===o&&(o=0);var r=n-o;r&&(x=!0,_(r))},j=m(s()),T=[j.key],S=function(t){return v+(0,ut.createPath)(t)},_=function(t){e.go(t)},C=0,k=function(t){1===(C+=t)?((0,dt.addEventListener)(window,"popstate",O),u&&(0,dt.addEventListener)(window,"hashchange",P)):0===C&&((0,dt.removeEventListener)(window,"popstate",O),u&&(0,dt.removeEventListener)(window,"hashchange",P))},A=!1,L={length:e.length,action:"POP",location:j,createHref:S,push:function(t,r){(0,i.default)(!("object"===(void 0===t?"undefined":o(t))&&void 0!==t.state&&void 0!==r),"You should avoid providing a 2nd state argument to push when the 1st argument is a location-like object that already has state; it is ignored");var a=(0,ft.createLocation)(t,r,b(),L.location);g.confirmTransitionTo(a,"PUSH",h,function(t){if(t){var o=S(a),r=a.key,c=a.state;if(n)if(e.pushState({key:r,state:c},null,o),l)window.location.href=o;else{var s=T.indexOf(L.location.key),u=T.slice(0,-1===s?0:s+1);u.push(a.key),T=u,w({action:"PUSH",location:a})}else(0,i.default)(void 0===c,"Browser history cannot push state in browsers that do not support HTML5 history"),window.location.href=o}})},replace:function(t,r){(0,i.default)(!("object"===(void 0===t?"undefined":o(t))&&void 0!==t.state&&void 0!==r),"You should avoid providing a 2nd state argument to replace when the 1st argument is a location-like object that already has state; it is ignored");var a=(0,ft.createLocation)(t,r,b(),L.location);g.confirmTransitionTo(a,"REPLACE",h,function(t){if(t){var o=S(a),r=a.key,c=a.state;if(n)if(e.replaceState({key:r,state:c},null,o),l)window.location.replace(o);else{var s=T.indexOf(L.location.key);-1!==s&&(T[s]=a.key),w({action:"REPLACE",location:a})}else(0,i.default)(void 0===c,"Browser history cannot replace state in browsers that do not support HTML5 history"),window.location.replace(o)}})},go:_,goBack:function(){return _(-1)},goForward:function(){return _(1)},block:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=g.setPrompt(t);return A||(k(1),A=!0),function(){return A&&(A=!1,k(-1)),e()}},listen:function(t){var e=g.appendListener(t);return k(1),function(){k(-1),e()}}};return L}})),vt=function(){},mt=vt,bt=function(t,e,n,o,r,i,a,c){if(!t){var s;if(void 0===e)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,o,r,i,a,c],p=0;(s=new Error(e.replace(/%s/g,function(){return u[p++]}))).name="Invariant Violation"}throw s.framesToPop=1,s}},gt=function(){};gt.thatReturns=u,gt.thatReturnsFalse=u(!1),gt.thatReturnsTrue=u(!0),gt.thatReturnsNull=u(null),gt.thatReturnsThis=function(){return this},gt.thatReturnsArgument=function(t){return t};var wt=gt,Ot=function(t){},Pt=function(t,e,n,o,r,i,a,c){if(Ot(e),!t){var s;if(void 0===e)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,o,r,i,a,c],p=0;(s=new Error(e.replace(/%s/g,function(){return u[p++]}))).name="Invariant Violation"}throw s.framesToPop=1,s}},xt="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",Rt=function(){function t(t,e,n,o,r,i){i!==xt&&Pt(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function e(){return t}t.isRequired=t;var n={array:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e};return n.checkPropTypes=wt,n.PropTypes=n,n},Et=o(function(t){t.exports=Rt()}),jt=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},Tt=function(t){function n(){var e,o,r;p(this,n);for(var i=arguments.length,a=Array(i),c=0;c<i;c++)a[c]=arguments[c];return e=o=l(this,t.call.apply(t,[this].concat(a))),o.state={match:o.computeMatch(o.props.history.location.pathname)},r=e,l(o,r)}return f(n,t),n.prototype.getChildContext=function(){return{router:jt({},this.context.router,{history:this.props.history,route:{location:this.props.history.location,match:this.state.match}})}},n.prototype.computeMatch=function(t){return{path:"/",url:"/",params:{},isExact:"/"===t}},n.prototype.componentWillMount=function(){var t=this,n=this.props,o=n.children,r=n.history;bt(null==o||1===e.Children.count(o),"A <Router> may have only one child element"),this.unlisten=r.listen(function(){t.setState({match:t.computeMatch(r.location.pathname)})})},n.prototype.componentWillReceiveProps=function(t){mt(this.props.history===t.history,"You cannot change <Router history>")},n.prototype.componentWillUnmount=function(){this.unlisten()},n.prototype.render=function(){var t=this.props.children;return t?e.Children.only(t):null},n}(e.Component);Tt.propTypes={history:Et.object.isRequired,children:Et.node},Tt.contextTypes={router:Et.object},Tt.childContextTypes={router:Et.object.isRequired};var St="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},_t=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},Ct=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},kt=function(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)},At=function(t,e){var n={};for(var o in t)e.indexOf(o)>=0||Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=t[o]);return n},Lt=function(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},Mt=function(t){function n(){var e,o,r;_t(this,n);for(var i=arguments.length,a=Array(i),c=0;c<i;c++)a[c]=arguments[c];return e=o=Lt(this,t.call.apply(t,[this].concat(a))),o.history=yt(o.props),r=e,Lt(o,r)}return kt(n,t),n.prototype.componentWillMount=function(){},n.prototype.render=function(){return e.createElement(Tt,{history:this.history,children:this.props.children})},n}(e.Component),Ut=n(o(function(t,e){function n(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 o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},r=n(Q),i=n(it),a=n(ht),c={hashbang:{encodePath:function(t){return"!"===t.charAt(0)?t:"!/"+(0,ut.stripLeadingSlash)(t)},decodePath:function(t){return"!"===t.charAt(0)?t.substr(1):t}},noslash:{encodePath:ut.stripLeadingSlash,decodePath:ut.addLeadingSlash},slash:{encodePath:ut.addLeadingSlash,decodePath:ut.addLeadingSlash}},s=function(){var t=window.location.href,e=t.indexOf("#");return-1===e?"":t.substring(e+1)},u=function(t){return window.location.hash=t},p=function(t){var e=window.location.href.indexOf("#");window.location.replace(window.location.href.slice(0,e>=0?e:0)+"#"+t)};e.default=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,i.default)(dt.canUseDOM,"Hash history needs a DOM");var e=window.history,n=(0,dt.supportsGoWithoutReloadUsingHash)(),l=t.getUserConfirmation,f=void 0===l?dt.getConfirmation:l,h=t.hashType,d=void 0===h?"slash":h,y=t.basename?(0,ut.stripTrailingSlash)((0,ut.addLeadingSlash)(t.basename)):"",v=c[d],m=v.encodePath,b=v.decodePath,g=function(){var t=b(s());return(0,r.default)(!y||(0,ut.hasBasename)(t,y),'You are attempting to use a basename on a page whose URL path does not begin with the basename. Expected path "'+t+'" to begin with "'+y+'".'),y&&(t=(0,ut.stripBasename)(t,y)),(0,ft.createLocation)(t)},w=(0,a.default)(),O=function(t){o(U,t),U.length=e.length,w.notifyListeners(U.location,U.action)},P=!1,x=null,R=function(){var t=s(),e=m(t);if(t!==e)p(e);else{var n=g(),o=U.location;if(!P&&(0,ft.locationsAreEqual)(o,n))return;if(x===(0,ut.createPath)(n))return;x=null,E(n)}},E=function(t){P?(P=!1,O()):w.confirmTransitionTo(t,"POP",f,function(e){e?O({action:"POP",location:t}):j(t)})},j=function(t){var e=U.location,n=C.lastIndexOf((0,ut.createPath)(e));-1===n&&(n=0);var o=C.lastIndexOf((0,ut.createPath)(t));-1===o&&(o=0);var r=n-o;r&&(P=!0,k(r))},T=s(),S=m(T);T!==S&&p(S);var _=g(),C=[(0,ut.createPath)(_)],k=function(t){(0,r.default)(n,"Hash history go(n) causes a full page reload in this browser"),e.go(t)},A=0,L=function(t){1===(A+=t)?(0,dt.addEventListener)(window,"hashchange",R):0===A&&(0,dt.removeEventListener)(window,"hashchange",R)},M=!1,U={length:e.length,action:"POP",location:_,createHref:function(t){return"#"+m(y+(0,ut.createPath)(t))},push:function(t,e){(0,r.default)(void 0===e,"Hash history cannot push state; it is ignored");var n=(0,ft.createLocation)(t,void 0,void 0,U.location);w.confirmTransitionTo(n,"PUSH",f,function(t){if(t){var e=(0,ut.createPath)(n),o=m(y+e);if(s()!==o){x=e,u(o);var i=C.lastIndexOf((0,ut.createPath)(U.location)),a=C.slice(0,-1===i?0:i+1);a.push(e),C=a,O({action:"PUSH",location:n})}else(0,r.default)(!1,"Hash history cannot PUSH the same path; a new entry will not be added to the history stack"),O()}})},replace:function(t,e){(0,r.default)(void 0===e,"Hash history cannot replace state; it is ignored");var n=(0,ft.createLocation)(t,void 0,void 0,U.location);w.confirmTransitionTo(n,"REPLACE",f,function(t){if(t){var e=(0,ut.createPath)(n),o=m(y+e);s()!==o&&(x=e,p(o));var r=C.indexOf((0,ut.createPath)(U.location));-1!==r&&(C[r]=e),O({action:"REPLACE",location:n})}})},go:k,goBack:function(){return k(-1)},goForward:function(){return k(1)},block:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=w.setPrompt(t);return M||(L(1),M=!0),function(){return M&&(M=!1,L(-1)),e()}},listen:function(t){var e=w.appendListener(t);return L(1),function(){L(-1),e()}}};return U}})),qt=function(t){function n(){var e,o,r;_t(this,n);for(var i=arguments.length,a=Array(i),c=0;c<i;c++)a[c]=arguments[c];return e=o=Lt(this,t.call.apply(t,[this].concat(a))),o.history=Ut(o.props),r=e,Lt(o,r)}return kt(n,t),n.prototype.componentWillMount=function(){},n.prototype.render=function(){return e.createElement(Tt,{history:this.history,children:this.props.children})},n}(e.Component),Ht=function(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)},It=function(t){function n(){var e,o,r;_t(this,n);for(var i=arguments.length,a=Array(i),c=0;c<i;c++)a[c]=arguments[c];return e=o=Lt(this,t.call.apply(t,[this].concat(a))),o.handleClick=function(t){if(o.props.onClick&&o.props.onClick(t),!t.defaultPrevented&&0===t.button&&!o.props.target&&!Ht(t)){t.preventDefault();var e=o.context.router.history,n=o.props,r=n.replace,i=n.to;r?e.replace(i):e.push(i)}},r=e,Lt(o,r)}return kt(n,t),n.prototype.render=function(){var t=this.props,n=(t.replace,t.to),o=t.innerRef,r=At(t,["replace","to","innerRef"]);this.context.router||it(!1);var i=this.context.router.history.createHref("string"==typeof n?{pathname:n}:n);return e.createElement("a",Ct({},r,{onClick:this.handleClick,href:i,ref:o}))},n}(e.Component);It.defaultProps={replace:!1},It.contextTypes={router:rt.shape({history:rt.shape({push:rt.func.isRequired,replace:rt.func.isRequired,createHref:rt.func.isRequired}).isRequired}).isRequired};var Yt=o(function(t,e){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};var n=e.hasBasename=function(t,e){return new RegExp("^"+e+"(\\/|\\?|#|$)","i").test(t)};e.stripBasename=function(t,e){return n(t,e)?t.substr(e.length):t},e.stripTrailingSlash=function(t){return"/"===t.charAt(t.length-1)?t.slice(0,-1):t},e.parsePath=function(t){var e=t||"/",n="",o="",r=e.indexOf("#");-1!==r&&(o=e.substr(r),e=e.substr(0,r));var i=e.indexOf("?");return-1!==i&&(n=e.substr(i),e=e.substr(0,i)),{pathname:e,search:"?"===n?"":n,hash:"#"===o?"":o}},e.createPath=function(t){var e=t.pathname,n=t.search,o=t.hash,r=e||"/";return n&&"?"!==n&&(r+="?"===n.charAt(0)?n:"?"+n),o&&"#"!==o&&(r+="#"===o.charAt(0)?o:"#"+o),r}}),Bt=Yt.addLeadingSlash,Wt=Yt.parsePath,Nt=Yt.createPath,Dt=Object.freeze({default:y}),Ft="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},$t=Object.freeze({default:v}),Vt=Dt&&y||Dt,zt=$t&&v||$t,Kt=o(function(t,e){function n(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 o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},r=n(Vt),i=n(zt);e.createLocation=function(t,e,n,i){var a=void 0;"string"==typeof t?(a=(0,Yt.parsePath)(t)).state=e:(void 0===(a=o({},t)).pathname&&(a.pathname=""),a.search?"?"!==a.search.charAt(0)&&(a.search="?"+a.search):a.search="",a.hash?"#"!==a.hash.charAt(0)&&(a.hash="#"+a.hash):a.hash="",void 0!==e&&void 0===a.state&&(a.state=e));try{a.pathname=decodeURI(a.pathname)}catch(t){throw t instanceof URIError?new URIError('Pathname "'+a.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):t}return n&&(a.key=n),i?a.pathname?"/"!==a.pathname.charAt(0)&&(a.pathname=(0,r.default)(a.pathname,i.pathname)):a.pathname=i.pathname:a.pathname||(a.pathname="/"),a},e.locationsAreEqual=function(t,e){return t.pathname===e.pathname&&t.search===e.search&&t.hash===e.hash&&t.key===e.key&&(0,i.default)(t.state,e.state)}}),Gt=o(function(t,e){e.__esModule=!0;var n=function(t){return t&&t.__esModule?t:{default:t}}(mt);e.default=function(){var t=null,e=[];return{setPrompt:function(e){return(0,n.default)(null==t,"A history supports only one prompt at a time"),t=e,function(){t===e&&(t=null)}},confirmTransitionTo:function(e,o,r,i){if(null!=t){var a="function"==typeof t?t(e,o):t;"string"==typeof a?"function"==typeof r?r(a,i):((0,n.default)(!1,"A history needs a getUserConfirmation function in order to use a prompt message"),i(!0)):i(!1!==a)}else i(!0)},appendListener:function(t){var n=!0,o=function(){n&&t.apply(void 0,arguments)};return e.push(o),function(){n=!1,e=e.filter(function(t){return t!==o})}},notifyListeners:function(){for(var t=arguments.length,n=Array(t),o=0;o<t;o++)n[o]=arguments[o];e.forEach(function(t){return t.apply(void 0,n)})}}}}),Jt=n(o(function(t,e){function n(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&&t!==Symbol.prototype?"symbol":typeof t},r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},i=n(mt),a=n(Gt),c=function(t,e,n){return Math.min(Math.max(t,e),n)};e.default=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.getUserConfirmation,n=t.initialEntries,s=void 0===n?["/"]:n,u=t.initialIndex,p=void 0===u?0:u,l=t.keyLength,f=void 0===l?6:l,h=(0,a.default)(),d=function(t){r(w,t),w.length=w.entries.length,h.notifyListeners(w.location,w.action)},y=function(){return Math.random().toString(36).substr(2,f)},v=c(p,0,s.length-1),m=s.map(function(t){return"string"==typeof t?(0,Kt.createLocation)(t,void 0,y()):(0,Kt.createLocation)(t,void 0,t.key||y())}),b=Yt.createPath,g=function(t){var n=c(w.index+t,0,w.entries.length-1),o=w.entries[n];h.confirmTransitionTo(o,"POP",e,function(t){t?d({action:"POP",location:o,index:n}):d()})},w={length:m.length,action:"POP",location:m[v],index:v,entries:m,createHref:b,push:function(t,n){(0,i.default)(!("object"===(void 0===t?"undefined":o(t))&&void 0!==t.state&&void 0!==n),"You should avoid providing a 2nd state argument to push when the 1st argument is a location-like object that already has state; it is ignored");var r=(0,Kt.createLocation)(t,n,y(),w.location);h.confirmTransitionTo(r,"PUSH",e,function(t){if(t){var e=w.index+1,n=w.entries.slice(0);n.length>e?n.splice(e,n.length-e,r):n.push(r),d({action:"PUSH",location:r,index:e,entries:n})}})},replace:function(t,n){(0,i.default)(!("object"===(void 0===t?"undefined":o(t))&&void 0!==t.state&&void 0!==n),"You should avoid providing a 2nd state argument to replace when the 1st argument is a location-like object that already has state; it is ignored");var r=(0,Kt.createLocation)(t,n,y(),w.location);h.confirmTransitionTo(r,"REPLACE",e,function(t){t&&(w.entries[w.index]=r,d({action:"REPLACE",location:r}))})},go:g,goBack:function(){return g(-1)},goForward:function(){return g(1)},canGo:function(t){var e=w.index+t;return e>=0&&e<w.entries.length},block:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return h.setPrompt(t)},listen:function(t){return h.appendListener(t)}};return w}})),Qt=function(t){function n(){var e,o,r;m(this,n);for(var i=arguments.length,a=Array(i),c=0;c<i;c++)a[c]=arguments[c];return e=o=b(this,t.call.apply(t,[this].concat(a))),o.history=Jt(o.props),r=e,b(o,r)}return g(n,t),n.prototype.componentWillMount=function(){mt(!this.props.history,"<MemoryRouter> ignores the history prop. To use a custom history, use `import { Router }` instead of `import { MemoryRouter as Router }`.")},n.prototype.render=function(){return e.createElement(Tt,{history:this.history,children:this.props.children})},n}(e.Component);Qt.propTypes={initialEntries:Et.array,initialIndex:Et.number,getUserConfirmation:Et.func,keyLength:Et.number,children:Et.node};var Xt=Array.isArray||function(t){return"[object Array]"==Object.prototype.toString.call(t)},Zt=A,te=w,ee=x,ne=k,oe=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");Zt.parse=te,Zt.compile=function(t,e){return x(w(t,e))},Zt.tokensToFunction=ee,Zt.tokensToRegExp=ne;var re={},ie=0,ae=function(t,e){var n=""+e.end+e.strict+e.sensitive,o=re[n]||(re[n]={});if(o[t])return o[t];var r=[],i={re:Zt(t,r,e),keys:r};return ie<1e4&&(o[t]=i,ie++),i},ce=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};"string"==typeof e&&(e={path:e});var n=e,o=n.path,r=void 0===o?"/":o,i=n.exact,a=void 0!==i&&i,c=n.strict,s=void 0!==c&&c,u=n.sensitive,p=ae(r,{end:a,strict:s,sensitive:void 0!==u&&u}),l=p.re,f=p.keys,h=l.exec(t);if(!h)return null;var d=h[0],y=h.slice(1),v=t===d;return a&&!v?null:{path:r,url:"/"===r&&""===d?"/":d,isExact:v,params:f.reduce(function(t,e,n){return t[e.name]=y[n],t},{})}},se=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},ue=function(t){return 0===e.Children.count(t)},pe=function(t){function n(){var e,o,r;L(this,n);for(var i=arguments.length,a=Array(i),c=0;c<i;c++)a[c]=arguments[c];return e=o=M(this,t.call.apply(t,[this].concat(a))),o.state={match:o.computeMatch(o.props,o.context.router)},r=e,M(o,r)}return U(n,t),n.prototype.getChildContext=function(){return{router:se({},this.context.router,{route:{location:this.props.location||this.context.router.route.location,match:this.state.match}})}},n.prototype.computeMatch=function(t,e){var n=t.computedMatch,o=t.location,r=t.path,i=t.strict,a=t.exact,c=t.sensitive;if(n)return n;bt(e,"You should not use <Route> or withRouter() outside a <Router>");var s=e.route,u=(o||s.location).pathname;return r?ce(u,{path:r,strict:i,exact:a,sensitive:c}):s.match},n.prototype.componentWillMount=function(){mt(!(this.props.component&&this.props.render),"You should not use <Route component> and <Route render> in the same route; <Route render> will be ignored"),mt(!(this.props.component&&this.props.children&&!ue(this.props.children)),"You should not use <Route component> and <Route children> in the same route; <Route children> will be ignored"),mt(!(this.props.render&&this.props.children&&!ue(this.props.children)),"You should not use <Route render> and <Route children> in the same route; <Route children> will be ignored")},n.prototype.componentWillReceiveProps=function(t,e){mt(!(t.location&&!this.props.location),'<Route> elements should not change from uncontrolled to controlled (or vice versa). You initially used no "location" prop and then provided one on a subsequent render.'),mt(!(!t.location&&this.props.location),'<Route> elements should not change from controlled to uncontrolled (or vice versa). You provided a "location" prop initially but omitted it on a subsequent render.'),this.setState({match:this.computeMatch(t,e.router)})},n.prototype.render=function(){var t=this.state.match,n=this.props,o=n.children,r=n.component,i=n.render,a=this.context.router,c=a.history,s=a.route,u=a.staticContext,p={match:t,location:this.props.location||s.location,history:c,staticContext:u};return r?t?e.createElement(r,p):null:i?t?i(p):null:o?"function"==typeof o?o(p):ue(o)?null:e.Children.only(o):null},n}(e.Component);pe.propTypes={computedMatch:Et.object,path:Et.string,exact:Et.bool,strict:Et.bool,sensitive:Et.bool,component:Et.func,render:Et.func,children:Et.oneOfType([Et.func,Et.node]),location:Et.object},pe.contextTypes={router:Et.shape({history:Et.object.isRequired,route:Et.object.isRequired,staticContext:Et.object})},pe.childContextTypes={router:Et.object.isRequired};var le=function(t){var n=t.to,o=t.exact,r=t.strict,i=t.location,a=t.activeClassName,c=t.className,s=t.activeStyle,u=t.style,p=t.isActive,l=t.ariaCurrent,f=At(t,["to","exact","strict","location","activeClassName","className","activeStyle","style","isActive","ariaCurrent"]);return e.createElement(pe,{path:"object"===(void 0===n?"undefined":St(n))?n.pathname:n,exact:o,strict:r,location:i,children:function(t){var o=t.location,r=t.match,i=!!(p?p(r,o):r);return e.createElement(It,Ct({to:n,className:i?[c,a].filter(function(t){return t}).join(" "):c,style:i?Ct({},u,s):u,"aria-current":i&&l},f))}})};le.defaultProps={activeClassName:"active",ariaCurrent:"true"};var fe=function(t){function e(){return q(this,e),H(this,t.apply(this,arguments))}return I(e,t),e.prototype.enable=function(t){this.unblock&&this.unblock(),this.unblock=this.context.router.history.block(t)},e.prototype.disable=function(){this.unblock&&(this.unblock(),this.unblock=null)},e.prototype.componentWillMount=function(){bt(this.context.router,"You should not use <Prompt> outside a <Router>"),this.props.when&&this.enable(this.props.message)},e.prototype.componentWillReceiveProps=function(t){t.when?this.props.when&&this.props.message===t.message||this.enable(t.message):this.disable()},e.prototype.componentWillUnmount=function(){this.disable()},e.prototype.render=function(){return null},e}(e.Component);fe.propTypes={when:Et.bool,message:Et.oneOfType([Et.func,Et.string]).isRequired},fe.defaultProps={when:!0},fe.contextTypes={router:Et.shape({history:Et.shape({block:Et.func.isRequired}).isRequired}).isRequired};var he=function(t){var e=t||"/",n="",o="",r=e.indexOf("#");-1!==r&&(o=e.substr(r),e=e.substr(0,r));var i=e.indexOf("?");return-1!==i&&(n=e.substr(i),e=e.substr(0,i)),{pathname:e,search:"?"===n?"":n,hash:"#"===o?"":o}},de=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},ye=function(t,e,n,o){var r=void 0;"string"==typeof t?(r=he(t)).state=e:(void 0===(r=de({},t)).pathname&&(r.pathname=""),r.search?"?"!==r.search.charAt(0)&&(r.search="?"+r.search):r.search="",r.hash?"#"!==r.hash.charAt(0)&&(r.hash="#"+r.hash):r.hash="",void 0!==e&&void 0===r.state&&(r.state=e));try{r.pathname=decodeURI(r.pathname)}catch(t){throw t instanceof URIError?new URIError('Pathname "'+r.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):t}return n&&(r.key=n),o?r.pathname?"/"!==r.pathname.charAt(0)&&(r.pathname=y(r.pathname,o.pathname)):r.pathname=o.pathname:r.pathname||(r.pathname="/"),r},ve=function(t,e){return t.pathname===e.pathname&&t.search===e.search&&t.hash===e.hash&&t.key===e.key&&v(t.state,e.state)},me=function(t){function e(){return Y(this,e),B(this,t.apply(this,arguments))}return W(e,t),e.prototype.isStatic=function(){return this.context.router&&this.context.router.staticContext},e.prototype.componentWillMount=function(){bt(this.context.router,"You should not use <Redirect> outside a <Router>"),this.isStatic()&&this.perform()},e.prototype.componentDidMount=function(){this.isStatic()||this.perform()},e.prototype.componentDidUpdate=function(t){var e=ye(t.to),n=ye(this.props.to);ve(e,n)?mt(!1,"You tried to redirect to the same route you're currently on: \""+n.pathname+n.search+'"'):this.perform()},e.prototype.perform=function(){var t=this.context.router.history,e=this.props,n=e.push,o=e.to;n?t.push(o):t.replace(o)},e.prototype.render=function(){return null},e}(e.Component);me.propTypes={push:Et.bool,from:Et.string,to:Et.oneOfType([Et.string,Et.object]).isRequired},me.defaultProps={push:!1},me.contextTypes={router:Et.shape({history:Et.shape({push:Et.func.isRequired,replace:Et.func.isRequired}).isRequired,staticContext:Et.object}).isRequired};var be=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},ge=function(t){var e=t.pathname,n=void 0===e?"/":e,o=t.search,r=void 0===o?"":o,i=t.hash,a=void 0===i?"":i;return{pathname:n,search:"?"===r?"":r,hash:"#"===a?"":a}},we=function(t,e){return t?be({},e,{pathname:Bt(t)+e.pathname}):e},Oe=function(t,e){if(!t)return e;var n=Bt(t);return 0!==e.pathname.indexOf(n)?e:be({},e,{pathname:e.pathname.substr(n.length)})},Pe=function(t){return"string"==typeof t?Wt(t):ge(t)},xe=function(t){return"string"==typeof t?t:Nt(t)},Re=function(t){return function(){bt(!1,"You cannot %s with <StaticRouter>",t)}},Ee=function(){},je=function(t){function n(){var e,o,r;D(this,n);for(var i=arguments.length,a=Array(i),c=0;c<i;c++)a[c]=arguments[c];return e=o=F(this,t.call.apply(t,[this].concat(a))),o.createHref=function(t){return Bt(o.props.basename+xe(t))},o.handlePush=function(t){var e=o.props,n=e.basename,r=e.context;r.action="PUSH",r.location=we(n,Pe(t)),r.url=xe(r.location)},o.handleReplace=function(t){var e=o.props,n=e.basename,r=e.context;r.action="REPLACE",r.location=we(n,Pe(t)),r.url=xe(r.location)},o.handleListen=function(){return Ee},o.handleBlock=function(){return Ee},r=e,F(o,r)}return $(n,t),n.prototype.getChildContext=function(){return{router:{staticContext:this.props.context}}},n.prototype.componentWillMount=function(){mt(!this.props.history,"<StaticRouter> ignores the history prop. To use a custom history, use `import { Router }` instead of `import { StaticRouter as Router }`.")},n.prototype.render=function(){var t=this.props,n=t.basename,o=(t.context,t.location),r=N(t,["basename","context","location"]),i={createHref:this.createHref,action:"POP",location:Oe(n,Pe(o)),push:this.handlePush,replace:this.handleReplace,go:Re("go"),goBack:Re("goBack"),goForward:Re("goForward"),listen:this.handleListen,block:this.handleBlock};return e.createElement(Tt,be({},r,{history:i}))},n}(e.Component);je.propTypes={basename:Et.string,context:Et.object.isRequired,location:Et.oneOfType([Et.string,Et.object])},je.defaultProps={basename:"",location:"/"},je.childContextTypes={router:Et.object.isRequired};var Te=function(t){function n(){return V(this,n),z(this,t.apply(this,arguments))}return K(n,t),n.prototype.componentWillMount=function(){bt(this.context.router,"You should not use <Switch> outside a <Router>")},n.prototype.componentWillReceiveProps=function(t){mt(!(t.location&&!this.props.location),'<Switch> elements should not change from uncontrolled to controlled (or vice versa). You initially used no "location" prop and then provided one on a subsequent render.'),mt(!(!t.location&&this.props.location),'<Switch> elements should not change from controlled to uncontrolled (or vice versa). You provided a "location" prop initially but omitted it on a subsequent render.')},n.prototype.render=function(){var t=this.context.router.route,n=this.props.children,o=this.props.location||t.location,r=void 0,i=void 0;return e.Children.forEach(n,function(n){if(e.isValidElement(n)){var a=n.props,c=a.path,s=a.exact,u=a.strict,p=a.sensitive,l=a.from,f=c||l;null==r&&(i=n,r=f?ce(o.pathname,{path:f,exact:s,strict:u,sensitive:p}):t.match)}}),r?e.cloneElement(i,{location:o,computedMatch:r}):null},n}(e.Component);Te.contextTypes={router:Et.shape({route:Et.object.isRequired}).isRequired},Te.propTypes={children:Et.node,location:Et.object};var Se={childContextTypes:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,mixins:!0,propTypes:!0,type:!0},_e={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Ce=Object.defineProperty,ke=Object.getOwnPropertyNames,Ae=Object.getOwnPropertySymbols,Le=Object.getOwnPropertyDescriptor,Me=Object.getPrototypeOf,Ue=Me&&Me(Object),qe=function t(e,n,o){if("string"!=typeof n){if(Ue){var r=Me(n);r&&r!==Ue&&t(e,r,o)}var i=ke(n);Ae&&(i=i.concat(Ae(n)));for(var a=0;a<i.length;++a){var c=i[a];if(!(Se[c]||_e[c]||o&&o[c])){var s=Le(n,c);try{Ce(e,c,s)}catch(t){}}}return e}return e},He=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t};t.BrowserRouter=Mt,t.HashRouter=qt,t.Link=It,t.MemoryRouter=Qt,t.NavLink=le,t.Prompt=fe,t.Redirect=me,t.Route=pe,t.Router=Tt,t.StaticRouter=je,t.Switch=Te,t.matchPath=ce,t.withRouter=function(t){var n=function(n){var o=n.wrappedComponentRef,r=G(n,["wrappedComponentRef"]);return e.createElement(pe,{render:function(n){return e.createElement(t,He({},r,n,{ref:o}))}})};return n.displayName="withRouter("+(t.displayName||t.name)+")",n.WrappedComponent=t,n.propTypes={wrappedComponentRef:Et.func},qe(n,t)},Object.defineProperty(t,"__esModule",{value:!0})});
@@ -1 +0,0 @@
1
- !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],e):e(t.ReactRouter={},t.React)}(this,function(t,e){"use strict";function n(t,e){return e={exports:{}},t(e,e.exports),e.exports}function r(t){return function(){return t}}function o(t){return"/"===t.charAt(0)}function i(t,e){for(var n=e,r=n+1,o=t.length;r<o;n+=1,r+=1)t[n]=t[r];t.pop()}function a(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=t&&t.split("/")||[],r=e&&e.split("/")||[],a=t&&o(t),c=e&&o(e),u=a||c;if(t&&o(t)?r=n:n.length&&(r.pop(),r=r.concat(n)),!r.length)return"/";var s=void 0;if(r.length){var p=r[r.length-1];s="."===p||".."===p||""===p}else s=!1;for(var h=0,l=r.length;l>=0;l--){var f=r[l];"."===f?i(r,l):".."===f?(i(r,l),h++):h&&(i(r,l),h--)}if(!u)for(;h--;h)r.unshift("..");!u||""===r[0]||r[0]&&o(r[0])||r.unshift("");var d=r.join("/");return s&&"/"!==d.substr(-1)&&(d+="/"),d}function c(t,e){if(t===e)return!0;if(null==t||null==e)return!1;if(Array.isArray(t))return Array.isArray(e)&&t.length===e.length&&t.every(function(t,n){return c(t,e[n])});var n=void 0===t?"undefined":U(t);if(n!==(void 0===e?"undefined":U(e)))return!1;if("object"===n){var r=t.valueOf(),o=e.valueOf();if(r!==t||o!==e)return c(r,o);var i=Object.keys(t),a=Object.keys(e);return i.length===a.length&&i.every(function(n){return c(t[n],e[n])})}return!1}function u(t,e){for(var n,r=[],o=0,i=0,a="",c=e&&e.delimiter||"/";null!=(n=ct.exec(t));){var u=n[0],s=n[1],p=n.index;if(a+=t.slice(i,p),i=p+u.length,s)a+=s[1];else{var h=t[i],d=n[2],y=n[3],m=n[4],v=n[5],g=n[6],b=n[7];a&&(r.push(a),a="");var x=null!=d&&null!=h&&h!==d,R="+"===g||"*"===g,O="?"===g||"*"===g,P=n[2]||c,w=m||v;r.push({name:y||o++,prefix:d||"",delimiter:P,optional:O,repeat:R,partial:x,asterisk:!!b,pattern:w?f(w):b?".*":"[^"+l(P)+"]+?"})}}return i<t.length&&(a+=t.substr(i)),a&&r.push(a),r}function s(t){return encodeURI(t).replace(/[\/?#]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})}function p(t){return encodeURI(t).replace(/[?#]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})}function h(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="",i=n||{},a=(r||{}).pretty?s:encodeURIComponent,c=0;c<t.length;c++){var u=t[c];if("string"!=typeof u){var h,l=i[u.name];if(null==l){if(u.optional){u.partial&&(o+=u.prefix);continue}throw new TypeError('Expected "'+u.name+'" to be defined')}if(nt(l)){if(!u.repeat)throw new TypeError('Expected "'+u.name+'" to not repeat, but received `'+JSON.stringify(l)+"`");if(0===l.length){if(u.optional)continue;throw new TypeError('Expected "'+u.name+'" to not be empty')}for(var f=0;f<l.length;f++){if(h=a(l[f]),!e[c].test(h))throw new TypeError('Expected all "'+u.name+'" to match "'+u.pattern+'", but received `'+JSON.stringify(h)+"`");o+=(0===f?u.prefix:u.delimiter)+h}}else{if(h=u.asterisk?p(l):a(l),!e[c].test(h))throw new TypeError('Expected "'+u.name+'" to match "'+u.pattern+'", but received "'+h+'"');o+=u.prefix+h}}else o+=u}return o}}function l(t){return t.replace(/([.+*?=^!:${}()[\]|\/\\])/g,"\\$1")}function f(t){return t.replace(/([=!:$\/()])/g,"\\$1")}function d(t,e){return t.keys=e,t}function y(t){return t.sensitive?"":"i"}function m(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 d(t,e)}function v(t,e,n){for(var r=[],o=0;o<t.length;o++)r.push(x(t[o],e,n).source);return d(new RegExp("(?:"+r.join("|")+")",y(n)),e)}function g(t,e,n){return b(u(t,n),e,n)}function b(t,e,n){nt(e)||(n=e||n,e=[]);for(var r=(n=n||{}).strict,o=!1!==n.end,i="",a=0;a<t.length;a++){var c=t[a];if("string"==typeof c)i+=l(c);else{var u=l(c.prefix),s="(?:"+c.pattern+")";e.push(c),c.repeat&&(s+="(?:"+u+s+")*"),i+=s=c.optional?c.partial?u+"("+s+")?":"(?:"+u+"("+s+"))?":u+"("+s+")"}}var p=l(n.delimiter||"/"),h=i.slice(-p.length)===p;return r||(i=(h?i.slice(0,-p.length):i)+"(?:"+p+"(?=$))?"),i+=o?"$":r&&h?"":"(?="+p+"|$)",d(new RegExp("^"+i,y(n)),e)}function x(t,e,n){return nt(e)||(n=e||n,e=[]),n=n||{},t instanceof RegExp?m(t,e):nt(t)?v(t,e,n):g(t,e,n)}e=e&&e.hasOwnProperty("default")?e.default:e;var R=function(){},O=R,P=function(){};P.thatReturns=r,P.thatReturnsFalse=r(!1),P.thatReturnsTrue=r(!0),P.thatReturnsNull=r(null),P.thatReturnsThis=function(){return this},P.thatReturnsArgument=function(t){return t};var w=P,E=function(t){},j=function(t,e,n,r,o,i,a,c){if(E(e),!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],p=0;(u=new Error(e.replace(/%s/g,function(){return s[p++]}))).name="Invariant Violation"}throw u.framesToPop=1,u}},C="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",T=function(){function t(t,e,n,r,o,i){i!==C&&j(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function e(){return t}t.isRequired=t;var n={array:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e};return n.checkPropTypes=w,n.PropTypes=n,n},k=n(function(t){t.exports=T()}),A=n(function(t,e){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};var n=e.hasBasename=function(t,e){return new RegExp("^"+e+"(\\/|\\?|#|$)","i").test(t)};e.stripBasename=function(t,e){return n(t,e)?t.substr(e.length):t},e.stripTrailingSlash=function(t){return"/"===t.charAt(t.length-1)?t.slice(0,-1):t},e.parsePath=function(t){var e=t||"/",n="",r="",o=e.indexOf("#");-1!==o&&(r=e.substr(o),e=e.substr(0,o));var i=e.indexOf("?");return-1!==i&&(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}}),S=A.addLeadingSlash,M=A.parsePath,_=A.createPath,L=Object.freeze({default:a}),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},q=Object.freeze({default:c}),I=L&&a||L,W=q&&c||q,$=n(function(t,e){function n(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0,e.locationsAreEqual=e.createLocation=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(I),i=n(W);e.createLocation=function(t,e,n,i){var a=void 0;"string"==typeof t?(a=(0,A.parsePath)(t)).state=e:(void 0===(a=r({},t)).pathname&&(a.pathname=""),a.search?"?"!==a.search.charAt(0)&&(a.search="?"+a.search):a.search="",a.hash?"#"!==a.hash.charAt(0)&&(a.hash="#"+a.hash):a.hash="",void 0!==e&&void 0===a.state&&(a.state=e));try{a.pathname=decodeURI(a.pathname)}catch(t){throw t instanceof URIError?new URIError('Pathname "'+a.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):t}return n&&(a.key=n),i?a.pathname?"/"!==a.pathname.charAt(0)&&(a.pathname=(0,o.default)(a.pathname,i.pathname)):a.pathname=i.pathname:a.pathname||(a.pathname="/"),a},e.locationsAreEqual=function(t,e){return t.pathname===e.pathname&&t.search===e.search&&t.hash===e.hash&&t.key===e.key&&(0,i.default)(t.state,e.state)}}),H=n(function(t,e){e.__esModule=!0;var n=function(t){return t&&t.__esModule?t:{default:t}}(O);e.default=function(){var t=null,e=[];return{setPrompt:function(e){return(0,n.default)(null==t,"A history supports only one prompt at a time"),t=e,function(){t===e&&(t=null)}},confirmTransitionTo:function(e,r,o,i){if(null!=t){var a="function"==typeof t?t(e,r):t;"string"==typeof a?"function"==typeof o?o(a,i):((0,n.default)(!1,"A history needs a getUserConfirmation function in order to use a prompt message"),i(!0)):i(!1!==a)}else i(!0)},appendListener:function(t){var n=!0,r=function(){n&&t.apply(void 0,arguments)};return e.push(r),function(){n=!1,e=e.filter(function(t){return t!==r})}},notifyListeners:function(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];e.forEach(function(t){return t.apply(void 0,n)})}}}}),N=function(t){return t&&t.__esModule?t.default:t}(n(function(t,e){function n(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var r="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},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(O),a=n(H),c=function(t,e,n){return Math.min(Math.max(t,e),n)};e.default=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.getUserConfirmation,n=t.initialEntries,u=void 0===n?["/"]:n,s=t.initialIndex,p=void 0===s?0:s,h=t.keyLength,l=void 0===h?6:h,f=(0,a.default)(),d=function(t){o(x,t),x.length=x.entries.length,f.notifyListeners(x.location,x.action)},y=function(){return Math.random().toString(36).substr(2,l)},m=c(p,0,u.length-1),v=u.map(function(t){return"string"==typeof t?(0,$.createLocation)(t,void 0,y()):(0,$.createLocation)(t,void 0,t.key||y())}),g=A.createPath,b=function(t){var n=c(x.index+t,0,x.entries.length-1),r=x.entries[n];f.confirmTransitionTo(r,"POP",e,function(t){t?d({action:"POP",location:r,index:n}):d()})},x={length:v.length,action:"POP",location:v[m],index:m,entries:v,createHref:g,push:function(t,n){(0,i.default)(!("object"===(void 0===t?"undefined":r(t))&&void 0!==t.state&&void 0!==n),"You should avoid providing a 2nd state argument to push when the 1st argument is a location-like object that already has state; it is ignored");var o=(0,$.createLocation)(t,n,y(),x.location);f.confirmTransitionTo(o,"PUSH",e,function(t){if(t){var e=x.index+1,n=x.entries.slice(0);n.length>e?n.splice(e,n.length-e,o):n.push(o),d({action:"PUSH",location:o,index:e,entries:n})}})},replace:function(t,n){(0,i.default)(!("object"===(void 0===t?"undefined":r(t))&&void 0!==t.state&&void 0!==n),"You should avoid providing a 2nd state argument to replace when the 1st argument is a location-like object that already has state; it is ignored");var o=(0,$.createLocation)(t,n,y(),x.location);f.confirmTransitionTo(o,"REPLACE",e,function(t){t&&(x.entries[x.index]=o,d({action:"REPLACE",location:o}))})},go:b,goBack:function(){return b(-1)},goForward:function(){return b(1)},canGo:function(t){var e=x.index+t;return e>=0&&e<x.entries.length},block:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return f.setPrompt(t)},listen:function(t){return f.appendListener(t)}};return x}})),B=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],p=0;(u=new Error(e.replace(/%s/g,function(){return s[p++]}))).name="Invariant Violation"}throw u.framesToPop=1,u}},D=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},F=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},V=function(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)},Y=function(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},z=function(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},J=function(t){function n(){var e,r,o;D(this,n);for(var i=arguments.length,a=Array(i),c=0;c<i;c++)a[c]=arguments[c];return e=r=z(this,t.call.apply(t,[this].concat(a))),r.state={match:r.computeMatch(r.props.history.location.pathname)},o=e,z(r,o)}return V(n,t),n.prototype.getChildContext=function(){return{router:F({},this.context.router,{history:this.props.history,route:{location:this.props.history.location,match:this.state.match}})}},n.prototype.computeMatch=function(t){return{path:"/",url:"/",params:{},isExact:"/"===t}},n.prototype.componentWillMount=function(){var t=this,n=this.props,r=n.children,o=n.history;null!=r&&1!==e.Children.count(r)&&B(!1),this.unlisten=o.listen(function(){t.setState({match:t.computeMatch(o.location.pathname)})})},n.prototype.componentWillReceiveProps=function(t){},n.prototype.componentWillUnmount=function(){this.unlisten()},n.prototype.render=function(){var t=this.props.children;return t?e.Children.only(t):null},n}(e.Component);J.contextTypes={router:k.object},J.childContextTypes={router:k.object.isRequired};var G=function(t){function n(){var e,r,o;D(this,n);for(var i=arguments.length,a=Array(i),c=0;c<i;c++)a[c]=arguments[c];return e=r=z(this,t.call.apply(t,[this].concat(a))),r.history=N(r.props),o=e,z(r,o)}return V(n,t),n.prototype.componentWillMount=function(){},n.prototype.render=function(){return e.createElement(J,{history:this.history,children:this.props.children})},n}(e.Component),K=function(t){function e(){return D(this,e),z(this,t.apply(this,arguments))}return V(e,t),e.prototype.enable=function(t){this.unblock&&this.unblock(),this.unblock=this.context.router.history.block(t)},e.prototype.disable=function(){this.unblock&&(this.unblock(),this.unblock=null)},e.prototype.componentWillMount=function(){this.context.router||B(!1),this.props.when&&this.enable(this.props.message)},e.prototype.componentWillReceiveProps=function(t){t.when?this.props.when&&this.props.message===t.message||this.enable(t.message):this.disable()},e.prototype.componentWillUnmount=function(){this.disable()},e.prototype.render=function(){return null},e}(e.Component);K.defaultProps={when:!0},K.contextTypes={router:k.shape({history:k.shape({block:k.func.isRequired}).isRequired}).isRequired};var Q=function(t){var e=t||"/",n="",r="",o=e.indexOf("#");-1!==o&&(r=e.substr(o),e=e.substr(0,o));var i=e.indexOf("?");return-1!==i&&(n=e.substr(i),e=e.substr(0,i)),{pathname:e,search:"?"===n?"":n,hash:"#"===r?"":r}},X=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},Z=function(t,e,n,r){var o=void 0;"string"==typeof t?(o=Q(t)).state=e:(void 0===(o=X({},t)).pathname&&(o.pathname=""),o.search?"?"!==o.search.charAt(0)&&(o.search="?"+o.search):o.search="",o.hash?"#"!==o.hash.charAt(0)&&(o.hash="#"+o.hash):o.hash="",void 0!==e&&void 0===o.state&&(o.state=e));try{o.pathname=decodeURI(o.pathname)}catch(t){throw t instanceof URIError?new URIError('Pathname "'+o.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):t}return n&&(o.key=n),r?o.pathname?"/"!==o.pathname.charAt(0)&&(o.pathname=a(o.pathname,r.pathname)):o.pathname=r.pathname:o.pathname||(o.pathname="/"),o},tt=function(t,e){return t.pathname===e.pathname&&t.search===e.search&&t.hash===e.hash&&t.key===e.key&&c(t.state,e.state)},et=function(t){function e(){return D(this,e),z(this,t.apply(this,arguments))}return V(e,t),e.prototype.isStatic=function(){return this.context.router&&this.context.router.staticContext},e.prototype.componentWillMount=function(){this.context.router||B(!1),this.isStatic()&&this.perform()},e.prototype.componentDidMount=function(){this.isStatic()||this.perform()},e.prototype.componentDidUpdate=function(t){var e=Z(t.to),n=Z(this.props.to);tt(e,n)||this.perform()},e.prototype.perform=function(){var t=this.context.router.history,e=this.props,n=e.push,r=e.to;n?t.push(r):t.replace(r)},e.prototype.render=function(){return null},e}(e.Component);et.defaultProps={push:!1},et.contextTypes={router:k.shape({history:k.shape({push:k.func.isRequired,replace:k.func.isRequired}).isRequired,staticContext:k.object}).isRequired};var nt=Array.isArray||function(t){return"[object Array]"==Object.prototype.toString.call(t)},rt=x,ot=u,it=h,at=b,ct=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");rt.parse=ot,rt.compile=function(t,e){return h(u(t,e))},rt.tokensToFunction=it,rt.tokensToRegExp=at;var ut={},st=0,pt=function(t,e){var n=""+e.end+e.strict+e.sensitive,r=ut[n]||(ut[n]={});if(r[t])return r[t];var o=[],i={re:rt(t,o,e),keys:o};return st<1e4&&(r[t]=i,st++),i},ht=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};"string"==typeof e&&(e={path:e});var n=e,r=n.path,o=void 0===r?"/":r,i=n.exact,a=void 0!==i&&i,c=n.strict,u=void 0!==c&&c,s=n.sensitive,p=pt(o,{end:a,strict:u,sensitive:void 0!==s&&s}),h=p.re,l=p.keys,f=h.exec(t);if(!f)return null;var d=f[0],y=f.slice(1),m=t===d;return a&&!m?null:{path:o,url:"/"===o&&""===d?"/":d,isExact:m,params:l.reduce(function(t,e,n){return t[e.name]=y[n],t},{})}},lt=function(t){return 0===e.Children.count(t)},ft=function(t){function n(){var e,r,o;D(this,n);for(var i=arguments.length,a=Array(i),c=0;c<i;c++)a[c]=arguments[c];return e=r=z(this,t.call.apply(t,[this].concat(a))),r.state={match:r.computeMatch(r.props,r.context.router)},o=e,z(r,o)}return V(n,t),n.prototype.getChildContext=function(){return{router:F({},this.context.router,{route:{location:this.props.location||this.context.router.route.location,match:this.state.match}})}},n.prototype.computeMatch=function(t,e){var n=t.computedMatch,r=t.location,o=t.path,i=t.strict,a=t.exact,c=t.sensitive;if(n)return n;e||B(!1);var u=e.route,s=(r||u.location).pathname;return o?ht(s,{path:o,strict:i,exact:a,sensitive:c}):u.match},n.prototype.componentWillMount=function(){},n.prototype.componentWillReceiveProps=function(t,e){this.setState({match:this.computeMatch(t,e.router)})},n.prototype.render=function(){var t=this.state.match,n=this.props,r=n.children,o=n.component,i=n.render,a=this.context.router,c=a.history,u=a.route,s=a.staticContext,p={match:t,location:this.props.location||u.location,history:c,staticContext:s};return o?t?e.createElement(o,p):null:i?t?i(p):null:r?"function"==typeof r?r(p):lt(r)?null:e.Children.only(r):null},n}(e.Component);ft.contextTypes={router:k.shape({history:k.object.isRequired,route:k.object.isRequired,staticContext:k.object})},ft.childContextTypes={router:k.object.isRequired};var dt=function(t){var e=t.pathname,n=void 0===e?"/":e,r=t.search,o=void 0===r?"":r,i=t.hash,a=void 0===i?"":i;return{pathname:n,search:"?"===o?"":o,hash:"#"===a?"":a}},yt=function(t,e){return t?F({},e,{pathname:S(t)+e.pathname}):e},mt=function(t,e){if(!t)return e;var n=S(t);return 0!==e.pathname.indexOf(n)?e:F({},e,{pathname:e.pathname.substr(n.length)})},vt=function(t){return"string"==typeof t?M(t):dt(t)},gt=function(t){return"string"==typeof t?t:_(t)},bt=function(t){return function(){B(!1)}},xt=function(){},Rt=function(t){function n(){var e,r,o;D(this,n);for(var i=arguments.length,a=Array(i),c=0;c<i;c++)a[c]=arguments[c];return e=r=z(this,t.call.apply(t,[this].concat(a))),r.createHref=function(t){return S(r.props.basename+gt(t))},r.handlePush=function(t){var e=r.props,n=e.basename,o=e.context;o.action="PUSH",o.location=yt(n,vt(t)),o.url=gt(o.location)},r.handleReplace=function(t){var e=r.props,n=e.basename,o=e.context;o.action="REPLACE",o.location=yt(n,vt(t)),o.url=gt(o.location)},r.handleListen=function(){return xt},r.handleBlock=function(){return xt},o=e,z(r,o)}return V(n,t),n.prototype.getChildContext=function(){return{router:{staticContext:this.props.context}}},n.prototype.componentWillMount=function(){},n.prototype.render=function(){var t=this.props,n=t.basename,r=(t.context,t.location),o=Y(t,["basename","context","location"]),i={createHref:this.createHref,action:"POP",location:mt(n,vt(r)),push:this.handlePush,replace:this.handleReplace,go:bt(),goBack:bt(),goForward:bt(),listen:this.handleListen,block:this.handleBlock};return e.createElement(J,F({},o,{history:i}))},n}(e.Component);Rt.defaultProps={basename:"",location:"/"},Rt.childContextTypes={router:k.object.isRequired};var Ot=function(t){function n(){return D(this,n),z(this,t.apply(this,arguments))}return V(n,t),n.prototype.componentWillMount=function(){this.context.router||B(!1)},n.prototype.componentWillReceiveProps=function(t){},n.prototype.render=function(){var t=this.context.router.route,n=this.props.children,r=this.props.location||t.location,o=void 0,i=void 0;return e.Children.forEach(n,function(n){if(e.isValidElement(n)){var a=n.props,c=a.path,u=a.exact,s=a.strict,p=a.sensitive,h=a.from,l=c||h;null==o&&(i=n,o=l?ht(r.pathname,{path:l,exact:u,strict:s,sensitive:p}):t.match)}}),o?e.cloneElement(i,{location:r,computedMatch:o}):null},n}(e.Component);Ot.contextTypes={router:k.shape({route:k.object.isRequired}).isRequired};var Pt={childContextTypes:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,mixins:!0,propTypes:!0,type:!0},wt={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Et=Object.defineProperty,jt=Object.getOwnPropertyNames,Ct=Object.getOwnPropertySymbols,Tt=Object.getOwnPropertyDescriptor,kt=Object.getPrototypeOf,At=kt&&kt(Object),St=function t(e,n,r){if("string"!=typeof n){if(At){var o=kt(n);o&&o!==At&&t(e,o,r)}var i=jt(n);Ct&&(i=i.concat(Ct(n)));for(var a=0;a<i.length;++a){var c=i[a];if(!(Pt[c]||wt[c]||r&&r[c])){var u=Tt(n,c);try{Et(e,c,u)}catch(t){}}}return e}return e};t.MemoryRouter=G,t.Prompt=K,t.Redirect=et,t.Route=ft,t.Router=J,t.StaticRouter=Rt,t.Switch=Ot,t.matchPath=ht,t.withRouter=function(t){var n=function(n){var r=n.wrappedComponentRef,o=Y(n,["wrappedComponentRef"]);return e.createElement(ft,{render:function(n){return e.createElement(t,F({},o,n,{ref:r}))}})};return n.displayName="withRouter("+(t.displayName||t.name)+")",n.WrappedComponent=t,St(n,t)},Object.defineProperty(t,"__esModule",{value:!0})});