96 | );
97 | }
98 | }
99 |
100 |
101 | export default connect(
102 | state => ({...state}),
103 | dispatch => ({
104 | start: () => {
105 | dispatch( startCtxUI() );
106 | dispatch( emit( start ) );
107 | },
108 | susRes: () => {
109 | dispatch( susResAudioCtx() );
110 | dispatch( emit( susRes ) );
111 | },
112 | close: () => {
113 | dispatch( closeCtxUI() );
114 | dispatch( emit( close ) );
115 | },
116 | })
117 | )(RRWAExamplesApp);
118 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # REACT-REDUX-WEBAUDIO [](https://travis-ci.org/bsaphier/react-redux-webaudio) [](https://coveralls.io/github/bsaphier/react-redux-webaudio) [](https://www.npmjs.com/package/react-redux-webaudio)
2 | ###### An event manager for the [Web Audio API](https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API), integrated with [`react-redux`](https://redux.js.org/basics/usagewithreact).
3 |
4 | > #### ***Attn***: *Do not use this library for processing audio events that require low latency.*
5 | > Audio events are handled by React's internal reconciliation/diffing algos and therefore the latency, in terms of audio, is **huge**.
6 |
7 | ## Demo & Examples
8 | [Live Demo](https://bsaphier.github.io/react-redux-webaudio/examples/public/index.html)
9 | To build the examples locally, clone/fork the repo and run:
10 | ```
11 | cd examples
12 | yarn /* OR */ npm install
13 | npm start // this will start a webpack-dev-server and open the demo in your browser
14 | ```
15 |
16 | ## Installation & Setup
17 | ```bash
18 | npm i react-redux-webaudio
19 | ```
20 |
21 |
22 | ### Basic Setup Example
23 | ```javascript
24 | /**
25 | * Imports
26 | */
27 | // Es6+ import
28 | import { RRWAEngine, actionCreators, webAudioReducer } from 'react-redux-webaudio';
29 | // Es5
30 | const { RRWAEngine, actionCreators, webAudioReducer } = require('react-redux-webaudio');
31 |
32 |
33 |
34 | /**
35 | * The root reducer used in the Redux store.
36 | */
37 | const rootReducer = combineReducers({
38 | // your other reducers...
39 | webAudioReducer
40 | });
41 |
42 |
43 |
44 | /**
45 | * The application entry point.
46 | * Best to keep RRWAEngine at the top-level but technically it can be
47 | * anywhere, as long as it renders before any AudioEvents are emitted.
48 | */
49 | ReactDOM.render(
50 |
51 |
52 |
53 |
54 |
55 | ,
56 | document.getElementById('app')
57 | );
58 |
59 |
60 |
61 | /**
62 | * A container component that will render within the component tree of
63 | */
64 | const Container = connect(
65 | state => state,
66 | dispatch => ({ makeNoise: () => dispatch(actionCreators.emit(audioEvent)) })
67 | )(ReactComponent);
68 | ```
69 |
70 |
71 | ## Documentation
72 |
73 | **React-Redux-Webaudio** consists of three modules:
74 | - **webAudioReducer** – *The Redux reducer.*
75 | - **RRWAEngine** –––––– *The React component.*
76 | - **actionCreators** –––– *The Redux action-creators (it's not required that these action creators are used).*
77 |
78 |
79 | ### Defining an Audio Event
80 | Within the context of **React-Redux-Webaudio**, an `AudioEvent` is a function that receives one or two arguments: a reference to an instance of `window.AudioContext`, anda function that when called, returns that instance's `currentTime` value.
81 |
82 | ```ts
83 | type AudioEvent = (audioCtx: AudioContext, getCurrentTime?: () => number) => void | any;
84 |
85 | // a semi-practical example of what an AudioEvent could look like
86 | let audioEvent: AudioEvent = (audioCtx, getCurrentTime) => {
87 | let oscillator: OscillatorNode = audioCtx.createOscillator();
88 | let gainNode: GainNode = audioCtx.createGain();
89 |
90 | oscillator.connect(gainNode);
91 | gainNode.connect(audioCtx.destination);
92 |
93 | oscillator.type = 'square';
94 | oscillator.frequency.value = 100;
95 | oscillator.start(getCurrentTime() + 500); // wait half a second, then make sound.
96 |
97 | gainNode.gain.value = 0.1;
98 | };
99 | ```
100 | ###### ***Note***: Directly accessing `audioCtx.currentTime` may result in the time when the event was queued, not invoked. Instead, use the optional function `getCurrentTime`, which will return the value of `audioCtx.currentTime` when the `AudioEvent` is actually invoked.
101 |
102 | ### Action Creators
103 | #### `emit`
104 | The `emit` action-creator receives a single event or an array of events.
105 | - If passed a single event, it will be pushed to a queue where it will be invoked in FIFO order.
106 | - If passed an array of events, the array will be concatenated with the current event queue.
107 |
108 | #### Queueing an audio event without the included `emit` action-creator:
109 | To use your own Redux action instead of the one created by emit, the action type must be `'QUEUE_EVENT'` and the action must have an `event` key with a value of an `AudioEvent` or `Array`.
110 |
111 | ```ts
112 | type AudioEventAction = {
113 | type: 'QUEUE_EVENT'
114 | event: AudioEvent | AudioEvent[]
115 | }
116 |
117 | let action: AudioEventAction = {
118 | type: 'QUEUE_EVENT',
119 | event: (audioCtx, currentTime) => {
120 | // do something... anything.
121 | }
122 | };
123 |
124 | store.dispatch(action); // more practically, include the action within a mapDispatchToProps function.
125 | ```
126 |
127 |
128 | ### The RRWAEngine Component
129 | Include the RRWAEngine component anywhere in your app (*best to keep RRWAEngine at the top-level but technically it can be anywhere*). It must be within scope of the Redux store containing the webAudioReducer.
130 | ```js
131 | class App extends React.Component {
132 | render() {
133 | return (
134 |
135 |
136 | {/* other components would go here */}
137 |
138 | );
139 | }
140 | }
141 |
142 | ReactDOM.render(
143 |
144 |
145 | ,
146 | document.getElementById('app')
147 | );
148 | ```
149 |
150 | ---
151 |
152 | ###### *Pull Requests, github issues, comments, and questions are welcome* :)
153 |
--------------------------------------------------------------------------------
/test/RRWA-component.spec.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import TestRenderer from 'react-test-renderer';
3 | import { RRWA, mapState, mapDispatch } from '../src/RRWA-component';
4 |
5 | class MockAudioContext {
6 | constructor() {
7 | this.closed = false;
8 | this.currentTime = 0;
9 | }
10 |
11 | close() {
12 | this.closed = true;
13 | }
14 | }
15 |
16 |
17 | describe('RRWA component', () => {
18 | const event1Mock = jest.fn();
19 | const event2Mock = jest.fn();
20 | const event3Mock = jest.fn();
21 | const eventObject1 = { key: 0, event: event1Mock };
22 | const eventObject2 = { key: 1, event: event2Mock };
23 | const eventObject3 = { key: 2, event: event3Mock };
24 | const mockEvents = [eventObject1, eventObject2, eventObject3];
25 |
26 | afterEach(() => {
27 | jest.clearAllMocks();
28 | });
29 |
30 | describe('* Lifecycle *', () => {
31 | describe('componentDidMount', () => {
32 |
33 | afterEach(() => {
34 | jest.clearAllMocks();
35 | });
36 |
37 | it('calls RRWA.processEvent on every item in RRWA.props.events if RRWA.props.events is not empty', () => {
38 | const componentDidMountSpy = jest.spyOn(RRWA.prototype, 'componentDidMount');
39 |
40 | // test with empty events array
41 | let wrapper = TestRenderer.create( {}} events={[]} />);
42 | let instance = wrapper.getInstance();
43 | expect(instance.props.events.length).toBeFalsy();
44 | let processEventSpy = jest.spyOn(instance, 'processEvent');
45 | componentDidMountSpy.mockClear();
46 | instance.componentDidMount();
47 | expect(componentDidMountSpy).toHaveBeenCalledTimes(1);
48 | expect(processEventSpy).not.toHaveBeenCalled();
49 | wrapper.unmount();
50 |
51 | // test with events in the events array
52 | wrapper = TestRenderer.create( {}} events={mockEvents} />);
53 | instance = wrapper.getInstance();
54 | expect(instance.props.events.length).not.toBeFalsy();
55 | processEventSpy = jest.spyOn(instance, 'processEvent');
56 | componentDidMountSpy.mockClear();
57 | instance.componentDidMount();
58 | expect(componentDidMountSpy).toHaveBeenCalledTimes(1);
59 | expect(processEventSpy).toHaveBeenCalledTimes(instance.props.events.length);
60 | wrapper.unmount();
61 | });
62 |
63 | it('calls RRWA.props.clearQ if RRWA.props.events is not empty', () => {
64 | const componentDidMountSpy = jest.spyOn(RRWA.prototype, 'componentDidMount');
65 | const clearQMock = jest.fn();
66 | let wrapper = TestRenderer.create();
67 |
68 | // test with empty events array
69 | expect(componentDidMountSpy).toHaveBeenCalledTimes(1);
70 | expect(clearQMock).not.toHaveBeenCalled();
71 | wrapper.unmount();
72 |
73 | // test with events in the events array
74 | wrapper = TestRenderer.create();
75 | expect(componentDidMountSpy).toHaveBeenCalledTimes(2);
76 | expect(clearQMock).toHaveBeenCalledTimes(1);
77 | wrapper.unmount();
78 | });
79 | });
80 |
81 | describe('shouldComponentUpdate', () => {
82 | it('will return `true` if RRWA.props.events is not empty', () => {
83 | const wrapper = TestRenderer.create();
84 | const instance = wrapper.getInstance();
85 | expect(instance.shouldComponentUpdate({ events: [] })).toBe(false);
86 | expect(instance.shouldComponentUpdate({ events: mockEvents })).toBe(true);
87 | wrapper.unmount();
88 | jest.clearAllMocks();
89 | });
90 | });
91 |
92 | describe('componentDidUpdate', () => {
93 |
94 | afterEach(() => {
95 | jest.clearAllMocks();
96 | });
97 |
98 | it('does not get called if the incoming RRWA.props.events is empty', () => {
99 | const componentDidUpdateSpy = jest.spyOn(RRWA.prototype, 'componentDidUpdate');
100 | let wrapper = TestRenderer.create( {}} events={[]} />);
101 | let instance = wrapper.getInstance();
102 |
103 | // test with events in the events array
104 | wrapper.update( {}} events={[eventObject1]} />);
105 | expect(instance.props.events.length).not.toBeFalsy();
106 | expect(componentDidUpdateSpy).toHaveBeenCalledTimes(1);
107 |
108 | // test with empty events array
109 | wrapper.update( {}} events={[]} />);
110 | expect(instance.props.events.length).toBeFalsy();
111 | expect(componentDidUpdateSpy).toHaveBeenCalledTimes(1); // was not called again, even though props did update
112 | });
113 |
114 | it('calls RRWA.processEvent on every item in RRWA.props.events, if RRWA.props.events is not empty', () => {
115 | const componentDidUpdateSpy = jest.spyOn(RRWA.prototype, 'componentDidUpdate');
116 |
117 | // test with empty events array
118 | let wrapper = TestRenderer.create(
119 |
120 | );
121 | let instance = wrapper.getInstance();
122 | let processEventSpy = jest.spyOn(instance, 'processEvent');
123 | wrapper.update( {}} events={[]} />);
124 | expect(instance.props.events.length).toBeFalsy();
125 | expect(componentDidUpdateSpy).not.toHaveBeenCalled();
126 | expect(processEventSpy).not.toHaveBeenCalled();
127 |
128 | // test with events in the events array
129 | wrapper.update( {}} events={mockEvents} />);
130 | expect(instance.props.events.length).toBeGreaterThan(0);
131 | expect(componentDidUpdateSpy).toHaveBeenCalledTimes(1);
132 | expect(processEventSpy).toHaveBeenCalledTimes(instance.props.events.length);
133 |
134 | wrapper.unmount();
135 | });
136 |
137 | it('calls RRWA.props.clearQ if RRWA.props.events is not empty', () => {
138 | const componentDidUpdateSpy = jest.spyOn(RRWA.prototype, 'componentDidUpdate');
139 | const clearQMock = jest.fn();
140 |
141 | // test with empty events array
142 | const wrapper = TestRenderer.create();
143 | expect(componentDidUpdateSpy).not.toHaveBeenCalled();
144 | expect(clearQMock).not.toHaveBeenCalled();
145 |
146 | // test with events in the events array
147 | wrapper.update();
148 | expect(componentDidUpdateSpy).toHaveBeenCalledTimes(1);
149 | expect(clearQMock).toHaveBeenCalledTimes(1);
150 |
151 | wrapper.unmount();
152 | });
153 | });
154 |
155 | describe('componentWillUnmount', () => {
156 |
157 | afterEach(() => {
158 | jest.clearAllMocks();
159 | });
160 |
161 | it('gets called when the component unmounts', () => {
162 | const componentWillUnmountSpy = jest.spyOn(RRWA.prototype, 'componentWillUnmount');
163 | const wrapper = TestRenderer.create( {}} events={[]} />);
164 | expect(componentWillUnmountSpy).not.toHaveBeenCalled();
165 | wrapper.unmount();
166 | expect(componentWillUnmountSpy).toHaveBeenCalledTimes(1);
167 | });
168 |
169 | it('calls RRWA.audioContext.close', () => {
170 | const wrapper = TestRenderer.create( {}} events={[]} />);
171 | const instance = wrapper.getInstance();
172 | const audioContextCloseSpy = jest.spyOn(instance.audioContext, 'close');
173 | wrapper.unmount();
174 | expect(audioContextCloseSpy).toHaveBeenCalledTimes(1);
175 | });
176 | });
177 | });
178 |
179 | describe('* Instance *', () => {
180 | const _AudioContext = window.AudioContext; // store this value so that it can be reset
181 | let wrapper, instance, audioContext;
182 |
183 | beforeEach(() => {
184 | wrapper = TestRenderer.create( {}} events={[]} />);
185 | instance = wrapper.getInstance();
186 | audioContext = instance.audioContext;
187 | });
188 |
189 | afterEach(() => {
190 | wrapper.unmount();
191 | jest.clearAllMocks();
192 | window.AudioContext = _AudioContext;
193 | delete window.webkitAudioContext;
194 | });
195 |
196 | it('should render without error', () => {
197 | expect(wrapper).toBeTruthy();
198 | });
199 |
200 | it('should be an instance of RRWA-component', () => {
201 | expect(instance).toBeInstanceOf(RRWA);
202 | });
203 |
204 | it('shouldn\'t render anything', () => {
205 | expect(instance.render()).toBeNull();
206 | });
207 |
208 | it('constructor assigns RRWA.audioContext to a new instance of window.AudioContext || window.webkitAudioContext', () => {
209 | window.AudioContext = MockAudioContext;
210 | wrapper = TestRenderer.create( {}} events={[]} />);
211 | instance = wrapper.getInstance();
212 | expect(instance.audioContext).toBeInstanceOf(MockAudioContext);
213 |
214 | window.AudioContext = undefined;
215 | window.webkitAudioContext = MockAudioContext;
216 | wrapper = TestRenderer.create( {}} events={[]} />);
217 | instance = wrapper.getInstance();
218 | expect(instance.audioContext).toBeInstanceOf(MockAudioContext);
219 | });
220 |
221 | it('should throw an error if (window.AudioContext || window.webkitAudioContext) is false', () => {
222 | window.AudioContext = undefined;
223 | window.webkitAudioContext = undefined;
224 | expect(window.AudioContext || window.webkitAudioContext).toBeFalsy();
225 | expect(() => TestRenderer.create( {}} events={[]} />)).toThrow();
226 | });
227 |
228 | describe('RRWA.getCurrTime', () => {
229 | it('should return the currentTime of the audioContext instance', () => {
230 | expect(audioContext.currentTime).toEqual(0);
231 | expect(instance.getCurrTime()).toEqual(0);
232 | audioContext.processTo(500);
233 | expect(audioContext.currentTime).toBeCloseTo(500);
234 | expect(instance.getCurrTime()).toBeCloseTo(500);
235 | });
236 | });
237 |
238 | describe('RRWA.processEvent', () => {
239 | it('should call the function passed as args[0].event', () => {
240 | const eventMock = eventObject1.event;
241 | instance.processEvent(eventObject1);
242 | expect(eventMock.mock.calls.length).toBe(1);
243 | });
244 |
245 | it('should pass RRWA.audioContext as the first argument to the event function that this method calls', () => {
246 | const eventMock = eventObject1.event;
247 | eventMock.mockClear();
248 | instance.processEvent(eventObject1);
249 | expect(eventMock.mock.calls[0][0]).toBe(instance.audioContext);
250 | });
251 |
252 | it('should pass RRWA.getCurrTime as the second argument to the event function that this method calls', () => {
253 | const eventMock = eventObject1.event;
254 | eventMock.mockClear();
255 | instance.processEvent(eventObject1);
256 | expect(eventMock.mock.calls[0][1]).toBe(instance.getCurrTime);
257 | });
258 | });
259 | });
260 |
261 | describe('* Redux Connection *', () => {
262 |
263 | describe('mapStateToProps', () => {
264 | let mockState = { webAudioReducer: { events: [] } };
265 |
266 | it('returns an object containing the values of the webAudioReducer', () => {
267 | expect(mapState(mockState)).toEqual(mockState.webAudioReducer);
268 | expect(mapState(mockState)).toMatchObject(mockState.webAudioReducer);
269 | });
270 |
271 | it('returns a new object', () => {
272 | expect(mapState(mockState)).toEqual(mockState.webAudioReducer);
273 | expect(mapState(mockState)).not.toBe(mockState.webAudioReducer);
274 | });
275 | });
276 |
277 | describe('mapDispatchToProps', () => {
278 |
279 | it('returns an object containing a key: `clearQ`', () => {
280 | expect(mapDispatch()).toHaveProperty('clearQ');
281 | });
282 |
283 | it('the value of clearQ is a function that calls the function passed to mapDispatch', () => {
284 | let dispatch = jest.fn();
285 | let mappedProps = mapDispatch(dispatch);
286 | mappedProps.clearQ();
287 | expect(dispatch).toHaveBeenCalled();
288 | });
289 | });
290 | });
291 | });
292 |
--------------------------------------------------------------------------------
/examples/public/bundle.js:
--------------------------------------------------------------------------------
1 | !function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=93)}([function(e,t,n){"use strict";function r(e,t,n,r,i,a,u,s){if(o(t),!e){var c;if(void 0===t)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,r,i,a,u,s],p=0;c=new Error(t.replace(/%s/g,function(){return l[p++]})),c.name="Invariant Violation"}throw c.framesToPop=1,c}}var o=function(e){};e.exports=r},function(e,t,n){"use strict";var r=n(6),o=r;e.exports=o},function(e,t,n){"use strict";function r(e){for(var t=arguments.length-1,n="Minified React error #"+e+"; visit http://facebook.github.io/react/docs/error-decoder.html?invariant="+e,r=0;r1){for(var h=Array(f),m=0;m1){for(var g=Array(v),y=0;y]/,s=n(41),c=s(function(e,t){if(e.namespaceURI!==i.svg||"innerHTML"in e)e.innerHTML=t;else{r=r||document.createElement("div"),r.innerHTML="";for(var n=r.firstChild;n.firstChild;)e.appendChild(n.firstChild)}});if(o.canUseDOM){var l=document.createElement("div");l.innerHTML=" ",""===l.innerHTML&&(c=function(e,t){if(e.parentNode&&e.parentNode.replaceChild(e,e),a.test(t)||"<"===t[0]&&u.test(t)){e.innerHTML=String.fromCharCode(65279)+t;var n=e.firstChild;1===n.data.length?e.removeChild(n):n.deleteData(0,1)}else e.innerHTML=t}),l=null}e.exports=c},function(e,t,n){"use strict";function r(e){var t=""+e,n=i.exec(t);if(!n)return t;var r,o="",a=0,u=0;for(a=n.index;a]/;e.exports=o},function(e,t,n){"use strict";function r(e){return Object.prototype.hasOwnProperty.call(e,m)||(e[m]=f++,p[e[m]]={}),p[e[m]]}var o,i=n(3),a=n(33),u=n(165),s=n(75),c=n(166),l=n(37),p={},d=!1,f=0,h={topAbort:"abort",topAnimationEnd:c("animationend")||"animationend",topAnimationIteration:c("animationiteration")||"animationiteration",topAnimationStart:c("animationstart")||"animationstart",topBlur:"blur",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topChange:"change",topClick:"click",topCompositionEnd:"compositionend",topCompositionStart:"compositionstart",topCompositionUpdate:"compositionupdate",topContextMenu:"contextmenu",topCopy:"copy",topCut:"cut",topDoubleClick:"dblclick",topDrag:"drag",topDragEnd:"dragend",topDragEnter:"dragenter",topDragExit:"dragexit",topDragLeave:"dragleave",topDragOver:"dragover",topDragStart:"dragstart",topDrop:"drop",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topFocus:"focus",topInput:"input",topKeyDown:"keydown",topKeyPress:"keypress",topKeyUp:"keyup",topLoadedData:"loadeddata",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topMouseDown:"mousedown",topMouseMove:"mousemove",topMouseOut:"mouseout",topMouseOver:"mouseover",topMouseUp:"mouseup",topPaste:"paste",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topScroll:"scroll",topSeeked:"seeked",topSeeking:"seeking",topSelectionChange:"selectionchange",topStalled:"stalled",topSuspend:"suspend",topTextInput:"textInput",topTimeUpdate:"timeupdate",topTouchCancel:"touchcancel",topTouchEnd:"touchend",topTouchMove:"touchmove",topTouchStart:"touchstart",topTransitionEnd:c("transitionend")||"transitionend",topVolumeChange:"volumechange",topWaiting:"waiting",topWheel:"wheel"},m="_reactListenersID"+String(Math.random()).slice(2),v=i({},u,{ReactEventListener:null,injection:{injectReactEventListener:function(e){e.setHandleTopLevel(v.handleTopLevel),v.ReactEventListener=e}},setEnabled:function(e){v.ReactEventListener&&v.ReactEventListener.setEnabled(e)},isEnabled:function(){return!(!v.ReactEventListener||!v.ReactEventListener.isEnabled())},listenTo:function(e,t){for(var n=t,o=r(n),i=a.registrationNameDependencies[e],u=0;u-1||a("96",e),!c.plugins[n]){t.extractEvents||a("97",e),c.plugins[n]=t;var r=t.eventTypes;for(var i in r)o(r[i],t,i)||a("98",i,e)}}}function o(e,t,n){c.eventNameDispatchConfigs.hasOwnProperty(n)&&a("99",n),c.eventNameDispatchConfigs[n]=e;var r=e.phasedRegistrationNames;if(r){for(var o in r)if(r.hasOwnProperty(o)){var u=r[o];i(u,t,n)}return!0}return!!e.registrationName&&(i(e.registrationName,t,n),!0)}function i(e,t,n){c.registrationNameModules[e]&&a("100",e),c.registrationNameModules[e]=t,c.registrationNameDependencies[e]=t.eventTypes[n].dependencies}var a=n(2),u=(n(0),null),s={},c={plugins:[],eventNameDispatchConfigs:{},registrationNameModules:{},registrationNameDependencies:{},possibleRegistrationNames:null,injectEventPluginOrder:function(e){u&&a("101"),u=Array.prototype.slice.call(e),r()},injectEventPluginsByName:function(e){var t=!1;for(var n in e)if(e.hasOwnProperty(n)){var o=e[n];s.hasOwnProperty(n)&&s[n]===o||(s[n]&&a("102",n),s[n]=o,t=!0)}t&&r()},getPluginModuleForEvent:function(e){var t=e.dispatchConfig;if(t.registrationName)return c.registrationNameModules[t.registrationName]||null;if(void 0!==t.phasedRegistrationNames){var n=t.phasedRegistrationNames;for(var r in n)if(n.hasOwnProperty(r)){var o=c.registrationNameModules[n[r]];if(o)return o}}return null},_resetEventPlugins:function(){u=null;for(var e in s)s.hasOwnProperty(e)&&delete s[e];c.plugins.length=0;var t=c.eventNameDispatchConfigs;for(var n in t)t.hasOwnProperty(n)&&delete t[n];var r=c.registrationNameModules;for(var o in r)r.hasOwnProperty(o)&&delete r[o]}};e.exports=c},function(e,t,n){"use strict";function r(e){return"topMouseUp"===e||"topTouchEnd"===e||"topTouchCancel"===e}function o(e){return"topMouseMove"===e||"topTouchMove"===e}function i(e){return"topMouseDown"===e||"topTouchStart"===e}function a(e,t,n,r){var o=e.type||"unknown-event";e.currentTarget=g.getNodeFromInstance(r),t?m.invokeGuardedCallbackWithCatch(o,n,e):m.invokeGuardedCallback(o,n,e),e.currentTarget=null}function u(e,t){var n=e._dispatchListeners,r=e._dispatchInstances;if(Array.isArray(n))for(var o=0;o0&&r.length<20?n+" (keys: "+r.join(", ")+")":n}function i(e,t){var n=u.get(e);if(!n){return null}return n}var a=n(2),u=(n(9),n(22)),s=(n(7),n(8)),c=(n(0),n(1),{isMounted:function(e){var t=u.get(e);return!!t&&!!t._renderedComponent},enqueueCallback:function(e,t,n){c.validateCallback(t,n);var o=i(e);if(!o)return null;o._pendingCallbacks?o._pendingCallbacks.push(t):o._pendingCallbacks=[t],r(o)},enqueueCallbackInternal:function(e,t){e._pendingCallbacks?e._pendingCallbacks.push(t):e._pendingCallbacks=[t],r(e)},enqueueForceUpdate:function(e){var t=i(e,"forceUpdate");t&&(t._pendingForceUpdate=!0,r(t))},enqueueReplaceState:function(e,t,n){var o=i(e,"replaceState");o&&(o._pendingStateQueue=[t],o._pendingReplaceState=!0,void 0!==n&&null!==n&&(c.validateCallback(n,"replaceState"),o._pendingCallbacks?o._pendingCallbacks.push(n):o._pendingCallbacks=[n]),r(o))},enqueueSetState:function(e,t){var n=i(e,"setState");if(n){(n._pendingStateQueue||(n._pendingStateQueue=[])).push(t),r(n)}},enqueueElementInternal:function(e,t,n){e._pendingElement=t,e._context=n,r(e)},validateCallback:function(e,t){e&&"function"!=typeof e&&a("122",t,o(e))}});e.exports=c},function(e,t,n){"use strict";var r=(n(3),n(6)),o=(n(1),r);e.exports=o},function(e,t,n){"use strict";function r(e){var t,n=e.keyCode;return"charCode"in e?0===(t=e.charCode)&&13===n&&(t=13):t=n,t>=32||13===t?t:0}e.exports=r},function(e,t,n){"use strict";e.exports=n(213)},function(e,t,n){"use strict";function r(e,t,n){this.props=e,this.context=t,this.refs=c,this.updater=n||s}function o(e,t,n){this.props=e,this.context=t,this.refs=c,this.updater=n||s}function i(){}var a=n(18),u=n(3),s=n(52),c=(n(53),n(23));n(0),n(94);r.prototype.isReactComponent={},r.prototype.setState=function(e,t){"object"!=typeof e&&"function"!=typeof e&&null!=e&&a("85"),this.updater.enqueueSetState(this,e),t&&this.updater.enqueueCallback(this,t,"setState")},r.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this),e&&this.updater.enqueueCallback(this,e,"forceUpdate")};i.prototype=r.prototype,o.prototype=new i,o.prototype.constructor=o,u(o.prototype,r.prototype),o.prototype.isPureReactComponent=!0,e.exports={Component:r,PureComponent:o}},function(e,t,n){"use strict";var r=(n(1),{isMounted:function(e){return!1},enqueueCallback:function(e,t){},enqueueForceUpdate:function(e){},enqueueReplaceState:function(e,t){},enqueueSetState:function(e,t){}});e.exports=r},function(e,t,n){"use strict";var r=!1;e.exports=r},function(e,t,n){"use strict";var r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103;e.exports=r},function(e,t,n){"use strict";var r=n(102);e.exports=function(e){return r(e,!1)}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){e.exports=n(109)()},function(e,t,n){"use strict";n.d(t,"b",function(){return i}),n.d(t,"a",function(){return a});var r=n(57),o=n.n(r),i=o.a.shape({trySubscribe:o.a.func.isRequired,tryUnsubscribe:o.a.func.isRequired,notifyNestedSubs:o.a.func.isRequired,isSubscribed:o.a.func.isRequired}),a=o.a.shape({subscribe:o.a.func.isRequired,dispatch:o.a.func.isRequired,getState:o.a.func.isRequired})},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function a(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function u(){}function s(e,t){var n={run:function(r){try{var o=e(t.getState(),r);(o!==n.props||n.error)&&(n.shouldComponentUpdate=!0,n.props=o,n.error=null)}catch(e){n.shouldComponentUpdate=!0,n.error=e}}};return n}function c(e){var t,n,c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},l=c.getDisplayName,d=void 0===l?function(e){return"ConnectAdvanced("+e+")"}:l,_=c.methodName,C=void 0===_?"connectAdvanced":_,E=c.renderCountProp,w=void 0===E?void 0:E,x=c.shouldHandleStateChanges,T=void 0===x||x,P=c.storeKey,k=void 0===P?"store":P,S=c.withRef,O=void 0!==S&&S,N=a(c,["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef"]),M=k+"Subscription",I=y++,R=(t={},t[k]=v.a,t[M]=v.b,t),A=(n={},n[M]=v.b,n);return function(t){f.a("function"==typeof t,"You must pass a component to the function returned by connect. Instead received "+JSON.stringify(t));var n=t.displayName||t.name||"Component",a=d(n),c=g({},N,{getDisplayName:d,methodName:C,renderCountProp:w,shouldHandleStateChanges:T,storeKey:k,withRef:O,displayName:a,wrappedComponentName:n,WrappedComponent:t}),l=function(n){function l(e,t){r(this,l);var i=o(this,n.call(this,e,t));return i.version=I,i.state={},i.renderCount=0,i.store=e[k]||t[k],i.propsMode=Boolean(e[k]),i.setWrappedInstance=i.setWrappedInstance.bind(i),f.a(i.store,'Could not find "'+k+'" in either the context or props of "'+a+'". Either wrap the root component in a , or explicitly pass "'+k+'" as a prop to "'+a+'".'),i.initSelector(),i.initSubscription(),i}return i(l,n),l.prototype.getChildContext=function(){var e,t=this.propsMode?null:this.subscription;return e={},e[M]=t||this.context[M],e},l.prototype.componentDidMount=function(){T&&(this.subscription.trySubscribe(),this.selector.run(this.props),this.selector.shouldComponentUpdate&&this.forceUpdate())},l.prototype.componentWillReceiveProps=function(e){this.selector.run(e)},l.prototype.shouldComponentUpdate=function(){return this.selector.shouldComponentUpdate},l.prototype.componentWillUnmount=function(){this.subscription&&this.subscription.tryUnsubscribe(),this.subscription=null,this.notifyNestedSubs=u,this.store=null,this.selector.run=u,this.selector.shouldComponentUpdate=!1},l.prototype.getWrappedInstance=function(){return f.a(O,"To access the wrapped instance, you need to specify { withRef: true } in the options argument of the "+C+"() call."),this.wrappedInstance},l.prototype.setWrappedInstance=function(e){this.wrappedInstance=e},l.prototype.initSelector=function(){var t=e(this.store.dispatch,c);this.selector=s(t,this.store),this.selector.run(this.props)},l.prototype.initSubscription=function(){if(T){var e=(this.propsMode?this.props:this.context)[M];this.subscription=new m.a(this.store,e,this.onStateChange.bind(this)),this.notifyNestedSubs=this.subscription.notifyNestedSubs.bind(this.subscription)}},l.prototype.onStateChange=function(){this.selector.run(this.props),this.selector.shouldComponentUpdate?(this.componentDidUpdate=this.notifyNestedSubsOnComponentDidUpdate,this.setState(b)):this.notifyNestedSubs()},l.prototype.notifyNestedSubsOnComponentDidUpdate=function(){this.componentDidUpdate=void 0,this.notifyNestedSubs()},l.prototype.isSubscribed=function(){return Boolean(this.subscription)&&this.subscription.isSubscribed()},l.prototype.addExtraProps=function(e){if(!(O||w||this.propsMode&&this.subscription))return e;var t=g({},e);return O&&(t.ref=this.setWrappedInstance),w&&(t[w]=this.renderCount++),this.propsMode&&this.subscription&&(t[M]=this.subscription),t},l.prototype.render=function(){var e=this.selector;if(e.shouldComponentUpdate=!1,e.error)throw e.error;return h.createElement(t,this.addExtraProps(e.props))},l}(h.Component);return l.WrappedComponent=t,l.displayName=a,l.childContextTypes=A,l.contextTypes=R,l.propTypes=R,p.a(l,t)}}t.a=c;var l=n(110),p=n.n(l),d=n(111),f=n.n(d),h=n(12),m=(n.n(h),n(112)),v=n(58),g=Object.assign||function(e){for(var t=1;t1)for(var n=1;n.":"function"==typeof t?" Instead of passing a class like Foo, pass React.createElement(Foo) or .":null!=t&&void 0!==t.props?" This may be caused by unintentionally loading two independent copies of React.":"");var a,u=v.createElement(j,{child:t});if(e){var s=E.get(e);a=s._processChildContext(s._context)}else a=k;var l=d(n);if(l){var p=l._currentElement,h=p.props.child;if(N(h,t)){var m=l._renderedComponent.getPublicInstance(),g=r&&function(){r.call(m)};return F._updateRootComponent(l,u,a,n,g),m}F.unmountComponentAtNode(n)}var y=o(n),b=y&&!!i(y),_=c(n),C=b&&!l&&!_,w=F._renderNewRootComponent(u,n,C,a)._renderedComponent.getPublicInstance();return r&&r.call(w),w},render:function(e,t,n){return F._renderSubtreeIntoContainer(null,e,t,n)},unmountComponentAtNode:function(e){l(e)||f("40");var t=d(e);if(!t){c(e),1===e.nodeType&&e.hasAttribute(I);return!1}return delete U[t._instance.rootID],P.batchedUpdates(s,t,e,!1),!0},_mountImageIntoNode:function(e,t,n,i,a){if(l(t)||f("41"),i){var u=o(t);if(w.canReuseMarkup(e,u))return void y.precacheNode(n,u);var s=u.getAttribute(w.CHECKSUM_ATTR_NAME);u.removeAttribute(w.CHECKSUM_ATTR_NAME);var c=u.outerHTML;u.setAttribute(w.CHECKSUM_ATTR_NAME,s);var p=e,d=r(p,c),m=" (client) "+p.substring(d-20,d+20)+"\n (server) "+c.substring(d-20,d+20);t.nodeType===A&&f("42",m)}if(t.nodeType===A&&f("43"),a.useCreateElement){for(;t.lastChild;)t.removeChild(t.lastChild);h.insertTreeBefore(t,e,null)}else O(t,e),y.precacheNode(n,t.firstChild)}};e.exports=F},function(e,t,n){"use strict";function r(e){for(var t;(t=e._renderedNodeType)===o.COMPOSITE;)e=e._renderedComponent;return t===o.HOST?e._renderedComponent:t===o.EMPTY?null:void 0}var o=n(83);e.exports=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var o=n(12),i=r(o),a=n(29),u=n(135),s=n(212),c=r(s),l=n(221),p=r(l);(0,u.render)(i.default.createElement(a.Provider,{store:p.default},i.default.createElement(c.default,null)),document.getElementById("app"))},function(e,t,n){"use strict";var r=function(){};e.exports=r},function(e,t,n){"use strict";function r(e){return(""+e).replace(_,"$&/")}function o(e,t){this.func=e,this.context=t,this.count=0}function i(e,t,n){var r=e.func,o=e.context;r.call(o,t,e.count++)}function a(e,t,n){if(null==e)return e;var r=o.getPooled(t,n);g(e,i,r),o.release(r)}function u(e,t,n,r){this.result=e,this.keyPrefix=t,this.func=n,this.context=r,this.count=0}function s(e,t,n){var o=e.result,i=e.keyPrefix,a=e.func,u=e.context,s=a.call(u,t,e.count++);Array.isArray(s)?c(s,o,n,v.thatReturnsArgument):null!=s&&(m.isValidElement(s)&&(s=m.cloneAndReplaceKey(s,i+(!s.key||t&&t.key===s.key?"":r(s.key)+"/")+n)),o.push(s))}function c(e,t,n,o,i){var a="";null!=n&&(a=r(n)+"/");var c=u.getPooled(t,a,o,i);g(e,s,c),u.release(c)}function l(e,t,n){if(null==e)return e;var r=[];return c(e,r,null,t,n),r}function p(e,t,n){return null}function d(e,t){return g(e,p,null)}function f(e){var t=[];return c(e,t,null,v.thatReturnsArgument),t}var h=n(96),m=n(14),v=n(6),g=n(97),y=h.twoArgumentPooler,b=h.fourArgumentPooler,_=/\/+/g;o.prototype.destructor=function(){this.func=null,this.context=null,this.count=0},h.addPoolingTo(o,y),u.prototype.destructor=function(){this.result=null,this.keyPrefix=null,this.func=null,this.context=null,this.count=0},h.addPoolingTo(u,b);var C={forEach:a,map:l,mapIntoWithKeyPrefixInternal:c,count:d,toArray:f};e.exports=C},function(e,t,n){"use strict";var r=n(18),o=(n(0),function(e){var t=this;if(t.instancePool.length){var n=t.instancePool.pop();return t.call(n,e),n}return new t(e)}),i=function(e,t){var n=this;if(n.instancePool.length){var r=n.instancePool.pop();return n.call(r,e,t),r}return new n(e,t)},a=function(e,t,n){var r=this;if(r.instancePool.length){var o=r.instancePool.pop();return r.call(o,e,t,n),o}return new r(e,t,n)},u=function(e,t,n,r){var o=this;if(o.instancePool.length){var i=o.instancePool.pop();return o.call(i,e,t,n,r),i}return new o(e,t,n,r)},s=function(e){var t=this;e instanceof t||r("25"),e.destructor(),t.instancePool.length>",k={array:p("array"),bool:p("boolean"),func:p("function"),number:p("number"),object:p("object"),string:p("string"),symbol:p("symbol"),any:function(){return l(r.thatReturnsNull)}(),arrayOf:d,element:function(){function t(t,n,r,o,i){var a=t[n];if(!e(a)){return new c("Invalid "+o+" `"+i+"` of type `"+_(a)+"` supplied to `"+r+"`, expected a single ReactElement.")}return null}return l(t)}(),instanceOf:f,node:function(){function e(e,t,n,r,o){return y(e[t])?null:new c("Invalid "+r+" `"+o+"` supplied to `"+n+"`, expected a ReactNode.")}return l(e)}(),objectOf:m,oneOf:h,oneOfType:v,shape:g};return c.prototype=Error.prototype,k.checkPropTypes=u,k.PropTypes=k,k}},function(e,t,n){"use strict";function r(e,t,n,r,o){}e.exports=r},function(e,t,n){"use strict";e.exports="15.6.1"},function(e,t,n){"use strict";var r=n(51),o=r.Component,i=n(14),a=i.isValidElement,u=n(52),s=n(106);e.exports=s(o,a,u)},function(e,t,n){"use strict";function r(e){return e}function o(e,t,n){function o(e,t){var n=y.hasOwnProperty(t)?y[t]:null;E.hasOwnProperty(t)&&u("OVERRIDE_BASE"===n,"ReactClassInterface: You are attempting to override `%s` from your class specification. Ensure that your method names do not overlap with React methods.",t),e&&u("DEFINE_MANY"===n||"DEFINE_MANY_MERGED"===n,"ReactClassInterface: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.",t)}function c(e,n){if(n){u("function"!=typeof n,"ReactClass: You're attempting to use a component class or function as a mixin. Instead, just use a regular object."),u(!t(n),"ReactClass: You're attempting to use a component as a mixin. Instead, just use a regular object.");var r=e.prototype,i=r.__reactAutoBindPairs;n.hasOwnProperty(s)&&b.mixins(e,n.mixins);for(var a in n)if(n.hasOwnProperty(a)&&a!==s){var c=n[a],l=r.hasOwnProperty(a);if(o(l,a),b.hasOwnProperty(a))b[a](e,c);else{var p=y.hasOwnProperty(a),h="function"==typeof c,m=h&&!p&&!l&&!1!==n.autobind;if(m)i.push(a,c),r[a]=c;else if(l){var v=y[a];u(p&&("DEFINE_MANY_MERGED"===v||"DEFINE_MANY"===v),"ReactClass: Unexpected spec policy %s for key %s when mixing in component specs.",v,a),"DEFINE_MANY_MERGED"===v?r[a]=d(r[a],c):"DEFINE_MANY"===v&&(r[a]=f(r[a],c))}else r[a]=c}}}else;}function l(e,t){if(t)for(var n in t){var r=t[n];if(t.hasOwnProperty(n)){var o=n in b;u(!o,'ReactClass: You are attempting to define a reserved property, `%s`, that shouldn\'t be on the "statics" key. Define it as an instance property instead; it will still be accessible on the constructor.',n);var i=n in e;u(!i,"ReactClass: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.",n),e[n]=r}}}function p(e,t){u(e&&t&&"object"==typeof e&&"object"==typeof t,"mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.");for(var n in t)t.hasOwnProperty(n)&&(u(void 0===e[n],"mergeIntoWithNoDuplicateKeys(): Tried to merge two objects with the same key: `%s`. This conflict may be due to a mixin; in particular, this may be caused by two getInitialState() or getDefaultProps() methods returning objects with clashing keys.",n),e[n]=t[n]);return e}function d(e,t){return function(){var n=e.apply(this,arguments),r=t.apply(this,arguments);if(null==n)return r;if(null==r)return n;var o={};return p(o,n),p(o,r),o}}function f(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function h(e,t){var n=t.bind(e);return n}function m(e){for(var t=e.__reactAutoBindPairs,n=0;n0&&void 0!==arguments[0]?arguments[0]:"store",n=arguments[1],a=n||t+"Subscription",s=function(e){function n(i,a){r(this,n);var u=o(this,e.call(this,i,a));return u[t]=i.store,u}return i(n,e),n.prototype.getChildContext=function(){var e;return e={},e[t]=this[t],e[a]=null,e},n.prototype.render=function(){return u.Children.only(this.props.children)},n}(u.Component);return s.propTypes={store:l.a.isRequired,children:c.a.element.isRequired},s.childContextTypes=(e={},e[t]=l.a.isRequired,e[a]=l.b,e),s.displayName="Provider",s}t.a=a;var u=n(12),s=(n.n(u),n(57)),c=n.n(s),l=n(58);n(30);t.b=a()},function(e,t,n){"use strict";var r=n(6),o=n(0),i=n(56);e.exports=function(){function e(e,t,n,r,a,u){u!==i&&o(!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 t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t};return n.checkPropTypes=r,n.PropTypes=n,n}},function(e,t,n){"use strict";var r={childContextTypes:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,arguments:!0,arity:!0},i="function"==typeof Object.getOwnPropertySymbols;e.exports=function(e,t,n){if("string"!=typeof t){var a=Object.getOwnPropertyNames(t);i&&(a=a.concat(Object.getOwnPropertySymbols(t)));for(var u=0;u=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function o(e,t,n){for(var r=t.length-1;r>=0;r--){var o=t[r](e);if(o)return o}return function(t,r){throw new Error("Invalid value of type "+typeof e+" for "+n+" argument when connecting component "+r.wrappedComponentName+".")}}function i(e,t){return e===t}var a=n(59),u=n(114),s=n(115),c=n(131),l=n(132),p=n(133),d=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},t=e.connectHOC,n=void 0===t?a.a:t,f=e.mapStateToPropsFactories,h=void 0===f?c.a:f,m=e.mapDispatchToPropsFactories,v=void 0===m?s.a:m,g=e.mergePropsFactories,y=void 0===g?l.a:g,b=e.selectorFactory,_=void 0===b?p.a:b;return function(e,t,a){var s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},c=s.pure,l=void 0===c||c,p=s.areStatesEqual,f=void 0===p?i:p,m=s.areOwnPropsEqual,g=void 0===m?u.a:m,b=s.areStatePropsEqual,C=void 0===b?u.a:b,E=s.areMergedPropsEqual,w=void 0===E?u.a:E,x=r(s,["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"]),T=o(e,h,"mapStateToProps"),P=o(t,v,"mapDispatchToProps"),k=o(a,y,"mergeProps");return n(_,d({methodName:"connect",getDisplayName:function(e){return"Connect("+e+")"},shouldHandleStateChanges:Boolean(e),initMapStateToProps:T,initMapDispatchToProps:P,initMergeProps:k,pure:l,areStatesEqual:f,areOwnPropsEqual:g,areStatePropsEqual:C,areMergedPropsEqual:w},x))}}()},function(e,t,n){"use strict";function r(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!==e&&t!==t}function o(e,t){if(r(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;for(var a=0;a0&&void 0!==arguments[0]?arguments[0]:{},t=arguments[1];if(s)throw s;for(var o=!1,i={},a=0;a=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function o(e,t,n,r){return function(o,i){return n(e(o,i),t(r,i),i)}}function i(e,t,n,r,o){function i(o,i){return h=o,m=i,v=e(h,m),g=t(r,m),y=n(v,g,m),f=!0,y}function a(){return v=e(h,m),t.dependsOnOwnProps&&(g=t(r,m)),y=n(v,g,m)}function u(){return e.dependsOnOwnProps&&(v=e(h,m)),t.dependsOnOwnProps&&(g=t(r,m)),y=n(v,g,m)}function s(){var t=e(h,m),r=!d(t,v);return v=t,r&&(y=n(v,g,m)),y}function c(e,t){var n=!p(t,m),r=!l(e,h);return h=e,m=t,n&&r?a():n?u():r?s():y}var l=o.areStatesEqual,p=o.areOwnPropsEqual,d=o.areStatePropsEqual,f=!1,h=void 0,m=void 0,v=void 0,g=void 0,y=void 0;return function(e,t){return f?c(e,t):i(e,t)}}function a(e,t){var n=t.initMapStateToProps,a=t.initMapDispatchToProps,u=t.initMergeProps,s=r(t,["initMapStateToProps","initMapDispatchToProps","initMergeProps"]),c=n(e,s),l=a(e,s),p=u(e,s);return(s.pure?i:o)(c,l,p,e,s)}t.a=a;n(134)},function(e,t,n){"use strict";n(30)},function(e,t,n){"use strict";e.exports=n(136)},function(e,t,n){"use strict";var r=n(4),o=n(137),i=n(91),a=n(16),u=n(8),s=n(209),c=n(210),l=n(92),p=n(211);n(1);o.inject();var d={findDOMNode:c,render:i.render,unmountComponentAtNode:i.unmountComponentAtNode,version:s,unstable_batchedUpdates:u.batchedUpdates,unstable_renderSubtreeIntoContainer:p};"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.inject&&__REACT_DEVTOOLS_GLOBAL_HOOK__.inject({ComponentTree:{getClosestInstanceFromNode:r.getClosestInstanceFromNode,getNodeFromInstance:function(e){return e._renderedComponent&&(e=l(e)),e?r.getNodeFromInstance(e):null}},Mount:i,Reconciler:a});e.exports=d},function(e,t,n){"use strict";function r(){w||(w=!0,y.EventEmitter.injectReactEventListener(g),y.EventPluginHub.injectEventPluginOrder(u),y.EventPluginUtils.injectComponentTree(d),y.EventPluginUtils.injectTreeTraversal(h),y.EventPluginHub.injectEventPluginsByName({SimpleEventPlugin:E,EnterLeaveEventPlugin:s,ChangeEventPlugin:a,SelectEventPlugin:C,BeforeInputEventPlugin:i}),y.HostComponent.injectGenericComponentClass(p),y.HostComponent.injectTextComponentClass(m),y.DOMProperty.injectDOMPropertyConfig(o),y.DOMProperty.injectDOMPropertyConfig(c),y.DOMProperty.injectDOMPropertyConfig(_),y.EmptyComponent.injectEmptyComponentFactory(function(e){return new f(e)}),y.Updates.injectReconcileTransaction(b),y.Updates.injectBatchingStrategy(v),y.Component.injectEnvironment(l))}var o=n(138),i=n(139),a=n(143),u=n(146),s=n(147),c=n(148),l=n(149),p=n(155),d=n(4),f=n(180),h=n(181),m=n(182),v=n(183),g=n(184),y=n(186),b=n(187),_=n(193),C=n(194),E=n(195),w=!1;e.exports={inject:r}},function(e,t,n){"use strict";var r={Properties:{"aria-current":0,"aria-details":0,"aria-disabled":0,"aria-hidden":0,"aria-invalid":0,"aria-keyshortcuts":0,"aria-label":0,"aria-roledescription":0,"aria-autocomplete":0,"aria-checked":0,"aria-expanded":0,"aria-haspopup":0,"aria-level":0,"aria-modal":0,"aria-multiline":0,"aria-multiselectable":0,"aria-orientation":0,"aria-placeholder":0,"aria-pressed":0,"aria-readonly":0,"aria-required":0,"aria-selected":0,"aria-sort":0,"aria-valuemax":0,"aria-valuemin":0,"aria-valuenow":0,"aria-valuetext":0,"aria-atomic":0,"aria-busy":0,"aria-live":0,"aria-relevant":0,"aria-dropeffect":0,"aria-grabbed":0,"aria-activedescendant":0,"aria-colcount":0,"aria-colindex":0,"aria-colspan":0,"aria-controls":0,"aria-describedby":0,"aria-errormessage":0,"aria-flowto":0,"aria-labelledby":0,"aria-owns":0,"aria-posinset":0,"aria-rowcount":0,"aria-rowindex":0,"aria-rowspan":0,"aria-setsize":0},DOMAttributeNames:{},DOMPropertyNames:{}};e.exports=r},function(e,t,n){"use strict";function r(e){return(e.ctrlKey||e.altKey||e.metaKey)&&!(e.ctrlKey&&e.altKey)}function o(e){switch(e){case"topCompositionStart":return T.compositionStart;case"topCompositionEnd":return T.compositionEnd;case"topCompositionUpdate":return T.compositionUpdate}}function i(e,t){return"topKeyDown"===e&&t.keyCode===y}function a(e,t){switch(e){case"topKeyUp":return-1!==g.indexOf(t.keyCode);case"topKeyDown":return t.keyCode!==y;case"topKeyPress":case"topMouseDown":case"topBlur":return!0;default:return!1}}function u(e){var t=e.detail;return"object"==typeof t&&"data"in t?t.data:null}function s(e,t,n,r){var s,c;if(b?s=o(e):k?a(e,n)&&(s=T.compositionEnd):i(e,n)&&(s=T.compositionStart),!s)return null;E&&(k||s!==T.compositionStart?s===T.compositionEnd&&k&&(c=k.getData()):k=h.getPooled(r));var l=m.getPooled(s,t,n,r);if(c)l.data=c;else{var p=u(n);null!==p&&(l.data=p)}return d.accumulateTwoPhaseDispatches(l),l}function c(e,t){switch(e){case"topCompositionEnd":return u(t);case"topKeyPress":return t.which!==w?null:(P=!0,x);case"topTextInput":var n=t.data;return n===x&&P?null:n;default:return null}}function l(e,t){if(k){if("topCompositionEnd"===e||!b&&a(e,t)){var n=k.getData();return h.release(k),k=null,n}return null}switch(e){case"topPaste":return null;case"topKeyPress":return t.which&&!r(t)?String.fromCharCode(t.which):null;case"topCompositionEnd":return E?null:t.data;default:return null}}function p(e,t,n,r){var o;if(!(o=C?c(e,n):l(e,n)))return null;var i=v.getPooled(T.beforeInput,t,n,r);return i.data=o,d.accumulateTwoPhaseDispatches(i),i}var d=n(19),f=n(5),h=n(140),m=n(141),v=n(142),g=[9,13,27,32],y=229,b=f.canUseDOM&&"CompositionEvent"in window,_=null;f.canUseDOM&&"documentMode"in document&&(_=document.documentMode);var C=f.canUseDOM&&"TextEvent"in window&&!_&&!function(){var e=window.opera;return"object"==typeof e&&"function"==typeof e.version&&parseInt(e.version(),10)<=12}(),E=f.canUseDOM&&(!b||_&&_>8&&_<=11),w=32,x=String.fromCharCode(w),T={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["topCompositionEnd","topKeyPress","topTextInput","topPaste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:["topBlur","topCompositionEnd","topKeyDown","topKeyPress","topKeyUp","topMouseDown"]},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:["topBlur","topCompositionStart","topKeyDown","topKeyPress","topKeyUp","topMouseDown"]},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:["topBlur","topCompositionUpdate","topKeyDown","topKeyPress","topKeyUp","topMouseDown"]}},P=!1,k=null,S={eventTypes:T,extractEvents:function(e,t,n,r){return[s(e,t,n,r),p(e,t,n,r)]}};e.exports=S},function(e,t,n){"use strict";function r(e){this._root=e,this._startText=this.getText(),this._fallbackText=null}var o=n(3),i=n(11),a=n(70);o(r.prototype,{destructor:function(){this._root=null,this._startText=null,this._fallbackText=null},getText:function(){return"value"in this._root?this._root.value:this._root[a()]},getData:function(){if(this._fallbackText)return this._fallbackText;var e,t,n=this._startText,r=n.length,o=this.getText(),i=o.length;for(e=0;e1?1-t:void 0;return this._fallbackText=o.slice(e,u),this._fallbackText}}),i.addPoolingTo(r),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return o.call(this,e,t,n,r)}var o=n(10),i={data:null};o.augmentClass(r,i),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return o.call(this,e,t,n,r)}var o=n(10),i={data:null};o.augmentClass(r,i),e.exports=r},function(e,t,n){"use strict";function r(e,t,n){var r=P.getPooled(M.change,e,t,n);return r.type="change",E.accumulateTwoPhaseDispatches(r),r}function o(e){var t=e.nodeName&&e.nodeName.toLowerCase();return"select"===t||"input"===t&&"file"===e.type}function i(e){var t=r(R,e,S(e));T.batchedUpdates(a,t)}function a(e){C.enqueueEvents(e),C.processEventQueue(!1)}function u(e,t){I=e,R=t,I.attachEvent("onchange",i)}function s(){I&&(I.detachEvent("onchange",i),I=null,R=null)}function c(e,t){var n=k.updateValueIfChanged(e),r=!0===t.simulated&&U._allowSimulatedPassThrough;if(n||r)return e}function l(e,t){if("topChange"===e)return t}function p(e,t,n){"topFocus"===e?(s(),u(t,n)):"topBlur"===e&&s()}function d(e,t){I=e,R=t,I.attachEvent("onpropertychange",h)}function f(){I&&(I.detachEvent("onpropertychange",h),I=null,R=null)}function h(e){"value"===e.propertyName&&c(R,e)&&i(e)}function m(e,t,n){"topFocus"===e?(f(),d(t,n)):"topBlur"===e&&f()}function v(e,t,n){if("topSelectionChange"===e||"topKeyUp"===e||"topKeyDown"===e)return c(R,n)}function g(e){var t=e.nodeName;return t&&"input"===t.toLowerCase()&&("checkbox"===e.type||"radio"===e.type)}function y(e,t,n){if("topClick"===e)return c(t,n)}function b(e,t,n){if("topInput"===e||"topChange"===e)return c(t,n)}function _(e,t){if(null!=e){var n=e._wrapperState||t._wrapperState;if(n&&n.controlled&&"number"===t.type){var r=""+t.value;t.getAttribute("value")!==r&&t.setAttribute("value",r)}}}var C=n(20),E=n(19),w=n(5),x=n(4),T=n(8),P=n(10),k=n(73),S=n(36),O=n(37),N=n(74),M={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:["topBlur","topChange","topClick","topFocus","topInput","topKeyDown","topKeyUp","topSelectionChange"]}},I=null,R=null,A=!1;w.canUseDOM&&(A=O("change")&&(!document.documentMode||document.documentMode>8));var D=!1;w.canUseDOM&&(D=O("input")&&(!("documentMode"in document)||document.documentMode>9));var U={eventTypes:M,_allowSimulatedPassThrough:!0,_isInputEventSupported:D,extractEvents:function(e,t,n,i){var a,u,s=t?x.getNodeFromInstance(t):window;if(o(s)?A?a=l:u=p:N(s)?D?a=b:(a=v,u=m):g(s)&&(a=y),a){var c=a(e,t,n);if(c){return r(c,n,i)}}u&&u(e,s,t),"topBlur"===e&&_(t,s)}};e.exports=U},function(e,t,n){"use strict";function r(e,t,n){"function"==typeof e?e(t.getPublicInstance()):i.addComponentAsRefTo(t,e,n)}function o(e,t,n){"function"==typeof e?e(null):i.removeComponentAsRefFrom(t,e,n)}var i=n(145),a={};a.attachRefs=function(e,t){if(null!==t&&"object"==typeof t){var n=t.ref;null!=n&&r(n,e,t._owner)}},a.shouldUpdateRefs=function(e,t){var n=null,r=null;null!==e&&"object"==typeof e&&(n=e.ref,r=e._owner);var o=null,i=null;return null!==t&&"object"==typeof t&&(o=t.ref,i=t._owner),n!==o||"string"==typeof o&&i!==r},a.detachRefs=function(e,t){if(null!==t&&"object"==typeof t){var n=t.ref;null!=n&&o(n,e,t._owner)}},e.exports=a},function(e,t,n){"use strict";function r(e){return!(!e||"function"!=typeof e.attachRef||"function"!=typeof e.detachRef)}var o=n(2),i=(n(0),{addComponentAsRefTo:function(e,t,n){r(n)||o("119"),n.attachRef(t,e)},removeComponentAsRefFrom:function(e,t,n){r(n)||o("120");var i=n.getPublicInstance();i&&i.refs[t]===e.getPublicInstance()&&n.detachRef(t)}});e.exports=i},function(e,t,n){"use strict";var r=["ResponderEventPlugin","SimpleEventPlugin","TapEventPlugin","EnterLeaveEventPlugin","ChangeEventPlugin","SelectEventPlugin","BeforeInputEventPlugin"];e.exports=r},function(e,t,n){"use strict";var r=n(19),o=n(4),i=n(25),a={mouseEnter:{registrationName:"onMouseEnter",dependencies:["topMouseOut","topMouseOver"]},mouseLeave:{registrationName:"onMouseLeave",dependencies:["topMouseOut","topMouseOver"]}},u={eventTypes:a,extractEvents:function(e,t,n,u){if("topMouseOver"===e&&(n.relatedTarget||n.fromElement))return null;if("topMouseOut"!==e&&"topMouseOver"!==e)return null;var s;if(u.window===u)s=u;else{var c=u.ownerDocument;s=c?c.defaultView||c.parentWindow:window}var l,p;if("topMouseOut"===e){l=t;var d=n.relatedTarget||n.toElement;p=d?o.getClosestInstanceFromNode(d):null}else l=null,p=t;if(l===p)return null;var f=null==l?s:o.getNodeFromInstance(l),h=null==p?s:o.getNodeFromInstance(p),m=i.getPooled(a.mouseLeave,l,n,u);m.type="mouseleave",m.target=f,m.relatedTarget=h;var v=i.getPooled(a.mouseEnter,p,n,u);return v.type="mouseenter",v.target=h,v.relatedTarget=f,r.accumulateEnterLeaveDispatches(m,v,l,p),[m,v]}};e.exports=u},function(e,t,n){"use strict";var r=n(15),o=r.injection.MUST_USE_PROPERTY,i=r.injection.HAS_BOOLEAN_VALUE,a=r.injection.HAS_NUMERIC_VALUE,u=r.injection.HAS_POSITIVE_NUMERIC_VALUE,s=r.injection.HAS_OVERLOADED_BOOLEAN_VALUE,c={isCustomAttribute:RegExp.prototype.test.bind(new RegExp("^(data|aria)-["+r.ATTRIBUTE_NAME_CHAR+"]*$")),Properties:{accept:0,acceptCharset:0,accessKey:0,action:0,allowFullScreen:i,allowTransparency:0,alt:0,as:0,async:i,autoComplete:0,autoPlay:i,capture:i,cellPadding:0,cellSpacing:0,charSet:0,challenge:0,checked:o|i,cite:0,classID:0,className:0,cols:u,colSpan:0,content:0,contentEditable:0,contextMenu:0,controls:i,coords:0,crossOrigin:0,data:0,dateTime:0,default:i,defer:i,dir:0,disabled:i,download:s,draggable:0,encType:0,form:0,formAction:0,formEncType:0,formMethod:0,formNoValidate:i,formTarget:0,frameBorder:0,headers:0,height:0,hidden:i,high:0,href:0,hrefLang:0,htmlFor:0,httpEquiv:0,icon:0,id:0,inputMode:0,integrity:0,is:0,keyParams:0,keyType:0,kind:0,label:0,lang:0,list:0,loop:i,low:0,manifest:0,marginHeight:0,marginWidth:0,max:0,maxLength:0,media:0,mediaGroup:0,method:0,min:0,minLength:0,multiple:o|i,muted:o|i,name:0,nonce:0,noValidate:i,open:i,optimum:0,pattern:0,placeholder:0,playsInline:i,poster:0,preload:0,profile:0,radioGroup:0,readOnly:i,referrerPolicy:0,rel:0,required:i,reversed:i,role:0,rows:u,rowSpan:a,sandbox:0,scope:0,scoped:i,scrolling:0,seamless:i,selected:o|i,shape:0,size:u,sizes:0,span:u,spellCheck:0,src:0,srcDoc:0,srcLang:0,srcSet:0,start:a,step:0,style:0,summary:0,tabIndex:0,target:0,title:0,type:0,useMap:0,value:0,width:0,wmode:0,wrap:0,about:0,datatype:0,inlist:0,prefix:0,property:0,resource:0,typeof:0,vocab:0,autoCapitalize:0,autoCorrect:0,autoSave:0,color:0,itemProp:0,itemScope:i,itemType:0,itemID:0,itemRef:0,results:0,security:0,unselectable:0},DOMAttributeNames:{acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"},DOMPropertyNames:{},DOMMutationMethods:{value:function(e,t){if(null==t)return e.removeAttribute("value");"number"!==e.type||!1===e.hasAttribute("value")?e.setAttribute("value",""+t):e.validity&&!e.validity.badInput&&e.ownerDocument.activeElement!==e&&e.setAttribute("value",""+t)}}};e.exports=c},function(e,t,n){"use strict";var r=n(39),o=n(154),i={processChildrenUpdates:o.dangerouslyProcessChildrenUpdates,replaceNodeWithMarkup:r.dangerouslyReplaceNodeWithMarkup};e.exports=i},function(e,t,n){"use strict";var r=n(2),o=n(17),i=n(5),a=n(151),u=n(6),s=(n(0),{dangerouslyReplaceNodeWithMarkup:function(e,t){if(i.canUseDOM||r("56"),t||r("57"),"HTML"===e.nodeName&&r("58"),"string"==typeof t){var n=a(t,u)[0];e.parentNode.replaceChild(n,e)}else o.replaceChildWithTree(e,t)}});e.exports=s},function(e,t,n){"use strict";function r(e){var t=e.match(l);return t&&t[1].toLowerCase()}function o(e,t){var n=c;c||s(!1);var o=r(e),i=o&&u(o);if(i){n.innerHTML=i[1]+e+i[2];for(var l=i[0];l--;)n=n.lastChild}else n.innerHTML=e;var p=n.getElementsByTagName("script");p.length&&(t||s(!1),a(p).forEach(t));for(var d=Array.from(n.childNodes);n.lastChild;)n.removeChild(n.lastChild);return d}var i=n(5),a=n(152),u=n(153),s=n(0),c=i.canUseDOM?document.createElement("div"):null,l=/^\s*<(\w+)/;e.exports=o},function(e,t,n){"use strict";function r(e){var t=e.length;if((Array.isArray(e)||"object"!=typeof e&&"function"!=typeof e)&&a(!1),"number"!=typeof t&&a(!1),0===t||t-1 in e||a(!1),"function"==typeof e.callee&&a(!1),e.hasOwnProperty)try{return Array.prototype.slice.call(e)}catch(e){}for(var n=Array(t),r=0;r":"<"+e+">"+e+">",u[e]=!a.firstChild),u[e]?d[e]:null}var o=n(5),i=n(0),a=o.canUseDOM?document.createElement("div"):null,u={},s=[1,'"],c=[1,"