@samitouri / QOS-React / commits / 05ace7365a

Move new example changes to fixtures folder

Nathan Hunzaker committed Dec 19, 2016 at 08:43 UTC 05ace7365a24bf67affccc4d4ab02768f27aac34
7 files changed +22799 -3
examples/basic/index.html
+2 -3
@@ -23,9 +23,8 @@
23 Learn more about React at
24 <a href="https://facebook.github.io/react" target="_blank">facebook.github.io/react</a>.
25 </p>
26 -
27 - <script src="../react-loader.js"></script>
28 -
26 + <script src="../../build/react.js"></script>
27 + <script src="../../build/react-dom.js"></script>
28 <script>
29 var ExampleApplication = React.createClass({
30 render: function() {
fixtures/dom/public/react-dom.js new
+18938
@@ -0,0 +1,18938 @@
1 + /**
2 + * ReactDOM v16.0.0-alpha
3 + */
4 +
5 +;(function(f) {
6 + // CommonJS
7 + if (typeof exports === "object" && typeof module !== "undefined") {
8 + module.exports = f(require('react'));
9 +
10 + // RequireJS
11 + } else if (typeof define === "function" && define.amd) {
12 + define(['react'], f);
13 +
14 + // <script>
15 + } else {
16 + var g;
17 + if (typeof window !== "undefined") {
18 + g = window;
19 + } else if (typeof global !== "undefined") {
20 + g = global;
21 + } else if (typeof self !== "undefined") {
22 + g = self;
23 + } else {
24 + // works providing we're not in "use strict";
25 + // needed for Java 8 Nashorn
26 + // see https://github.com/facebook/react/issues/3037
27 + g = this;
28 + }
29 + g.ReactDOM = f(g.React);
30 + }
31 +})(function(React) {
32 + return (function(f){return f()})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){
33 +/**
34 + * Copyright 2013-present, Facebook, Inc.
35 + * All rights reserved.
36 + *
37 + * This source code is licensed under the BSD-style license found in the
38 + * LICENSE file in the root directory of this source tree. An additional grant
39 + * of patent rights can be found in the PATENTS file in the same directory.
40 + *
41 + */
42 +
43 +'use strict';
44 +
45 +var ARIADOMPropertyConfig = {
46 + Properties: {
47 + // Global States and Properties
48 + 'aria-current': 0, // state
49 + 'aria-details': 0,
50 + 'aria-disabled': 0, // state
51 + 'aria-hidden': 0, // state
52 + 'aria-invalid': 0, // state
53 + 'aria-keyshortcuts': 0,
54 + 'aria-label': 0,
55 + 'aria-roledescription': 0,
56 + // Widget Attributes
57 + 'aria-autocomplete': 0,
58 + 'aria-checked': 0,
59 + 'aria-expanded': 0,
60 + 'aria-haspopup': 0,
61 + 'aria-level': 0,
62 + 'aria-modal': 0,
63 + 'aria-multiline': 0,
64 + 'aria-multiselectable': 0,
65 + 'aria-orientation': 0,
66 + 'aria-placeholder': 0,
67 + 'aria-pressed': 0,
68 + 'aria-readonly': 0,
69 + 'aria-required': 0,
70 + 'aria-selected': 0,
71 + 'aria-sort': 0,
72 + 'aria-valuemax': 0,
73 + 'aria-valuemin': 0,
74 + 'aria-valuenow': 0,
75 + 'aria-valuetext': 0,
76 + // Live Region Attributes
77 + 'aria-atomic': 0,
78 + 'aria-busy': 0,
79 + 'aria-live': 0,
80 + 'aria-relevant': 0,
81 + // Drag-and-Drop Attributes
82 + 'aria-dropeffect': 0,
83 + 'aria-grabbed': 0,
84 + // Relationship Attributes
85 + 'aria-activedescendant': 0,
86 + 'aria-colcount': 0,
87 + 'aria-colindex': 0,
88 + 'aria-colspan': 0,
89 + 'aria-controls': 0,
90 + 'aria-describedby': 0,
91 + 'aria-errormessage': 0,
92 + 'aria-flowto': 0,
93 + 'aria-labelledby': 0,
94 + 'aria-owns': 0,
95 + 'aria-posinset': 0,
96 + 'aria-rowcount': 0,
97 + 'aria-rowindex': 0,
98 + 'aria-rowspan': 0,
99 + 'aria-setsize': 0
100 + },
101 + DOMAttributeNames: {},
102 + DOMPropertyNames: {}
103 +};
104 +
105 +module.exports = ARIADOMPropertyConfig;
106 +},{}],2:[function(_dereq_,module,exports){
107 +/**
108 + * Copyright 2013-present, Facebook, Inc.
109 + * All rights reserved.
110 + *
111 + * This source code is licensed under the BSD-style license found in the
112 + * LICENSE file in the root directory of this source tree. An additional grant
113 + * of patent rights can be found in the PATENTS file in the same directory.
114 + *
115 + */
116 +
117 +'use strict';
118 +
119 +var ReactDOMComponentTree = _dereq_(35);
120 +
121 +var focusNode = _dereq_(151);
122 +
123 +var AutoFocusUtils = {
124 + focusDOMComponent: function () {
125 + focusNode(ReactDOMComponentTree.getNodeFromInstance(this));
126 + }
127 +};
128 +
129 +module.exports = AutoFocusUtils;
130 +},{"151":151,"35":35}],3:[function(_dereq_,module,exports){
131 +/**
132 + * Copyright 2013-present Facebook, Inc.
133 + * All rights reserved.
134 + *
135 + * This source code is licensed under the BSD-style license found in the
136 + * LICENSE file in the root directory of this source tree. An additional grant
137 + * of patent rights can be found in the PATENTS file in the same directory.
138 + *
139 + */
140 +
141 +'use strict';
142 +
143 +var EventPropagators = _dereq_(20);
144 +var ExecutionEnvironment = _dereq_(143);
145 +var FallbackCompositionState = _dereq_(21);
146 +var SyntheticCompositionEvent = _dereq_(94);
147 +var SyntheticInputEvent = _dereq_(98);
148 +
149 +var END_KEYCODES = [9, 13, 27, 32]; // Tab, Return, Esc, Space
150 +var START_KEYCODE = 229;
151 +
152 +var canUseCompositionEvent = ExecutionEnvironment.canUseDOM && 'CompositionEvent' in window;
153 +
154 +var documentMode = null;
155 +if (ExecutionEnvironment.canUseDOM && 'documentMode' in document) {
156 + documentMode = document.documentMode;
157 +}
158 +
159 +// Webkit offers a very useful `textInput` event that can be used to
160 +// directly represent `beforeInput`. The IE `textinput` event is not as
161 +// useful, so we don't use it.
162 +var canUseTextInputEvent = ExecutionEnvironment.canUseDOM && 'TextEvent' in window && !documentMode && !isPresto();
163 +
164 +// In IE9+, we have access to composition events, but the data supplied
165 +// by the native compositionend event may be incorrect. Japanese ideographic
166 +// spaces, for instance (\u3000) are not recorded correctly.
167 +var useFallbackCompositionData = ExecutionEnvironment.canUseDOM && (!canUseCompositionEvent || documentMode && documentMode > 8 && documentMode <= 11);
168 +
169 +/**
170 + * Opera <= 12 includes TextEvent in window, but does not fire
171 + * text input events. Rely on keypress instead.
172 + */
173 +function isPresto() {
174 + var opera = window.opera;
175 + return typeof opera === 'object' && typeof opera.version === 'function' && parseInt(opera.version(), 10) <= 12;
176 +}
177 +
178 +var SPACEBAR_CODE = 32;
179 +var SPACEBAR_CHAR = String.fromCharCode(SPACEBAR_CODE);
180 +
181 +// Events and their corresponding property names.
182 +var eventTypes = {
183 + beforeInput: {
184 + phasedRegistrationNames: {
185 + bubbled: 'onBeforeInput',
186 + captured: 'onBeforeInputCapture'
187 + },
188 + dependencies: ['topCompositionEnd', 'topKeyPress', 'topTextInput', 'topPaste']
189 + },
190 + compositionEnd: {
191 + phasedRegistrationNames: {
192 + bubbled: 'onCompositionEnd',
193 + captured: 'onCompositionEndCapture'
194 + },
195 + dependencies: ['topBlur', 'topCompositionEnd', 'topKeyDown', 'topKeyPress', 'topKeyUp', 'topMouseDown']
196 + },
197 + compositionStart: {
198 + phasedRegistrationNames: {
199 + bubbled: 'onCompositionStart',
200 + captured: 'onCompositionStartCapture'
201 + },
202 + dependencies: ['topBlur', 'topCompositionStart', 'topKeyDown', 'topKeyPress', 'topKeyUp', 'topMouseDown']
203 + },
204 + compositionUpdate: {
205 + phasedRegistrationNames: {
206 + bubbled: 'onCompositionUpdate',
207 + captured: 'onCompositionUpdateCapture'
208 + },
209 + dependencies: ['topBlur', 'topCompositionUpdate', 'topKeyDown', 'topKeyPress', 'topKeyUp', 'topMouseDown']
210 + }
211 +};
212 +
213 +// Track whether we've ever handled a keypress on the space key.
214 +var hasSpaceKeypress = false;
215 +
216 +/**
217 + * Return whether a native keypress event is assumed to be a command.
218 + * This is required because Firefox fires `keypress` events for key commands
219 + * (cut, copy, select-all, etc.) even though no character is inserted.
220 + */
221 +function isKeypressCommand(nativeEvent) {
222 + return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&
223 + // ctrlKey && altKey is equivalent to AltGr, and is not a command.
224 + !(nativeEvent.ctrlKey && nativeEvent.altKey);
225 +}
226 +
227 +/**
228 + * Translate native top level events into event types.
229 + *
230 + * @param {string} topLevelType
231 + * @return {object}
232 + */
233 +function getCompositionEventType(topLevelType) {
234 + switch (topLevelType) {
235 + case 'topCompositionStart':
236 + return eventTypes.compositionStart;
237 + case 'topCompositionEnd':
238 + return eventTypes.compositionEnd;
239 + case 'topCompositionUpdate':
240 + return eventTypes.compositionUpdate;
241 + }
242 +}
243 +
244 +/**
245 + * Does our fallback best-guess model think this event signifies that
246 + * composition has begun?
247 + *
248 + * @param {string} topLevelType
249 + * @param {object} nativeEvent
250 + * @return {boolean}
251 + */
252 +function isFallbackCompositionStart(topLevelType, nativeEvent) {
253 + return topLevelType === 'topKeyDown' && nativeEvent.keyCode === START_KEYCODE;
254 +}
255 +
256 +/**
257 + * Does our fallback mode think that this event is the end of composition?
258 + *
259 + * @param {string} topLevelType
260 + * @param {object} nativeEvent
261 + * @return {boolean}
262 + */
263 +function isFallbackCompositionEnd(topLevelType, nativeEvent) {
264 + switch (topLevelType) {
265 + case 'topKeyUp':
266 + // Command keys insert or clear IME input.
267 + return END_KEYCODES.indexOf(nativeEvent.keyCode) !== -1;
268 + case 'topKeyDown':
269 + // Expect IME keyCode on each keydown. If we get any other
270 + // code we must have exited earlier.
271 + return nativeEvent.keyCode !== START_KEYCODE;
272 + case 'topKeyPress':
273 + case 'topMouseDown':
274 + case 'topBlur':
275 + // Events are not possible without cancelling IME.
276 + return true;
277 + default:
278 + return false;
279 + }
280 +}
281 +
282 +/**
283 + * Google Input Tools provides composition data via a CustomEvent,
284 + * with the `data` property populated in the `detail` object. If this
285 + * is available on the event object, use it. If not, this is a plain
286 + * composition event and we have nothing special to extract.
287 + *
288 + * @param {object} nativeEvent
289 + * @return {?string}
290 + */
291 +function getDataFromCustomEvent(nativeEvent) {
292 + var detail = nativeEvent.detail;
293 + if (typeof detail === 'object' && 'data' in detail) {
294 + return detail.data;
295 + }
296 + return null;
297 +}
298 +
299 +// Track the current IME composition fallback object, if any.
300 +var currentComposition = null;
301 +
302 +/**
303 + * @return {?object} A SyntheticCompositionEvent.
304 + */
305 +function extractCompositionEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget) {
306 + var eventType;
307 + var fallbackData;
308 +
309 + if (canUseCompositionEvent) {
310 + eventType = getCompositionEventType(topLevelType);
311 + } else if (!currentComposition) {
312 + if (isFallbackCompositionStart(topLevelType, nativeEvent)) {
313 + eventType = eventTypes.compositionStart;
314 + }
315 + } else if (isFallbackCompositionEnd(topLevelType, nativeEvent)) {
316 + eventType = eventTypes.compositionEnd;
317 + }
318 +
319 + if (!eventType) {
320 + return null;
321 + }
322 +
323 + if (useFallbackCompositionData) {
324 + // The current composition is stored statically and must not be
325 + // overwritten while composition continues.
326 + if (!currentComposition && eventType === eventTypes.compositionStart) {
327 + currentComposition = FallbackCompositionState.getPooled(nativeEventTarget);
328 + } else if (eventType === eventTypes.compositionEnd) {
329 + if (currentComposition) {
330 + fallbackData = currentComposition.getData();
331 + }
332 + }
333 + }
334 +
335 + var event = SyntheticCompositionEvent.getPooled(eventType, targetInst, nativeEvent, nativeEventTarget);
336 +
337 + if (fallbackData) {
338 + // Inject data generated from fallback path into the synthetic event.
339 + // This matches the property of native CompositionEventInterface.
340 + event.data = fallbackData;
341 + } else {
342 + var customData = getDataFromCustomEvent(nativeEvent);
343 + if (customData !== null) {
344 + event.data = customData;
345 + }
346 + }
347 +
348 + EventPropagators.accumulateTwoPhaseDispatches(event);
349 + return event;
350 +}
351 +
352 +/**
353 + * @param {string} topLevelType Record from `EventConstants`.
354 + * @param {object} nativeEvent Native browser event.
355 + * @return {?string} The string corresponding to this `beforeInput` event.
356 + */
357 +function getNativeBeforeInputChars(topLevelType, nativeEvent) {
358 + switch (topLevelType) {
359 + case 'topCompositionEnd':
360 + return getDataFromCustomEvent(nativeEvent);
361 + case 'topKeyPress':
362 + /**
363 + * If native `textInput` events are available, our goal is to make
364 + * use of them. However, there is a special case: the spacebar key.
365 + * In Webkit, preventing default on a spacebar `textInput` event
366 + * cancels character insertion, but it *also* causes the browser
367 + * to fall back to its default spacebar behavior of scrolling the
368 + * page.
369 + *
370 + * Tracking at:
371 + * https://code.google.com/p/chromium/issues/detail?id=355103
372 + *
373 + * To avoid this issue, use the keypress event as if no `textInput`
374 + * event is available.
375 + */
376 + var which = nativeEvent.which;
377 + if (which !== SPACEBAR_CODE) {
378 + return null;
379 + }
380 +
381 + hasSpaceKeypress = true;
382 + return SPACEBAR_CHAR;
383 +
384 + case 'topTextInput':
385 + // Record the characters to be added to the DOM.
386 + var chars = nativeEvent.data;
387 +
388 + // If it's a spacebar character, assume that we have already handled
389 + // it at the keypress level and bail immediately. Android Chrome
390 + // doesn't give us keycodes, so we need to blacklist it.
391 + if (chars === SPACEBAR_CHAR && hasSpaceKeypress) {
392 + return null;
393 + }
394 +
395 + return chars;
396 +
397 + default:
398 + // For other native event types, do nothing.
399 + return null;
400 + }
401 +}
402 +
403 +/**
404 + * For browsers that do not provide the `textInput` event, extract the
405 + * appropriate string to use for SyntheticInputEvent.
406 + *
407 + * @param {string} topLevelType Record from `EventConstants`.
408 + * @param {object} nativeEvent Native browser event.
409 + * @return {?string} The fallback string for this `beforeInput` event.
410 + */
411 +function getFallbackBeforeInputChars(topLevelType, nativeEvent) {
412 + // If we are currently composing (IME) and using a fallback to do so,
413 + // try to extract the composed characters from the fallback object.
414 + // If composition event is available, we extract a string only at
415 + // compositionevent, otherwise extract it at fallback events.
416 + if (currentComposition) {
417 + if (topLevelType === 'topCompositionEnd' || !canUseCompositionEvent && isFallbackCompositionEnd(topLevelType, nativeEvent)) {
418 + var chars = currentComposition.getData();
419 + FallbackCompositionState.release(currentComposition);
420 + currentComposition = null;
421 + return chars;
422 + }
423 + return null;
424 + }
425 +
426 + switch (topLevelType) {
427 + case 'topPaste':
428 + // If a paste event occurs after a keypress, throw out the input
429 + // chars. Paste events should not lead to BeforeInput events.
430 + return null;
431 + case 'topKeyPress':
432 + /**
433 + * As of v27, Firefox may fire keypress events even when no character
434 + * will be inserted. A few possibilities:
435 + *
436 + * - `which` is `0`. Arrow keys, Esc key, etc.
437 + *
438 + * - `which` is the pressed key code, but no char is available.
439 + * Ex: 'AltGr + d` in Polish. There is no modified character for
440 + * this key combination and no character is inserted into the
441 + * document, but FF fires the keypress for char code `100` anyway.
442 + * No `input` event will occur.
443 + *
444 + * - `which` is the pressed key code, but a command combination is
445 + * being used. Ex: `Cmd+C`. No character is inserted, and no
446 + * `input` event will occur.
447 + */
448 + if (nativeEvent.which && !isKeypressCommand(nativeEvent)) {
449 + return String.fromCharCode(nativeEvent.which);
450 + }
451 + return null;
452 + case 'topCompositionEnd':
453 + return useFallbackCompositionData ? null : nativeEvent.data;
454 + default:
455 + return null;
456 + }
457 +}
458 +
459 +/**
460 + * Extract a SyntheticInputEvent for `beforeInput`, based on either native
461 + * `textInput` or fallback behavior.
462 + *
463 + * @return {?object} A SyntheticInputEvent.
464 + */
465 +function extractBeforeInputEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget) {
466 + var chars;
467 +
468 + if (canUseTextInputEvent) {
469 + chars = getNativeBeforeInputChars(topLevelType, nativeEvent);
470 + } else {
471 + chars = getFallbackBeforeInputChars(topLevelType, nativeEvent);
472 + }
473 +
474 + // If no characters are being inserted, no BeforeInput event should
475 + // be fired.
476 + if (!chars) {
477 + return null;
478 + }
479 +
480 + var event = SyntheticInputEvent.getPooled(eventTypes.beforeInput, targetInst, nativeEvent, nativeEventTarget);
481 +
482 + event.data = chars;
483 + EventPropagators.accumulateTwoPhaseDispatches(event);
484 + return event;
485 +}
486 +
487 +/**
488 + * Create an `onBeforeInput` event to match
489 + * http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105/#events-inputevents.
490 + *
491 + * This event plugin is based on the native `textInput` event
492 + * available in Chrome, Safari, Opera, and IE. This event fires after
493 + * `onKeyPress` and `onCompositionEnd`, but before `onInput`.
494 + *
495 + * `beforeInput` is spec'd but not implemented in any browsers, and
496 + * the `input` event does not provide any useful information about what has
497 + * actually been added, contrary to the spec. Thus, `textInput` is the best
498 + * available event to identify the characters that have actually been inserted
499 + * into the target node.
500 + *
501 + * This plugin is also responsible for emitting `composition` events, thus
502 + * allowing us to share composition fallback code for both `beforeInput` and
503 + * `composition` event types.
504 + */
505 +var BeforeInputEventPlugin = {
506 +
507 + eventTypes: eventTypes,
508 +
509 + extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
510 + return [extractCompositionEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget), extractBeforeInputEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget)];
511 + }
512 +};
513 +
514 +module.exports = BeforeInputEventPlugin;
515 +},{"143":143,"20":20,"21":21,"94":94,"98":98}],4:[function(_dereq_,module,exports){
516 +/**
517 + * Copyright 2013-present, Facebook, Inc.
518 + * All rights reserved.
519 + *
520 + * This source code is licensed under the BSD-style license found in the
521 + * LICENSE file in the root directory of this source tree. An additional grant
522 + * of patent rights can be found in the PATENTS file in the same directory.
523 + *
524 + */
525 +
526 +'use strict';
527 +
528 +/**
529 + * CSS properties which accept numbers but are not in units of "px".
530 + */
531 +
532 +var isUnitlessNumber = {
533 + animationIterationCount: true,
534 + borderImageOutset: true,
535 + borderImageSlice: true,
536 + borderImageWidth: true,
537 + boxFlex: true,
538 + boxFlexGroup: true,
539 + boxOrdinalGroup: true,
540 + columnCount: true,
541 + flex: true,
542 + flexGrow: true,
543 + flexPositive: true,
544 + flexShrink: true,
545 + flexNegative: true,
546 + flexOrder: true,
547 + gridRow: true,
548 + gridColumn: true,
549 + fontWeight: true,
550 + lineClamp: true,
551 + lineHeight: true,
552 + opacity: true,
553 + order: true,
554 + orphans: true,
555 + tabSize: true,
556 + widows: true,
557 + zIndex: true,
558 + zoom: true,
559 +
560 + // SVG-related properties
561 + fillOpacity: true,
562 + floodOpacity: true,
563 + stopOpacity: true,
564 + strokeDasharray: true,
565 + strokeDashoffset: true,
566 + strokeMiterlimit: true,
567 + strokeOpacity: true,
568 + strokeWidth: true
569 +};
570 +
571 +/**
572 + * @param {string} prefix vendor-specific prefix, eg: Webkit
573 + * @param {string} key style name, eg: transitionDuration
574 + * @return {string} style name prefixed with `prefix`, properly camelCased, eg:
575 + * WebkitTransitionDuration
576 + */
577 +function prefixKey(prefix, key) {
578 + return prefix + key.charAt(0).toUpperCase() + key.substring(1);
579 +}
580 +
581 +/**
582 + * Support style names that may come passed in prefixed by adding permutations
583 + * of vendor prefixes.
584 + */
585 +var prefixes = ['Webkit', 'ms', 'Moz', 'O'];
586 +
587 +// Using Object.keys here, or else the vanilla for-in loop makes IE8 go into an
588 +// infinite loop, because it iterates over the newly added props too.
589 +Object.keys(isUnitlessNumber).forEach(function (prop) {
590 + prefixes.forEach(function (prefix) {
591 + isUnitlessNumber[prefixKey(prefix, prop)] = isUnitlessNumber[prop];
592 + });
593 +});
594 +
595 +/**
596 + * Most style properties can be unset by doing .style[prop] = '' but IE8
597 + * doesn't like doing that with shorthand properties so for the properties that
598 + * IE8 breaks on, which are listed here, we instead unset each of the
599 + * individual properties. See http://bugs.jquery.com/ticket/12385.
600 + * The 4-value 'clock' properties like margin, padding, border-width seem to
601 + * behave without any problems. Curiously, list-style works too without any
602 + * special prodding.
603 + */
604 +var shorthandPropertyExpansions = {
605 + background: {
606 + backgroundAttachment: true,
607 + backgroundColor: true,
608 + backgroundImage: true,
609 + backgroundPositionX: true,
610 + backgroundPositionY: true,
611 + backgroundRepeat: true
612 + },
613 + backgroundPosition: {
614 + backgroundPositionX: true,
615 + backgroundPositionY: true
616 + },
617 + border: {
618 + borderWidth: true,
619 + borderStyle: true,
620 + borderColor: true
621 + },
622 + borderBottom: {
623 + borderBottomWidth: true,
624 + borderBottomStyle: true,
625 + borderBottomColor: true
626 + },
627 + borderLeft: {
628 + borderLeftWidth: true,
629 + borderLeftStyle: true,
630 + borderLeftColor: true
631 + },
632 + borderRight: {
633 + borderRightWidth: true,
634 + borderRightStyle: true,
635 + borderRightColor: true
636 + },
637 + borderTop: {
638 + borderTopWidth: true,
639 + borderTopStyle: true,
640 + borderTopColor: true
641 + },
642 + font: {
643 + fontStyle: true,
644 + fontVariant: true,
645 + fontWeight: true,
646 + fontSize: true,
647 + lineHeight: true,
648 + fontFamily: true
649 + },
650 + outline: {
651 + outlineWidth: true,
652 + outlineStyle: true,
653 + outlineColor: true
654 + }
655 +};
656 +
657 +var CSSProperty = {
658 + isUnitlessNumber: isUnitlessNumber,
659 + shorthandPropertyExpansions: shorthandPropertyExpansions
660 +};
661 +
662 +module.exports = CSSProperty;
663 +},{}],5:[function(_dereq_,module,exports){
664 +/**
665 + * Copyright 2013-present, Facebook, Inc.
666 + * All rights reserved.
667 + *
668 + * This source code is licensed under the BSD-style license found in the
669 + * LICENSE file in the root directory of this source tree. An additional grant
670 + * of patent rights can be found in the PATENTS file in the same directory.
671 + *
672 + */
673 +
674 +'use strict';
675 +
676 +var CSSProperty = _dereq_(4);
677 +var ExecutionEnvironment = _dereq_(143);
678 +
679 +var camelizeStyleName = _dereq_(145);
680 +var dangerousStyleValue = _dereq_(111);
681 +var getComponentName = _dereq_(116);
682 +var hyphenateStyleName = _dereq_(156);
683 +var memoizeStringOnly = _dereq_(160);
684 +var warning = _dereq_(164);
685 +
686 +if ("development" !== 'production') {
687 + var _require = _dereq_(52),
688 + getCurrentFiberOwnerName = _require.getCurrentFiberOwnerName;
689 +}
690 +
691 +var processStyleName = memoizeStringOnly(function (styleName) {
692 + return hyphenateStyleName(styleName);
693 +});
694 +
695 +var hasShorthandPropertyBug = false;
696 +var styleFloatAccessor = 'cssFloat';
697 +if (ExecutionEnvironment.canUseDOM) {
698 + var tempStyle = document.createElement('div').style;
699 + try {
700 + // IE8 throws "Invalid argument." if resetting shorthand style properties.
701 + tempStyle.font = '';
702 + } catch (e) {
703 + hasShorthandPropertyBug = true;
704 + }
705 + // IE8 only supports accessing cssFloat (standard) as styleFloat
706 + if (document.documentElement.style.cssFloat === undefined) {
707 + styleFloatAccessor = 'styleFloat';
708 + }
709 +}
710 +
711 +if ("development" !== 'production') {
712 + // 'msTransform' is correct, but the other prefixes should be capitalized
713 + var badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/;
714 +
715 + // style values shouldn't contain a semicolon
716 + var badStyleValueWithSemicolonPattern = /;\s*$/;
717 +
718 + var warnedStyleNames = {};
719 + var warnedStyleValues = {};
720 + var warnedForNaNValue = false;
721 +
722 + var warnHyphenatedStyleName = function (name, owner) {
723 + if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {
724 + return;
725 + }
726 +
727 + warnedStyleNames[name] = true;
728 + "development" !== 'production' ? warning(false, 'Unsupported style property %s. Did you mean %s?%s', name, camelizeStyleName(name), checkRenderMessage(owner)) : void 0;
729 + };
730 +
731 + var warnBadVendoredStyleName = function (name, owner) {
732 + if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {
733 + return;
734 + }
735 +
736 + warnedStyleNames[name] = true;
737 + "development" !== 'production' ? warning(false, 'Unsupported vendor-prefixed style property %s. Did you mean %s?%s', name, name.charAt(0).toUpperCase() + name.slice(1), checkRenderMessage(owner)) : void 0;
738 + };
739 +
740 + var warnStyleValueWithSemicolon = function (name, value, owner) {
741 + if (warnedStyleValues.hasOwnProperty(value) && warnedStyleValues[value]) {
742 + return;
743 + }
744 +
745 + warnedStyleValues[value] = true;
746 + "development" !== 'production' ? warning(false, 'Style property values shouldn\'t contain a semicolon.%s ' + 'Try "%s: %s" instead.', checkRenderMessage(owner), name, value.replace(badStyleValueWithSemicolonPattern, '')) : void 0;
747 + };
748 +
749 + var warnStyleValueIsNaN = function (name, value, owner) {
750 + if (warnedForNaNValue) {
751 + return;
752 + }
753 +
754 + warnedForNaNValue = true;
755 + "development" !== 'production' ? warning(false, '`NaN` is an invalid value for the `%s` css style property.%s', name, checkRenderMessage(owner)) : void 0;
756 + };
757 +
758 + var checkRenderMessage = function (owner) {
759 + var ownerName;
760 + if (owner != null) {
761 + // Stack passes the owner manually all the way to CSSPropertyOperations.
762 + ownerName = getComponentName(owner);
763 + } else {
764 + // Fiber doesn't pass it but uses ReactDebugCurrentFiber to track it.
765 + // It is only enabled in development and tracks host components too.
766 + ownerName = getCurrentFiberOwnerName();
767 + // TODO: also report the stack.
768 + }
769 + if (ownerName) {
770 + return ' Check the render method of `' + ownerName + '`.';
771 + }
772 + return '';
773 + };
774 +
775 + /**
776 + * @param {string} name
777 + * @param {*} value
778 + * @param {ReactDOMComponent} component
779 + */
780 + var warnValidStyle = function (name, value, component) {
781 + var owner;
782 + if (component) {
783 + owner = component._currentElement._owner;
784 + }
785 + if (name.indexOf('-') > -1) {
786 + warnHyphenatedStyleName(name, owner);
787 + } else if (badVendoredStyleNamePattern.test(name)) {
788 + warnBadVendoredStyleName(name, owner);
789 + } else if (badStyleValueWithSemicolonPattern.test(value)) {
790 + warnStyleValueWithSemicolon(name, value, owner);
791 + }
792 +
793 + if (typeof value === 'number' && isNaN(value)) {
794 + warnStyleValueIsNaN(name, value, owner);
795 + }
796 + };
797 +}
798 +
799 +/**
800 + * Operations for dealing with CSS properties.
801 + */
802 +var CSSPropertyOperations = {
803 +
804 + /**
805 + * Serializes a mapping of style properties for use as inline styles:
806 + *
807 + * > createMarkupForStyles({width: '200px', height: 0})
808 + * "width:200px;height:0;"
809 + *
810 + * Undefined values are ignored so that declarative programming is easier.
811 + * The result should be HTML-escaped before insertion into the DOM.
812 + *
813 + * @param {object} styles
814 + * @param {ReactDOMComponent} component
815 + * @return {?string}
816 + */
817 + createMarkupForStyles: function (styles, component) {
818 + var serialized = '';
819 + for (var styleName in styles) {
820 + if (!styles.hasOwnProperty(styleName)) {
821 + continue;
822 + }
823 + var styleValue = styles[styleName];
824 + if ("development" !== 'production') {
825 + warnValidStyle(styleName, styleValue, component);
826 + }
827 + if (styleValue != null) {
828 + serialized += processStyleName(styleName) + ':';
829 + serialized += dangerousStyleValue(styleName, styleValue, component) + ';';
830 + }
831 + }
832 + return serialized || null;
833 + },
834 +
835 + /**
836 + * Sets the value for multiple styles on a node. If a value is specified as
837 + * '' (empty string), the corresponding style property will be unset.
838 + *
839 + * @param {DOMElement} node
840 + * @param {object} styles
841 + * @param {ReactDOMComponent} component
842 + */
843 + setValueForStyles: function (node, styles, component) {
844 + var style = node.style;
845 + for (var styleName in styles) {
846 + if (!styles.hasOwnProperty(styleName)) {
847 + continue;
848 + }
849 + if ("development" !== 'production') {
850 + warnValidStyle(styleName, styles[styleName], component);
851 + }
852 + var styleValue = dangerousStyleValue(styleName, styles[styleName], component);
853 + if (styleName === 'float' || styleName === 'cssFloat') {
854 + styleName = styleFloatAccessor;
855 + }
856 + if (styleValue) {
857 + style[styleName] = styleValue;
858 + } else {
859 + var expansion = hasShorthandPropertyBug && CSSProperty.shorthandPropertyExpansions[styleName];
860 + if (expansion) {
861 + // Shorthand property that IE8 won't like unsetting, so unset each
862 + // component to placate it
863 + for (var individualStyleName in expansion) {
864 + style[individualStyleName] = '';
865 + }
866 + } else {
867 + style[styleName] = '';
868 + }
869 + }
870 + }
871 + }
872 +
873 +};
874 +
875 +module.exports = CSSPropertyOperations;
876 +},{"111":111,"116":116,"143":143,"145":145,"156":156,"160":160,"164":164,"4":4,"52":52}],6:[function(_dereq_,module,exports){
877 +/**
878 + * Copyright 2013-present, Facebook, Inc.
879 + * All rights reserved.
880 + *
881 + * This source code is licensed under the BSD-style license found in the
882 + * LICENSE file in the root directory of this source tree. An additional grant
883 + * of patent rights can be found in the PATENTS file in the same directory.
884 + *
885 + *
886 + */
887 +
888 +'use strict';
889 +
890 +var _prodInvariant = _dereq_(133);
891 +
892 +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
893 +
894 +var PooledClass = _dereq_(24);
895 +
896 +var invariant = _dereq_(157);
897 +
898 +/**
899 + * A specialized pseudo-event module to help keep track of components waiting to
900 + * be notified when their DOM representations are available for use.
901 + *
902 + * This implements `PooledClass`, so you should never need to instantiate this.
903 + * Instead, use `CallbackQueue.getPooled()`.
904 + *
905 + * @class ReactMountReady
906 + * @implements PooledClass
907 + * @internal
908 + */
909 +
910 +var CallbackQueue = function () {
911 + function CallbackQueue(arg) {
912 + _classCallCheck(this, CallbackQueue);
913 +
914 + this._callbacks = null;
915 + this._contexts = null;
916 + this._arg = arg;
917 + }
918 +
919 + /**
920 + * Enqueues a callback to be invoked when `notifyAll` is invoked.
921 + *
922 + * @param {function} callback Invoked when `notifyAll` is invoked.
923 + * @param {?object} context Context to call `callback` with.
924 + * @internal
925 + */
926 +
927 +
928 + CallbackQueue.prototype.enqueue = function enqueue(callback, context) {
929 + this._callbacks = this._callbacks || [];
930 + this._callbacks.push(callback);
931 + this._contexts = this._contexts || [];
932 + this._contexts.push(context);
933 + };
934 +
935 + /**
936 + * Invokes all enqueued callbacks and clears the queue. This is invoked after
937 + * the DOM representation of a component has been created or updated.
938 + *
939 + * @internal
940 + */
941 +
942 +
943 + CallbackQueue.prototype.notifyAll = function notifyAll() {
944 + var callbacks = this._callbacks;
945 + var contexts = this._contexts;
946 + var arg = this._arg;
947 + if (callbacks && contexts) {
948 + !(callbacks.length === contexts.length) ? "development" !== 'production' ? invariant(false, 'Mismatched list of contexts in callback queue') : _prodInvariant('24') : void 0;
949 + this._callbacks = null;
950 + this._contexts = null;
951 + for (var i = 0; i < callbacks.length; i++) {
952 + callbacks[i].call(contexts[i], arg);
953 + }
954 + callbacks.length = 0;
955 + contexts.length = 0;
956 + }
957 + };
958 +
959 + CallbackQueue.prototype.checkpoint = function checkpoint() {
960 + return this._callbacks ? this._callbacks.length : 0;
961 + };
962 +
963 + CallbackQueue.prototype.rollback = function rollback(len) {
964 + if (this._callbacks && this._contexts) {
965 + this._callbacks.length = len;
966 + this._contexts.length = len;
967 + }
968 + };
969 +
970 + /**
971 + * Resets the internal queue.
972 + *
973 + * @internal
974 + */
975 +
976 +
977 + CallbackQueue.prototype.reset = function reset() {
978 + this._callbacks = null;
979 + this._contexts = null;
980 + };
981 +
982 + /**
983 + * `PooledClass` looks for this.
984 + */
985 +
986 +
987 + CallbackQueue.prototype.destructor = function destructor() {
988 + this.reset();
989 + };
990 +
991 + return CallbackQueue;
992 +}();
993 +
994 +module.exports = PooledClass.addPoolingTo(CallbackQueue);
995 +},{"133":133,"157":157,"24":24}],7:[function(_dereq_,module,exports){
996 +/**
997 + * Copyright 2013-present, Facebook, Inc.
998 + * All rights reserved.
999 + *
1000 + * This source code is licensed under the BSD-style license found in the
1001 + * LICENSE file in the root directory of this source tree. An additional grant
1002 + * of patent rights can be found in the PATENTS file in the same directory.
1003 + *
1004 + */
1005 +
1006 +'use strict';
1007 +
1008 +var EventPluginHub = _dereq_(17);
1009 +var EventPropagators = _dereq_(20);
1010 +var ExecutionEnvironment = _dereq_(143);
1011 +var ReactControlledComponent = _dereq_(30);
1012 +var ReactDOMComponentTree = _dereq_(35);
1013 +var ReactGenericBatching = _dereq_(62);
1014 +var SyntheticEvent = _dereq_(96);
1015 +
1016 +var inputValueTracking = _dereq_(128);
1017 +var getEventTarget = _dereq_(121);
1018 +var isEventSupported = _dereq_(130);
1019 +var isTextInputElement = _dereq_(131);
1020 +
1021 +var eventTypes = {
1022 + change: {
1023 + phasedRegistrationNames: {
1024 + bubbled: 'onChange',
1025 + captured: 'onChangeCapture'
1026 + },
1027 + dependencies: ['topBlur', 'topChange', 'topClick', 'topFocus', 'topInput', 'topKeyDown', 'topKeyUp', 'topSelectionChange']
1028 + }
1029 +};
1030 +
1031 +function createAndAccumulateChangeEvent(inst, nativeEvent, target) {
1032 + var event = SyntheticEvent.getPooled(eventTypes.change, inst, nativeEvent, target);
1033 + event.type = 'change';
1034 + // Flag this event loop as needing state restore.
1035 + ReactControlledComponent.enqueueStateRestore(target);
1036 + EventPropagators.accumulateTwoPhaseDispatches(event);
1037 + return event;
1038 +}
1039 +/**
1040 + * For IE shims
1041 + */
1042 +var activeElement = null;
1043 +var activeElementInst = null;
1044 +
1045 +/**
1046 + * SECTION: handle `change` event
1047 + */
1048 +function shouldUseChangeEvent(elem) {
1049 + var nodeName = elem.nodeName && elem.nodeName.toLowerCase();
1050 + return nodeName === 'select' || nodeName === 'input' && elem.type === 'file';
1051 +}
1052 +
1053 +var doesChangeEventBubble = false;
1054 +if (ExecutionEnvironment.canUseDOM) {
1055 + // See `handleChange` comment below
1056 + doesChangeEventBubble = isEventSupported('change') && (!document.documentMode || document.documentMode > 8);
1057 +}
1058 +
1059 +function manualDispatchChangeEvent(nativeEvent) {
1060 + var event = createAndAccumulateChangeEvent(activeElementInst, nativeEvent, getEventTarget(nativeEvent));
1061 +
1062 + // If change and propertychange bubbled, we'd just bind to it like all the
1063 + // other events and have it go through ReactBrowserEventEmitter. Since it
1064 + // doesn't, we manually listen for the events and so we have to enqueue and
1065 + // process the abstract event manually.
1066 + //
1067 + // Batching is necessary here in order to ensure that all event handlers run
1068 + // before the next rerender (including event handlers attached to ancestor
1069 + // elements instead of directly on the input). Without this, controlled
1070 + // components don't work properly in conjunction with event bubbling because
1071 + // the component is rerendered and the value reverted before all the event
1072 + // handlers can run. See https://github.com/facebook/react/issues/708.
1073 + ReactGenericBatching.batchedUpdates(runEventInBatch, event);
1074 +}
1075 +
1076 +function runEventInBatch(event) {
1077 + EventPluginHub.enqueueEvents(event);
1078 + EventPluginHub.processEventQueue(false);
1079 +}
1080 +
1081 +function startWatchingForChangeEventIE8(target, targetInst) {
1082 + activeElement = target;
1083 + activeElementInst = targetInst;
1084 + activeElement.attachEvent('onchange', manualDispatchChangeEvent);
1085 +}
1086 +
1087 +function stopWatchingForChangeEventIE8() {
1088 + if (!activeElement) {
1089 + return;
1090 + }
1091 + activeElement.detachEvent('onchange', manualDispatchChangeEvent);
1092 + activeElement = null;
1093 + activeElementInst = null;
1094 +}
1095 +
1096 +function getInstIfValueChanged(targetInst) {
1097 + if (inputValueTracking.updateValueIfChanged(targetInst)) {
1098 + return targetInst;
1099 + }
1100 +}
1101 +
1102 +function getTargetInstForChangeEvent(topLevelType, targetInst) {
1103 + if (topLevelType === 'topChange') {
1104 + return targetInst;
1105 + }
1106 +}
1107 +
1108 +function handleEventsForChangeEventIE8(topLevelType, target, targetInst) {
1109 + if (topLevelType === 'topFocus') {
1110 + // stopWatching() should be a noop here but we call it just in case we
1111 + // missed a blur event somehow.
1112 + stopWatchingForChangeEventIE8();
1113 + startWatchingForChangeEventIE8(target, targetInst);
1114 + } else if (topLevelType === 'topBlur') {
1115 + stopWatchingForChangeEventIE8();
1116 + }
1117 +}
1118 +
1119 +/**
1120 + * SECTION: handle `input` event
1121 + */
1122 +var isInputEventSupported = false;
1123 +if (ExecutionEnvironment.canUseDOM) {
1124 + // IE9 claims to support the input event but fails to trigger it when
1125 + // deleting text, so we ignore its input events.
1126 + isInputEventSupported = isEventSupported('input') && (!document.documentMode || document.documentMode > 9);
1127 +}
1128 +
1129 +/**
1130 + * (For IE <=9) Starts tracking propertychange events on the passed-in element
1131 + * and override the value property so that we can distinguish user events from
1132 + * value changes in JS.
1133 + */
1134 +function startWatchingForValueChange(target, targetInst) {
1135 + activeElement = target;
1136 + activeElementInst = targetInst;
1137 + activeElement.attachEvent('onpropertychange', handlePropertyChange);
1138 +}
1139 +
1140 +/**
1141 + * (For IE <=9) Removes the event listeners from the currently-tracked element,
1142 + * if any exists.
1143 + */
1144 +function stopWatchingForValueChange() {
1145 + if (!activeElement) {
1146 + return;
1147 + }
1148 + activeElement.detachEvent('onpropertychange', handlePropertyChange);
1149 + activeElement = null;
1150 + activeElementInst = null;
1151 +}
1152 +
1153 +/**
1154 + * (For IE <=9) Handles a propertychange event, sending a `change` event if
1155 + * the value of the active element has changed.
1156 + */
1157 +function handlePropertyChange(nativeEvent) {
1158 + if (nativeEvent.propertyName !== 'value') {
1159 + return;
1160 + }
1161 + if (getInstIfValueChanged(activeElementInst)) {
1162 + manualDispatchChangeEvent(nativeEvent);
1163 + }
1164 +}
1165 +
1166 +function handleEventsForInputEventPolyfill(topLevelType, target, targetInst) {
1167 + if (topLevelType === 'topFocus') {
1168 + // In IE8, we can capture almost all .value changes by adding a
1169 + // propertychange handler and looking for events with propertyName
1170 + // equal to 'value'
1171 + // In IE9, propertychange fires for most input events but is buggy and
1172 + // doesn't fire when text is deleted, but conveniently, selectionchange
1173 + // appears to fire in all of the remaining cases so we catch those and
1174 + // forward the event if the value has changed
1175 + // In either case, we don't want to call the event handler if the value
1176 + // is changed from JS so we redefine a setter for `.value` that updates
1177 + // our activeElementValue variable, allowing us to ignore those changes
1178 + //
1179 + // stopWatching() should be a noop here but we call it just in case we
1180 + // missed a blur event somehow.
1181 + stopWatchingForValueChange();
1182 + startWatchingForValueChange(target, targetInst);
1183 + } else if (topLevelType === 'topBlur') {
1184 + stopWatchingForValueChange();
1185 + }
1186 +}
1187 +
1188 +// For IE8 and IE9.
1189 +function getTargetInstForInputEventPolyfill(topLevelType, targetInst) {
1190 + if (topLevelType === 'topSelectionChange' || topLevelType === 'topKeyUp' || topLevelType === 'topKeyDown') {
1191 + // On the selectionchange event, the target is just document which isn't
1192 + // helpful for us so just check activeElement instead.
1193 + //
1194 + // 99% of the time, keydown and keyup aren't necessary. IE8 fails to fire
1195 + // propertychange on the first input event after setting `value` from a
1196 + // script and fires only keydown, keypress, keyup. Catching keyup usually
1197 + // gets it and catching keydown lets us fire an event for the first
1198 + // keystroke if user does a key repeat (it'll be a little delayed: right
1199 + // before the second keystroke). Other input methods (e.g., paste) seem to
1200 + // fire selectionchange normally.
1201 + return getInstIfValueChanged(activeElementInst);
1202 + }
1203 +}
1204 +
1205 +/**
1206 + * SECTION: handle `click` event
1207 + */
1208 +function shouldUseClickEvent(elem) {
1209 + // Use the `click` event to detect changes to checkbox and radio inputs.
1210 + // This approach works across all browsers, whereas `change` does not fire
1211 + // until `blur` in IE8.
1212 + var nodeName = elem.nodeName;
1213 + return nodeName && nodeName.toLowerCase() === 'input' && (elem.type === 'checkbox' || elem.type === 'radio');
1214 +}
1215 +
1216 +function getTargetInstForClickEvent(topLevelType, targetInst) {
1217 + if (topLevelType === 'topClick') {
1218 + return getInstIfValueChanged(targetInst);
1219 + }
1220 +}
1221 +
1222 +function getTargetInstForInputOrChangeEvent(topLevelType, targetInst) {
1223 + if (topLevelType === 'topInput' || topLevelType === 'topChange') {
1224 + return getInstIfValueChanged(targetInst);
1225 + }
1226 +}
1227 +
1228 +function handleControlledInputBlur(inst, node) {
1229 + // Fiber and ReactDOM keep wrapper state in separate places
1230 + var state = inst._wrapperState || node._wrapperState;
1231 +
1232 + if (!state || !state.controlled || node.type !== 'number') {
1233 + return;
1234 + }
1235 +
1236 + // If controlled, assign the value attribute to the current value on blur
1237 + var value = '' + node.value;
1238 + if (node.getAttribute('value') !== value) {
1239 + node.setAttribute('value', value);
1240 + }
1241 +}
1242 +
1243 +/**
1244 + * This plugin creates an `onChange` event that normalizes change events
1245 + * across form elements. This event fires at a time when it's possible to
1246 + * change the element's value without seeing a flicker.
1247 + *
1248 + * Supported elements are:
1249 + * - input (see `isTextInputElement`)
1250 + * - textarea
1251 + * - select
1252 + */
1253 +var ChangeEventPlugin = {
1254 +
1255 + eventTypes: eventTypes,
1256 +
1257 + _isInputEventSupported: isInputEventSupported,
1258 +
1259 + extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
1260 + var targetNode = targetInst ? ReactDOMComponentTree.getNodeFromInstance(targetInst) : window;
1261 +
1262 + var getTargetInstFunc, handleEventFunc;
1263 + if (shouldUseChangeEvent(targetNode)) {
1264 + if (doesChangeEventBubble) {
1265 + getTargetInstFunc = getTargetInstForChangeEvent;
1266 + } else {
1267 + handleEventFunc = handleEventsForChangeEventIE8;
1268 + }
1269 + } else if (isTextInputElement(targetNode)) {
1270 + if (isInputEventSupported) {
1271 + getTargetInstFunc = getTargetInstForInputOrChangeEvent;
1272 + } else {
1273 + getTargetInstFunc = getTargetInstForInputEventPolyfill;
1274 + handleEventFunc = handleEventsForInputEventPolyfill;
1275 + }
1276 + } else if (shouldUseClickEvent(targetNode)) {
1277 + getTargetInstFunc = getTargetInstForClickEvent;
1278 + }
1279 +
1280 + if (getTargetInstFunc) {
1281 + var inst = getTargetInstFunc(topLevelType, targetInst);
1282 + if (inst) {
1283 + var event = createAndAccumulateChangeEvent(inst, nativeEvent, nativeEventTarget);
1284 + return event;
1285 + }
1286 + }
1287 +
1288 + if (handleEventFunc) {
1289 + handleEventFunc(topLevelType, targetNode, targetInst);
1290 + }
1291 +
1292 + // When blurring, set the value attribute for number inputs
1293 + if (topLevelType === 'topBlur') {
1294 + handleControlledInputBlur(targetInst, targetNode);
1295 + }
1296 + }
1297 +
1298 +};
1299 +
1300 +module.exports = ChangeEventPlugin;
1301 +},{"121":121,"128":128,"130":130,"131":131,"143":143,"17":17,"20":20,"30":30,"35":35,"62":62,"96":96}],8:[function(_dereq_,module,exports){
1302 +/**
1303 + * Copyright 2013-present, Facebook, Inc.
1304 + * All rights reserved.
1305 + *
1306 + * This source code is licensed under the BSD-style license found in the
1307 + * LICENSE file in the root directory of this source tree. An additional grant
1308 + * of patent rights can be found in the PATENTS file in the same directory.
1309 + *
1310 + */
1311 +
1312 +'use strict';
1313 +
1314 +var DOMLazyTree = _dereq_(10);
1315 +var Danger = _dereq_(14);
1316 +var ReactDOMComponentTree = _dereq_(35);
1317 +var ReactInstrumentation = _dereq_(67);
1318 +
1319 +var createMicrosoftUnsafeLocalFunction = _dereq_(110);
1320 +var setInnerHTML = _dereq_(134);
1321 +var setTextContent = _dereq_(135);
1322 +
1323 +function getNodeAfter(parentNode, node) {
1324 + // Special case for text components, which return [open, close] comments
1325 + // from getHostNode.
1326 + if (Array.isArray(node)) {
1327 + node = node[1];
1328 + }
1329 + return node ? node.nextSibling : parentNode.firstChild;
1330 +}
1331 +
1332 +/**
1333 + * Inserts `childNode` as a child of `parentNode` at the `index`.
1334 + *
1335 + * @param {DOMElement} parentNode Parent node in which to insert.
1336 + * @param {DOMElement} childNode Child node to insert.
1337 + * @param {number} index Index at which to insert the child.
1338 + * @internal
1339 + */
1340 +var insertChildAt = createMicrosoftUnsafeLocalFunction(function (parentNode, childNode, referenceNode) {
1341 + // We rely exclusively on `insertBefore(node, null)` instead of also using
1342 + // `appendChild(node)`. (Using `undefined` is not allowed by all browsers so
1343 + // we are careful to use `null`.)
1344 + parentNode.insertBefore(childNode, referenceNode);
1345 +});
1346 +
1347 +function insertLazyTreeChildAt(parentNode, childTree, referenceNode) {
1348 + DOMLazyTree.insertTreeBefore(parentNode, childTree, referenceNode);
1349 +}
1350 +
1351 +function moveChild(parentNode, childNode, referenceNode) {
1352 + if (Array.isArray(childNode)) {
1353 + moveDelimitedText(parentNode, childNode[0], childNode[1], referenceNode);
1354 + } else {
1355 + insertChildAt(parentNode, childNode, referenceNode);
1356 + }
1357 +}
1358 +
1359 +function removeChild(parentNode, childNode) {
1360 + if (Array.isArray(childNode)) {
1361 + var closingComment = childNode[1];
1362 + childNode = childNode[0];
1363 + removeDelimitedText(parentNode, childNode, closingComment);
1364 + parentNode.removeChild(closingComment);
1365 + }
1366 + parentNode.removeChild(childNode);
1367 +}
1368 +
1369 +function moveDelimitedText(parentNode, openingComment, closingComment, referenceNode) {
1370 + var node = openingComment;
1371 + while (true) {
1372 + var nextNode = node.nextSibling;
1373 + insertChildAt(parentNode, node, referenceNode);
1374 + if (node === closingComment) {
1375 + break;
1376 + }
1377 + node = nextNode;
1378 + }
1379 +}
1380 +
1381 +function removeDelimitedText(parentNode, startNode, closingComment) {
1382 + while (true) {
1383 + var node = startNode.nextSibling;
1384 + if (node === closingComment) {
1385 + // The closing comment is removed by ReactMultiChild.
1386 + break;
1387 + } else {
1388 + parentNode.removeChild(node);
1389 + }
1390 + }
1391 +}
1392 +
1393 +function replaceDelimitedText(openingComment, closingComment, stringText) {
1394 + var parentNode = openingComment.parentNode;
1395 + var nodeAfterComment = openingComment.nextSibling;
1396 + if (nodeAfterComment === closingComment) {
1397 + // There are no text nodes between the opening and closing comments; insert
1398 + // a new one if stringText isn't empty.
1399 + if (stringText) {
1400 + insertChildAt(parentNode, document.createTextNode(stringText), nodeAfterComment);
1401 + }
1402 + } else {
1403 + if (stringText) {
1404 + // Set the text content of the first node after the opening comment, and
1405 + // remove all following nodes up until the closing comment.
1406 + setTextContent(nodeAfterComment, stringText);
1407 + removeDelimitedText(parentNode, nodeAfterComment, closingComment);
1408 + } else {
1409 + removeDelimitedText(parentNode, openingComment, closingComment);
1410 + }
1411 + }
1412 +
1413 + if ("development" !== 'production') {
1414 + ReactInstrumentation.debugTool.onHostOperation({
1415 + instanceID: ReactDOMComponentTree.getInstanceFromNode(openingComment)._debugID,
1416 + type: 'replace text',
1417 + payload: stringText
1418 + });
1419 + }
1420 +}
1421 +
1422 +var dangerouslyReplaceNodeWithMarkup = Danger.dangerouslyReplaceNodeWithMarkup;
1423 +if ("development" !== 'production') {
1424 + dangerouslyReplaceNodeWithMarkup = function (oldChild, markup, prevInstance) {
1425 + Danger.dangerouslyReplaceNodeWithMarkup(oldChild, markup);
1426 + if (prevInstance._debugID !== 0) {
1427 + ReactInstrumentation.debugTool.onHostOperation({
1428 + instanceID: prevInstance._debugID,
1429 + type: 'replace with',
1430 + payload: markup.toString()
1431 + });
1432 + } else {
1433 + var nextInstance = ReactDOMComponentTree.getInstanceFromNode(markup.node);
1434 + if (nextInstance._debugID !== 0) {
1435 + ReactInstrumentation.debugTool.onHostOperation({
1436 + instanceID: nextInstance._debugID,
1437 + type: 'mount',
1438 + payload: markup.toString()
1439 + });
1440 + }
1441 + }
1442 + };
1443 +}
1444 +
1445 +/**
1446 + * Operations for updating with DOM children.
1447 + */
1448 +var DOMChildrenOperations = {
1449 +
1450 + dangerouslyReplaceNodeWithMarkup: dangerouslyReplaceNodeWithMarkup,
1451 +
1452 + replaceDelimitedText: replaceDelimitedText,
1453 +
1454 + /**
1455 + * Updates a component's children by processing a series of updates. The
1456 + * update configurations are each expected to have a `parentNode` property.
1457 + *
1458 + * @param {array<object>} updates List of update configurations.
1459 + * @internal
1460 + */
1461 + processUpdates: function (parentNode, updates) {
1462 + if ("development" !== 'production') {
1463 + var parentNodeDebugID = ReactDOMComponentTree.getInstanceFromNode(parentNode)._debugID;
1464 + }
1465 +
1466 + for (var k = 0; k < updates.length; k++) {
1467 + var update = updates[k];
1468 + switch (update.type) {
1469 + case 'INSERT_MARKUP':
1470 + insertLazyTreeChildAt(parentNode, update.content, getNodeAfter(parentNode, update.afterNode));
1471 + if ("development" !== 'production') {
1472 + ReactInstrumentation.debugTool.onHostOperation({
1473 + instanceID: parentNodeDebugID,
1474 + type: 'insert child',
1475 + payload: { toIndex: update.toIndex, content: update.content.toString() }
1476 + });
1477 + }
1478 + break;
1479 + case 'MOVE_EXISTING':
1480 + moveChild(parentNode, update.fromNode, getNodeAfter(parentNode, update.afterNode));
1481 + if ("development" !== 'production') {
1482 + ReactInstrumentation.debugTool.onHostOperation({
1483 + instanceID: parentNodeDebugID,
1484 + type: 'move child',
1485 + payload: { fromIndex: update.fromIndex, toIndex: update.toIndex }
1486 + });
1487 + }
1488 + break;
1489 + case 'SET_MARKUP':
1490 + setInnerHTML(parentNode, update.content);
1491 + if ("development" !== 'production') {
1492 + ReactInstrumentation.debugTool.onHostOperation({
1493 + instanceID: parentNodeDebugID,
1494 + type: 'replace children',
1495 + payload: update.content.toString()
1496 + });
1497 + }
1498 + break;
1499 + case 'TEXT_CONTENT':
1500 + setTextContent(parentNode, update.content);
1501 + if ("development" !== 'production') {
1502 + ReactInstrumentation.debugTool.onHostOperation({
1503 + instanceID: parentNodeDebugID,
1504 + type: 'replace text',
1505 + payload: update.content.toString()
1506 + });
1507 + }
1508 + break;
1509 + case 'REMOVE_NODE':
1510 + removeChild(parentNode, update.fromNode);
1511 + if ("development" !== 'production') {
1512 + ReactInstrumentation.debugTool.onHostOperation({
1513 + instanceID: parentNodeDebugID,
1514 + type: 'remove child',
1515 + payload: { fromIndex: update.fromIndex }
1516 + });
1517 + }
1518 + break;
1519 + }
1520 + }
1521 + }
1522 +
1523 +};
1524 +
1525 +module.exports = DOMChildrenOperations;
1526 +},{"10":10,"110":110,"134":134,"135":135,"14":14,"35":35,"67":67}],9:[function(_dereq_,module,exports){
1527 +/**
1528 + * Copyright 2013-present, Facebook, Inc.
1529 + * All rights reserved.
1530 + *
1531 + * This source code is licensed under the BSD-style license found in the
1532 + * LICENSE file in the root directory of this source tree. An additional grant
1533 + * of patent rights can be found in the PATENTS file in the same directory.
1534 + *
1535 + */
1536 +
1537 +'use strict';
1538 +
1539 +/**
1540 + * Module that is injectable into `EventPluginHub`, that specifies a
1541 + * deterministic ordering of `EventPlugin`s. A convenient way to reason about
1542 + * plugins, without having to package every one of them. This is better than
1543 + * having plugins be ordered in the same order that they are injected because
1544 + * that ordering would be influenced by the packaging order.
1545 + * `ResponderEventPlugin` must occur before `SimpleEventPlugin` so that
1546 + * preventing default on events is convenient in `SimpleEventPlugin` handlers.
1547 + */
1548 +
1549 +var DOMEventPluginOrder = ['ResponderEventPlugin', 'SimpleEventPlugin', 'TapEventPlugin', 'EnterLeaveEventPlugin', 'ChangeEventPlugin', 'SelectEventPlugin', 'BeforeInputEventPlugin'];
1550 +
1551 +module.exports = DOMEventPluginOrder;
1552 +},{}],10:[function(_dereq_,module,exports){
1553 +/**
1554 + * Copyright 2015-present, Facebook, Inc.
1555 + * All rights reserved.
1556 + *
1557 + * This source code is licensed under the BSD-style license found in the
1558 + * LICENSE file in the root directory of this source tree. An additional grant
1559 + * of patent rights can be found in the PATENTS file in the same directory.
1560 + *
1561 + */
1562 +
1563 +'use strict';
1564 +
1565 +var DOMNamespaces = _dereq_(11);
1566 +var setInnerHTML = _dereq_(134);
1567 +
1568 +var createMicrosoftUnsafeLocalFunction = _dereq_(110);
1569 +var setTextContent = _dereq_(135);
1570 +
1571 +var ELEMENT_NODE_TYPE = 1;
1572 +var DOCUMENT_FRAGMENT_NODE_TYPE = 11;
1573 +
1574 +/**
1575 + * In IE (8-11) and Edge, appending nodes with no children is dramatically
1576 + * faster than appending a full subtree, so we essentially queue up the
1577 + * .appendChild calls here and apply them so each node is added to its parent
1578 + * before any children are added.
1579 + *
1580 + * In other browsers, doing so is slower or neutral compared to the other order
1581 + * (in Firefox, twice as slow) so we only do this inversion in IE.
1582 + *
1583 + * See https://github.com/spicyj/innerhtml-vs-createelement-vs-clonenode.
1584 + */
1585 +var enableLazy = typeof document !== 'undefined' && typeof document.documentMode === 'number' || typeof navigator !== 'undefined' && typeof navigator.userAgent === 'string' && /\bEdge\/\d/.test(navigator.userAgent);
1586 +
1587 +function insertTreeChildren(tree) {
1588 + if (!enableLazy) {
1589 + return;
1590 + }
1591 + var node = tree.node;
1592 + var children = tree.children;
1593 + if (children.length) {
1594 + for (var i = 0; i < children.length; i++) {
1595 + insertTreeBefore(node, children[i], null);
1596 + }
1597 + } else if (tree.html != null) {
1598 + setInnerHTML(node, tree.html);
1599 + } else if (tree.text != null) {
1600 + setTextContent(node, tree.text);
1601 + }
1602 +}
1603 +
1604 +var insertTreeBefore = createMicrosoftUnsafeLocalFunction(function (parentNode, tree, referenceNode) {
1605 + // DocumentFragments aren't actually part of the DOM after insertion so
1606 + // appending children won't update the DOM. We need to ensure the fragment
1607 + // is properly populated first, breaking out of our lazy approach for just
1608 + // this level. Also, some <object> plugins (like Flash Player) will read
1609 + // <param> nodes immediately upon insertion into the DOM, so <object>
1610 + // must also be populated prior to insertion into the DOM.
1611 + if (tree.node.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE || tree.node.nodeType === ELEMENT_NODE_TYPE && tree.node.nodeName.toLowerCase() === 'object' && (tree.node.namespaceURI == null || tree.node.namespaceURI === DOMNamespaces.html)) {
1612 + insertTreeChildren(tree);
1613 + parentNode.insertBefore(tree.node, referenceNode);
1614 + } else {
1615 + parentNode.insertBefore(tree.node, referenceNode);
1616 + insertTreeChildren(tree);
1617 + }
1618 +});
1619 +
1620 +function replaceChildWithTree(oldNode, newTree) {
1621 + oldNode.parentNode.replaceChild(newTree.node, oldNode);
1622 + insertTreeChildren(newTree);
1623 +}
1624 +
1625 +function queueChild(parentTree, childTree) {
1626 + if (enableLazy) {
1627 + parentTree.children.push(childTree);
1628 + } else {
1629 + parentTree.node.appendChild(childTree.node);
1630 + }
1631 +}
1632 +
1633 +function queueHTML(tree, html) {
1634 + if (enableLazy) {
1635 + tree.html = html;
1636 + } else {
1637 + setInnerHTML(tree.node, html);
1638 + }
1639 +}
1640 +
1641 +function queueText(tree, text) {
1642 + if (enableLazy) {
1643 + tree.text = text;
1644 + } else {
1645 + setTextContent(tree.node, text);
1646 + }
1647 +}
1648 +
1649 +function toString() {
1650 + return this.node.nodeName;
1651 +}
1652 +
1653 +function DOMLazyTree(node) {
1654 + return {
1655 + node: node,
1656 + children: [],
1657 + html: null,
1658 + text: null,
1659 + toString: toString
1660 + };
1661 +}
1662 +
1663 +DOMLazyTree.insertTreeBefore = insertTreeBefore;
1664 +DOMLazyTree.replaceChildWithTree = replaceChildWithTree;
1665 +DOMLazyTree.queueChild = queueChild;
1666 +DOMLazyTree.queueHTML = queueHTML;
1667 +DOMLazyTree.queueText = queueText;
1668 +
1669 +module.exports = DOMLazyTree;
1670 +},{"11":11,"110":110,"134":134,"135":135}],11:[function(_dereq_,module,exports){
1671 +/**
1672 + * Copyright 2013-present, Facebook, Inc.
1673 + * All rights reserved.
1674 + *
1675 + * This source code is licensed under the BSD-style license found in the
1676 + * LICENSE file in the root directory of this source tree. An additional grant
1677 + * of patent rights can be found in the PATENTS file in the same directory.
1678 + *
1679 + */
1680 +
1681 +'use strict';
1682 +
1683 +var DOMNamespaces = {
1684 + html: 'http://www.w3.org/1999/xhtml',
1685 + mathml: 'http://www.w3.org/1998/Math/MathML',
1686 + svg: 'http://www.w3.org/2000/svg'
1687 +};
1688 +
1689 +module.exports = DOMNamespaces;
1690 +},{}],12:[function(_dereq_,module,exports){
1691 +/**
1692 + * Copyright 2013-present, Facebook, Inc.
1693 + * All rights reserved.
1694 + *
1695 + * This source code is licensed under the BSD-style license found in the
1696 + * LICENSE file in the root directory of this source tree. An additional grant
1697 + * of patent rights can be found in the PATENTS file in the same directory.
1698 + *
1699 + */
1700 +
1701 +'use strict';
1702 +
1703 +var _prodInvariant = _dereq_(133);
1704 +
1705 +var invariant = _dereq_(157);
1706 +
1707 +function checkMask(value, bitmask) {
1708 + return (value & bitmask) === bitmask;
1709 +}
1710 +
1711 +var DOMPropertyInjection = {
1712 + /**
1713 + * Mapping from normalized, camelcased property names to a configuration that
1714 + * specifies how the associated DOM property should be accessed or rendered.
1715 + */
1716 + MUST_USE_PROPERTY: 0x1,
1717 + HAS_BOOLEAN_VALUE: 0x4,
1718 + HAS_NUMERIC_VALUE: 0x8,
1719 + HAS_POSITIVE_NUMERIC_VALUE: 0x10 | 0x8,
1720 + HAS_OVERLOADED_BOOLEAN_VALUE: 0x20,
1721 +
1722 + /**
1723 + * Inject some specialized knowledge about the DOM. This takes a config object
1724 + * with the following properties:
1725 + *
1726 + * isCustomAttribute: function that given an attribute name will return true
1727 + * if it can be inserted into the DOM verbatim. Useful for data-* or aria-*
1728 + * attributes where it's impossible to enumerate all of the possible
1729 + * attribute names,
1730 + *
1731 + * Properties: object mapping DOM property name to one of the
1732 + * DOMPropertyInjection constants or null. If your attribute isn't in here,
1733 + * it won't get written to the DOM.
1734 + *
1735 + * DOMAttributeNames: object mapping React attribute name to the DOM
1736 + * attribute name. Attribute names not specified use the **lowercase**
1737 + * normalized name.
1738 + *
1739 + * DOMAttributeNamespaces: object mapping React attribute name to the DOM
1740 + * attribute namespace URL. (Attribute names not specified use no namespace.)
1741 + *
1742 + * DOMPropertyNames: similar to DOMAttributeNames but for DOM properties.
1743 + * Property names not specified use the normalized name.
1744 + *
1745 + * DOMMutationMethods: Properties that require special mutation methods. If
1746 + * `value` is undefined, the mutation method should unset the property.
1747 + *
1748 + * @param {object} domPropertyConfig the config as described above.
1749 + */
1750 + injectDOMPropertyConfig: function (domPropertyConfig) {
1751 + var Injection = DOMPropertyInjection;
1752 + var Properties = domPropertyConfig.Properties || {};
1753 + var DOMAttributeNamespaces = domPropertyConfig.DOMAttributeNamespaces || {};
1754 + var DOMAttributeNames = domPropertyConfig.DOMAttributeNames || {};
1755 + var DOMPropertyNames = domPropertyConfig.DOMPropertyNames || {};
1756 + var DOMMutationMethods = domPropertyConfig.DOMMutationMethods || {};
1757 +
1758 + if (domPropertyConfig.isCustomAttribute) {
1759 + DOMProperty._isCustomAttributeFunctions.push(domPropertyConfig.isCustomAttribute);
1760 + }
1761 +
1762 + for (var propName in Properties) {
1763 + !!DOMProperty.properties.hasOwnProperty(propName) ? "development" !== 'production' ? invariant(false, 'injectDOMPropertyConfig(...): You\'re trying to inject DOM property \'%s\' which has already been injected. You may be accidentally injecting the same DOM property config twice, or you may be injecting two configs that have conflicting property names.', propName) : _prodInvariant('48', propName) : void 0;
1764 +
1765 + var lowerCased = propName.toLowerCase();
1766 + var propConfig = Properties[propName];
1767 +
1768 + var propertyInfo = {
1769 + attributeName: lowerCased,
1770 + attributeNamespace: null,
1771 + propertyName: propName,
1772 + mutationMethod: null,
1773 +
1774 + mustUseProperty: checkMask(propConfig, Injection.MUST_USE_PROPERTY),
1775 + hasBooleanValue: checkMask(propConfig, Injection.HAS_BOOLEAN_VALUE),
1776 + hasNumericValue: checkMask(propConfig, Injection.HAS_NUMERIC_VALUE),
1777 + hasPositiveNumericValue: checkMask(propConfig, Injection.HAS_POSITIVE_NUMERIC_VALUE),
1778 + hasOverloadedBooleanValue: checkMask(propConfig, Injection.HAS_OVERLOADED_BOOLEAN_VALUE)
1779 + };
1780 + !(propertyInfo.hasBooleanValue + propertyInfo.hasNumericValue + propertyInfo.hasOverloadedBooleanValue <= 1) ? "development" !== 'production' ? invariant(false, 'DOMProperty: Value can be one of boolean, overloaded boolean, or numeric value, but not a combination: %s', propName) : _prodInvariant('50', propName) : void 0;
1781 +
1782 + if ("development" !== 'production') {
1783 + DOMProperty.getPossibleStandardName[lowerCased] = propName;
1784 + }
1785 +
1786 + if (DOMAttributeNames.hasOwnProperty(propName)) {
1787 + var attributeName = DOMAttributeNames[propName];
1788 + propertyInfo.attributeName = attributeName;
1789 + if ("development" !== 'production') {
1790 + DOMProperty.getPossibleStandardName[attributeName] = propName;
1791 + }
1792 + }
1793 +
1794 + if (DOMAttributeNamespaces.hasOwnProperty(propName)) {
1795 + propertyInfo.attributeNamespace = DOMAttributeNamespaces[propName];
1796 + }
1797 +
1798 + if (DOMPropertyNames.hasOwnProperty(propName)) {
1799 + propertyInfo.propertyName = DOMPropertyNames[propName];
1800 + }
1801 +
1802 + if (DOMMutationMethods.hasOwnProperty(propName)) {
1803 + propertyInfo.mutationMethod = DOMMutationMethods[propName];
1804 + }
1805 +
1806 + DOMProperty.properties[propName] = propertyInfo;
1807 + }
1808 + }
1809 +};
1810 +
1811 +/* eslint-disable max-len */
1812 +var ATTRIBUTE_NAME_START_CHAR = ':A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD';
1813 +/* eslint-enable max-len */
1814 +
1815 +/**
1816 + * DOMProperty exports lookup objects that can be used like functions:
1817 + *
1818 + * > DOMProperty.isValid['id']
1819 + * true
1820 + * > DOMProperty.isValid['foobar']
1821 + * undefined
1822 + *
1823 + * Although this may be confusing, it performs better in general.
1824 + *
1825 + * @see http://jsperf.com/key-exists
1826 + * @see http://jsperf.com/key-missing
1827 + */
1828 +var DOMProperty = {
1829 +
1830 + ID_ATTRIBUTE_NAME: 'data-reactid',
1831 + ROOT_ATTRIBUTE_NAME: 'data-reactroot',
1832 +
1833 + ATTRIBUTE_NAME_START_CHAR: ATTRIBUTE_NAME_START_CHAR,
1834 + ATTRIBUTE_NAME_CHAR: ATTRIBUTE_NAME_START_CHAR + '\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040',
1835 +
1836 + /**
1837 + * Map from property "standard name" to an object with info about how to set
1838 + * the property in the DOM. Each object contains:
1839 + *
1840 + * attributeName:
1841 + * Used when rendering markup or with `*Attribute()`.
1842 + * attributeNamespace
1843 + * propertyName:
1844 + * Used on DOM node instances. (This includes properties that mutate due to
1845 + * external factors.)
1846 + * mutationMethod:
1847 + * If non-null, used instead of the property or `setAttribute()` after
1848 + * initial render.
1849 + * mustUseProperty:
1850 + * Whether the property must be accessed and mutated as an object property.
1851 + * hasBooleanValue:
1852 + * Whether the property should be removed when set to a falsey value.
1853 + * hasNumericValue:
1854 + * Whether the property must be numeric or parse as a numeric and should be
1855 + * removed when set to a falsey value.
1856 + * hasPositiveNumericValue:
1857 + * Whether the property must be positive numeric or parse as a positive
1858 + * numeric and should be removed when set to a falsey value.
1859 + * hasOverloadedBooleanValue:
1860 + * Whether the property can be used as a flag as well as with a value.
1861 + * Removed when strictly equal to false; present without a value when
1862 + * strictly equal to true; present with a value otherwise.
1863 + */
1864 + properties: {},
1865 +
1866 + /**
1867 + * Mapping from lowercase property names to the properly cased version, used
1868 + * to warn in the case of missing properties. Available only in __DEV__.
1869 + *
1870 + * autofocus is predefined, because adding it to the property whitelist
1871 + * causes unintended side effects.
1872 + *
1873 + * @type {Object}
1874 + */
1875 + getPossibleStandardName: "development" !== 'production' ? { autofocus: 'autoFocus' } : null,
1876 +
1877 + /**
1878 + * All of the isCustomAttribute() functions that have been injected.
1879 + */
1880 + _isCustomAttributeFunctions: [],
1881 +
1882 + /**
1883 + * Checks whether a property name is a custom attribute.
1884 + * @method
1885 + */
1886 + isCustomAttribute: function (attributeName) {
1887 + for (var i = 0; i < DOMProperty._isCustomAttributeFunctions.length; i++) {
1888 + var isCustomAttributeFn = DOMProperty._isCustomAttributeFunctions[i];
1889 + if (isCustomAttributeFn(attributeName)) {
1890 + return true;
1891 + }
1892 + }
1893 + return false;
1894 + },
1895 +
1896 + injection: DOMPropertyInjection
1897 +};
1898 +
1899 +module.exports = DOMProperty;
1900 +},{"133":133,"157":157}],13:[function(_dereq_,module,exports){
1901 +/**
1902 + * Copyright 2013-present, Facebook, Inc.
1903 + * All rights reserved.
1904 + *
1905 + * This source code is licensed under the BSD-style license found in the
1906 + * LICENSE file in the root directory of this source tree. An additional grant
1907 + * of patent rights can be found in the PATENTS file in the same directory.
1908 + *
1909 + */
1910 +
1911 +'use strict';
1912 +
1913 +var DOMProperty = _dereq_(12);
1914 +var ReactDOMComponentTree = _dereq_(35);
1915 +var ReactInstrumentation = _dereq_(67);
1916 +
1917 +var quoteAttributeValueForBrowser = _dereq_(132);
1918 +var warning = _dereq_(164);
1919 +
1920 +var VALID_ATTRIBUTE_NAME_REGEX = new RegExp('^[' + DOMProperty.ATTRIBUTE_NAME_START_CHAR + '][' + DOMProperty.ATTRIBUTE_NAME_CHAR + ']*$');
1921 +var illegalAttributeNameCache = {};
1922 +var validatedAttributeNameCache = {};
1923 +
1924 +function isAttributeNameSafe(attributeName) {
1925 + if (validatedAttributeNameCache.hasOwnProperty(attributeName)) {
1926 + return true;
1927 + }
1928 + if (illegalAttributeNameCache.hasOwnProperty(attributeName)) {
1929 + return false;
1930 + }
1931 + if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) {
1932 + validatedAttributeNameCache[attributeName] = true;
1933 + return true;
1934 + }
1935 + illegalAttributeNameCache[attributeName] = true;
1936 + "development" !== 'production' ? warning(false, 'Invalid attribute name: `%s`', attributeName) : void 0;
1937 + return false;
1938 +}
1939 +
1940 +function shouldIgnoreValue(propertyInfo, value) {
1941 + return value == null || propertyInfo.hasBooleanValue && !value || propertyInfo.hasNumericValue && isNaN(value) || propertyInfo.hasPositiveNumericValue && value < 1 || propertyInfo.hasOverloadedBooleanValue && value === false;
1942 +}
1943 +
1944 +/**
1945 + * Operations for dealing with DOM properties.
1946 + */
1947 +var DOMPropertyOperations = {
1948 +
1949 + /**
1950 + * Creates markup for the ID property.
1951 + *
1952 + * @param {string} id Unescaped ID.
1953 + * @return {string} Markup string.
1954 + */
1955 + createMarkupForID: function (id) {
1956 + return DOMProperty.ID_ATTRIBUTE_NAME + '=' + quoteAttributeValueForBrowser(id);
1957 + },
1958 +
1959 + setAttributeForID: function (node, id) {
1960 + node.setAttribute(DOMProperty.ID_ATTRIBUTE_NAME, id);
1961 + },
1962 +
1963 + createMarkupForRoot: function () {
1964 + return DOMProperty.ROOT_ATTRIBUTE_NAME + '=""';
1965 + },
1966 +
1967 + setAttributeForRoot: function (node) {
1968 + node.setAttribute(DOMProperty.ROOT_ATTRIBUTE_NAME, '');
1969 + },
1970 +
1971 + /**
1972 + * Creates markup for a property.
1973 + *
1974 + * @param {string} name
1975 + * @param {*} value
1976 + * @return {?string} Markup string, or null if the property was invalid.
1977 + */
1978 + createMarkupForProperty: function (name, value) {
1979 + var propertyInfo = DOMProperty.properties.hasOwnProperty(name) ? DOMProperty.properties[name] : null;
1980 + if (propertyInfo) {
1981 + if (shouldIgnoreValue(propertyInfo, value)) {
1982 + return '';
1983 + }
1984 + var attributeName = propertyInfo.attributeName;
1985 + if (propertyInfo.hasBooleanValue || propertyInfo.hasOverloadedBooleanValue && value === true) {
1986 + return attributeName + '=""';
1987 + }
1988 + return attributeName + '=' + quoteAttributeValueForBrowser(value);
1989 + } else if (DOMProperty.isCustomAttribute(name)) {
1990 + if (value == null) {
1991 + return '';
1992 + }
1993 + return name + '=' + quoteAttributeValueForBrowser(value);
1994 + }
1995 + return null;
1996 + },
1997 +
1998 + /**
1999 + * Creates markup for a custom property.
2000 + *
2001 + * @param {string} name
2002 + * @param {*} value
2003 + * @return {string} Markup string, or empty string if the property was invalid.
2004 + */
2005 + createMarkupForCustomAttribute: function (name, value) {
2006 + if (!isAttributeNameSafe(name) || value == null) {
2007 + return '';
2008 + }
2009 + return name + '=' + quoteAttributeValueForBrowser(value);
2010 + },
2011 +
2012 + /**
2013 + * Sets the value for a property on a node.
2014 + *
2015 + * @param {DOMElement} node
2016 + * @param {string} name
2017 + * @param {*} value
2018 + */
2019 + setValueForProperty: function (node, name, value) {
2020 + var propertyInfo = DOMProperty.properties.hasOwnProperty(name) ? DOMProperty.properties[name] : null;
2021 + if (propertyInfo) {
2022 + var mutationMethod = propertyInfo.mutationMethod;
2023 + if (mutationMethod) {
2024 + mutationMethod(node, value);
2025 + } else if (shouldIgnoreValue(propertyInfo, value)) {
2026 + this.deleteValueForProperty(node, name);
2027 + return;
2028 + } else if (propertyInfo.mustUseProperty) {
2029 + // Contrary to `setAttribute`, object properties are properly
2030 + // `toString`ed by IE8/9.
2031 + node[propertyInfo.propertyName] = value;
2032 + } else {
2033 + var attributeName = propertyInfo.attributeName;
2034 + var namespace = propertyInfo.attributeNamespace;
2035 + // `setAttribute` with objects becomes only `[object]` in IE8/9,
2036 + // ('' + value) makes it output the correct toString()-value.
2037 + if (namespace) {
2038 + node.setAttributeNS(namespace, attributeName, '' + value);
2039 + } else if (propertyInfo.hasBooleanValue || propertyInfo.hasOverloadedBooleanValue && value === true) {
2040 + node.setAttribute(attributeName, '');
2041 + } else {
2042 + node.setAttribute(attributeName, '' + value);
2043 + }
2044 + }
2045 + } else if (DOMProperty.isCustomAttribute(name)) {
2046 + DOMPropertyOperations.setValueForAttribute(node, name, value);
2047 + return;
2048 + }
2049 +
2050 + if ("development" !== 'production') {
2051 + var payload = {};
2052 + payload[name] = value;
2053 + ReactInstrumentation.debugTool.onHostOperation({
2054 + instanceID: ReactDOMComponentTree.getInstanceFromNode(node)._debugID,
2055 + type: 'update attribute',
2056 + payload: payload
2057 + });
2058 + }
2059 + },
2060 +
2061 + setValueForAttribute: function (node, name, value) {
2062 + if (!isAttributeNameSafe(name)) {
2063 + return;
2064 + }
2065 + if (value == null) {
2066 + node.removeAttribute(name);
2067 + } else {
2068 + node.setAttribute(name, '' + value);
2069 + }
2070 +
2071 + if ("development" !== 'production') {
2072 + var payload = {};
2073 + payload[name] = value;
2074 + ReactInstrumentation.debugTool.onHostOperation({
2075 + instanceID: ReactDOMComponentTree.getInstanceFromNode(node)._debugID,
2076 + type: 'update attribute',
2077 + payload: payload
2078 + });
2079 + }
2080 + },
2081 +
2082 + /**
2083 + * Deletes an attributes from a node.
2084 + *
2085 + * @param {DOMElement} node
2086 + * @param {string} name
2087 + */
2088 + deleteValueForAttribute: function (node, name) {
2089 + node.removeAttribute(name);
2090 + if ("development" !== 'production') {
2091 + ReactInstrumentation.debugTool.onHostOperation({
2092 + instanceID: ReactDOMComponentTree.getInstanceFromNode(node)._debugID,
2093 + type: 'remove attribute',
2094 + payload: name
2095 + });
2096 + }
2097 + },
2098 +
2099 + /**
2100 + * Deletes the value for a property on a node.
2101 + *
2102 + * @param {DOMElement} node
2103 + * @param {string} name
2104 + */
2105 + deleteValueForProperty: function (node, name) {
2106 + var propertyInfo = DOMProperty.properties.hasOwnProperty(name) ? DOMProperty.properties[name] : null;
2107 + if (propertyInfo) {
2108 + var mutationMethod = propertyInfo.mutationMethod;
2109 + if (mutationMethod) {
2110 + mutationMethod(node, undefined);
2111 + } else if (propertyInfo.mustUseProperty) {
2112 + var propName = propertyInfo.propertyName;
2113 + if (propertyInfo.hasBooleanValue) {
2114 + node[propName] = false;
2115 + } else {
2116 + node[propName] = '';
2117 + }
2118 + } else {
2119 + node.removeAttribute(propertyInfo.attributeName);
2120 + }
2121 + } else if (DOMProperty.isCustomAttribute(name)) {
2122 + node.removeAttribute(name);
2123 + }
2124 +
2125 + if ("development" !== 'production') {
2126 + ReactInstrumentation.debugTool.onHostOperation({
2127 + instanceID: ReactDOMComponentTree.getInstanceFromNode(node)._debugID,
2128 + type: 'remove attribute',
2129 + payload: name
2130 + });
2131 + }
2132 + }
2133 +
2134 +};
2135 +
2136 +module.exports = DOMPropertyOperations;
2137 +},{"12":12,"132":132,"164":164,"35":35,"67":67}],14:[function(_dereq_,module,exports){
2138 +/**
2139 + * Copyright 2013-present, Facebook, Inc.
2140 + * All rights reserved.
2141 + *
2142 + * This source code is licensed under the BSD-style license found in the
2143 + * LICENSE file in the root directory of this source tree. An additional grant
2144 + * of patent rights can be found in the PATENTS file in the same directory.
2145 + *
2146 + */
2147 +
2148 +'use strict';
2149 +
2150 +var _prodInvariant = _dereq_(133);
2151 +
2152 +var DOMLazyTree = _dereq_(10);
2153 +var ExecutionEnvironment = _dereq_(143);
2154 +
2155 +var createNodesFromMarkup = _dereq_(148);
2156 +var emptyFunction = _dereq_(149);
2157 +var invariant = _dereq_(157);
2158 +
2159 +var Danger = {
2160 +
2161 + /**
2162 + * Replaces a node with a string of markup at its current position within its
2163 + * parent. The markup must render into a single root node.
2164 + *
2165 + * @param {DOMElement} oldChild Child node to replace.
2166 + * @param {string} markup Markup to render in place of the child node.
2167 + * @internal
2168 + */
2169 + dangerouslyReplaceNodeWithMarkup: function (oldChild, markup) {
2170 + !ExecutionEnvironment.canUseDOM ? "development" !== 'production' ? invariant(false, 'dangerouslyReplaceNodeWithMarkup(...): Cannot render markup in a worker thread. Make sure `window` and `document` are available globally before requiring React when unit testing or use ReactDOMServer.renderToString() for server rendering.') : _prodInvariant('56') : void 0;
2171 + !markup ? "development" !== 'production' ? invariant(false, 'dangerouslyReplaceNodeWithMarkup(...): Missing markup.') : _prodInvariant('57') : void 0;
2172 + !(oldChild.nodeName !== 'HTML') ? "development" !== 'production' ? invariant(false, 'dangerouslyReplaceNodeWithMarkup(...): Cannot replace markup of the <html> node. This is because browser quirks make this unreliable and/or slow. If you want to render to the root you must use server rendering. See ReactDOMServer.renderToString().') : _prodInvariant('58') : void 0;
2173 +
2174 + if (typeof markup === 'string') {
2175 + var newChild = createNodesFromMarkup(markup, emptyFunction)[0];
2176 + oldChild.parentNode.replaceChild(newChild, oldChild);
2177 + } else {
2178 + DOMLazyTree.replaceChildWithTree(oldChild, markup);
2179 + }
2180 + }
2181 +
2182 +};
2183 +
2184 +module.exports = Danger;
2185 +},{"10":10,"133":133,"143":143,"148":148,"149":149,"157":157}],15:[function(_dereq_,module,exports){
2186 +/**
2187 + * Copyright 2013-present, Facebook, Inc.
2188 + * All rights reserved.
2189 + *
2190 + * This source code is licensed under the BSD-style license found in the
2191 + * LICENSE file in the root directory of this source tree. An additional grant
2192 + * of patent rights can be found in the PATENTS file in the same directory.
2193 + *
2194 + */
2195 +
2196 +'use strict';
2197 +
2198 +var EventPropagators = _dereq_(20);
2199 +var ReactDOMComponentTree = _dereq_(35);
2200 +var SyntheticMouseEvent = _dereq_(100);
2201 +
2202 +var eventTypes = {
2203 + mouseEnter: {
2204 + registrationName: 'onMouseEnter',
2205 + dependencies: ['topMouseOut', 'topMouseOver']
2206 + },
2207 + mouseLeave: {
2208 + registrationName: 'onMouseLeave',
2209 + dependencies: ['topMouseOut', 'topMouseOver']
2210 + }
2211 +};
2212 +
2213 +var EnterLeaveEventPlugin = {
2214 +
2215 + eventTypes: eventTypes,
2216 +
2217 + /**
2218 + * For almost every interaction we care about, there will be both a top-level
2219 + * `mouseover` and `mouseout` event that occurs. Only use `mouseout` so that
2220 + * we do not extract duplicate events. However, moving the mouse into the
2221 + * browser from outside will not fire a `mouseout` event. In this case, we use
2222 + * the `mouseover` top-level event.
2223 + */
2224 + extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
2225 + if (topLevelType === 'topMouseOver' && (nativeEvent.relatedTarget || nativeEvent.fromElement)) {
2226 + return null;
2227 + }
2228 + if (topLevelType !== 'topMouseOut' && topLevelType !== 'topMouseOver') {
2229 + // Must not be a mouse in or mouse out - ignoring.
2230 + return null;
2231 + }
2232 +
2233 + var win;
2234 + if (nativeEventTarget.window === nativeEventTarget) {
2235 + // `nativeEventTarget` is probably a window object.
2236 + win = nativeEventTarget;
2237 + } else {
2238 + // TODO: Figure out why `ownerDocument` is sometimes undefined in IE8.
2239 + var doc = nativeEventTarget.ownerDocument;
2240 + if (doc) {
2241 + win = doc.defaultView || doc.parentWindow;
2242 + } else {
2243 + win = window;
2244 + }
2245 + }
2246 +
2247 + var from;
2248 + var to;
2249 + if (topLevelType === 'topMouseOut') {
2250 + from = targetInst;
2251 + var related = nativeEvent.relatedTarget || nativeEvent.toElement;
2252 + to = related ? ReactDOMComponentTree.getClosestInstanceFromNode(related) : null;
2253 + } else {
2254 + // Moving to a node from outside the window.
2255 + from = null;
2256 + to = targetInst;
2257 + }
2258 +
2259 + if (from === to) {
2260 + // Nothing pertains to our managed components.
2261 + return null;
2262 + }
2263 +
2264 + var fromNode = from == null ? win : ReactDOMComponentTree.getNodeFromInstance(from);
2265 + var toNode = to == null ? win : ReactDOMComponentTree.getNodeFromInstance(to);
2266 +
2267 + var leave = SyntheticMouseEvent.getPooled(eventTypes.mouseLeave, from, nativeEvent, nativeEventTarget);
2268 + leave.type = 'mouseleave';
2269 + leave.target = fromNode;
2270 + leave.relatedTarget = toNode;
2271 +
2272 + var enter = SyntheticMouseEvent.getPooled(eventTypes.mouseEnter, to, nativeEvent, nativeEventTarget);
2273 + enter.type = 'mouseenter';
2274 + enter.target = toNode;
2275 + enter.relatedTarget = fromNode;
2276 +
2277 + EventPropagators.accumulateEnterLeaveDispatches(leave, enter, from, to);
2278 +
2279 + return [leave, enter];
2280 + }
2281 +
2282 +};
2283 +
2284 +module.exports = EnterLeaveEventPlugin;
2285 +},{"100":100,"20":20,"35":35}],16:[function(_dereq_,module,exports){
2286 +/**
2287 + * Copyright 2013-present, Facebook, Inc.
2288 + * All rights reserved.
2289 + *
2290 + * This source code is licensed under the BSD-style license found in the
2291 + * LICENSE file in the root directory of this source tree. An additional grant
2292 + * of patent rights can be found in the PATENTS file in the same directory.
2293 + *
2294 + */
2295 +
2296 +'use strict';
2297 +
2298 +/**
2299 + * Types of raw signals from the browser caught at the top level.
2300 + */
2301 +var topLevelTypes = {
2302 + topAbort: null,
2303 + topAnimationEnd: null,
2304 + topAnimationIteration: null,
2305 + topAnimationStart: null,
2306 + topBlur: null,
2307 + topCanPlay: null,
2308 + topCanPlayThrough: null,
2309 + topChange: null,
2310 + topClick: null,
2311 + topCompositionEnd: null,
2312 + topCompositionStart: null,
2313 + topCompositionUpdate: null,
2314 + topContextMenu: null,
2315 + topCopy: null,
2316 + topCut: null,
2317 + topDoubleClick: null,
2318 + topDrag: null,
2319 + topDragEnd: null,
2320 + topDragEnter: null,
2321 + topDragExit: null,
2322 + topDragLeave: null,
2323 + topDragOver: null,
2324 + topDragStart: null,
2325 + topDrop: null,
2326 + topDurationChange: null,
2327 + topEmptied: null,
2328 + topEncrypted: null,
2329 + topEnded: null,
2330 + topError: null,
2331 + topFocus: null,
2332 + topInput: null,
2333 + topInvalid: null,
2334 + topKeyDown: null,
2335 + topKeyPress: null,
2336 + topKeyUp: null,
2337 + topLoad: null,
2338 + topLoadedData: null,
2339 + topLoadedMetadata: null,
2340 + topLoadStart: null,
2341 + topMouseDown: null,
2342 + topMouseMove: null,
2343 + topMouseOut: null,
2344 + topMouseOver: null,
2345 + topMouseUp: null,
2346 + topPaste: null,
2347 + topPause: null,
2348 + topPlay: null,
2349 + topPlaying: null,
2350 + topProgress: null,
2351 + topRateChange: null,
2352 + topReset: null,
2353 + topScroll: null,
2354 + topSeeked: null,
2355 + topSeeking: null,
2356 + topSelectionChange: null,
2357 + topStalled: null,
2358 + topSubmit: null,
2359 + topSuspend: null,
2360 + topTextInput: null,
2361 + topTimeUpdate: null,
2362 + topTouchCancel: null,
2363 + topTouchEnd: null,
2364 + topTouchMove: null,
2365 + topTouchStart: null,
2366 + topTransitionEnd: null,
2367 + topVolumeChange: null,
2368 + topWaiting: null,
2369 + topWheel: null
2370 +};
2371 +
2372 +var EventConstants = {
2373 + topLevelTypes: topLevelTypes
2374 +};
2375 +
2376 +module.exports = EventConstants;
2377 +},{}],17:[function(_dereq_,module,exports){
2378 +/**
2379 + * Copyright 2013-present, Facebook, Inc.
2380 + * All rights reserved.
2381 + *
2382 + * This source code is licensed under the BSD-style license found in the
2383 + * LICENSE file in the root directory of this source tree. An additional grant
2384 + * of patent rights can be found in the PATENTS file in the same directory.
2385 + *
2386 + */
2387 +
2388 +'use strict';
2389 +
2390 +var _prodInvariant = _dereq_(133);
2391 +
2392 +var EventPluginRegistry = _dereq_(18);
2393 +var EventPluginUtils = _dereq_(19);
2394 +var ReactErrorUtils = _dereq_(57);
2395 +
2396 +var accumulateInto = _dereq_(107);
2397 +var forEachAccumulated = _dereq_(115);
2398 +var invariant = _dereq_(157);
2399 +
2400 +/**
2401 + * Internal queue of events that have accumulated their dispatches and are
2402 + * waiting to have their dispatches executed.
2403 + */
2404 +var eventQueue = null;
2405 +
2406 +/**
2407 + * Dispatches an event and releases it back into the pool, unless persistent.
2408 + *
2409 + * @param {?object} event Synthetic event to be dispatched.
2410 + * @param {boolean} simulated If the event is simulated (changes exn behavior)
2411 + * @private
2412 + */
2413 +var executeDispatchesAndRelease = function (event, simulated) {
2414 + if (event) {
2415 + EventPluginUtils.executeDispatchesInOrder(event, simulated);
2416 +
2417 + if (!event.isPersistent()) {
2418 + event.constructor.release(event);
2419 + }
2420 + }
2421 +};
2422 +var executeDispatchesAndReleaseSimulated = function (e) {
2423 + return executeDispatchesAndRelease(e, true);
2424 +};
2425 +var executeDispatchesAndReleaseTopLevel = function (e) {
2426 + return executeDispatchesAndRelease(e, false);
2427 +};
2428 +
2429 +function isInteractive(tag) {
2430 + return tag === 'button' || tag === 'input' || tag === 'select' || tag === 'textarea';
2431 +}
2432 +
2433 +function shouldPreventMouseEvent(name, type, props) {
2434 + switch (name) {
2435 + case 'onClick':
2436 + case 'onClickCapture':
2437 + case 'onDoubleClick':
2438 + case 'onDoubleClickCapture':
2439 + case 'onMouseDown':
2440 + case 'onMouseDownCapture':
2441 + case 'onMouseMove':
2442 + case 'onMouseMoveCapture':
2443 + case 'onMouseUp':
2444 + case 'onMouseUpCapture':
2445 + return !!(props.disabled && isInteractive(type));
2446 + default:
2447 + return false;
2448 + }
2449 +}
2450 +
2451 +/**
2452 + * This is a unified interface for event plugins to be installed and configured.
2453 + *
2454 + * Event plugins can implement the following properties:
2455 + *
2456 + * `extractEvents` {function(string, DOMEventTarget, string, object): *}
2457 + * Required. When a top-level event is fired, this method is expected to
2458 + * extract synthetic events that will in turn be queued and dispatched.
2459 + *
2460 + * `eventTypes` {object}
2461 + * Optional, plugins that fire events must publish a mapping of registration
2462 + * names that are used to register listeners. Values of this mapping must
2463 + * be objects that contain `registrationName` or `phasedRegistrationNames`.
2464 + *
2465 + * `executeDispatch` {function(object, function, string)}
2466 + * Optional, allows plugins to override how an event gets dispatched. By
2467 + * default, the listener is simply invoked.
2468 + *
2469 + * Each plugin that is injected into `EventsPluginHub` is immediately operable.
2470 + *
2471 + * @public
2472 + */
2473 +var EventPluginHub = {
2474 +
2475 + /**
2476 + * Methods for injecting dependencies.
2477 + */
2478 + injection: {
2479 +
2480 + /**
2481 + * @param {array} InjectedEventPluginOrder
2482 + * @public
2483 + */
2484 + injectEventPluginOrder: EventPluginRegistry.injectEventPluginOrder,
2485 +
2486 + /**
2487 + * @param {object} injectedNamesToPlugins Map from names to plugin modules.
2488 + */
2489 + injectEventPluginsByName: EventPluginRegistry.injectEventPluginsByName
2490 +
2491 + },
2492 +
2493 + /**
2494 + * @param {object} inst The instance, which is the source of events.
2495 + * @param {string} registrationName Name of listener (e.g. `onClick`).
2496 + * @return {?function} The stored callback.
2497 + */
2498 + getListener: function (inst, registrationName) {
2499 + var listener;
2500 +
2501 + // TODO: shouldPreventMouseEvent is DOM-specific and definitely should not
2502 + // live here; needs to be moved to a better place soon
2503 + if (typeof inst.tag === 'number') {
2504 + var props = inst.memoizedProps;
2505 + listener = props[registrationName];
2506 + if (shouldPreventMouseEvent(registrationName, inst.type, props)) {
2507 + return null;
2508 + }
2509 + } else {
2510 + var _props = inst._currentElement.props;
2511 + listener = _props[registrationName];
2512 + if (shouldPreventMouseEvent(registrationName, inst._currentElement.type, _props)) {
2513 + return null;
2514 + }
2515 + }
2516 +
2517 + !(!listener || typeof listener === 'function') ? "development" !== 'production' ? invariant(false, 'Expected %s listener to be a function, instead got type %s', registrationName, typeof listener) : _prodInvariant('94', registrationName, typeof listener) : void 0;
2518 + return listener;
2519 + },
2520 +
2521 + /**
2522 + * Allows registered plugins an opportunity to extract events from top-level
2523 + * native browser events.
2524 + *
2525 + * @return {*} An accumulation of synthetic events.
2526 + * @internal
2527 + */
2528 + extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
2529 + var events;
2530 + var plugins = EventPluginRegistry.plugins;
2531 + for (var i = 0; i < plugins.length; i++) {
2532 + // Not every plugin in the ordering may be loaded at runtime.
2533 + var possiblePlugin = plugins[i];
2534 + if (possiblePlugin) {
2535 + var extractedEvents = possiblePlugin.extractEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget);
2536 + if (extractedEvents) {
2537 + events = accumulateInto(events, extractedEvents);
2538 + }
2539 + }
2540 + }
2541 + return events;
2542 + },
2543 +
2544 + /**
2545 + * Enqueues a synthetic event that should be dispatched when
2546 + * `processEventQueue` is invoked.
2547 + *
2548 + * @param {*} events An accumulation of synthetic events.
2549 + * @internal
2550 + */
2551 + enqueueEvents: function (events) {
2552 + if (events) {
2553 + eventQueue = accumulateInto(eventQueue, events);
2554 + }
2555 + },
2556 +
2557 + /**
2558 + * Dispatches all synthetic events on the event queue.
2559 + *
2560 + * @internal
2561 + */
2562 + processEventQueue: function (simulated) {
2563 + // Set `eventQueue` to null before processing it so that we can tell if more
2564 + // events get enqueued while processing.
2565 + var processingEventQueue = eventQueue;
2566 + eventQueue = null;
2567 + if (simulated) {
2568 + forEachAccumulated(processingEventQueue, executeDispatchesAndReleaseSimulated);
2569 + } else {
2570 + forEachAccumulated(processingEventQueue, executeDispatchesAndReleaseTopLevel);
2571 + }
2572 + !!eventQueue ? "development" !== 'production' ? invariant(false, 'processEventQueue(): Additional events were enqueued while processing an event queue. Support for this has not yet been implemented.') : _prodInvariant('95') : void 0;
2573 + // This would be a good time to rethrow if any of the event handlers threw.
2574 + ReactErrorUtils.rethrowCaughtError();
2575 + }
2576 +
2577 +};
2578 +
2579 +module.exports = EventPluginHub;
2580 +},{"107":107,"115":115,"133":133,"157":157,"18":18,"19":19,"57":57}],18:[function(_dereq_,module,exports){
2581 +/**
2582 + * Copyright 2013-present, Facebook, Inc.
2583 + * All rights reserved.
2584 + *
2585 + * This source code is licensed under the BSD-style license found in the
2586 + * LICENSE file in the root directory of this source tree. An additional grant
2587 + * of patent rights can be found in the PATENTS file in the same directory.
2588 + *
2589 + *
2590 + */
2591 +
2592 +'use strict';
2593 +
2594 +var _prodInvariant = _dereq_(133);
2595 +
2596 +var invariant = _dereq_(157);
2597 +
2598 +/**
2599 + * Injectable ordering of event plugins.
2600 + */
2601 +var eventPluginOrder = null;
2602 +
2603 +/**
2604 + * Injectable mapping from names to event plugin modules.
2605 + */
2606 +var namesToPlugins = {};
2607 +
2608 +/**
2609 + * Recomputes the plugin list using the injected plugins and plugin ordering.
2610 + *
2611 + * @private
2612 + */
2613 +function recomputePluginOrdering() {
2614 + if (!eventPluginOrder) {
2615 + // Wait until an `eventPluginOrder` is injected.
2616 + return;
2617 + }
2618 + for (var pluginName in namesToPlugins) {
2619 + var pluginModule = namesToPlugins[pluginName];
2620 + var pluginIndex = eventPluginOrder.indexOf(pluginName);
2621 + !(pluginIndex > -1) ? "development" !== 'production' ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : _prodInvariant('96', pluginName) : void 0;
2622 + if (EventPluginRegistry.plugins[pluginIndex]) {
2623 + continue;
2624 + }
2625 + !pluginModule.extractEvents ? "development" !== 'production' ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : _prodInvariant('97', pluginName) : void 0;
2626 + EventPluginRegistry.plugins[pluginIndex] = pluginModule;
2627 + var publishedEvents = pluginModule.eventTypes;
2628 + for (var eventName in publishedEvents) {
2629 + !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? "development" !== 'production' ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : _prodInvariant('98', eventName, pluginName) : void 0;
2630 + }
2631 + }
2632 +}
2633 +
2634 +/**
2635 + * Publishes an event so that it can be dispatched by the supplied plugin.
2636 + *
2637 + * @param {object} dispatchConfig Dispatch configuration for the event.
2638 + * @param {object} PluginModule Plugin publishing the event.
2639 + * @return {boolean} True if the event was successfully published.
2640 + * @private
2641 + */
2642 +function publishEventForPlugin(dispatchConfig, pluginModule, eventName) {
2643 + !!EventPluginRegistry.eventNameDispatchConfigs.hasOwnProperty(eventName) ? "development" !== 'production' ? invariant(false, 'EventPluginHub: More than one plugin attempted to publish the same event name, `%s`.', eventName) : _prodInvariant('99', eventName) : void 0;
2644 + EventPluginRegistry.eventNameDispatchConfigs[eventName] = dispatchConfig;
2645 +
2646 + var phasedRegistrationNames = dispatchConfig.phasedRegistrationNames;
2647 + if (phasedRegistrationNames) {
2648 + for (var phaseName in phasedRegistrationNames) {
2649 + if (phasedRegistrationNames.hasOwnProperty(phaseName)) {
2650 + var phasedRegistrationName = phasedRegistrationNames[phaseName];
2651 + publishRegistrationName(phasedRegistrationName, pluginModule, eventName);
2652 + }
2653 + }
2654 + return true;
2655 + } else if (dispatchConfig.registrationName) {
2656 + publishRegistrationName(dispatchConfig.registrationName, pluginModule, eventName);
2657 + return true;
2658 + }
2659 + return false;
2660 +}
2661 +
2662 +/**
2663 + * Publishes a registration name that is used to identify dispatched events.
2664 + *
2665 + * @param {string} registrationName Registration name to add.
2666 + * @param {object} PluginModule Plugin publishing the event.
2667 + * @private
2668 + */
2669 +function publishRegistrationName(registrationName, pluginModule, eventName) {
2670 + !!EventPluginRegistry.registrationNameModules[registrationName] ? "development" !== 'production' ? invariant(false, 'EventPluginHub: More than one plugin attempted to publish the same registration name, `%s`.', registrationName) : _prodInvariant('100', registrationName) : void 0;
2671 + EventPluginRegistry.registrationNameModules[registrationName] = pluginModule;
2672 + EventPluginRegistry.registrationNameDependencies[registrationName] = pluginModule.eventTypes[eventName].dependencies;
2673 +
2674 + if ("development" !== 'production') {
2675 + var lowerCasedName = registrationName.toLowerCase();
2676 + EventPluginRegistry.possibleRegistrationNames[lowerCasedName] = registrationName;
2677 +
2678 + if (registrationName === 'onDoubleClick') {
2679 + EventPluginRegistry.possibleRegistrationNames.ondblclick = registrationName;
2680 + }
2681 + }
2682 +}
2683 +
2684 +/**
2685 + * Registers plugins so that they can extract and dispatch events.
2686 + *
2687 + * @see {EventPluginHub}
2688 + */
2689 +var EventPluginRegistry = {
2690 +
2691 + /**
2692 + * Ordered list of injected plugins.
2693 + */
2694 + plugins: [],
2695 +
2696 + /**
2697 + * Mapping from event name to dispatch config
2698 + */
2699 + eventNameDispatchConfigs: {},
2700 +
2701 + /**
2702 + * Mapping from registration name to plugin module
2703 + */
2704 + registrationNameModules: {},
2705 +
2706 + /**
2707 + * Mapping from registration name to event name
2708 + */
2709 + registrationNameDependencies: {},
2710 +
2711 + /**
2712 + * Mapping from lowercase registration names to the properly cased version,
2713 + * used to warn in the case of missing event handlers. Available
2714 + * only in __DEV__.
2715 + * @type {Object}
2716 + */
2717 + possibleRegistrationNames: "development" !== 'production' ? {} : null,
2718 + // Trust the developer to only use possibleRegistrationNames in __DEV__
2719 +
2720 + /**
2721 + * Injects an ordering of plugins (by plugin name). This allows the ordering
2722 + * to be decoupled from injection of the actual plugins so that ordering is
2723 + * always deterministic regardless of packaging, on-the-fly injection, etc.
2724 + *
2725 + * @param {array} InjectedEventPluginOrder
2726 + * @internal
2727 + * @see {EventPluginHub.injection.injectEventPluginOrder}
2728 + */
2729 + injectEventPluginOrder: function (injectedEventPluginOrder) {
2730 + !!eventPluginOrder ? "development" !== 'production' ? invariant(false, 'EventPluginRegistry: Cannot inject event plugin ordering more than once. You are likely trying to load more than one copy of React.') : _prodInvariant('101') : void 0;
2731 + // Clone the ordering so it cannot be dynamically mutated.
2732 + eventPluginOrder = Array.prototype.slice.call(injectedEventPluginOrder);
2733 + recomputePluginOrdering();
2734 + },
2735 +
2736 + /**
2737 + * Injects plugins to be used by `EventPluginHub`. The plugin names must be
2738 + * in the ordering injected by `injectEventPluginOrder`.
2739 + *
2740 + * Plugins can be injected as part of page initialization or on-the-fly.
2741 + *
2742 + * @param {object} injectedNamesToPlugins Map from names to plugin modules.
2743 + * @internal
2744 + * @see {EventPluginHub.injection.injectEventPluginsByName}
2745 + */
2746 + injectEventPluginsByName: function (injectedNamesToPlugins) {
2747 + var isOrderingDirty = false;
2748 + for (var pluginName in injectedNamesToPlugins) {
2749 + if (!injectedNamesToPlugins.hasOwnProperty(pluginName)) {
2750 + continue;
2751 + }
2752 + var pluginModule = injectedNamesToPlugins[pluginName];
2753 + if (!namesToPlugins.hasOwnProperty(pluginName) || namesToPlugins[pluginName] !== pluginModule) {
2754 + !!namesToPlugins[pluginName] ? "development" !== 'production' ? invariant(false, 'EventPluginRegistry: Cannot inject two different event plugins using the same name, `%s`.', pluginName) : _prodInvariant('102', pluginName) : void 0;
2755 + namesToPlugins[pluginName] = pluginModule;
2756 + isOrderingDirty = true;
2757 + }
2758 + }
2759 + if (isOrderingDirty) {
2760 + recomputePluginOrdering();
2761 + }
2762 + },
2763 +
2764 + /**
2765 + * Looks up the plugin for the supplied event.
2766 + *
2767 + * @param {object} event A synthetic event.
2768 + * @return {?object} The plugin that created the supplied event.
2769 + * @internal
2770 + */
2771 + getPluginModuleForEvent: function (event) {
2772 + var dispatchConfig = event.dispatchConfig;
2773 + if (dispatchConfig.registrationName) {
2774 + return EventPluginRegistry.registrationNameModules[dispatchConfig.registrationName] || null;
2775 + }
2776 + if (dispatchConfig.phasedRegistrationNames !== undefined) {
2777 + // pulling phasedRegistrationNames out of dispatchConfig helps Flow see
2778 + // that it is not undefined.
2779 + var phasedRegistrationNames = dispatchConfig.phasedRegistrationNames;
2780 +
2781 + for (var phase in phasedRegistrationNames) {
2782 + if (!phasedRegistrationNames.hasOwnProperty(phase)) {
2783 + continue;
2784 + }
2785 + var pluginModule = EventPluginRegistry.registrationNameModules[phasedRegistrationNames[phase]];
2786 + if (pluginModule) {
2787 + return pluginModule;
2788 + }
2789 + }
2790 + }
2791 + return null;
2792 + },
2793 +
2794 + /**
2795 + * Exposed for unit testing.
2796 + * @private
2797 + */
2798 + _resetEventPlugins: function () {
2799 + eventPluginOrder = null;
2800 + for (var pluginName in namesToPlugins) {
2801 + if (namesToPlugins.hasOwnProperty(pluginName)) {
2802 + delete namesToPlugins[pluginName];
2803 + }
2804 + }
2805 + EventPluginRegistry.plugins.length = 0;
2806 +
2807 + var eventNameDispatchConfigs = EventPluginRegistry.eventNameDispatchConfigs;
2808 + for (var eventName in eventNameDispatchConfigs) {
2809 + if (eventNameDispatchConfigs.hasOwnProperty(eventName)) {
2810 + delete eventNameDispatchConfigs[eventName];
2811 + }
2812 + }
2813 +
2814 + var registrationNameModules = EventPluginRegistry.registrationNameModules;
2815 + for (var registrationName in registrationNameModules) {
2816 + if (registrationNameModules.hasOwnProperty(registrationName)) {
2817 + delete registrationNameModules[registrationName];
2818 + }
2819 + }
2820 +
2821 + if ("development" !== 'production') {
2822 + var possibleRegistrationNames = EventPluginRegistry.possibleRegistrationNames;
2823 + for (var lowerCasedName in possibleRegistrationNames) {
2824 + if (possibleRegistrationNames.hasOwnProperty(lowerCasedName)) {
2825 + delete possibleRegistrationNames[lowerCasedName];
2826 + }
2827 + }
2828 + }
2829 + }
2830 +
2831 +};
2832 +
2833 +module.exports = EventPluginRegistry;
2834 +},{"133":133,"157":157}],19:[function(_dereq_,module,exports){
2835 +/**
2836 + * Copyright 2013-present, Facebook, Inc.
2837 + * All rights reserved.
2838 + *
2839 + * This source code is licensed under the BSD-style license found in the
2840 + * LICENSE file in the root directory of this source tree. An additional grant
2841 + * of patent rights can be found in the PATENTS file in the same directory.
2842 + *
2843 + */
2844 +
2845 +'use strict';
2846 +
2847 +var _prodInvariant = _dereq_(133);
2848 +
2849 +var ReactErrorUtils = _dereq_(57);
2850 +
2851 +var invariant = _dereq_(157);
2852 +var warning = _dereq_(164);
2853 +
2854 +/**
2855 + * Injected dependencies:
2856 + */
2857 +
2858 +/**
2859 + * - `ComponentTree`: [required] Module that can convert between React instances
2860 + * and actual node references.
2861 + */
2862 +var ComponentTree;
2863 +var injection = {
2864 + injectComponentTree: function (Injected) {
2865 + ComponentTree = Injected;
2866 + if ("development" !== 'production') {
2867 + "development" !== 'production' ? warning(Injected && Injected.getNodeFromInstance && Injected.getInstanceFromNode, 'EventPluginUtils.injection.injectComponentTree(...): Injected ' + 'module is missing getNodeFromInstance or getInstanceFromNode.') : void 0;
2868 + }
2869 + }
2870 +};
2871 +
2872 +function isEndish(topLevelType) {
2873 + return topLevelType === 'topMouseUp' || topLevelType === 'topTouchEnd' || topLevelType === 'topTouchCancel';
2874 +}
2875 +
2876 +function isMoveish(topLevelType) {
2877 + return topLevelType === 'topMouseMove' || topLevelType === 'topTouchMove';
2878 +}
2879 +function isStartish(topLevelType) {
2880 + return topLevelType === 'topMouseDown' || topLevelType === 'topTouchStart';
2881 +}
2882 +
2883 +var validateEventDispatches;
2884 +if ("development" !== 'production') {
2885 + validateEventDispatches = function (event) {
2886 + var dispatchListeners = event._dispatchListeners;
2887 + var dispatchInstances = event._dispatchInstances;
2888 +
2889 + var listenersIsArr = Array.isArray(dispatchListeners);
2890 + var listenersLen = listenersIsArr ? dispatchListeners.length : dispatchListeners ? 1 : 0;
2891 +
2892 + var instancesIsArr = Array.isArray(dispatchInstances);
2893 + var instancesLen = instancesIsArr ? dispatchInstances.length : dispatchInstances ? 1 : 0;
2894 +
2895 + "development" !== 'production' ? warning(instancesIsArr === listenersIsArr && instancesLen === listenersLen, 'EventPluginUtils: Invalid `event`.') : void 0;
2896 + };
2897 +}
2898 +
2899 +/**
2900 + * Dispatch the event to the listener.
2901 + * @param {SyntheticEvent} event SyntheticEvent to handle
2902 + * @param {boolean} simulated If the event is simulated (changes exn behavior)
2903 + * @param {function} listener Application-level callback
2904 + * @param {*} inst Internal component instance
2905 + */
2906 +function executeDispatch(event, simulated, listener, inst) {
2907 + var type = event.type || 'unknown-event';
2908 + event.currentTarget = EventPluginUtils.getNodeFromInstance(inst);
2909 + if (simulated) {
2910 + ReactErrorUtils.invokeGuardedCallbackWithCatch(type, listener, event);
2911 + } else {
2912 + ReactErrorUtils.invokeGuardedCallback(type, listener, event);
2913 + }
2914 + event.currentTarget = null;
2915 +}
2916 +
2917 +/**
2918 + * Standard/simple iteration through an event's collected dispatches.
2919 + */
2920 +function executeDispatchesInOrder(event, simulated) {
2921 + var dispatchListeners = event._dispatchListeners;
2922 + var dispatchInstances = event._dispatchInstances;
2923 + if ("development" !== 'production') {
2924 + validateEventDispatches(event);
2925 + }
2926 + if (Array.isArray(dispatchListeners)) {
2927 + for (var i = 0; i < dispatchListeners.length; i++) {
2928 + if (event.isPropagationStopped()) {
2929 + break;
2930 + }
2931 + // Listeners and Instances are two parallel arrays that are always in sync.
2932 + executeDispatch(event, simulated, dispatchListeners[i], dispatchInstances[i]);
2933 + }
2934 + } else if (dispatchListeners) {
2935 + executeDispatch(event, simulated, dispatchListeners, dispatchInstances);
2936 + }
2937 + event._dispatchListeners = null;
2938 + event._dispatchInstances = null;
2939 +}
2940 +
2941 +/**
2942 + * Standard/simple iteration through an event's collected dispatches, but stops
2943 + * at the first dispatch execution returning true, and returns that id.
2944 + *
2945 + * @return {?string} id of the first dispatch execution who's listener returns
2946 + * true, or null if no listener returned true.
2947 + */
2948 +function executeDispatchesInOrderStopAtTrueImpl(event) {
2949 + var dispatchListeners = event._dispatchListeners;
2950 + var dispatchInstances = event._dispatchInstances;
2951 + if ("development" !== 'production') {
2952 + validateEventDispatches(event);
2953 + }
2954 + if (Array.isArray(dispatchListeners)) {
2955 + for (var i = 0; i < dispatchListeners.length; i++) {
2956 + if (event.isPropagationStopped()) {
2957 + break;
2958 + }
2959 + // Listeners and Instances are two parallel arrays that are always in sync.
2960 + if (dispatchListeners[i](event, dispatchInstances[i])) {
2961 + return dispatchInstances[i];
2962 + }
2963 + }
2964 + } else if (dispatchListeners) {
2965 + if (dispatchListeners(event, dispatchInstances)) {
2966 + return dispatchInstances;
2967 + }
2968 + }
2969 + return null;
2970 +}
2971 +
2972 +/**
2973 + * @see executeDispatchesInOrderStopAtTrueImpl
2974 + */
2975 +function executeDispatchesInOrderStopAtTrue(event) {
2976 + var ret = executeDispatchesInOrderStopAtTrueImpl(event);
2977 + event._dispatchInstances = null;
2978 + event._dispatchListeners = null;
2979 + return ret;
2980 +}
2981 +
2982 +/**
2983 + * Execution of a "direct" dispatch - there must be at most one dispatch
2984 + * accumulated on the event or it is considered an error. It doesn't really make
2985 + * sense for an event with multiple dispatches (bubbled) to keep track of the
2986 + * return values at each dispatch execution, but it does tend to make sense when
2987 + * dealing with "direct" dispatches.
2988 + *
2989 + * @return {*} The return value of executing the single dispatch.
2990 + */
2991 +function executeDirectDispatch(event) {
2992 + if ("development" !== 'production') {
2993 + validateEventDispatches(event);
2994 + }
2995 + var dispatchListener = event._dispatchListeners;
2996 + var dispatchInstance = event._dispatchInstances;
2997 + !!Array.isArray(dispatchListener) ? "development" !== 'production' ? invariant(false, 'executeDirectDispatch(...): Invalid `event`.') : _prodInvariant('103') : void 0;
2998 + event.currentTarget = dispatchListener ? EventPluginUtils.getNodeFromInstance(dispatchInstance) : null;
2999 + var res = dispatchListener ? dispatchListener(event) : null;
3000 + event.currentTarget = null;
3001 + event._dispatchListeners = null;
3002 + event._dispatchInstances = null;
3003 + return res;
3004 +}
3005 +
3006 +/**
3007 + * @param {SyntheticEvent} event
3008 + * @return {boolean} True iff number of dispatches accumulated is greater than 0.
3009 + */
3010 +function hasDispatches(event) {
3011 + return !!event._dispatchListeners;
3012 +}
3013 +
3014 +/**
3015 + * General utilities that are useful in creating custom Event Plugins.
3016 + */
3017 +var EventPluginUtils = {
3018 + isEndish: isEndish,
3019 + isMoveish: isMoveish,
3020 + isStartish: isStartish,
3021 +
3022 + executeDirectDispatch: executeDirectDispatch,
3023 + executeDispatchesInOrder: executeDispatchesInOrder,
3024 + executeDispatchesInOrderStopAtTrue: executeDispatchesInOrderStopAtTrue,
3025 + hasDispatches: hasDispatches,
3026 +
3027 + getInstanceFromNode: function (node) {
3028 + return ComponentTree.getInstanceFromNode(node);
3029 + },
3030 + getNodeFromInstance: function (node) {
3031 + return ComponentTree.getNodeFromInstance(node);
3032 + },
3033 +
3034 + injection: injection
3035 +};
3036 +
3037 +module.exports = EventPluginUtils;
3038 +},{"133":133,"157":157,"164":164,"57":57}],20:[function(_dereq_,module,exports){
3039 +/**
3040 + * Copyright 2013-present, Facebook, Inc.
3041 + * All rights reserved.
3042 + *
3043 + * This source code is licensed under the BSD-style license found in the
3044 + * LICENSE file in the root directory of this source tree. An additional grant
3045 + * of patent rights can be found in the PATENTS file in the same directory.
3046 + *
3047 + */
3048 +
3049 +'use strict';
3050 +
3051 +var EventPluginHub = _dereq_(17);
3052 +var ReactTreeTraversal = _dereq_(83);
3053 +
3054 +var accumulateInto = _dereq_(107);
3055 +var forEachAccumulated = _dereq_(115);
3056 +var warning = _dereq_(164);
3057 +
3058 +var getListener = EventPluginHub.getListener;
3059 +
3060 +/**
3061 + * Some event types have a notion of different registration names for different
3062 + * "phases" of propagation. This finds listeners by a given phase.
3063 + */
3064 +function listenerAtPhase(inst, event, propagationPhase) {
3065 + var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];
3066 + return getListener(inst, registrationName);
3067 +}
3068 +
3069 +/**
3070 + * Tags a `SyntheticEvent` with dispatched listeners. Creating this function
3071 + * here, allows us to not have to bind or create functions for each event.
3072 + * Mutating the event's members allows us to not have to create a wrapping
3073 + * "dispatch" object that pairs the event with the listener.
3074 + */
3075 +function accumulateDirectionalDispatches(inst, phase, event) {
3076 + if ("development" !== 'production') {
3077 + "development" !== 'production' ? warning(inst, 'Dispatching inst must not be null') : void 0;
3078 + }
3079 + var listener = listenerAtPhase(inst, event, phase);
3080 + if (listener) {
3081 + event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);
3082 + event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);
3083 + }
3084 +}
3085 +
3086 +/**
3087 + * Collect dispatches (must be entirely collected before dispatching - see unit
3088 + * tests). Lazily allocate the array to conserve memory. We must loop through
3089 + * each event and perform the traversal for each one. We cannot perform a
3090 + * single traversal for the entire collection of events because each event may
3091 + * have a different target.
3092 + */
3093 +function accumulateTwoPhaseDispatchesSingle(event) {
3094 + if (event && event.dispatchConfig.phasedRegistrationNames) {
3095 + ReactTreeTraversal.traverseTwoPhase(event._targetInst, accumulateDirectionalDispatches, event);
3096 + }
3097 +}
3098 +
3099 +/**
3100 + * Same as `accumulateTwoPhaseDispatchesSingle`, but skips over the targetID.
3101 + */
3102 +function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {
3103 + if (event && event.dispatchConfig.phasedRegistrationNames) {
3104 + var targetInst = event._targetInst;
3105 + var parentInst = targetInst ? ReactTreeTraversal.getParentInstance(targetInst) : null;
3106 + ReactTreeTraversal.traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);
3107 + }
3108 +}
3109 +
3110 +/**
3111 + * Accumulates without regard to direction, does not look for phased
3112 + * registration names. Same as `accumulateDirectDispatchesSingle` but without
3113 + * requiring that the `dispatchMarker` be the same as the dispatched ID.
3114 + */
3115 +function accumulateDispatches(inst, ignoredDirection, event) {
3116 + if (event && event.dispatchConfig.registrationName) {
3117 + var registrationName = event.dispatchConfig.registrationName;
3118 + var listener = getListener(inst, registrationName);
3119 + if (listener) {
3120 + event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);
3121 + event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);
3122 + }
3123 + }
3124 +}
3125 +
3126 +/**
3127 + * Accumulates dispatches on an `SyntheticEvent`, but only for the
3128 + * `dispatchMarker`.
3129 + * @param {SyntheticEvent} event
3130 + */
3131 +function accumulateDirectDispatchesSingle(event) {
3132 + if (event && event.dispatchConfig.registrationName) {
3133 + accumulateDispatches(event._targetInst, null, event);
3134 + }
3135 +}
3136 +
3137 +function accumulateTwoPhaseDispatches(events) {
3138 + forEachAccumulated(events, accumulateTwoPhaseDispatchesSingle);
3139 +}
3140 +
3141 +function accumulateTwoPhaseDispatchesSkipTarget(events) {
3142 + forEachAccumulated(events, accumulateTwoPhaseDispatchesSingleSkipTarget);
3143 +}
3144 +
3145 +function accumulateEnterLeaveDispatches(leave, enter, from, to) {
3146 + ReactTreeTraversal.traverseEnterLeave(from, to, accumulateDispatches, leave, enter);
3147 +}
3148 +
3149 +function accumulateDirectDispatches(events) {
3150 + forEachAccumulated(events, accumulateDirectDispatchesSingle);
3151 +}
3152 +
3153 +/**
3154 + * A small set of propagation patterns, each of which will accept a small amount
3155 + * of information, and generate a set of "dispatch ready event objects" - which
3156 + * are sets of events that have already been annotated with a set of dispatched
3157 + * listener functions/ids. The API is designed this way to discourage these
3158 + * propagation strategies from actually executing the dispatches, since we
3159 + * always want to collect the entire set of dispatches before executing event a
3160 + * single one.
3161 + *
3162 + * @constructor EventPropagators
3163 + */
3164 +var EventPropagators = {
3165 + accumulateTwoPhaseDispatches: accumulateTwoPhaseDispatches,
3166 + accumulateTwoPhaseDispatchesSkipTarget: accumulateTwoPhaseDispatchesSkipTarget,
3167 + accumulateDirectDispatches: accumulateDirectDispatches,
3168 + accumulateEnterLeaveDispatches: accumulateEnterLeaveDispatches
3169 +};
3170 +
3171 +module.exports = EventPropagators;
3172 +},{"107":107,"115":115,"164":164,"17":17,"83":83}],21:[function(_dereq_,module,exports){
3173 +/**
3174 + * Copyright 2013-present, Facebook, Inc.
3175 + * All rights reserved.
3176 + *
3177 + * This source code is licensed under the BSD-style license found in the
3178 + * LICENSE file in the root directory of this source tree. An additional grant
3179 + * of patent rights can be found in the PATENTS file in the same directory.
3180 + *
3181 + */
3182 +
3183 +'use strict';
3184 +
3185 +var _assign = _dereq_(165);
3186 +
3187 +var PooledClass = _dereq_(24);
3188 +
3189 +var getTextContentAccessor = _dereq_(126);
3190 +
3191 +/**
3192 + * This helper class stores information about text content of a target node,
3193 + * allowing comparison of content before and after a given event.
3194 + *
3195 + * Identify the node where selection currently begins, then observe
3196 + * both its text content and its current position in the DOM. Since the
3197 + * browser may natively replace the target node during composition, we can
3198 + * use its position to find its replacement.
3199 + *
3200 + * @param {DOMEventTarget} root
3201 + */
3202 +function FallbackCompositionState(root) {
3203 + this._root = root;
3204 + this._startText = this.getText();
3205 + this._fallbackText = null;
3206 +}
3207 +
3208 +_assign(FallbackCompositionState.prototype, {
3209 + destructor: function () {
3210 + this._root = null;
3211 + this._startText = null;
3212 + this._fallbackText = null;
3213 + },
3214 +
3215 + /**
3216 + * Get current text of input.
3217 + *
3218 + * @return {string}
3219 + */
3220 + getText: function () {
3221 + if ('value' in this._root) {
3222 + return this._root.value;
3223 + }
3224 + return this._root[getTextContentAccessor()];
3225 + },
3226 +
3227 + /**
3228 + * Determine the differing substring between the initially stored
3229 + * text content and the current content.
3230 + *
3231 + * @return {string}
3232 + */
3233 + getData: function () {
3234 + if (this._fallbackText) {
3235 + return this._fallbackText;
3236 + }
3237 +
3238 + var start;
3239 + var startValue = this._startText;
3240 + var startLength = startValue.length;
3241 + var end;
3242 + var endValue = this.getText();
3243 + var endLength = endValue.length;
3244 +
3245 + for (start = 0; start < startLength; start++) {
3246 + if (startValue[start] !== endValue[start]) {
3247 + break;
3248 + }
3249 + }
3250 +
3251 + var minEnd = startLength - start;
3252 + for (end = 1; end <= minEnd; end++) {
3253 + if (startValue[startLength - end] !== endValue[endLength - end]) {
3254 + break;
3255 + }
3256 + }
3257 +
3258 + var sliceTail = end > 1 ? 1 - end : undefined;
3259 + this._fallbackText = endValue.slice(start, sliceTail);
3260 + return this._fallbackText;
3261 + }
3262 +});
3263 +
3264 +PooledClass.addPoolingTo(FallbackCompositionState);
3265 +
3266 +module.exports = FallbackCompositionState;
3267 +},{"126":126,"165":165,"24":24}],22:[function(_dereq_,module,exports){
3268 +/**
3269 + * Copyright 2013-present, Facebook, Inc.
3270 + * All rights reserved.
3271 + *
3272 + * This source code is licensed under the BSD-style license found in the
3273 + * LICENSE file in the root directory of this source tree. An additional grant
3274 + * of patent rights can be found in the PATENTS file in the same directory.
3275 + *
3276 + */
3277 +
3278 +'use strict';
3279 +
3280 +var DOMProperty = _dereq_(12);
3281 +
3282 +var MUST_USE_PROPERTY = DOMProperty.injection.MUST_USE_PROPERTY;
3283 +var HAS_BOOLEAN_VALUE = DOMProperty.injection.HAS_BOOLEAN_VALUE;
3284 +var HAS_NUMERIC_VALUE = DOMProperty.injection.HAS_NUMERIC_VALUE;
3285 +var HAS_POSITIVE_NUMERIC_VALUE = DOMProperty.injection.HAS_POSITIVE_NUMERIC_VALUE;
3286 +var HAS_OVERLOADED_BOOLEAN_VALUE = DOMProperty.injection.HAS_OVERLOADED_BOOLEAN_VALUE;
3287 +
3288 +var HTMLDOMPropertyConfig = {
3289 + isCustomAttribute: RegExp.prototype.test.bind(new RegExp('^(data|aria)-[' + DOMProperty.ATTRIBUTE_NAME_CHAR + ']*$')),
3290 + Properties: {
3291 + /**
3292 + * Standard Properties
3293 + */
3294 + accept: 0,
3295 + acceptCharset: 0,
3296 + accessKey: 0,
3297 + action: 0,
3298 + allowFullScreen: HAS_BOOLEAN_VALUE,
3299 + allowTransparency: 0,
3300 + alt: 0,
3301 + // specifies target context for links with `preload` type
3302 + as: 0,
3303 + async: HAS_BOOLEAN_VALUE,
3304 + autoComplete: 0,
3305 + // autoFocus is polyfilled/normalized by AutoFocusUtils
3306 + // autoFocus: HAS_BOOLEAN_VALUE,
3307 + autoPlay: HAS_BOOLEAN_VALUE,
3308 + capture: HAS_BOOLEAN_VALUE,
3309 + cellPadding: 0,
3310 + cellSpacing: 0,
3311 + charSet: 0,
3312 + challenge: 0,
3313 + checked: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
3314 + cite: 0,
3315 + classID: 0,
3316 + className: 0,
3317 + cols: HAS_POSITIVE_NUMERIC_VALUE,
3318 + colSpan: 0,
3319 + content: 0,
3320 + contentEditable: 0,
3321 + contextMenu: 0,
3322 + controls: HAS_BOOLEAN_VALUE,
3323 + coords: 0,
3324 + crossOrigin: 0,
3325 + data: 0, // For `<object />` acts as `src`.
3326 + dateTime: 0,
3327 + 'default': HAS_BOOLEAN_VALUE,
3328 + defer: HAS_BOOLEAN_VALUE,
3329 + dir: 0,
3330 + disabled: HAS_BOOLEAN_VALUE,
3331 + download: HAS_OVERLOADED_BOOLEAN_VALUE,
3332 + draggable: 0,
3333 + encType: 0,
3334 + form: 0,
3335 + formAction: 0,
3336 + formEncType: 0,
3337 + formMethod: 0,
3338 + formNoValidate: HAS_BOOLEAN_VALUE,
3339 + formTarget: 0,
3340 + frameBorder: 0,
3341 + headers: 0,
3342 + height: 0,
3343 + hidden: HAS_BOOLEAN_VALUE,
3344 + high: 0,
3345 + href: 0,
3346 + hrefLang: 0,
3347 + htmlFor: 0,
3348 + httpEquiv: 0,
3349 + id: 0,
3350 + inputMode: 0,
3351 + integrity: 0,
3352 + is: 0,
3353 + keyParams: 0,
3354 + keyType: 0,
3355 + kind: 0,
3356 + label: 0,
3357 + lang: 0,
3358 + list: 0,
3359 + loop: HAS_BOOLEAN_VALUE,
3360 + low: 0,
3361 + manifest: 0,
3362 + marginHeight: 0,
3363 + marginWidth: 0,
3364 + max: 0,
3365 + maxLength: 0,
3366 + media: 0,
3367 + mediaGroup: 0,
3368 + method: 0,
3369 + min: 0,
3370 + minLength: 0,
3371 + // Caution; `option.selected` is not updated if `select.multiple` is
3372 + // disabled with `removeAttribute`.
3373 + multiple: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
3374 + muted: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
3375 + name: 0,
3376 + nonce: 0,
3377 + noValidate: HAS_BOOLEAN_VALUE,
3378 + open: HAS_BOOLEAN_VALUE,
3379 + optimum: 0,
3380 + pattern: 0,
3381 + placeholder: 0,
3382 + playsInline: HAS_BOOLEAN_VALUE,
3383 + poster: 0,
3384 + preload: 0,
3385 + profile: 0,
3386 + radioGroup: 0,
3387 + readOnly: HAS_BOOLEAN_VALUE,
3388 + referrerPolicy: 0,
3389 + rel: 0,
3390 + required: HAS_BOOLEAN_VALUE,
3391 + reversed: HAS_BOOLEAN_VALUE,
3392 + role: 0,
3393 + rows: HAS_POSITIVE_NUMERIC_VALUE,
3394 + rowSpan: HAS_NUMERIC_VALUE,
3395 + sandbox: 0,
3396 + scope: 0,
3397 + scoped: HAS_BOOLEAN_VALUE,
3398 + scrolling: 0,
3399 + seamless: HAS_BOOLEAN_VALUE,
3400 + selected: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
3401 + shape: 0,
3402 + size: HAS_POSITIVE_NUMERIC_VALUE,
3403 + sizes: 0,
3404 + // support for projecting regular DOM Elements via V1 named slots ( shadow dom )
3405 + slot: 0,
3406 + span: HAS_POSITIVE_NUMERIC_VALUE,
3407 + spellCheck: 0,
3408 + src: 0,
3409 + srcDoc: 0,
3410 + srcLang: 0,
3411 + srcSet: 0,
3412 + start: HAS_NUMERIC_VALUE,
3413 + step: 0,
3414 + style: 0,
3415 + summary: 0,
3416 + tabIndex: 0,
3417 + target: 0,
3418 + title: 0,
3419 + // Setting .type throws on non-<input> tags
3420 + type: 0,
3421 + useMap: 0,
3422 + value: 0,
3423 + width: 0,
3424 + wmode: 0,
3425 + wrap: 0,
3426 +
3427 + /**
3428 + * RDFa Properties
3429 + */
3430 + about: 0,
3431 + datatype: 0,
3432 + inlist: 0,
3433 + prefix: 0,
3434 + // property is also supported for OpenGraph in meta tags.
3435 + property: 0,
3436 + resource: 0,
3437 + 'typeof': 0,
3438 + vocab: 0,
3439 +
3440 + /**
3441 + * Non-standard Properties
3442 + */
3443 + // autoCapitalize and autoCorrect are supported in Mobile Safari for
3444 + // keyboard hints.
3445 + autoCapitalize: 0,
3446 + autoCorrect: 0,
3447 + // autoSave allows WebKit/Blink to persist values of input fields on page reloads
3448 + autoSave: 0,
3449 + // color is for Safari mask-icon link
3450 + color: 0,
3451 + // itemProp, itemScope, itemType are for
3452 + // Microdata support. See http://schema.org/docs/gs.html
3453 + itemProp: 0,
3454 + itemScope: HAS_BOOLEAN_VALUE,
3455 + itemType: 0,
3456 + // itemID and itemRef are for Microdata support as well but
3457 + // only specified in the WHATWG spec document. See
3458 + // https://html.spec.whatwg.org/multipage/microdata.html#microdata-dom-api
3459 + itemID: 0,
3460 + itemRef: 0,
3461 + // results show looking glass icon and recent searches on input
3462 + // search fields in WebKit/Blink
3463 + results: 0,
3464 + // IE-only attribute that specifies security restrictions on an iframe
3465 + // as an alternative to the sandbox attribute on IE<10
3466 + security: 0,
3467 + // IE-only attribute that controls focus behavior
3468 + unselectable: 0
3469 + },
3470 + DOMAttributeNames: {
3471 + acceptCharset: 'accept-charset',
3472 + className: 'class',
3473 + htmlFor: 'for',
3474 + httpEquiv: 'http-equiv'
3475 + },
3476 + DOMPropertyNames: {},
3477 + DOMMutationMethods: {
3478 + value: function (node, value) {
3479 + if (value == null) {
3480 + return node.removeAttribute('value');
3481 + }
3482 +
3483 + // Number inputs get special treatment due to some edge cases in
3484 + // Chrome. Let everything else assign the value attribute as normal.
3485 + // https://github.com/facebook/react/issues/7253#issuecomment-236074326
3486 + if (node.type !== 'number' || node.hasAttribute('value') === false) {
3487 + node.setAttribute('value', '' + value);
3488 + } else if (node.validity && !node.validity.badInput && node.ownerDocument.activeElement !== node) {
3489 + // Don't assign an attribute if validation reports bad
3490 + // input. Chrome will clear the value. Additionally, don't
3491 + // operate on inputs that have focus, otherwise Chrome might
3492 + // strip off trailing decimal places and cause the user's
3493 + // cursor position to jump to the beginning of the input.
3494 + //
3495 + // In ReactDOMInput, we have an onBlur event that will trigger
3496 + // this function again when focus is lost.
3497 + node.setAttribute('value', '' + value);
3498 + }
3499 + }
3500 + }
3501 +};
3502 +
3503 +module.exports = HTMLDOMPropertyConfig;
3504 +},{"12":12}],23:[function(_dereq_,module,exports){
3505 +/**
3506 + * Copyright 2013-present, Facebook, Inc.
3507 + * All rights reserved.
3508 + *
3509 + * This source code is licensed under the BSD-style license found in the
3510 + * LICENSE file in the root directory of this source tree. An additional grant
3511 + * of patent rights can be found in the PATENTS file in the same directory.
3512 + *
3513 + *
3514 + */
3515 +
3516 +'use strict';
3517 +
3518 +/**
3519 + * Escape and wrap key so it is safe to use as a reactid
3520 + *
3521 + * @param {string} key to be escaped.
3522 + * @return {string} the escaped key.
3523 + */
3524 +
3525 +function escape(key) {
3526 + var escapeRegex = /[=:]/g;
3527 + var escaperLookup = {
3528 + '=': '=0',
3529 + ':': '=2'
3530 + };
3531 + var escapedString = ('' + key).replace(escapeRegex, function (match) {
3532 + return escaperLookup[match];
3533 + });
3534 +
3535 + return '$' + escapedString;
3536 +}
3537 +
3538 +/**
3539 + * Unescape and unwrap key for human-readable display
3540 + *
3541 + * @param {string} key to unescape.
3542 + * @return {string} the unescaped key.
3543 + */
3544 +function unescape(key) {
3545 + var unescapeRegex = /(=0|=2)/g;
3546 + var unescaperLookup = {
3547 + '=0': '=',
3548 + '=2': ':'
3549 + };
3550 + var keySubstring = key[0] === '.' && key[1] === '$' ? key.substring(2) : key.substring(1);
3551 +
3552 + return ('' + keySubstring).replace(unescapeRegex, function (match) {
3553 + return unescaperLookup[match];
3554 + });
3555 +}
3556 +
3557 +var KeyEscapeUtils = {
3558 + escape: escape,
3559 + unescape: unescape
3560 +};
3561 +
3562 +module.exports = KeyEscapeUtils;
3563 +},{}],24:[function(_dereq_,module,exports){
3564 +/**
3565 + * Copyright 2013-present, Facebook, Inc.
3566 + * All rights reserved.
3567 + *
3568 + * This source code is licensed under the BSD-style license found in the
3569 + * LICENSE file in the root directory of this source tree. An additional grant
3570 + * of patent rights can be found in the PATENTS file in the same directory.
3571 + *
3572 + *
3573 + */
3574 +
3575 +'use strict';
3576 +
3577 +var _prodInvariant = _dereq_(133);
3578 +
3579 +var invariant = _dereq_(157);
3580 +
3581 +/**
3582 + * Static poolers. Several custom versions for each potential number of
3583 + * arguments. A completely generic pooler is easy to implement, but would
3584 + * require accessing the `arguments` object. In each of these, `this` refers to
3585 + * the Class itself, not an instance. If any others are needed, simply add them
3586 + * here, or in their own files.
3587 + */
3588 +var oneArgumentPooler = function (copyFieldsFrom) {
3589 + var Klass = this;
3590 + if (Klass.instancePool.length) {
3591 + var instance = Klass.instancePool.pop();
3592 + Klass.call(instance, copyFieldsFrom);
3593 + return instance;
3594 + } else {
3595 + return new Klass(copyFieldsFrom);
3596 + }
3597 +};
3598 +
3599 +var twoArgumentPooler = function (a1, a2) {
3600 + var Klass = this;
3601 + if (Klass.instancePool.length) {
3602 + var instance = Klass.instancePool.pop();
3603 + Klass.call(instance, a1, a2);
3604 + return instance;
3605 + } else {
3606 + return new Klass(a1, a2);
3607 + }
3608 +};
3609 +
3610 +var threeArgumentPooler = function (a1, a2, a3) {
3611 + var Klass = this;
3612 + if (Klass.instancePool.length) {
3613 + var instance = Klass.instancePool.pop();
3614 + Klass.call(instance, a1, a2, a3);
3615 + return instance;
3616 + } else {
3617 + return new Klass(a1, a2, a3);
3618 + }
3619 +};
3620 +
3621 +var fourArgumentPooler = function (a1, a2, a3, a4) {
3622 + var Klass = this;
3623 + if (Klass.instancePool.length) {
3624 + var instance = Klass.instancePool.pop();
3625 + Klass.call(instance, a1, a2, a3, a4);
3626 + return instance;
3627 + } else {
3628 + return new Klass(a1, a2, a3, a4);
3629 + }
3630 +};
3631 +
3632 +var standardReleaser = function (instance) {
3633 + var Klass = this;
3634 + !(instance instanceof Klass) ? "development" !== 'production' ? invariant(false, 'Trying to release an instance into a pool of a different type.') : _prodInvariant('25') : void 0;
3635 + instance.destructor();
3636 + if (Klass.instancePool.length < Klass.poolSize) {
3637 + Klass.instancePool.push(instance);
3638 + }
3639 +};
3640 +
3641 +var DEFAULT_POOL_SIZE = 10;
3642 +var DEFAULT_POOLER = oneArgumentPooler;
3643 +
3644 +/**
3645 + * Augments `CopyConstructor` to be a poolable class, augmenting only the class
3646 + * itself (statically) not adding any prototypical fields. Any CopyConstructor
3647 + * you give this may have a `poolSize` property, and will look for a
3648 + * prototypical `destructor` on instances.
3649 + *
3650 + * @param {Function} CopyConstructor Constructor that can be used to reset.
3651 + * @param {Function} pooler Customizable pooler.
3652 + */
3653 +var addPoolingTo = function (CopyConstructor, pooler) {
3654 + // Casting as any so that flow ignores the actual implementation and trusts
3655 + // it to match the type we declared
3656 + var NewKlass = CopyConstructor;
3657 + NewKlass.instancePool = [];
3658 + NewKlass.getPooled = pooler || DEFAULT_POOLER;
3659 + if (!NewKlass.poolSize) {
3660 + NewKlass.poolSize = DEFAULT_POOL_SIZE;
3661 + }
3662 + NewKlass.release = standardReleaser;
3663 + return NewKlass;
3664 +};
3665 +
3666 +var PooledClass = {
3667 + addPoolingTo: addPoolingTo,
3668 + oneArgumentPooler: oneArgumentPooler,
3669 + twoArgumentPooler: twoArgumentPooler,
3670 + threeArgumentPooler: threeArgumentPooler,
3671 + fourArgumentPooler: fourArgumentPooler
3672 +};
3673 +
3674 +module.exports = PooledClass;
3675 +},{"133":133,"157":157}],25:[function(_dereq_,module,exports){
3676 +/**
3677 + * Copyright 2013-present, Facebook, Inc.
3678 + * All rights reserved.
3679 + *
3680 + * This source code is licensed under the BSD-style license found in the
3681 + * LICENSE file in the root directory of this source tree. An additional grant
3682 + * of patent rights can be found in the PATENTS file in the same directory.
3683 + *
3684 + */
3685 +
3686 +'use strict';
3687 +
3688 +var _assign = _dereq_(165);
3689 +
3690 +var EventPluginRegistry = _dereq_(18);
3691 +var ReactEventEmitterMixin = _dereq_(58);
3692 +var ViewportMetrics = _dereq_(106);
3693 +
3694 +var getVendorPrefixedEventName = _dereq_(127);
3695 +var isEventSupported = _dereq_(130);
3696 +
3697 +/**
3698 + * Summary of `ReactBrowserEventEmitter` event handling:
3699 + *
3700 + * - Top-level delegation is used to trap most native browser events. This
3701 + * may only occur in the main thread and is the responsibility of
3702 + * ReactEventListener, which is injected and can therefore support pluggable
3703 + * event sources. This is the only work that occurs in the main thread.
3704 + *
3705 + * - We normalize and de-duplicate events to account for browser quirks. This
3706 + * may be done in the worker thread.
3707 + *
3708 + * - Forward these native events (with the associated top-level type used to
3709 + * trap it) to `EventPluginHub`, which in turn will ask plugins if they want
3710 + * to extract any synthetic events.
3711 + *
3712 + * - The `EventPluginHub` will then process each event by annotating them with
3713 + * "dispatches", a sequence of listeners and IDs that care about that event.
3714 + *
3715 + * - The `EventPluginHub` then dispatches the events.
3716 + *
3717 + * Overview of React and the event system:
3718 + *
3719 + * +------------+ .
3720 + * | DOM | .
3721 + * +------------+ .
3722 + * | .
3723 + * v .
3724 + * +------------+ .
3725 + * | ReactEvent | .
3726 + * | Listener | .
3727 + * +------------+ . +-----------+
3728 + * | . +--------+|SimpleEvent|
3729 + * | . | |Plugin |
3730 + * +-----|------+ . v +-----------+
3731 + * | | | . +--------------+ +------------+
3732 + * | +-----------.--->|EventPluginHub| | Event |
3733 + * | | . | | +-----------+ | Propagators|
3734 + * | ReactEvent | . | | |TapEvent | |------------|
3735 + * | Emitter | . | |<---+|Plugin | |other plugin|
3736 + * | | . | | +-----------+ | utilities |
3737 + * | +-----------.--->| | +------------+
3738 + * | | | . +--------------+
3739 + * +-----|------+ . ^ +-----------+
3740 + * | . | |Enter/Leave|
3741 + * + . +-------+|Plugin |
3742 + * +-------------+ . +-----------+
3743 + * | application | .
3744 + * |-------------| .
3745 + * | | .
3746 + * | | .
3747 + * +-------------+ .
3748 + * .
3749 + * React Core . General Purpose Event Plugin System
3750 + */
3751 +
3752 +var hasEventPageXY;
3753 +var alreadyListeningTo = {};
3754 +var isMonitoringScrollValue = false;
3755 +var reactTopListenersCounter = 0;
3756 +
3757 +// For events like 'submit' which don't consistently bubble (which we trap at a
3758 +// lower node than `document`), binding at `document` would cause duplicate
3759 +// events so we don't include them here
3760 +var topEventMapping = {
3761 + topAbort: 'abort',
3762 + topAnimationEnd: getVendorPrefixedEventName('animationend') || 'animationend',
3763 + topAnimationIteration: getVendorPrefixedEventName('animationiteration') || 'animationiteration',
3764 + topAnimationStart: getVendorPrefixedEventName('animationstart') || 'animationstart',
3765 + topBlur: 'blur',
3766 + topCanPlay: 'canplay',
3767 + topCanPlayThrough: 'canplaythrough',
3768 + topChange: 'change',
3769 + topClick: 'click',
3770 + topCompositionEnd: 'compositionend',
3771 + topCompositionStart: 'compositionstart',
3772 + topCompositionUpdate: 'compositionupdate',
3773 + topContextMenu: 'contextmenu',
3774 + topCopy: 'copy',
3775 + topCut: 'cut',
3776 + topDoubleClick: 'dblclick',
3777 + topDrag: 'drag',
3778 + topDragEnd: 'dragend',
3779 + topDragEnter: 'dragenter',
3780 + topDragExit: 'dragexit',
3781 + topDragLeave: 'dragleave',
3782 + topDragOver: 'dragover',
3783 + topDragStart: 'dragstart',
3784 + topDrop: 'drop',
3785 + topDurationChange: 'durationchange',
3786 + topEmptied: 'emptied',
3787 + topEncrypted: 'encrypted',
3788 + topEnded: 'ended',
3789 + topError: 'error',
3790 + topFocus: 'focus',
3791 + topInput: 'input',
3792 + topKeyDown: 'keydown',
3793 + topKeyPress: 'keypress',
3794 + topKeyUp: 'keyup',
3795 + topLoadedData: 'loadeddata',
3796 + topLoadedMetadata: 'loadedmetadata',
3797 + topLoadStart: 'loadstart',
3798 + topMouseDown: 'mousedown',
3799 + topMouseMove: 'mousemove',
3800 + topMouseOut: 'mouseout',
3801 + topMouseOver: 'mouseover',
3802 + topMouseUp: 'mouseup',
3803 + topPaste: 'paste',
3804 + topPause: 'pause',
3805 + topPlay: 'play',
3806 + topPlaying: 'playing',
3807 + topProgress: 'progress',
3808 + topRateChange: 'ratechange',
3809 + topScroll: 'scroll',
3810 + topSeeked: 'seeked',
3811 + topSeeking: 'seeking',
3812 + topSelectionChange: 'selectionchange',
3813 + topStalled: 'stalled',
3814 + topSuspend: 'suspend',
3815 + topTextInput: 'textInput',
3816 + topTimeUpdate: 'timeupdate',
3817 + topTouchCancel: 'touchcancel',
3818 + topTouchEnd: 'touchend',
3819 + topTouchMove: 'touchmove',
3820 + topTouchStart: 'touchstart',
3821 + topTransitionEnd: getVendorPrefixedEventName('transitionend') || 'transitionend',
3822 + topVolumeChange: 'volumechange',
3823 + topWaiting: 'waiting',
3824 + topWheel: 'wheel'
3825 +};
3826 +
3827 +/**
3828 + * To ensure no conflicts with other potential React instances on the page
3829 + */
3830 +var topListenersIDKey = '_reactListenersID' + String(Math.random()).slice(2);
3831 +
3832 +function getListeningForDocument(mountAt) {
3833 + // In IE8, `mountAt` is a host object and doesn't have `hasOwnProperty`
3834 + // directly.
3835 + if (!Object.prototype.hasOwnProperty.call(mountAt, topListenersIDKey)) {
3836 + mountAt[topListenersIDKey] = reactTopListenersCounter++;
3837 + alreadyListeningTo[mountAt[topListenersIDKey]] = {};
3838 + }
3839 + return alreadyListeningTo[mountAt[topListenersIDKey]];
3840 +}
3841 +
3842 +var ReactBrowserEventEmitter = _assign({}, ReactEventEmitterMixin, {
3843 +
3844 + /**
3845 + * Injectable event backend
3846 + */
3847 + ReactEventListener: null,
3848 +
3849 + injection: {
3850 + /**
3851 + * @param {object} ReactEventListener
3852 + */
3853 + injectReactEventListener: function (ReactEventListener) {
3854 + ReactEventListener.setHandleTopLevel(ReactBrowserEventEmitter.handleTopLevel);
3855 + ReactBrowserEventEmitter.ReactEventListener = ReactEventListener;
3856 + }
3857 + },
3858 +
3859 + /**
3860 + * Sets whether or not any created callbacks should be enabled.
3861 + *
3862 + * @param {boolean} enabled True if callbacks should be enabled.
3863 + */
3864 + setEnabled: function (enabled) {
3865 + if (ReactBrowserEventEmitter.ReactEventListener) {
3866 + ReactBrowserEventEmitter.ReactEventListener.setEnabled(enabled);
3867 + }
3868 + },
3869 +
3870 + /**
3871 + * @return {boolean} True if callbacks are enabled.
3872 + */
3873 + isEnabled: function () {
3874 + return !!(ReactBrowserEventEmitter.ReactEventListener && ReactBrowserEventEmitter.ReactEventListener.isEnabled());
3875 + },
3876 +
3877 + /**
3878 + * We listen for bubbled touch events on the document object.
3879 + *
3880 + * Firefox v8.01 (and possibly others) exhibited strange behavior when
3881 + * mounting `onmousemove` events at some node that was not the document
3882 + * element. The symptoms were that if your mouse is not moving over something
3883 + * contained within that mount point (for example on the background) the
3884 + * top-level listeners for `onmousemove` won't be called. However, if you
3885 + * register the `mousemove` on the document object, then it will of course
3886 + * catch all `mousemove`s. This along with iOS quirks, justifies restricting
3887 + * top-level listeners to the document object only, at least for these
3888 + * movement types of events and possibly all events.
3889 + *
3890 + * @see http://www.quirksmode.org/blog/archives/2010/09/click_event_del.html
3891 + *
3892 + * Also, `keyup`/`keypress`/`keydown` do not bubble to the window on IE, but
3893 + * they bubble to document.
3894 + *
3895 + * @param {string} registrationName Name of listener (e.g. `onClick`).
3896 + * @param {object} contentDocumentHandle Document which owns the container
3897 + */
3898 + listenTo: function (registrationName, contentDocumentHandle) {
3899 + var mountAt = contentDocumentHandle;
3900 + var isListening = getListeningForDocument(mountAt);
3901 + var dependencies = EventPluginRegistry.registrationNameDependencies[registrationName];
3902 +
3903 + for (var i = 0; i < dependencies.length; i++) {
3904 + var dependency = dependencies[i];
3905 + if (!(isListening.hasOwnProperty(dependency) && isListening[dependency])) {
3906 + if (dependency === 'topWheel') {
3907 + if (isEventSupported('wheel')) {
3908 + ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topWheel', 'wheel', mountAt);
3909 + } else if (isEventSupported('mousewheel')) {
3910 + ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topWheel', 'mousewheel', mountAt);
3911 + } else {
3912 + // Firefox needs to capture a different mouse scroll event.
3913 + // @see http://www.quirksmode.org/dom/events/tests/scroll.html
3914 + ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topWheel', 'DOMMouseScroll', mountAt);
3915 + }
3916 + } else if (dependency === 'topScroll') {
3917 +
3918 + if (isEventSupported('scroll', true)) {
3919 + ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent('topScroll', 'scroll', mountAt);
3920 + } else {
3921 + ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topScroll', 'scroll', ReactBrowserEventEmitter.ReactEventListener.WINDOW_HANDLE);
3922 + }
3923 + } else if (dependency === 'topFocus' || dependency === 'topBlur') {
3924 +
3925 + if (isEventSupported('focus', true)) {
3926 + ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent('topFocus', 'focus', mountAt);
3927 + ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent('topBlur', 'blur', mountAt);
3928 + } else if (isEventSupported('focusin')) {
3929 + // IE has `focusin` and `focusout` events which bubble.
3930 + // @see http://www.quirksmode.org/blog/archives/2008/04/delegating_the.html
3931 + ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topFocus', 'focusin', mountAt);
3932 + ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topBlur', 'focusout', mountAt);
3933 + }
3934 +
3935 + // to make sure blur and focus event listeners are only attached once
3936 + isListening.topBlur = true;
3937 + isListening.topFocus = true;
3938 + } else if (topEventMapping.hasOwnProperty(dependency)) {
3939 + ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(dependency, topEventMapping[dependency], mountAt);
3940 + }
3941 +
3942 + isListening[dependency] = true;
3943 + }
3944 + }
3945 + },
3946 +
3947 + isListeningToAllDependencies: function (registrationName, mountAt) {
3948 + var isListening = getListeningForDocument(mountAt);
3949 + var dependencies = EventPluginRegistry.registrationNameDependencies[registrationName];
3950 + for (var i = 0; i < dependencies.length; i++) {
3951 + var dependency = dependencies[i];
3952 + if (!(isListening.hasOwnProperty(dependency) && isListening[dependency])) {
3953 + return false;
3954 + }
3955 + }
3956 + return true;
3957 + },
3958 +
3959 + trapBubbledEvent: function (topLevelType, handlerBaseName, handle) {
3960 + return ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelType, handlerBaseName, handle);
3961 + },
3962 +
3963 + trapCapturedEvent: function (topLevelType, handlerBaseName, handle) {
3964 + return ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent(topLevelType, handlerBaseName, handle);
3965 + },
3966 +
3967 + /**
3968 + * Protect against document.createEvent() returning null
3969 + * Some popup blocker extensions appear to do this:
3970 + * https://github.com/facebook/react/issues/6887
3971 + */
3972 + supportsEventPageXY: function () {
3973 + if (!document.createEvent) {
3974 + return false;
3975 + }
3976 + var ev = document.createEvent('MouseEvent');
3977 + return ev != null && 'pageX' in ev;
3978 + },
3979 +
3980 + /**
3981 + * Listens to window scroll and resize events. We cache scroll values so that
3982 + * application code can access them without triggering reflows.
3983 + *
3984 + * ViewportMetrics is only used by SyntheticMouse/TouchEvent and only when
3985 + * pageX/pageY isn't supported (legacy browsers).
3986 + *
3987 + * NOTE: Scroll events do not bubble.
3988 + *
3989 + * @see http://www.quirksmode.org/dom/events/scroll.html
3990 + */
3991 + ensureScrollValueMonitoring: function () {
3992 + if (hasEventPageXY === undefined) {
3993 + hasEventPageXY = ReactBrowserEventEmitter.supportsEventPageXY();
3994 + }
3995 + if (!hasEventPageXY && !isMonitoringScrollValue) {
3996 + var refresh = ViewportMetrics.refreshScrollValues;
3997 + ReactBrowserEventEmitter.ReactEventListener.monitorScrollValue(refresh);
3998 + isMonitoringScrollValue = true;
3999 + }
4000 + }
4001 +
4002 +});
4003 +
4004 +module.exports = ReactBrowserEventEmitter;
4005 +},{"106":106,"127":127,"130":130,"165":165,"18":18,"58":58}],26:[function(_dereq_,module,exports){
4006 +(function (process){
4007 +/**
4008 + * Copyright 2014-present, Facebook, Inc.
4009 + * All rights reserved.
4010 + *
4011 + * This source code is licensed under the BSD-style license found in the
4012 + * LICENSE file in the root directory of this source tree. An additional grant
4013 + * of patent rights can be found in the PATENTS file in the same directory.
4014 + *
4015 + */
4016 +
4017 +'use strict';
4018 +
4019 +var KeyEscapeUtils = _dereq_(23);
4020 +var ReactFeatureFlags = _dereq_(60);
4021 +var ReactReconciler = _dereq_(77);
4022 +
4023 +var instantiateReactComponent = _dereq_(129);
4024 +var shouldUpdateReactComponent = _dereq_(136);
4025 +var traverseAllChildren = _dereq_(137);
4026 +var warning = _dereq_(164);
4027 +
4028 +var ReactComponentTreeHook;
4029 +
4030 +if (typeof process !== 'undefined' && process.env && "development" === 'test') {
4031 + // Temporary hack.
4032 + // Inline requires don't work well with Jest:
4033 + // https://github.com/facebook/react/issues/7240
4034 + // Remove the inline requires when we don't need them anymore:
4035 + // https://github.com/facebook/react/pull/7178
4036 + ReactComponentTreeHook = _dereq_(139);
4037 +}
4038 +
4039 +function instantiateChild(childInstances, child, name, selfDebugID) {
4040 + // We found a component instance.
4041 + var keyUnique = childInstances[name] === undefined;
4042 + if ("development" !== 'production') {
4043 + if (!ReactComponentTreeHook) {
4044 + ReactComponentTreeHook = _dereq_(139);
4045 + }
4046 + if (!keyUnique) {
4047 + "development" !== 'production' ? warning(false, 'flattenChildren(...): Encountered two children with the same key, ' + '`%s`. Child keys must be unique; when two children share a key, only ' + 'the first child will be used.%s', KeyEscapeUtils.unescape(name), ReactComponentTreeHook.getStackAddendumByID(selfDebugID)) : void 0;
4048 + }
4049 + }
4050 + if (child != null && keyUnique) {
4051 + childInstances[name] = instantiateReactComponent(child, true);
4052 + }
4053 +}
4054 +
4055 +/**
4056 + * ReactChildReconciler provides helpers for initializing or updating a set of
4057 + * children. Its output is suitable for passing it onto ReactMultiChild which
4058 + * does diffed reordering and insertion.
4059 + */
4060 +var ReactChildReconciler = {
4061 + /**
4062 + * Generates a "mount image" for each of the supplied children. In the case
4063 + * of `ReactDOMComponent`, a mount image is a string of markup.
4064 + *
4065 + * @param {?object} nestedChildNodes Nested child maps.
4066 + * @return {?object} A set of child instances.
4067 + * @internal
4068 + */
4069 + instantiateChildren: function (nestedChildNodes, transaction, context, selfDebugID // 0 in production and for roots
4070 + ) {
4071 + if (nestedChildNodes == null) {
4072 + return null;
4073 + }
4074 + var childInstances = {};
4075 +
4076 + if ("development" !== 'production') {
4077 + traverseAllChildren(nestedChildNodes, function (childInsts, child, name) {
4078 + return instantiateChild(childInsts, child, name, selfDebugID);
4079 + }, childInstances);
4080 + } else {
4081 + traverseAllChildren(nestedChildNodes, instantiateChild, childInstances);
4082 + }
4083 + return childInstances;
4084 + },
4085 +
4086 + /**
4087 + * Updates the rendered children and returns a new set of children.
4088 + *
4089 + * @param {?object} prevChildren Previously initialized set of children.
4090 + * @param {?object} nextChildren Flat child element maps.
4091 + * @param {ReactReconcileTransaction} transaction
4092 + * @param {object} context
4093 + * @return {?object} A new set of child instances.
4094 + * @internal
4095 + */
4096 + updateChildren: function (prevChildren, nextChildren, mountImages, removedNodes, transaction, hostParent, hostContainerInfo, context, selfDebugID // 0 in production and for roots
4097 + ) {
4098 + // We currently don't have a way to track moves here but if we use iterators
4099 + // instead of for..in we can zip the iterators and check if an item has
4100 + // moved.
4101 + // TODO: If nothing has changed, return the prevChildren object so that we
4102 + // can quickly bailout if nothing has changed.
4103 + if (!nextChildren && !prevChildren) {
4104 + return;
4105 + }
4106 + var name;
4107 + var prevChild;
4108 + for (name in nextChildren) {
4109 + if (!nextChildren.hasOwnProperty(name)) {
4110 + continue;
4111 + }
4112 + prevChild = prevChildren && prevChildren[name];
4113 + var prevElement = prevChild && prevChild._currentElement;
4114 + var nextElement = nextChildren[name];
4115 + if (prevChild != null && shouldUpdateReactComponent(prevElement, nextElement)) {
4116 + ReactReconciler.receiveComponent(prevChild, nextElement, transaction, context);
4117 + nextChildren[name] = prevChild;
4118 + } else {
4119 + if (!ReactFeatureFlags.prepareNewChildrenBeforeUnmountInStack && prevChild) {
4120 + removedNodes[name] = ReactReconciler.getHostNode(prevChild);
4121 + ReactReconciler.unmountComponent(prevChild, false, /* safely */
4122 + false /* skipLifecycle */
4123 + );
4124 + }
4125 + // The child must be instantiated before it's mounted.
4126 + var nextChildInstance = instantiateReactComponent(nextElement, true);
4127 + nextChildren[name] = nextChildInstance;
4128 + // Creating mount image now ensures refs are resolved in right order
4129 + // (see https://github.com/facebook/react/pull/7101 for explanation).
4130 + var nextChildMountImage = ReactReconciler.mountComponent(nextChildInstance, transaction, hostParent, hostContainerInfo, context, selfDebugID);
4131 + mountImages.push(nextChildMountImage);
4132 + if (ReactFeatureFlags.prepareNewChildrenBeforeUnmountInStack && prevChild) {
4133 + removedNodes[name] = ReactReconciler.getHostNode(prevChild);
4134 + ReactReconciler.unmountComponent(prevChild, false, /* safely */
4135 + false /* skipLifecycle */
4136 + );
4137 + }
4138 + }
4139 + }
4140 + // Unmount children that are no longer present.
4141 + for (name in prevChildren) {
4142 + if (prevChildren.hasOwnProperty(name) && !(nextChildren && nextChildren.hasOwnProperty(name))) {
4143 + prevChild = prevChildren[name];
4144 + removedNodes[name] = ReactReconciler.getHostNode(prevChild);
4145 + ReactReconciler.unmountComponent(prevChild, false, /* safely */
4146 + false /* skipLifecycle */
4147 + );
4148 + }
4149 + }
4150 + },
4151 +
4152 + /**
4153 + * Unmounts all rendered children. This should be used to clean up children
4154 + * when this component is unmounted.
4155 + *
4156 + * @param {?object} renderedChildren Previously initialized set of children.
4157 + * @internal
4158 + */
4159 + unmountChildren: function (renderedChildren, safely, skipLifecycle) {
4160 + for (var name in renderedChildren) {
4161 + if (renderedChildren.hasOwnProperty(name)) {
4162 + var renderedChild = renderedChildren[name];
4163 + ReactReconciler.unmountComponent(renderedChild, safely, skipLifecycle);
4164 + }
4165 + }
4166 + }
4167 +
4168 +};
4169 +
4170 +module.exports = ReactChildReconciler;
4171 +}).call(this,undefined)
4172 +},{"129":129,"136":136,"137":137,"139":139,"164":164,"23":23,"60":60,"77":77}],27:[function(_dereq_,module,exports){
4173 +/**
4174 + * Copyright 2013-present, Facebook, Inc.
4175 + * All rights reserved.
4176 + *
4177 + * This source code is licensed under the BSD-style license found in the
4178 + * LICENSE file in the root directory of this source tree. An additional grant
4179 + * of patent rights can be found in the PATENTS file in the same directory.
4180 + *
4181 + */
4182 +
4183 +'use strict';
4184 +
4185 +var DOMChildrenOperations = _dereq_(8);
4186 +var ReactDOMIDOperations = _dereq_(39);
4187 +
4188 +/**
4189 + * Abstracts away all functionality of the reconciler that requires knowledge of
4190 + * the browser context. TODO: These callers should be refactored to avoid the
4191 + * need for this injection.
4192 + */
4193 +var ReactComponentBrowserEnvironment = {
4194 +
4195 + processChildrenUpdates: ReactDOMIDOperations.dangerouslyProcessChildrenUpdates,
4196 +
4197 + replaceNodeWithMarkup: DOMChildrenOperations.dangerouslyReplaceNodeWithMarkup
4198 +
4199 +};
4200 +
4201 +module.exports = ReactComponentBrowserEnvironment;
4202 +},{"39":39,"8":8}],28:[function(_dereq_,module,exports){
4203 +/**
4204 + * Copyright 2014-present, Facebook, Inc.
4205 + * All rights reserved.
4206 + *
4207 + * This source code is licensed under the BSD-style license found in the
4208 + * LICENSE file in the root directory of this source tree. An additional grant
4209 + * of patent rights can be found in the PATENTS file in the same directory.
4210 + *
4211 + *
4212 + */
4213 +
4214 +'use strict';
4215 +
4216 +var _prodInvariant = _dereq_(133);
4217 +
4218 +var invariant = _dereq_(157);
4219 +
4220 +var injected = false;
4221 +
4222 +var ReactComponentEnvironment = {
4223 +
4224 + /**
4225 + * Optionally injectable hook for swapping out mount images in the middle of
4226 + * the tree.
4227 + */
4228 + replaceNodeWithMarkup: null,
4229 +
4230 + /**
4231 + * Optionally injectable hook for processing a queue of child updates. Will
4232 + * later move into MultiChildComponents.
4233 + */
4234 + processChildrenUpdates: null,
4235 +
4236 + injection: {
4237 + injectEnvironment: function (environment) {
4238 + !!injected ? "development" !== 'production' ? invariant(false, 'ReactCompositeComponent: injectEnvironment() can only be called once.') : _prodInvariant('104') : void 0;
4239 + ReactComponentEnvironment.replaceNodeWithMarkup = environment.replaceNodeWithMarkup;
4240 + ReactComponentEnvironment.processChildrenUpdates = environment.processChildrenUpdates;
4241 + injected = true;
4242 + }
4243 + }
4244 +
4245 +};
4246 +
4247 +module.exports = ReactComponentEnvironment;
4248 +},{"133":133,"157":157}],29:[function(_dereq_,module,exports){
4249 +/**
4250 + * Copyright 2013-present, Facebook, Inc.
4251 + * All rights reserved.
4252 + *
4253 + * This source code is licensed under the BSD-style license found in the
4254 + * LICENSE file in the root directory of this source tree. An additional grant
4255 + * of patent rights can be found in the PATENTS file in the same directory.
4256 + *
4257 + */
4258 +
4259 +'use strict';
4260 +
4261 +var _prodInvariant = _dereq_(133),
4262 + _assign = _dereq_(165);
4263 +
4264 +var React = _dereq_(141);
4265 +var ReactComponentEnvironment = _dereq_(28);
4266 +var ReactCurrentOwner = _dereq_(140);
4267 +var ReactErrorUtils = _dereq_(57);
4268 +var ReactFeatureFlags = _dereq_(60);
4269 +var ReactInstanceMap = _dereq_(66);
4270 +var ReactInstrumentation = _dereq_(67);
4271 +var ReactNodeTypes = _dereq_(72);
4272 +var ReactReconciler = _dereq_(77);
4273 +
4274 +if ("development" !== 'production') {
4275 + var checkReactTypeSpec = _dereq_(109);
4276 +}
4277 +
4278 +var emptyObject = _dereq_(150);
4279 +var invariant = _dereq_(157);
4280 +var shallowEqual = _dereq_(163);
4281 +var shouldUpdateReactComponent = _dereq_(136);
4282 +var warning = _dereq_(164);
4283 +
4284 +var CompositeTypes = {
4285 + ImpureClass: 0,
4286 + PureClass: 1,
4287 + StatelessFunctional: 2
4288 +};
4289 +
4290 +function StatelessComponent(Component) {}
4291 +StatelessComponent.prototype.render = function () {
4292 + var Component = ReactInstanceMap.get(this)._currentElement.type;
4293 + var element = Component(this.props, this.context, this.updater);
4294 + warnIfInvalidElement(Component, element);
4295 + return element;
4296 +};
4297 +
4298 +function warnIfInvalidElement(Component, element) {
4299 + if ("development" !== 'production') {
4300 + "development" !== 'production' ? warning(element === null || element === false || React.isValidElement(element), '%s(...): A valid React element (or null) must be returned. You may have ' + 'returned undefined, an array or some other invalid object.', Component.displayName || Component.name || 'Component') : void 0;
4301 + "development" !== 'production' ? warning(!Component.childContextTypes, '%s(...): childContextTypes cannot be defined on a functional component.', Component.displayName || Component.name || 'Component') : void 0;
4302 + }
4303 +}
4304 +
4305 +function shouldConstruct(Component) {
4306 + return !!(Component.prototype && Component.prototype.isReactComponent);
4307 +}
4308 +
4309 +function isPureComponent(Component) {
4310 + return !!(Component.prototype && Component.prototype.isPureReactComponent);
4311 +}
4312 +
4313 +// Separated into a function to contain deoptimizations caused by try/finally.
4314 +function measureLifeCyclePerf(fn, debugID, timerType) {
4315 + if (debugID === 0) {
4316 + // Top-level wrappers (see ReactMount) and empty components (see
4317 + // ReactDOMEmptyComponent) are invisible to hooks and devtools.
4318 + // Both are implementation details that should go away in the future.
4319 + return fn();
4320 + }
4321 +
4322 + ReactInstrumentation.debugTool.onBeginLifeCycleTimer(debugID, timerType);
4323 + try {
4324 + return fn();
4325 + } finally {
4326 + ReactInstrumentation.debugTool.onEndLifeCycleTimer(debugID, timerType);
4327 + }
4328 +}
4329 +
4330 +/**
4331 + * ------------------ The Life-Cycle of a Composite Component ------------------
4332 + *
4333 + * - constructor: Initialization of state. The instance is now retained.
4334 + * - componentWillMount
4335 + * - render
4336 + * - [children's constructors]
4337 + * - [children's componentWillMount and render]
4338 + * - [children's componentDidMount]
4339 + * - componentDidMount
4340 + *
4341 + * Update Phases:
4342 + * - componentWillReceiveProps (only called if parent updated)
4343 + * - shouldComponentUpdate
4344 + * - componentWillUpdate
4345 + * - render
4346 + * - [children's constructors or receive props phases]
4347 + * - componentDidUpdate
4348 + *
4349 + * - componentWillUnmount
4350 + * - [children's componentWillUnmount]
4351 + * - [children destroyed]
4352 + * - (destroyed): The instance is now blank, released by React and ready for GC.
4353 + *
4354 + * -----------------------------------------------------------------------------
4355 + */
4356 +
4357 +/**
4358 + * An incrementing ID assigned to each component when it is mounted. This is
4359 + * used to enforce the order in which `ReactUpdates` updates dirty components.
4360 + *
4361 + * @private
4362 + */
4363 +var nextMountID = 1;
4364 +
4365 +/**
4366 + * @lends {ReactCompositeComponent.prototype}
4367 + */
4368 +var ReactCompositeComponent = {
4369 +
4370 + /**
4371 + * Base constructor for all composite component.
4372 + *
4373 + * @param {ReactElement} element
4374 + * @final
4375 + * @internal
4376 + */
4377 + construct: function (element) {
4378 + this._currentElement = element;
4379 + this._rootNodeID = 0;
4380 + this._compositeType = null;
4381 + this._instance = null;
4382 + this._hostParent = null;
4383 + this._hostContainerInfo = null;
4384 +
4385 + // See ReactUpdateQueue
4386 + this._updateBatchNumber = null;
4387 + this._pendingElement = null;
4388 + this._pendingStateQueue = null;
4389 + this._pendingReplaceState = false;
4390 + this._pendingForceUpdate = false;
4391 +
4392 + this._renderedNodeType = null;
4393 + this._renderedComponent = null;
4394 + this._context = null;
4395 + this._mountOrder = 0;
4396 + this._topLevelWrapper = null;
4397 +
4398 + // See ReactUpdates and ReactUpdateQueue.
4399 + this._pendingCallbacks = null;
4400 +
4401 + // ComponentWillUnmount shall only be called once
4402 + this._calledComponentWillUnmount = false;
4403 +
4404 + if ("development" !== 'production') {
4405 + this._warnedAboutRefsInRender = false;
4406 + }
4407 + },
4408 +
4409 + /**
4410 + * Initializes the component, renders markup, and registers event listeners.
4411 + *
4412 + * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction
4413 + * @param {?object} hostParent
4414 + * @param {?object} hostContainerInfo
4415 + * @param {?object} context
4416 + * @return {?string} Rendered markup to be inserted into the DOM.
4417 + * @final
4418 + * @internal
4419 + */
4420 + mountComponent: function (transaction, hostParent, hostContainerInfo, context) {
4421 + var _this = this;
4422 +
4423 + this._context = context;
4424 + this._mountOrder = nextMountID++;
4425 + this._hostParent = hostParent;
4426 + this._hostContainerInfo = hostContainerInfo;
4427 +
4428 + var publicProps = this._currentElement.props;
4429 + var publicContext = this._processContext(context);
4430 +
4431 + var Component = this._currentElement.type;
4432 +
4433 + var updateQueue = transaction.getUpdateQueue();
4434 +
4435 + // Initialize the public class
4436 + var doConstruct = shouldConstruct(Component);
4437 + var inst = this._constructComponent(doConstruct, publicProps, publicContext, updateQueue);
4438 + var renderedElement;
4439 +
4440 + // Support functional components
4441 + if (!doConstruct && (inst == null || inst.render == null)) {
4442 + renderedElement = inst;
4443 + warnIfInvalidElement(Component, renderedElement);
4444 + !(inst === null || inst === false || React.isValidElement(inst)) ? "development" !== 'production' ? invariant(false, '%s(...): A valid React element (or null) must be returned. You may have returned undefined, an array or some other invalid object.', Component.displayName || Component.name || 'Component') : _prodInvariant('105', Component.displayName || Component.name || 'Component') : void 0;
4445 + inst = new StatelessComponent(Component);
4446 + this._compositeType = CompositeTypes.StatelessFunctional;
4447 + } else {
4448 + if (isPureComponent(Component)) {
4449 + this._compositeType = CompositeTypes.PureClass;
4450 + } else {
4451 + this._compositeType = CompositeTypes.ImpureClass;
4452 + }
4453 + }
4454 +
4455 + if ("development" !== 'production') {
4456 + // This will throw later in _renderValidatedComponent, but add an early
4457 + // warning now to help debugging
4458 + if (inst.render == null) {
4459 + "development" !== 'production' ? warning(false, '%s(...): No `render` method found on the returned component ' + 'instance: you may have forgotten to define `render`.', Component.displayName || Component.name || 'Component') : void 0;
4460 + }
4461 +
4462 + var propsMutated = inst.props !== publicProps;
4463 + var componentName = Component.displayName || Component.name || 'Component';
4464 +
4465 + "development" !== 'production' ? warning(inst.props === undefined || !propsMutated, '%s(...): When calling super() in `%s`, make sure to pass ' + 'up the same props that your component\'s constructor was passed.', componentName, componentName) : void 0;
4466 + }
4467 +
4468 + // These should be set up in the constructor, but as a convenience for
4469 + // simpler class abstractions, we set them up after the fact.
4470 + inst.props = publicProps;
4471 + inst.context = publicContext;
4472 + inst.refs = emptyObject;
4473 + inst.updater = updateQueue;
4474 +
4475 + this._instance = inst;
4476 +
4477 + // Store a reference from the instance back to the internal representation
4478 + ReactInstanceMap.set(inst, this);
4479 +
4480 + if ("development" !== 'production') {
4481 + // Since plain JS classes are defined without any special initialization
4482 + // logic, we can not catch common errors early. Therefore, we have to
4483 + // catch them here, at initialization time, instead.
4484 + "development" !== 'production' ? warning(!inst.getInitialState || inst.getInitialState.isReactClassApproved || inst.state, 'getInitialState was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Did you mean to define a state property instead?', this.getName() || 'a component') : void 0;
4485 + "development" !== 'production' ? warning(!inst.getDefaultProps || inst.getDefaultProps.isReactClassApproved, 'getDefaultProps was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Use a static property to define defaultProps instead.', this.getName() || 'a component') : void 0;
4486 + "development" !== 'production' ? warning(!inst.propTypes, 'propTypes was defined as an instance property on %s. Use a static ' + 'property to define propTypes instead.', this.getName() || 'a component') : void 0;
4487 + "development" !== 'production' ? warning(!inst.contextTypes, 'contextTypes was defined as an instance property on %s. Use a ' + 'static property to define contextTypes instead.', this.getName() || 'a component') : void 0;
4488 + "development" !== 'production' ? warning(typeof inst.componentShouldUpdate !== 'function', '%s has a method called ' + 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + 'The name is phrased as a question because the function is ' + 'expected to return a value.', this.getName() || 'A component') : void 0;
4489 + "development" !== 'production' ? warning(typeof inst.componentDidUnmount !== 'function', '%s has a method called ' + 'componentDidUnmount(). But there is no such lifecycle method. ' + 'Did you mean componentWillUnmount()?', this.getName() || 'A component') : void 0;
4490 + "development" !== 'production' ? warning(typeof inst.componentWillRecieveProps !== 'function', '%s has a method called ' + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', this.getName() || 'A component') : void 0;
4491 + }
4492 +
4493 + var initialState = inst.state;
4494 + if (initialState === undefined) {
4495 + inst.state = initialState = null;
4496 + }
4497 + !(typeof initialState === 'object' && !Array.isArray(initialState)) ? "development" !== 'production' ? invariant(false, '%s.state: must be set to an object or null', this.getName() || 'ReactCompositeComponent') : _prodInvariant('106', this.getName() || 'ReactCompositeComponent') : void 0;
4498 +
4499 + this._pendingStateQueue = null;
4500 + this._pendingReplaceState = false;
4501 + this._pendingForceUpdate = false;
4502 +
4503 + if (inst.componentWillMount) {
4504 + if ("development" !== 'production') {
4505 + measureLifeCyclePerf(function () {
4506 + return inst.componentWillMount();
4507 + }, this._debugID, 'componentWillMount');
4508 + } else {
4509 + inst.componentWillMount();
4510 + }
4511 + // When mounting, calls to `setState` by `componentWillMount` will set
4512 + // `this._pendingStateQueue` without triggering a re-render.
4513 + if (this._pendingStateQueue) {
4514 + inst.state = this._processPendingState(inst.props, inst.context);
4515 + }
4516 + }
4517 +
4518 + var markup;
4519 + if (inst.unstable_handleError) {
4520 + markup = this.performInitialMountWithErrorHandling(renderedElement, hostParent, hostContainerInfo, transaction, context);
4521 + } else {
4522 + markup = this.performInitialMount(renderedElement, hostParent, hostContainerInfo, transaction, context);
4523 + }
4524 +
4525 + if (inst.componentDidMount) {
4526 + if ("development" !== 'production') {
4527 + transaction.getReactMountReady().enqueue(function () {
4528 + measureLifeCyclePerf(function () {
4529 + return inst.componentDidMount();
4530 + }, _this._debugID, 'componentDidMount');
4531 + });
4532 + } else {
4533 + transaction.getReactMountReady().enqueue(inst.componentDidMount, inst);
4534 + }
4535 + }
4536 +
4537 + // setState callbacks during willMount should end up here
4538 + var callbacks = this._pendingCallbacks;
4539 + if (callbacks) {
4540 + this._pendingCallbacks = null;
4541 + for (var i = 0; i < callbacks.length; i++) {
4542 + transaction.getReactMountReady().enqueue(callbacks[i], inst);
4543 + }
4544 + }
4545 +
4546 + return markup;
4547 + },
4548 +
4549 + _constructComponent: function (doConstruct, publicProps, publicContext, updateQueue) {
4550 + if ("development" !== 'production') {
4551 + ReactCurrentOwner.current = this;
4552 + try {
4553 + return this._constructComponentWithoutOwner(doConstruct, publicProps, publicContext, updateQueue);
4554 + } finally {
4555 + ReactCurrentOwner.current = null;
4556 + }
4557 + } else {
4558 + return this._constructComponentWithoutOwner(doConstruct, publicProps, publicContext, updateQueue);
4559 + }
4560 + },
4561 +
4562 + _constructComponentWithoutOwner: function (doConstruct, publicProps, publicContext, updateQueue) {
4563 + var Component = this._currentElement.type;
4564 +
4565 + if (doConstruct) {
4566 + if ("development" !== 'production') {
4567 + return measureLifeCyclePerf(function () {
4568 + return new Component(publicProps, publicContext, updateQueue);
4569 + }, this._debugID, 'ctor');
4570 + } else {
4571 + return new Component(publicProps, publicContext, updateQueue);
4572 + }
4573 + }
4574 +
4575 + // This can still be an instance in case of factory components
4576 + // but we'll count this as time spent rendering as the more common case.
4577 + if ("development" !== 'production') {
4578 + return measureLifeCyclePerf(function () {
4579 + return Component(publicProps, publicContext, updateQueue);
4580 + }, this._debugID, 'render');
4581 + } else {
4582 + return Component(publicProps, publicContext, updateQueue);
4583 + }
4584 + },
4585 +
4586 + performInitialMountWithErrorHandling: function (renderedElement, hostParent, hostContainerInfo, transaction, context) {
4587 + var markup;
4588 + var checkpoint = transaction.checkpoint();
4589 + try {
4590 + markup = this.performInitialMount(renderedElement, hostParent, hostContainerInfo, transaction, context);
4591 + } catch (e) {
4592 + // Roll back to checkpoint, handle error (which may add items to the transaction), and take a new checkpoint
4593 + transaction.rollback(checkpoint);
4594 + this._instance.unstable_handleError(e);
4595 + if (this._pendingStateQueue) {
4596 + this._instance.state = this._processPendingState(this._instance.props, this._instance.context);
4597 + }
4598 + checkpoint = transaction.checkpoint();
4599 + this._renderedComponent.unmountComponent(true, /* safely */
4600 + // Don't call componentWillUnmount() because they never fully mounted:
4601 + true /* skipLifecyle */
4602 + );
4603 + transaction.rollback(checkpoint);
4604 +
4605 + // Try again - we've informed the component about the error, so they can render an error message this time.
4606 + // If this throws again, the error will bubble up (and can be caught by a higher error boundary).
4607 + markup = this.performInitialMount(renderedElement, hostParent, hostContainerInfo, transaction, context);
4608 + }
4609 + return markup;
4610 + },
4611 +
4612 + performInitialMount: function (renderedElement, hostParent, hostContainerInfo, transaction, context) {
4613 + // If not a stateless component, we now render
4614 + if (renderedElement === undefined) {
4615 + renderedElement = this._renderValidatedComponent();
4616 + }
4617 +
4618 + var nodeType = ReactNodeTypes.getType(renderedElement);
4619 + this._renderedNodeType = nodeType;
4620 + var child = this._instantiateReactComponent(renderedElement, nodeType !== ReactNodeTypes.EMPTY /* shouldHaveDebugID */
4621 + );
4622 + this._renderedComponent = child;
4623 +
4624 + var debugID = 0;
4625 + if ("development" !== 'production') {
4626 + debugID = this._debugID;
4627 + }
4628 +
4629 + var markup = ReactReconciler.mountComponent(child, transaction, hostParent, hostContainerInfo, this._processChildContext(context), debugID);
4630 +
4631 + if ("development" !== 'production') {
4632 + if (debugID !== 0) {
4633 + var childDebugIDs = child._debugID !== 0 ? [child._debugID] : [];
4634 + ReactInstrumentation.debugTool.onSetChildren(debugID, childDebugIDs);
4635 + }
4636 + }
4637 +
4638 + return markup;
4639 + },
4640 +
4641 + getHostNode: function () {
4642 + return ReactReconciler.getHostNode(this._renderedComponent);
4643 + },
4644 +
4645 + /**
4646 + * Releases any resources allocated by `mountComponent`.
4647 + *
4648 + * @final
4649 + * @internal
4650 + */
4651 + unmountComponent: function (safely, skipLifecycle) {
4652 + if (!this._renderedComponent) {
4653 + return;
4654 + }
4655 +
4656 + var inst = this._instance;
4657 +
4658 + if (inst.componentWillUnmount && !inst._calledComponentWillUnmount) {
4659 + inst._calledComponentWillUnmount = true;
4660 +
4661 + if (safely) {
4662 + if (!skipLifecycle) {
4663 + var name = this.getName() + '.componentWillUnmount()';
4664 + ReactErrorUtils.invokeGuardedCallback(name, inst.componentWillUnmount.bind(inst));
4665 + }
4666 + } else {
4667 + if ("development" !== 'production') {
4668 + measureLifeCyclePerf(function () {
4669 + return inst.componentWillUnmount();
4670 + }, this._debugID, 'componentWillUnmount');
4671 + } else {
4672 + inst.componentWillUnmount();
4673 + }
4674 + }
4675 + }
4676 +
4677 + if (this._renderedComponent) {
4678 + ReactReconciler.unmountComponent(this._renderedComponent, safely, skipLifecycle);
4679 + this._renderedNodeType = null;
4680 + this._renderedComponent = null;
4681 + this._instance = null;
4682 + }
4683 +
4684 + // Reset pending fields
4685 + // Even if this component is scheduled for another update in ReactUpdates,
4686 + // it would still be ignored because these fields are reset.
4687 + this._pendingStateQueue = null;
4688 + this._pendingReplaceState = false;
4689 + this._pendingForceUpdate = false;
4690 + this._pendingCallbacks = null;
4691 + this._pendingElement = null;
4692 +
4693 + // These fields do not really need to be reset since this object is no
4694 + // longer accessible.
4695 + this._context = null;
4696 + this._rootNodeID = 0;
4697 + this._topLevelWrapper = null;
4698 +
4699 + // Delete the reference from the instance to this internal representation
4700 + // which allow the internals to be properly cleaned up even if the user
4701 + // leaks a reference to the public instance.
4702 + ReactInstanceMap.remove(inst);
4703 +
4704 + // Some existing components rely on inst.props even after they've been
4705 + // destroyed (in event handlers).
4706 + // TODO: inst.props = null;
4707 + // TODO: inst.state = null;
4708 + // TODO: inst.context = null;
4709 + },
4710 +
4711 + /**
4712 + * Filters the context object to only contain keys specified in
4713 + * `contextTypes`
4714 + *
4715 + * @param {object} context
4716 + * @return {?object}
4717 + * @private
4718 + */
4719 + _maskContext: function (context) {
4720 + var Component = this._currentElement.type;
4721 + var contextTypes = Component.contextTypes;
4722 + if (!contextTypes) {
4723 + return emptyObject;
4724 + }
4725 + var maskedContext = {};
4726 + for (var contextName in contextTypes) {
4727 + maskedContext[contextName] = context[contextName];
4728 + }
4729 + return maskedContext;
4730 + },
4731 +
4732 + /**
4733 + * Filters the context object to only contain keys specified in
4734 + * `contextTypes`, and asserts that they are valid.
4735 + *
4736 + * @param {object} context
4737 + * @return {?object}
4738 + * @private
4739 + */
4740 + _processContext: function (context) {
4741 + var maskedContext = this._maskContext(context);
4742 + if ("development" !== 'production') {
4743 + var Component = this._currentElement.type;
4744 + if (Component.contextTypes) {
4745 + this._checkContextTypes(Component.contextTypes, maskedContext, 'context');
4746 + }
4747 + }
4748 + return maskedContext;
4749 + },
4750 +
4751 + /**
4752 + * @param {object} currentContext
4753 + * @return {object}
4754 + * @private
4755 + */
4756 + _processChildContext: function (currentContext) {
4757 + var Component = this._currentElement.type;
4758 + var inst = this._instance;
4759 + var childContext;
4760 +
4761 + if (typeof inst.getChildContext === 'function') {
4762 + if ("development" !== 'production') {
4763 + ReactInstrumentation.debugTool.onBeginProcessingChildContext();
4764 + try {
4765 + childContext = inst.getChildContext();
4766 + } finally {
4767 + ReactInstrumentation.debugTool.onEndProcessingChildContext();
4768 + }
4769 + } else {
4770 + childContext = inst.getChildContext();
4771 + }
4772 +
4773 + !(typeof Component.childContextTypes === 'object') ? "development" !== 'production' ? invariant(false, '%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().', this.getName() || 'ReactCompositeComponent') : _prodInvariant('107', this.getName() || 'ReactCompositeComponent') : void 0;
4774 + if ("development" !== 'production') {
4775 + this._checkContextTypes(Component.childContextTypes, childContext, 'childContext');
4776 + }
4777 + for (var name in childContext) {
4778 + !(name in Component.childContextTypes) ? "development" !== 'production' ? invariant(false, '%s.getChildContext(): key "%s" is not defined in childContextTypes.', this.getName() || 'ReactCompositeComponent', name) : _prodInvariant('108', this.getName() || 'ReactCompositeComponent', name) : void 0;
4779 + }
4780 + return _assign({}, currentContext, childContext);
4781 + }
4782 + return currentContext;
4783 + },
4784 +
4785 + /**
4786 + * Assert that the context types are valid
4787 + *
4788 + * @param {object} typeSpecs Map of context field to a ReactPropType
4789 + * @param {object} values Runtime values that need to be type-checked
4790 + * @param {string} location e.g. "prop", "context", "child context"
4791 + * @private
4792 + */
4793 + _checkContextTypes: function (typeSpecs, values, location) {
4794 + if ("development" !== 'production') {
4795 + checkReactTypeSpec(typeSpecs, values, location, this.getName(), null, this._debugID);
4796 + }
4797 + },
4798 +
4799 + receiveComponent: function (nextElement, transaction, nextContext) {
4800 + var prevElement = this._currentElement;
4801 + var prevContext = this._context;
4802 +
4803 + this._pendingElement = null;
4804 +
4805 + this.updateComponent(transaction, prevElement, nextElement, prevContext, nextContext);
4806 + },
4807 +
4808 + /**
4809 + * If any of `_pendingElement`, `_pendingStateQueue`, or `_pendingForceUpdate`
4810 + * is set, update the component.
4811 + *
4812 + * @param {ReactReconcileTransaction} transaction
4813 + * @internal
4814 + */
4815 + performUpdateIfNecessary: function (transaction) {
4816 + if (this._pendingElement != null) {
4817 + ReactReconciler.receiveComponent(this, this._pendingElement, transaction, this._context);
4818 + } else if (this._pendingStateQueue !== null || this._pendingForceUpdate) {
4819 + this.updateComponent(transaction, this._currentElement, this._currentElement, this._context, this._context);
4820 + } else {
4821 + var callbacks = this._pendingCallbacks;
4822 + this._pendingCallbacks = null;
4823 + if (callbacks) {
4824 + for (var j = 0; j < callbacks.length; j++) {
4825 + transaction.getReactMountReady().enqueue(callbacks[j], this.getPublicInstance());
4826 + }
4827 + }
4828 + this._updateBatchNumber = null;
4829 + }
4830 + },
4831 +
4832 + /**
4833 + * Perform an update to a mounted component. The componentWillReceiveProps and
4834 + * shouldComponentUpdate methods are called, then (assuming the update isn't
4835 + * skipped) the remaining update lifecycle methods are called and the DOM
4836 + * representation is updated.
4837 + *
4838 + * By default, this implements React's rendering and reconciliation algorithm.
4839 + * Sophisticated clients may wish to override this.
4840 + *
4841 + * @param {ReactReconcileTransaction} transaction
4842 + * @param {ReactElement} prevParentElement
4843 + * @param {ReactElement} nextParentElement
4844 + * @internal
4845 + * @overridable
4846 + */
4847 + updateComponent: function (transaction, prevParentElement, nextParentElement, prevUnmaskedContext, nextUnmaskedContext) {
4848 + var inst = this._instance;
4849 + !(inst != null) ? "development" !== 'production' ? invariant(false, 'Attempted to update component `%s` that has already been unmounted (or failed to mount).', this.getName() || 'ReactCompositeComponent') : _prodInvariant('136', this.getName() || 'ReactCompositeComponent') : void 0;
4850 +
4851 + var willReceive = false;
4852 + var nextContext;
4853 +
4854 + // Determine if the context has changed or not
4855 + if (this._context === nextUnmaskedContext) {
4856 + nextContext = inst.context;
4857 + } else {
4858 + nextContext = this._processContext(nextUnmaskedContext);
4859 + willReceive = true;
4860 + }
4861 +
4862 + var prevProps = prevParentElement.props;
4863 + var nextProps = nextParentElement.props;
4864 +
4865 + // Not a simple state update but a props update
4866 + if (prevParentElement !== nextParentElement) {
4867 + willReceive = true;
4868 + }
4869 +
4870 + // An update here will schedule an update but immediately set
4871 + // _pendingStateQueue which will ensure that any state updates gets
4872 + // immediately reconciled instead of waiting for the next batch.
4873 + if (willReceive && inst.componentWillReceiveProps) {
4874 + if ("development" !== 'production') {
4875 + measureLifeCyclePerf(function () {
4876 + return inst.componentWillReceiveProps(nextProps, nextContext);
4877 + }, this._debugID, 'componentWillReceiveProps');
4878 + } else {
4879 + inst.componentWillReceiveProps(nextProps, nextContext);
4880 + }
4881 + }
4882 +
4883 + // If updating happens to enqueue any new updates, we shouldn't execute new
4884 + // callbacks until the next render happens, so stash the callbacks first.
4885 + var callbacks = this._pendingCallbacks;
4886 + this._pendingCallbacks = null;
4887 +
4888 + var nextState = this._processPendingState(nextProps, nextContext);
4889 + var shouldUpdate = true;
4890 +
4891 + if (!this._pendingForceUpdate) {
4892 + if (inst.shouldComponentUpdate) {
4893 + if ("development" !== 'production') {
4894 + shouldUpdate = measureLifeCyclePerf(function () {
4895 + return inst.shouldComponentUpdate(nextProps, nextState, nextContext);
4896 + }, this._debugID, 'shouldComponentUpdate');
4897 + } else {
4898 + shouldUpdate = inst.shouldComponentUpdate(nextProps, nextState, nextContext);
4899 + }
4900 + } else {
4901 + if (this._compositeType === CompositeTypes.PureClass) {
4902 + shouldUpdate = !shallowEqual(prevProps, nextProps) || !shallowEqual(inst.state, nextState);
4903 + }
4904 + }
4905 + }
4906 +
4907 + if ("development" !== 'production') {
4908 + "development" !== 'production' ? warning(shouldUpdate !== undefined, '%s.shouldComponentUpdate(): Returned undefined instead of a ' + 'boolean value. Make sure to return true or false.', this.getName() || 'ReactCompositeComponent') : void 0;
4909 + }
4910 +
4911 + this._updateBatchNumber = null;
4912 + if (shouldUpdate) {
4913 + this._pendingForceUpdate = false;
4914 + // Will set `this.props`, `this.state` and `this.context`.
4915 + this._performComponentUpdate(nextParentElement, nextProps, nextState, nextContext, transaction, nextUnmaskedContext);
4916 + } else {
4917 + // If it's determined that a component should not update, we still want
4918 + // to set props and state but we shortcut the rest of the update.
4919 + this._currentElement = nextParentElement;
4920 + this._context = nextUnmaskedContext;
4921 + inst.props = nextProps;
4922 + inst.state = nextState;
4923 + inst.context = nextContext;
4924 + }
4925 +
4926 + if (callbacks) {
4927 + for (var j = 0; j < callbacks.length; j++) {
4928 + transaction.getReactMountReady().enqueue(callbacks[j], this.getPublicInstance());
4929 + }
4930 + }
4931 + },
4932 +
4933 + _processPendingState: function (props, context) {
4934 + var inst = this._instance;
4935 + var queue = this._pendingStateQueue;
4936 + var replace = this._pendingReplaceState;
4937 + this._pendingReplaceState = false;
4938 + this._pendingStateQueue = null;
4939 +
4940 + if (!queue) {
4941 + return inst.state;
4942 + }
4943 +
4944 + if (replace && queue.length === 1) {
4945 + return queue[0];
4946 + }
4947 +
4948 + var nextState = _assign({}, replace ? queue[0] : inst.state);
4949 + for (var i = replace ? 1 : 0; i < queue.length; i++) {
4950 + var partial = queue[i];
4951 + _assign(nextState, typeof partial === 'function' ? partial.call(inst, nextState, props, context) : partial);
4952 + }
4953 +
4954 + return nextState;
4955 + },
4956 +
4957 + /**
4958 + * Merges new props and state, notifies delegate methods of update and
4959 + * performs update.
4960 + *
4961 + * @param {ReactElement} nextElement Next element
4962 + * @param {object} nextProps Next public object to set as properties.
4963 + * @param {?object} nextState Next object to set as state.
4964 + * @param {?object} nextContext Next public object to set as context.
4965 + * @param {ReactReconcileTransaction} transaction
4966 + * @param {?object} unmaskedContext
4967 + * @private
4968 + */
4969 + _performComponentUpdate: function (nextElement, nextProps, nextState, nextContext, transaction, unmaskedContext) {
4970 + var _this2 = this;
4971 +
4972 + var inst = this._instance;
4973 +
4974 + var hasComponentDidUpdate = Boolean(inst.componentDidUpdate);
4975 + var prevProps;
4976 + var prevState;
4977 + var prevContext;
4978 + if (hasComponentDidUpdate) {
4979 + prevProps = inst.props;
4980 + prevState = inst.state;
4981 + prevContext = inst.context;
4982 + }
4983 +
4984 + if (inst.componentWillUpdate) {
4985 + if ("development" !== 'production') {
4986 + measureLifeCyclePerf(function () {
4987 + return inst.componentWillUpdate(nextProps, nextState, nextContext);
4988 + }, this._debugID, 'componentWillUpdate');
4989 + } else {
4990 + inst.componentWillUpdate(nextProps, nextState, nextContext);
4991 + }
4992 + }
4993 +
4994 + this._currentElement = nextElement;
4995 + this._context = unmaskedContext;
4996 + inst.props = nextProps;
4997 + inst.state = nextState;
4998 + inst.context = nextContext;
4999 +

This file is too large to show in full.

fixtures/dom/public/react.js new
+3859
@@ -0,0 +1,3859 @@
1 + /**
2 + * React v16.0.0-alpha
3 + */
4 +(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.React = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){
5 +/**
6 + * Copyright 2013-present, Facebook, Inc.
7 + * All rights reserved.
8 + *
9 + * This source code is licensed under the BSD-style license found in the
10 + * LICENSE file in the root directory of this source tree. An additional grant
11 + * of patent rights can be found in the PATENTS file in the same directory.
12 + *
13 + *
14 + */
15 +
16 +'use strict';
17 +
18 +/**
19 + * Escape and wrap key so it is safe to use as a reactid
20 + *
21 + * @param {string} key to be escaped.
22 + * @return {string} the escaped key.
23 + */
24 +
25 +function escape(key) {
26 + var escapeRegex = /[=:]/g;
27 + var escaperLookup = {
28 + '=': '=0',
29 + ':': '=2'
30 + };
31 + var escapedString = ('' + key).replace(escapeRegex, function (match) {
32 + return escaperLookup[match];
33 + });
34 +
35 + return '$' + escapedString;
36 +}
37 +
38 +/**
39 + * Unescape and unwrap key for human-readable display
40 + *
41 + * @param {string} key to unescape.
42 + * @return {string} the unescaped key.
43 + */
44 +function unescape(key) {
45 + var unescapeRegex = /(=0|=2)/g;
46 + var unescaperLookup = {
47 + '=0': '=',
48 + '=2': ':'
49 + };
50 + var keySubstring = key[0] === '.' && key[1] === '$' ? key.substring(2) : key.substring(1);
51 +
52 + return ('' + keySubstring).replace(unescapeRegex, function (match) {
53 + return unescaperLookup[match];
54 + });
55 +}
56 +
57 +var KeyEscapeUtils = {
58 + escape: escape,
59 + unescape: unescape
60 +};
61 +
62 +module.exports = KeyEscapeUtils;
63 +},{}],2:[function(_dereq_,module,exports){
64 +/**
65 + * Copyright 2013-present, Facebook, Inc.
66 + * All rights reserved.
67 + *
68 + * This source code is licensed under the BSD-style license found in the
69 + * LICENSE file in the root directory of this source tree. An additional grant
70 + * of patent rights can be found in the PATENTS file in the same directory.
71 + *
72 + *
73 + */
74 +
75 +'use strict';
76 +
77 +var _prodInvariant = _dereq_(25);
78 +
79 +var invariant = _dereq_(29);
80 +
81 +/**
82 + * Static poolers. Several custom versions for each potential number of
83 + * arguments. A completely generic pooler is easy to implement, but would
84 + * require accessing the `arguments` object. In each of these, `this` refers to
85 + * the Class itself, not an instance. If any others are needed, simply add them
86 + * here, or in their own files.
87 + */
88 +var oneArgumentPooler = function (copyFieldsFrom) {
89 + var Klass = this;
90 + if (Klass.instancePool.length) {
91 + var instance = Klass.instancePool.pop();
92 + Klass.call(instance, copyFieldsFrom);
93 + return instance;
94 + } else {
95 + return new Klass(copyFieldsFrom);
96 + }
97 +};
98 +
99 +var twoArgumentPooler = function (a1, a2) {
100 + var Klass = this;
101 + if (Klass.instancePool.length) {
102 + var instance = Klass.instancePool.pop();
103 + Klass.call(instance, a1, a2);
104 + return instance;
105 + } else {
106 + return new Klass(a1, a2);
107 + }
108 +};
109 +
110 +var threeArgumentPooler = function (a1, a2, a3) {
111 + var Klass = this;
112 + if (Klass.instancePool.length) {
113 + var instance = Klass.instancePool.pop();
114 + Klass.call(instance, a1, a2, a3);
115 + return instance;
116 + } else {
117 + return new Klass(a1, a2, a3);
118 + }
119 +};
120 +
121 +var fourArgumentPooler = function (a1, a2, a3, a4) {
122 + var Klass = this;
123 + if (Klass.instancePool.length) {
124 + var instance = Klass.instancePool.pop();
125 + Klass.call(instance, a1, a2, a3, a4);
126 + return instance;
127 + } else {
128 + return new Klass(a1, a2, a3, a4);
129 + }
130 +};
131 +
132 +var standardReleaser = function (instance) {
133 + var Klass = this;
134 + !(instance instanceof Klass) ? "development" !== 'production' ? invariant(false, 'Trying to release an instance into a pool of a different type.') : _prodInvariant('25') : void 0;
135 + instance.destructor();
136 + if (Klass.instancePool.length < Klass.poolSize) {
137 + Klass.instancePool.push(instance);
138 + }
139 +};
140 +
141 +var DEFAULT_POOL_SIZE = 10;
142 +var DEFAULT_POOLER = oneArgumentPooler;
143 +
144 +/**
145 + * Augments `CopyConstructor` to be a poolable class, augmenting only the class
146 + * itself (statically) not adding any prototypical fields. Any CopyConstructor
147 + * you give this may have a `poolSize` property, and will look for a
148 + * prototypical `destructor` on instances.
149 + *
150 + * @param {Function} CopyConstructor Constructor that can be used to reset.
151 + * @param {Function} pooler Customizable pooler.
152 + */
153 +var addPoolingTo = function (CopyConstructor, pooler) {
154 + // Casting as any so that flow ignores the actual implementation and trusts
155 + // it to match the type we declared
156 + var NewKlass = CopyConstructor;
157 + NewKlass.instancePool = [];
158 + NewKlass.getPooled = pooler || DEFAULT_POOLER;
159 + if (!NewKlass.poolSize) {
160 + NewKlass.poolSize = DEFAULT_POOL_SIZE;
161 + }
162 + NewKlass.release = standardReleaser;
163 + return NewKlass;
164 +};
165 +
166 +var PooledClass = {
167 + addPoolingTo: addPoolingTo,
168 + oneArgumentPooler: oneArgumentPooler,
169 + twoArgumentPooler: twoArgumentPooler,
170 + threeArgumentPooler: threeArgumentPooler,
171 + fourArgumentPooler: fourArgumentPooler
172 +};
173 +
174 +module.exports = PooledClass;
175 +},{"25":25,"29":29}],3:[function(_dereq_,module,exports){
176 +/**
177 + * Copyright 2013-present, Facebook, Inc.
178 + * All rights reserved.
179 + *
180 + * This source code is licensed under the BSD-style license found in the
181 + * LICENSE file in the root directory of this source tree. An additional grant
182 + * of patent rights can be found in the PATENTS file in the same directory.
183 + *
184 + */
185 +
186 +'use strict';
187 +
188 +var _assign = _dereq_(31);
189 +
190 +var ReactChildren = _dereq_(4);
191 +var ReactComponent = _dereq_(6);
192 +var ReactPureComponent = _dereq_(16);
193 +var ReactClass = _dereq_(5);
194 +var ReactDOMFactories = _dereq_(9);
195 +var ReactElement = _dereq_(10);
196 +var ReactPropTypes = _dereq_(15);
197 +var ReactVersion = _dereq_(19);
198 +
199 +var onlyChild = _dereq_(24);
200 +var warning = _dereq_(30);
201 +
202 +var createElement = ReactElement.createElement;
203 +var createFactory = ReactElement.createFactory;
204 +var cloneElement = ReactElement.cloneElement;
205 +
206 +if ("development" !== 'production') {
207 + var ReactElementValidator = _dereq_(12);
208 + createElement = ReactElementValidator.createElement;
209 + createFactory = ReactElementValidator.createFactory;
210 + cloneElement = ReactElementValidator.cloneElement;
211 +}
212 +
213 +var __spread = _assign;
214 +
215 +if ("development" !== 'production') {
216 + var warned = false;
217 + __spread = function () {
218 + "development" !== 'production' ? warning(warned, 'React.__spread is deprecated and should not be used. Use ' + 'Object.assign directly or another helper function with similar ' + 'semantics. You may be seeing this warning due to your compiler. ' + 'See https://fb.me/react-spread-deprecation for more details.') : void 0;
219 + warned = true;
220 + return _assign.apply(null, arguments);
221 + };
222 +}
223 +
224 +var React = {
225 +
226 + // Modern
227 +
228 + Children: {
229 + map: ReactChildren.map,
230 + forEach: ReactChildren.forEach,
231 + count: ReactChildren.count,
232 + toArray: ReactChildren.toArray,
233 + only: onlyChild
234 + },
235 +
236 + Component: ReactComponent,
237 + PureComponent: ReactPureComponent,
238 +
239 + createElement: createElement,
240 + cloneElement: cloneElement,
241 + isValidElement: ReactElement.isValidElement,
242 +
243 + // Classic
244 +
245 + PropTypes: ReactPropTypes,
246 + createClass: ReactClass.createClass,
247 + createFactory: createFactory,
248 + createMixin: function (mixin) {
249 + // Currently a noop. Will be used to validate and trace mixins.
250 + return mixin;
251 + },
252 +
253 + // This looks DOM specific but these are actually isomorphic helpers
254 + // since they are just generating DOM strings.
255 + DOM: ReactDOMFactories,
256 +
257 + version: ReactVersion,
258 +
259 + // Deprecated hook for JSX spread, don't use this for anything.
260 + __spread: __spread
261 +};
262 +
263 +module.exports = React;
264 +},{"10":10,"12":12,"15":15,"16":16,"19":19,"24":24,"30":30,"31":31,"4":4,"5":5,"6":6,"9":9}],4:[function(_dereq_,module,exports){
265 +/**
266 + * Copyright 2013-present, Facebook, Inc.
267 + * All rights reserved.
268 + *
269 + * This source code is licensed under the BSD-style license found in the
270 + * LICENSE file in the root directory of this source tree. An additional grant
271 + * of patent rights can be found in the PATENTS file in the same directory.
272 + *
273 + */
274 +
275 +'use strict';
276 +
277 +var PooledClass = _dereq_(2);
278 +var ReactElement = _dereq_(10);
279 +
280 +var emptyFunction = _dereq_(27);
281 +var traverseAllChildren = _dereq_(26);
282 +
283 +var twoArgumentPooler = PooledClass.twoArgumentPooler;
284 +var fourArgumentPooler = PooledClass.fourArgumentPooler;
285 +
286 +var userProvidedKeyEscapeRegex = /\/+/g;
287 +function escapeUserProvidedKey(text) {
288 + return ('' + text).replace(userProvidedKeyEscapeRegex, '$&/');
289 +}
290 +
291 +/**
292 + * PooledClass representing the bookkeeping associated with performing a child
293 + * traversal. Allows avoiding binding callbacks.
294 + *
295 + * @constructor ForEachBookKeeping
296 + * @param {!function} forEachFunction Function to perform traversal with.
297 + * @param {?*} forEachContext Context to perform context with.
298 + */
299 +function ForEachBookKeeping(forEachFunction, forEachContext) {
300 + this.func = forEachFunction;
301 + this.context = forEachContext;
302 + this.count = 0;
303 +}
304 +ForEachBookKeeping.prototype.destructor = function () {
305 + this.func = null;
306 + this.context = null;
307 + this.count = 0;
308 +};
309 +PooledClass.addPoolingTo(ForEachBookKeeping, twoArgumentPooler);
310 +
311 +function forEachSingleChild(bookKeeping, child, name) {
312 + var func = bookKeeping.func,
313 + context = bookKeeping.context;
314 +
315 + func.call(context, child, bookKeeping.count++);
316 +}
317 +
318 +/**
319 + * Iterates through children that are typically specified as `props.children`.
320 + *
321 + * See https://facebook.github.io/react/docs/react-api.html#react.children.foreach
322 + *
323 + * The provided forEachFunc(child, index) will be called for each
324 + * leaf child.
325 + *
326 + * @param {?*} children Children tree container.
327 + * @param {function(*, int)} forEachFunc
328 + * @param {*} forEachContext Context for forEachContext.
329 + */
330 +function forEachChildren(children, forEachFunc, forEachContext) {
331 + if (children == null) {
332 + return children;
333 + }
334 + var traverseContext = ForEachBookKeeping.getPooled(forEachFunc, forEachContext);
335 + traverseAllChildren(children, forEachSingleChild, traverseContext);
336 + ForEachBookKeeping.release(traverseContext);
337 +}
338 +
339 +/**
340 + * PooledClass representing the bookkeeping associated with performing a child
341 + * mapping. Allows avoiding binding callbacks.
342 + *
343 + * @constructor MapBookKeeping
344 + * @param {!*} mapResult Object containing the ordered map of results.
345 + * @param {!function} mapFunction Function to perform mapping with.
346 + * @param {?*} mapContext Context to perform mapping with.
347 + */
348 +function MapBookKeeping(mapResult, keyPrefix, mapFunction, mapContext) {
349 + this.result = mapResult;
350 + this.keyPrefix = keyPrefix;
351 + this.func = mapFunction;
352 + this.context = mapContext;
353 + this.count = 0;
354 +}
355 +MapBookKeeping.prototype.destructor = function () {
356 + this.result = null;
357 + this.keyPrefix = null;
358 + this.func = null;
359 + this.context = null;
360 + this.count = 0;
361 +};
362 +PooledClass.addPoolingTo(MapBookKeeping, fourArgumentPooler);
363 +
364 +function mapSingleChildIntoContext(bookKeeping, child, childKey) {
365 + var result = bookKeeping.result,
366 + keyPrefix = bookKeeping.keyPrefix,
367 + func = bookKeeping.func,
368 + context = bookKeeping.context;
369 +
370 +
371 + var mappedChild = func.call(context, child, bookKeeping.count++);
372 + if (Array.isArray(mappedChild)) {
373 + mapIntoWithKeyPrefixInternal(mappedChild, result, childKey, emptyFunction.thatReturnsArgument);
374 + } else if (mappedChild != null) {
375 + if (ReactElement.isValidElement(mappedChild)) {
376 + mappedChild = ReactElement.cloneAndReplaceKey(mappedChild,
377 + // Keep both the (mapped) and old keys if they differ, just as
378 + // traverseAllChildren used to do for objects as children
379 + keyPrefix + (mappedChild.key && (!child || child.key !== mappedChild.key) ? escapeUserProvidedKey(mappedChild.key) + '/' : '') + childKey);
380 + }
381 + result.push(mappedChild);
382 + }
383 +}
384 +
385 +function mapIntoWithKeyPrefixInternal(children, array, prefix, func, context) {
386 + var escapedPrefix = '';
387 + if (prefix != null) {
388 + escapedPrefix = escapeUserProvidedKey(prefix) + '/';
389 + }
390 + var traverseContext = MapBookKeeping.getPooled(array, escapedPrefix, func, context);
391 + traverseAllChildren(children, mapSingleChildIntoContext, traverseContext);
392 + MapBookKeeping.release(traverseContext);
393 +}
394 +
395 +/**
396 + * Maps children that are typically specified as `props.children`.
397 + *
398 + * See https://facebook.github.io/react/docs/react-api.html#react.children.map
399 + *
400 + * The provided mapFunction(child, key, index) will be called for each
401 + * leaf child.
402 + *
403 + * @param {?*} children Children tree container.
404 + * @param {function(*, int)} func The map function.
405 + * @param {*} context Context for mapFunction.
406 + * @return {object} Object containing the ordered map of results.
407 + */
408 +function mapChildren(children, func, context) {
409 + if (children == null) {
410 + return children;
411 + }
412 + var result = [];
413 + mapIntoWithKeyPrefixInternal(children, result, null, func, context);
414 + return result;
415 +}
416 +
417 +function forEachSingleChildDummy(traverseContext, child, name) {
418 + return null;
419 +}
420 +
421 +/**
422 + * Count the number of children that are typically specified as
423 + * `props.children`.
424 + *
425 + * See https://facebook.github.io/react/docs/react-api.html#react.children.count
426 + *
427 + * @param {?*} children Children tree container.
428 + * @return {number} The number of children.
429 + */
430 +function countChildren(children, context) {
431 + return traverseAllChildren(children, forEachSingleChildDummy, null);
432 +}
433 +
434 +/**
435 + * Flatten a children object (typically specified as `props.children`) and
436 + * return an array with appropriately re-keyed children.
437 + *
438 + * See https://facebook.github.io/react/docs/react-api.html#react.children.toarray
439 + */
440 +function toArray(children) {
441 + var result = [];
442 + mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);
443 + return result;
444 +}
445 +
446 +var ReactChildren = {
447 + forEach: forEachChildren,
448 + map: mapChildren,
449 + mapIntoWithKeyPrefixInternal: mapIntoWithKeyPrefixInternal,
450 + count: countChildren,
451 + toArray: toArray
452 +};
453 +
454 +module.exports = ReactChildren;
455 +},{"10":10,"2":2,"26":26,"27":27}],5:[function(_dereq_,module,exports){
456 +/**
457 + * Copyright 2013-present, Facebook, Inc.
458 + * All rights reserved.
459 + *
460 + * This source code is licensed under the BSD-style license found in the
461 + * LICENSE file in the root directory of this source tree. An additional grant
462 + * of patent rights can be found in the PATENTS file in the same directory.
463 + *
464 + */
465 +
466 +'use strict';
467 +
468 +var _prodInvariant = _dereq_(25),
469 + _assign = _dereq_(31);
470 +
471 +var ReactComponent = _dereq_(6);
472 +var ReactElement = _dereq_(10);
473 +var ReactPropTypeLocationNames = _dereq_(14);
474 +var ReactNoopUpdateQueue = _dereq_(13);
475 +
476 +var emptyObject = _dereq_(28);
477 +var invariant = _dereq_(29);
478 +var warning = _dereq_(30);
479 +
480 +var MIXINS_KEY = 'mixins';
481 +
482 +// Helper function to allow the creation of anonymous functions which do not
483 +// have .name set to the name of the variable being assigned to.
484 +function identity(fn) {
485 + return fn;
486 +}
487 +
488 +/**
489 + * Policies that describe methods in `ReactClassInterface`.
490 + */
491 +
492 +
493 +/**
494 + * Composite components are higher-level components that compose other composite
495 + * or host components.
496 + *
497 + * To create a new type of `ReactClass`, pass a specification of
498 + * your new class to `React.createClass`. The only requirement of your class
499 + * specification is that you implement a `render` method.
500 + *
501 + * var MyComponent = React.createClass({
502 + * render: function() {
503 + * return <div>Hello World</div>;
504 + * }
505 + * });
506 + *
507 + * The class specification supports a specific protocol of methods that have
508 + * special meaning (e.g. `render`). See `ReactClassInterface` for
509 + * more the comprehensive protocol. Any other properties and methods in the
510 + * class specification will be available on the prototype.
511 + *
512 + * @interface ReactClassInterface
513 + * @internal
514 + */
515 +var ReactClassInterface = {
516 +
517 + /**
518 + * An array of Mixin objects to include when defining your component.
519 + *
520 + * @type {array}
521 + * @optional
522 + */
523 + mixins: 'DEFINE_MANY',
524 +
525 + /**
526 + * An object containing properties and methods that should be defined on
527 + * the component's constructor instead of its prototype (static methods).
528 + *
529 + * @type {object}
530 + * @optional
531 + */
532 + statics: 'DEFINE_MANY',
533 +
534 + /**
535 + * Definition of prop types for this component.
536 + *
537 + * @type {object}
538 + * @optional
539 + */
540 + propTypes: 'DEFINE_MANY',
541 +
542 + /**
543 + * Definition of context types for this component.
544 + *
545 + * @type {object}
546 + * @optional
547 + */
548 + contextTypes: 'DEFINE_MANY',
549 +
550 + /**
551 + * Definition of context types this component sets for its children.
552 + *
553 + * @type {object}
554 + * @optional
555 + */
556 + childContextTypes: 'DEFINE_MANY',
557 +
558 + // ==== Definition methods ====
559 +
560 + /**
561 + * Invoked when the component is mounted. Values in the mapping will be set on
562 + * `this.props` if that prop is not specified (i.e. using an `in` check).
563 + *
564 + * This method is invoked before `getInitialState` and therefore cannot rely
565 + * on `this.state` or use `this.setState`.
566 + *
567 + * @return {object}
568 + * @optional
569 + */
570 + getDefaultProps: 'DEFINE_MANY_MERGED',
571 +
572 + /**
573 + * Invoked once before the component is mounted. The return value will be used
574 + * as the initial value of `this.state`.
575 + *
576 + * getInitialState: function() {
577 + * return {
578 + * isOn: false,
579 + * fooBaz: new BazFoo()
580 + * }
581 + * }
582 + *
583 + * @return {object}
584 + * @optional
585 + */
586 + getInitialState: 'DEFINE_MANY_MERGED',
587 +
588 + /**
589 + * @return {object}
590 + * @optional
591 + */
592 + getChildContext: 'DEFINE_MANY_MERGED',
593 +
594 + /**
595 + * Uses props from `this.props` and state from `this.state` to render the
596 + * structure of the component.
597 + *
598 + * No guarantees are made about when or how often this method is invoked, so
599 + * it must not have side effects.
600 + *
601 + * render: function() {
602 + * var name = this.props.name;
603 + * return <div>Hello, {name}!</div>;
604 + * }
605 + *
606 + * @return {ReactComponent}
607 + * @nosideeffects
608 + * @required
609 + */
610 + render: 'DEFINE_ONCE',
611 +
612 + // ==== Delegate methods ====
613 +
614 + /**
615 + * Invoked when the component is initially created and about to be mounted.
616 + * This may have side effects, but any external subscriptions or data created
617 + * by this method must be cleaned up in `componentWillUnmount`.
618 + *
619 + * @optional
620 + */
621 + componentWillMount: 'DEFINE_MANY',
622 +
623 + /**
624 + * Invoked when the component has been mounted and has a DOM representation.
625 + * However, there is no guarantee that the DOM node is in the document.
626 + *
627 + * Use this as an opportunity to operate on the DOM when the component has
628 + * been mounted (initialized and rendered) for the first time.
629 + *
630 + * @param {DOMElement} rootNode DOM element representing the component.
631 + * @optional
632 + */
633 + componentDidMount: 'DEFINE_MANY',
634 +
635 + /**
636 + * Invoked before the component receives new props.
637 + *
638 + * Use this as an opportunity to react to a prop transition by updating the
639 + * state using `this.setState`. Current props are accessed via `this.props`.
640 + *
641 + * componentWillReceiveProps: function(nextProps, nextContext) {
642 + * this.setState({
643 + * likesIncreasing: nextProps.likeCount > this.props.likeCount
644 + * });
645 + * }
646 + *
647 + * NOTE: There is no equivalent `componentWillReceiveState`. An incoming prop
648 + * transition may cause a state change, but the opposite is not true. If you
649 + * need it, you are probably looking for `componentWillUpdate`.
650 + *
651 + * @param {object} nextProps
652 + * @optional
653 + */
654 + componentWillReceiveProps: 'DEFINE_MANY',
655 +
656 + /**
657 + * Invoked while deciding if the component should be updated as a result of
658 + * receiving new props, state and/or context.
659 + *
660 + * Use this as an opportunity to `return false` when you're certain that the
661 + * transition to the new props/state/context will not require a component
662 + * update.
663 + *
664 + * shouldComponentUpdate: function(nextProps, nextState, nextContext) {
665 + * return !equal(nextProps, this.props) ||
666 + * !equal(nextState, this.state) ||
667 + * !equal(nextContext, this.context);
668 + * }
669 + *
670 + * @param {object} nextProps
671 + * @param {?object} nextState
672 + * @param {?object} nextContext
673 + * @return {boolean} True if the component should update.
674 + * @optional
675 + */
676 + shouldComponentUpdate: 'DEFINE_ONCE',
677 +
678 + /**
679 + * Invoked when the component is about to update due to a transition from
680 + * `this.props`, `this.state` and `this.context` to `nextProps`, `nextState`
681 + * and `nextContext`.
682 + *
683 + * Use this as an opportunity to perform preparation before an update occurs.
684 + *
685 + * NOTE: You **cannot** use `this.setState()` in this method.
686 + *
687 + * @param {object} nextProps
688 + * @param {?object} nextState
689 + * @param {?object} nextContext
690 + * @param {ReactReconcileTransaction} transaction
691 + * @optional
692 + */
693 + componentWillUpdate: 'DEFINE_MANY',
694 +
695 + /**
696 + * Invoked when the component's DOM representation has been updated.
697 + *
698 + * Use this as an opportunity to operate on the DOM when the component has
699 + * been updated.
700 + *
701 + * @param {object} prevProps
702 + * @param {?object} prevState
703 + * @param {?object} prevContext
704 + * @param {DOMElement} rootNode DOM element representing the component.
705 + * @optional
706 + */
707 + componentDidUpdate: 'DEFINE_MANY',
708 +
709 + /**
710 + * Invoked when the component is about to be removed from its parent and have
711 + * its DOM representation destroyed.
712 + *
713 + * Use this as an opportunity to deallocate any external resources.
714 + *
715 + * NOTE: There is no `componentDidUnmount` since your component will have been
716 + * destroyed by that point.
717 + *
718 + * @optional
719 + */
720 + componentWillUnmount: 'DEFINE_MANY',
721 +
722 + // ==== Advanced methods ====
723 +
724 + /**
725 + * Updates the component's currently mounted DOM representation.
726 + *
727 + * By default, this implements React's rendering and reconciliation algorithm.
728 + * Sophisticated clients may wish to override this.
729 + *
730 + * @param {ReactReconcileTransaction} transaction
731 + * @internal
732 + * @overridable
733 + */
734 + updateComponent: 'OVERRIDE_BASE'
735 +
736 +};
737 +
738 +/**
739 + * Mapping from class specification keys to special processing functions.
740 + *
741 + * Although these are declared like instance properties in the specification
742 + * when defining classes using `React.createClass`, they are actually static
743 + * and are accessible on the constructor instead of the prototype. Despite
744 + * being static, they must be defined outside of the "statics" key under
745 + * which all other static methods are defined.
746 + */
747 +var RESERVED_SPEC_KEYS = {
748 + displayName: function (Constructor, displayName) {
749 + Constructor.displayName = displayName;
750 + },
751 + mixins: function (Constructor, mixins) {
752 + if (mixins) {
753 + for (var i = 0; i < mixins.length; i++) {
754 + mixSpecIntoComponent(Constructor, mixins[i]);
755 + }
756 + }
757 + },
758 + childContextTypes: function (Constructor, childContextTypes) {
759 + if ("development" !== 'production') {
760 + validateTypeDef(Constructor, childContextTypes, 'childContext');
761 + }
762 + Constructor.childContextTypes = _assign({}, Constructor.childContextTypes, childContextTypes);
763 + },
764 + contextTypes: function (Constructor, contextTypes) {
765 + if ("development" !== 'production') {
766 + validateTypeDef(Constructor, contextTypes, 'context');
767 + }
768 + Constructor.contextTypes = _assign({}, Constructor.contextTypes, contextTypes);
769 + },
770 + /**
771 + * Special case getDefaultProps which should move into statics but requires
772 + * automatic merging.
773 + */
774 + getDefaultProps: function (Constructor, getDefaultProps) {
775 + if (Constructor.getDefaultProps) {
776 + Constructor.getDefaultProps = createMergedResultFunction(Constructor.getDefaultProps, getDefaultProps);
777 + } else {
778 + Constructor.getDefaultProps = getDefaultProps;
779 + }
780 + },
781 + propTypes: function (Constructor, propTypes) {
782 + if ("development" !== 'production') {
783 + validateTypeDef(Constructor, propTypes, 'prop');
784 + }
785 + Constructor.propTypes = _assign({}, Constructor.propTypes, propTypes);
786 + },
787 + statics: function (Constructor, statics) {
788 + mixStaticSpecIntoComponent(Constructor, statics);
789 + },
790 + autobind: function () {} };
791 +
792 +function validateTypeDef(Constructor, typeDef, location) {
793 + for (var propName in typeDef) {
794 + if (typeDef.hasOwnProperty(propName)) {
795 + // use a warning instead of an invariant so components
796 + // don't show up in prod but only in __DEV__
797 + "development" !== 'production' ? warning(typeof typeDef[propName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'React.PropTypes.', Constructor.displayName || 'ReactClass', ReactPropTypeLocationNames[location], propName) : void 0;
798 + }
799 + }
800 +}
801 +
802 +function validateMethodOverride(isAlreadyDefined, name) {
803 + var specPolicy = ReactClassInterface.hasOwnProperty(name) ? ReactClassInterface[name] : null;
804 +
805 + // Disallow overriding of base class methods unless explicitly allowed.
806 + if (ReactClassMixin.hasOwnProperty(name)) {
807 + !(specPolicy === 'OVERRIDE_BASE') ? "development" !== 'production' ? invariant(false, 'ReactClassInterface: You are attempting to override `%s` from your class specification. Ensure that your method names do not overlap with React methods.', name) : _prodInvariant('73', name) : void 0;
808 + }
809 +
810 + // Disallow defining methods more than once unless explicitly allowed.
811 + if (isAlreadyDefined) {
812 + !(specPolicy === 'DEFINE_MANY' || specPolicy === 'DEFINE_MANY_MERGED') ? "development" !== 'production' ? invariant(false, 'ReactClassInterface: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.', name) : _prodInvariant('74', name) : void 0;
813 + }
814 +}
815 +
816 +/**
817 + * Mixin helper which handles policy validation and reserved
818 + * specification keys when building React classes.
819 + */
820 +function mixSpecIntoComponent(Constructor, spec) {
821 + if (!spec) {
822 + if ("development" !== 'production') {
823 + var typeofSpec = typeof spec;
824 + var isMixinValid = typeofSpec === 'object' && spec !== null;
825 +
826 + "development" !== 'production' ? warning(isMixinValid, '%s: You\'re attempting to include a mixin that is either null ' + 'or not an object. Check the mixins included by the component, ' + 'as well as any mixins they include themselves. ' + 'Expected object but got %s.', Constructor.displayName || 'ReactClass', spec === null ? null : typeofSpec) : void 0;
827 + }
828 +
829 + return;
830 + }
831 +
832 + !(typeof spec !== 'function') ? "development" !== 'production' ? invariant(false, 'ReactClass: You\'re attempting to use a component class or function as a mixin. Instead, just use a regular object.') : _prodInvariant('75') : void 0;
833 + !!ReactElement.isValidElement(spec) ? "development" !== 'production' ? invariant(false, 'ReactClass: You\'re attempting to use a component as a mixin. Instead, just use a regular object.') : _prodInvariant('76') : void 0;
834 +
835 + var proto = Constructor.prototype;
836 + var autoBindPairs = proto.__reactAutoBindPairs;
837 +
838 + // By handling mixins before any other properties, we ensure the same
839 + // chaining order is applied to methods with DEFINE_MANY policy, whether
840 + // mixins are listed before or after these methods in the spec.
841 + if (spec.hasOwnProperty(MIXINS_KEY)) {
842 + RESERVED_SPEC_KEYS.mixins(Constructor, spec.mixins);
843 + }
844 +
845 + for (var name in spec) {
846 + if (!spec.hasOwnProperty(name)) {
847 + continue;
848 + }
849 +
850 + if (name === MIXINS_KEY) {
851 + // We have already handled mixins in a special case above.
852 + continue;
853 + }
854 +
855 + var property = spec[name];
856 + var isAlreadyDefined = proto.hasOwnProperty(name);
857 + validateMethodOverride(isAlreadyDefined, name);
858 +
859 + if (RESERVED_SPEC_KEYS.hasOwnProperty(name)) {
860 + RESERVED_SPEC_KEYS[name](Constructor, property);
861 + } else {
862 + // Setup methods on prototype:
863 + // The following member methods should not be automatically bound:
864 + // 1. Expected ReactClass methods (in the "interface").
865 + // 2. Overridden methods (that were mixed in).
866 + var isReactClassMethod = ReactClassInterface.hasOwnProperty(name);
867 + var isFunction = typeof property === 'function';
868 + var shouldAutoBind = isFunction && !isReactClassMethod && !isAlreadyDefined && spec.autobind !== false;
869 +
870 + if (shouldAutoBind) {
871 + autoBindPairs.push(name, property);
872 + proto[name] = property;
873 + } else {
874 + if (isAlreadyDefined) {
875 + var specPolicy = ReactClassInterface[name];
876 +
877 + // These cases should already be caught by validateMethodOverride.
878 + !(isReactClassMethod && (specPolicy === 'DEFINE_MANY_MERGED' || specPolicy === 'DEFINE_MANY')) ? "development" !== 'production' ? invariant(false, 'ReactClass: Unexpected spec policy %s for key %s when mixing in component specs.', specPolicy, name) : _prodInvariant('77', specPolicy, name) : void 0;
879 +
880 + // For methods which are defined more than once, call the existing
881 + // methods before calling the new property, merging if appropriate.
882 + if (specPolicy === 'DEFINE_MANY_MERGED') {
883 + proto[name] = createMergedResultFunction(proto[name], property);
884 + } else if (specPolicy === 'DEFINE_MANY') {
885 + proto[name] = createChainedFunction(proto[name], property);
886 + }
887 + } else {
888 + proto[name] = property;
889 + if ("development" !== 'production') {
890 + // Add verbose displayName to the function, which helps when looking
891 + // at profiling tools.
892 + if (typeof property === 'function' && spec.displayName) {
893 + proto[name].displayName = spec.displayName + '_' + name;
894 + }
895 + }
896 + }
897 + }
898 + }
899 + }
900 +}
901 +
902 +function mixStaticSpecIntoComponent(Constructor, statics) {
903 + if (!statics) {
904 + return;
905 + }
906 + for (var name in statics) {
907 + var property = statics[name];
908 + if (!statics.hasOwnProperty(name)) {
909 + continue;
910 + }
911 +
912 + var isReserved = name in RESERVED_SPEC_KEYS;
913 + !!isReserved ? "development" !== 'production' ? invariant(false, '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.', name) : _prodInvariant('78', name) : void 0;
914 +
915 + var isInherited = name in Constructor;
916 + !!isInherited ? "development" !== 'production' ? invariant(false, 'ReactClass: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.', name) : _prodInvariant('79', name) : void 0;
917 + Constructor[name] = property;
918 + }
919 +}
920 +
921 +/**
922 + * Merge two objects, but throw if both contain the same key.
923 + *
924 + * @param {object} one The first object, which is mutated.
925 + * @param {object} two The second object
926 + * @return {object} one after it has been mutated to contain everything in two.
927 + */
928 +function mergeIntoWithNoDuplicateKeys(one, two) {
929 + !(one && two && typeof one === 'object' && typeof two === 'object') ? "development" !== 'production' ? invariant(false, 'mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.') : _prodInvariant('80') : void 0;
930 +
931 + for (var key in two) {
932 + if (two.hasOwnProperty(key)) {
933 + !(one[key] === undefined) ? "development" !== 'production' ? invariant(false, '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.', key) : _prodInvariant('81', key) : void 0;
934 + one[key] = two[key];
935 + }
936 + }
937 + return one;
938 +}
939 +
940 +/**
941 + * Creates a function that invokes two functions and merges their return values.
942 + *
943 + * @param {function} one Function to invoke first.
944 + * @param {function} two Function to invoke second.
945 + * @return {function} Function that invokes the two argument functions.
946 + * @private
947 + */
948 +function createMergedResultFunction(one, two) {
949 + return function mergedResult() {
950 + var a = one.apply(this, arguments);
951 + var b = two.apply(this, arguments);
952 + if (a == null) {
953 + return b;
954 + } else if (b == null) {
955 + return a;
956 + }
957 + var c = {};
958 + mergeIntoWithNoDuplicateKeys(c, a);
959 + mergeIntoWithNoDuplicateKeys(c, b);
960 + return c;
961 + };
962 +}
963 +
964 +/**
965 + * Creates a function that invokes two functions and ignores their return vales.
966 + *
967 + * @param {function} one Function to invoke first.
968 + * @param {function} two Function to invoke second.
969 + * @return {function} Function that invokes the two argument functions.
970 + * @private
971 + */
972 +function createChainedFunction(one, two) {
973 + return function chainedFunction() {
974 + one.apply(this, arguments);
975 + two.apply(this, arguments);
976 + };
977 +}
978 +
979 +/**
980 + * Binds a method to the component.
981 + *
982 + * @param {object} component Component whose method is going to be bound.
983 + * @param {function} method Method to be bound.
984 + * @return {function} The bound method.
985 + */
986 +function bindAutoBindMethod(component, method) {
987 + var boundMethod = method.bind(component);
988 + if ("development" !== 'production') {
989 + boundMethod.__reactBoundContext = component;
990 + boundMethod.__reactBoundMethod = method;
991 + boundMethod.__reactBoundArguments = null;
992 + var componentName = component.constructor.displayName;
993 + var _bind = boundMethod.bind;
994 + boundMethod.bind = function (newThis) {
995 + for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
996 + args[_key - 1] = arguments[_key];
997 + }
998 +
999 + // User is trying to bind() an autobound method; we effectively will
1000 + // ignore the value of "this" that the user is trying to use, so
1001 + // let's warn.
1002 + if (newThis !== component && newThis !== null) {
1003 + "development" !== 'production' ? warning(false, 'bind(): React component methods may only be bound to the ' + 'component instance. See %s', componentName) : void 0;
1004 + } else if (!args.length) {
1005 + "development" !== 'production' ? warning(false, 'bind(): You are binding a component method to the component. ' + 'React does this for you automatically in a high-performance ' + 'way, so you can safely remove this call. See %s', componentName) : void 0;
1006 + return boundMethod;
1007 + }
1008 + var reboundMethod = _bind.apply(boundMethod, arguments);
1009 + reboundMethod.__reactBoundContext = component;
1010 + reboundMethod.__reactBoundMethod = method;
1011 + reboundMethod.__reactBoundArguments = args;
1012 + return reboundMethod;
1013 + };
1014 + }
1015 + return boundMethod;
1016 +}
1017 +
1018 +/**
1019 + * Binds all auto-bound methods in a component.
1020 + *
1021 + * @param {object} component Component whose method is going to be bound.
1022 + */
1023 +function bindAutoBindMethods(component) {
1024 + var pairs = component.__reactAutoBindPairs;
1025 + for (var i = 0; i < pairs.length; i += 2) {
1026 + var autoBindKey = pairs[i];
1027 + var method = pairs[i + 1];
1028 + component[autoBindKey] = bindAutoBindMethod(component, method);
1029 + }
1030 +}
1031 +
1032 +/**
1033 + * Add more to the ReactClass base class. These are all legacy features and
1034 + * therefore not already part of the modern ReactComponent.
1035 + */
1036 +var ReactClassMixin = {
1037 +
1038 + /**
1039 + * TODO: This will be deprecated because state should always keep a consistent
1040 + * type signature and the only use case for this, is to avoid that.
1041 + */
1042 + replaceState: function (newState, callback) {
1043 + this.updater.enqueueReplaceState(this, newState, callback, 'replaceState');
1044 + },
1045 +
1046 + /**
1047 + * Checks whether or not this composite component is mounted.
1048 + * @return {boolean} True if mounted, false otherwise.
1049 + * @protected
1050 + * @final
1051 + */
1052 + isMounted: function () {
1053 + return this.updater.isMounted(this);
1054 + }
1055 +};
1056 +
1057 +var ReactClassComponent = function () {};
1058 +_assign(ReactClassComponent.prototype, ReactComponent.prototype, ReactClassMixin);
1059 +
1060 +/**
1061 + * Module for creating composite components.
1062 + *
1063 + * @class ReactClass
1064 + */
1065 +var ReactClass = {
1066 +
1067 + /**
1068 + * Creates a composite component class given a class specification.
1069 + * See https://facebook.github.io/react/docs/react-api.html#createclass
1070 + *
1071 + * @param {object} spec Class specification (which must define `render`).
1072 + * @return {function} Component constructor function.
1073 + * @public
1074 + */
1075 + createClass: function (spec) {
1076 + // To keep our warnings more understandable, we'll use a little hack here to
1077 + // ensure that Constructor.name !== 'Constructor'. This makes sure we don't
1078 + // unnecessarily identify a class without displayName as 'Constructor'.
1079 + var Constructor = identity(function (props, context, updater) {
1080 + // This constructor gets overridden by mocks. The argument is used
1081 + // by mocks to assert on what gets mounted.
1082 +
1083 + if ("development" !== 'production') {
1084 + "development" !== 'production' ? warning(this instanceof Constructor, 'Something is calling a React component directly. Use a factory or ' + 'JSX instead. See: https://fb.me/react-legacyfactory') : void 0;
1085 + }
1086 +
1087 + // Wire up auto-binding
1088 + if (this.__reactAutoBindPairs.length) {
1089 + bindAutoBindMethods(this);
1090 + }
1091 +
1092 + this.props = props;
1093 + this.context = context;
1094 + this.refs = emptyObject;
1095 + this.updater = updater || ReactNoopUpdateQueue;
1096 +
1097 + this.state = null;
1098 +
1099 + // ReactClasses doesn't have constructors. Instead, they use the
1100 + // getInitialState and componentWillMount methods for initialization.
1101 +
1102 + var initialState = this.getInitialState ? this.getInitialState() : null;
1103 + if ("development" !== 'production') {
1104 + // We allow auto-mocks to proceed as if they're returning null.
1105 + if (initialState === undefined && this.getInitialState._isMockFunction) {
1106 + // This is probably bad practice. Consider warning here and
1107 + // deprecating this convenience.
1108 + initialState = null;
1109 + }
1110 + }
1111 + !(typeof initialState === 'object' && !Array.isArray(initialState)) ? "development" !== 'production' ? invariant(false, '%s.getInitialState(): must return an object or null', Constructor.displayName || 'ReactCompositeComponent') : _prodInvariant('82', Constructor.displayName || 'ReactCompositeComponent') : void 0;
1112 +
1113 + this.state = initialState;
1114 + });
1115 + Constructor.prototype = new ReactClassComponent();
1116 + Constructor.prototype.constructor = Constructor;
1117 + Constructor.prototype.__reactAutoBindPairs = [];
1118 +
1119 + mixSpecIntoComponent(Constructor, spec);
1120 +
1121 + // Initialize the defaultProps property after all mixins have been merged.
1122 + if (Constructor.getDefaultProps) {
1123 + Constructor.defaultProps = Constructor.getDefaultProps();
1124 + }
1125 +
1126 + if ("development" !== 'production') {
1127 + // This is a tag to indicate that the use of these method names is ok,
1128 + // since it's used with createClass. If it's not, then it's likely a
1129 + // mistake so we'll warn you to use the static property, property
1130 + // initializer or constructor respectively.
1131 + if (Constructor.getDefaultProps) {
1132 + Constructor.getDefaultProps.isReactClassApproved = {};
1133 + }
1134 + if (Constructor.prototype.getInitialState) {
1135 + Constructor.prototype.getInitialState.isReactClassApproved = {};
1136 + }
1137 + }
1138 +
1139 + !Constructor.prototype.render ? "development" !== 'production' ? invariant(false, 'createClass(...): Class specification must implement a `render` method.') : _prodInvariant('83') : void 0;
1140 +
1141 + if ("development" !== 'production') {
1142 + "development" !== 'production' ? warning(!Constructor.prototype.componentShouldUpdate, '%s has a method called ' + 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + 'The name is phrased as a question because the function is ' + 'expected to return a value.', spec.displayName || 'A component') : void 0;
1143 + "development" !== 'production' ? warning(!Constructor.prototype.componentWillRecieveProps, '%s has a method called ' + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', spec.displayName || 'A component') : void 0;
1144 + }
1145 +
1146 + // Reduce time spent doing lookups by setting these on the prototype.
1147 + for (var methodName in ReactClassInterface) {
1148 + if (!Constructor.prototype[methodName]) {
1149 + Constructor.prototype[methodName] = null;
1150 + }
1151 + }
1152 +
1153 + return Constructor;
1154 + }
1155 +
1156 +};
1157 +
1158 +module.exports = ReactClass;
1159 +},{"10":10,"13":13,"14":14,"25":25,"28":28,"29":29,"30":30,"31":31,"6":6}],6:[function(_dereq_,module,exports){
1160 +/**
1161 + * Copyright 2013-present, Facebook, Inc.
1162 + * All rights reserved.
1163 + *
1164 + * This source code is licensed under the BSD-style license found in the
1165 + * LICENSE file in the root directory of this source tree. An additional grant
1166 + * of patent rights can be found in the PATENTS file in the same directory.
1167 + *
1168 + */
1169 +
1170 +'use strict';
1171 +
1172 +var _prodInvariant = _dereq_(25);
1173 +
1174 +var ReactNoopUpdateQueue = _dereq_(13);
1175 +
1176 +var canDefineProperty = _dereq_(20);
1177 +var emptyObject = _dereq_(28);
1178 +var invariant = _dereq_(29);
1179 +var warning = _dereq_(30);
1180 +
1181 +/**
1182 + * Base class helpers for the updating state of a component.
1183 + */
1184 +function ReactComponent(props, context, updater) {
1185 + this.props = props;
1186 + this.context = context;
1187 + this.refs = emptyObject;
1188 + // We initialize the default updater but the real one gets injected by the
1189 + // renderer.
1190 + this.updater = updater || ReactNoopUpdateQueue;
1191 +}
1192 +
1193 +ReactComponent.prototype.isReactComponent = {};
1194 +
1195 +/**
1196 + * Sets a subset of the state. Always use this to mutate
1197 + * state. You should treat `this.state` as immutable.
1198 + *
1199 + * There is no guarantee that `this.state` will be immediately updated, so
1200 + * accessing `this.state` after calling this method may return the old value.
1201 + *
1202 + * There is no guarantee that calls to `setState` will run synchronously,
1203 + * as they may eventually be batched together. You can provide an optional
1204 + * callback that will be executed when the call to setState is actually
1205 + * completed.
1206 + *
1207 + * When a function is provided to setState, it will be called at some point in
1208 + * the future (not synchronously). It will be called with the up to date
1209 + * component arguments (state, props, context). These values can be different
1210 + * from this.* because your function may be called after receiveProps but before
1211 + * shouldComponentUpdate, and this new state, props, and context will not yet be
1212 + * assigned to this.
1213 + *
1214 + * @param {object|function} partialState Next partial state or function to
1215 + * produce next partial state to be merged with current state.
1216 + * @param {?function} callback Called after state is updated.
1217 + * @final
1218 + * @protected
1219 + */
1220 +ReactComponent.prototype.setState = function (partialState, callback) {
1221 + !(typeof partialState === 'object' || typeof partialState === 'function' || partialState == null) ? "development" !== 'production' ? invariant(false, 'setState(...): takes an object of state variables to update or a function which returns an object of state variables.') : _prodInvariant('85') : void 0;
1222 + this.updater.enqueueSetState(this, partialState, callback, 'setState');
1223 +};
1224 +
1225 +/**
1226 + * Forces an update. This should only be invoked when it is known with
1227 + * certainty that we are **not** in a DOM transaction.
1228 + *
1229 + * You may want to call this when you know that some deeper aspect of the
1230 + * component's state has changed but `setState` was not called.
1231 + *
1232 + * This will not invoke `shouldComponentUpdate`, but it will invoke
1233 + * `componentWillUpdate` and `componentDidUpdate`.
1234 + *
1235 + * @param {?function} callback Called after update is complete.
1236 + * @final
1237 + * @protected
1238 + */
1239 +ReactComponent.prototype.forceUpdate = function (callback) {
1240 + this.updater.enqueueForceUpdate(this, callback, 'forceUpdate');
1241 +};
1242 +
1243 +/**
1244 + * Deprecated APIs. These APIs used to exist on classic React classes but since
1245 + * we would like to deprecate them, we're not going to move them over to this
1246 + * modern base class. Instead, we define a getter that warns if it's accessed.
1247 + */
1248 +if ("development" !== 'production') {
1249 + var deprecatedAPIs = {
1250 + isMounted: ['isMounted', 'Instead, make sure to clean up subscriptions and pending requests in ' + 'componentWillUnmount to prevent memory leaks.'],
1251 + replaceState: ['replaceState', 'Refactor your code to use setState instead (see ' + 'https://github.com/facebook/react/issues/3236).']
1252 + };
1253 + var defineDeprecationWarning = function (methodName, info) {
1254 + if (canDefineProperty) {
1255 + Object.defineProperty(ReactComponent.prototype, methodName, {
1256 + get: function () {
1257 + "development" !== 'production' ? warning(false, '%s(...) is deprecated in plain JavaScript React classes. %s', info[0], info[1]) : void 0;
1258 + return undefined;
1259 + }
1260 + });
1261 + }
1262 + };
1263 + for (var fnName in deprecatedAPIs) {
1264 + if (deprecatedAPIs.hasOwnProperty(fnName)) {
1265 + defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);
1266 + }
1267 + }
1268 +}
1269 +
1270 +module.exports = ReactComponent;
1271 +},{"13":13,"20":20,"25":25,"28":28,"29":29,"30":30}],7:[function(_dereq_,module,exports){
1272 +/**
1273 + * Copyright 2016-present, Facebook, Inc.
1274 + * All rights reserved.
1275 + *
1276 + * This source code is licensed under the BSD-style license found in the
1277 + * LICENSE file in the root directory of this source tree. An additional grant
1278 + * of patent rights can be found in the PATENTS file in the same directory.
1279 + *
1280 + *
1281 + */
1282 +
1283 +'use strict';
1284 +
1285 +var _prodInvariant = _dereq_(25);
1286 +
1287 +var ReactCurrentOwner = _dereq_(8);
1288 +var ReactTypeOfWork = _dereq_(17);
1289 +var IndeterminateComponent = ReactTypeOfWork.IndeterminateComponent,
1290 + FunctionalComponent = ReactTypeOfWork.FunctionalComponent,
1291 + ClassComponent = ReactTypeOfWork.ClassComponent,
1292 + HostComponent = ReactTypeOfWork.HostComponent;
1293 +
1294 +
1295 +var getComponentName = _dereq_(22);
1296 +var invariant = _dereq_(29);
1297 +var warning = _dereq_(30);
1298 +
1299 +function isNative(fn) {
1300 + // Based on isNative() from Lodash
1301 + var funcToString = Function.prototype.toString;
1302 + var hasOwnProperty = Object.prototype.hasOwnProperty;
1303 + var reIsNative = RegExp('^' + funcToString
1304 + // Take an example native function source for comparison
1305 + .call(hasOwnProperty)
1306 + // Strip regex characters so we can use it for regex
1307 + .replace(/[\\^$.*+?()[\]{}|]/g, '\\$&')
1308 + // Remove hasOwnProperty from the template to make it generic
1309 + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$');
1310 + try {
1311 + var source = funcToString.call(fn);
1312 + return reIsNative.test(source);
1313 + } catch (err) {
1314 + return false;
1315 + }
1316 +}
1317 +
1318 +var canUseCollections =
1319 +// Array.from
1320 +typeof Array.from === 'function' &&
1321 +// Map
1322 +typeof Map === 'function' && isNative(Map) &&
1323 +// Map.prototype.keys
1324 +Map.prototype != null && typeof Map.prototype.keys === 'function' && isNative(Map.prototype.keys) &&
1325 +// Set
1326 +typeof Set === 'function' && isNative(Set) &&
1327 +// Set.prototype.keys
1328 +Set.prototype != null && typeof Set.prototype.keys === 'function' && isNative(Set.prototype.keys);
1329 +
1330 +var setItem;
1331 +var getItem;
1332 +var removeItem;
1333 +var getItemIDs;
1334 +var addRoot;
1335 +var removeRoot;
1336 +var getRootIDs;
1337 +
1338 +if (canUseCollections) {
1339 + var itemMap = new Map();
1340 + var rootIDSet = new Set();
1341 +
1342 + setItem = function (id, item) {
1343 + itemMap.set(id, item);
1344 + };
1345 + getItem = function (id) {
1346 + return itemMap.get(id);
1347 + };
1348 + removeItem = function (id) {
1349 + itemMap['delete'](id);
1350 + };
1351 + getItemIDs = function () {
1352 + return Array.from(itemMap.keys());
1353 + };
1354 +
1355 + addRoot = function (id) {
1356 + rootIDSet.add(id);
1357 + };
1358 + removeRoot = function (id) {
1359 + rootIDSet['delete'](id);
1360 + };
1361 + getRootIDs = function () {
1362 + return Array.from(rootIDSet.keys());
1363 + };
1364 +} else {
1365 + var itemByKey = {};
1366 + var rootByKey = {};
1367 +
1368 + // Use non-numeric keys to prevent V8 performance issues:
1369 + // https://github.com/facebook/react/pull/7232
1370 + var getKeyFromID = function (id) {
1371 + return '.' + id;
1372 + };
1373 + var getIDFromKey = function (key) {
1374 + return parseInt(key.substr(1), 10);
1375 + };
1376 +
1377 + setItem = function (id, item) {
1378 + var key = getKeyFromID(id);
1379 + itemByKey[key] = item;
1380 + };
1381 + getItem = function (id) {
1382 + var key = getKeyFromID(id);
1383 + return itemByKey[key];
1384 + };
1385 + removeItem = function (id) {
1386 + var key = getKeyFromID(id);
1387 + delete itemByKey[key];
1388 + };
1389 + getItemIDs = function () {
1390 + return Object.keys(itemByKey).map(getIDFromKey);
1391 + };
1392 +
1393 + addRoot = function (id) {
1394 + var key = getKeyFromID(id);
1395 + rootByKey[key] = true;
1396 + };
1397 + removeRoot = function (id) {
1398 + var key = getKeyFromID(id);
1399 + delete rootByKey[key];
1400 + };
1401 + getRootIDs = function () {
1402 + return Object.keys(rootByKey).map(getIDFromKey);
1403 + };
1404 +}
1405 +
1406 +var unmountedIDs = [];
1407 +
1408 +function purgeDeep(id) {
1409 + var item = getItem(id);
1410 + if (item) {
1411 + var childIDs = item.childIDs;
1412 +
1413 + removeItem(id);
1414 + childIDs.forEach(purgeDeep);
1415 + }
1416 +}
1417 +
1418 +function describeComponentFrame(name, source, ownerName) {
1419 + return '\n in ' + (name || 'Unknown') + (source ? ' (at ' + source.fileName.replace(/^.*[\\\/]/, '') + ':' + source.lineNumber + ')' : ownerName ? ' (created by ' + ownerName + ')' : '');
1420 +}
1421 +
1422 +function getDisplayName(element) {
1423 + if (element == null) {
1424 + return '#empty';
1425 + } else if (typeof element === 'string' || typeof element === 'number') {
1426 + return '#text';
1427 + } else if (typeof element.type === 'string') {
1428 + return element.type;
1429 + } else {
1430 + return element.type.displayName || element.type.name || 'Unknown';
1431 + }
1432 +}
1433 +
1434 +function describeID(id) {
1435 + var name = ReactComponentTreeHook.getDisplayName(id);
1436 + var element = ReactComponentTreeHook.getElement(id);
1437 + var ownerID = ReactComponentTreeHook.getOwnerID(id);
1438 + var ownerName;
1439 + if (ownerID) {
1440 + ownerName = ReactComponentTreeHook.getDisplayName(ownerID);
1441 + }
1442 + "development" !== 'production' ? warning(element, 'ReactComponentTreeHook: Missing React element for debugID %s when ' + 'building stack', id) : void 0;
1443 + return describeComponentFrame(name, element && element._source, ownerName);
1444 +}
1445 +
1446 +function describeFiber(fiber) {
1447 + switch (fiber.tag) {
1448 + case IndeterminateComponent:
1449 + case FunctionalComponent:
1450 + case ClassComponent:
1451 + case HostComponent:
1452 + var owner = fiber._debugOwner;
1453 + var source = fiber._debugSource;
1454 + var name = getComponentName(fiber);
1455 + var ownerName = null;
1456 + if (owner) {
1457 + ownerName = getComponentName(owner);
1458 + }
1459 + return describeComponentFrame(name, source, ownerName);
1460 + default:
1461 + return '';
1462 + }
1463 +}
1464 +
1465 +var ReactComponentTreeHook = {
1466 + onSetChildren: function (id, nextChildIDs) {
1467 + var item = getItem(id);
1468 + invariant(item, 'Item must have been set');
1469 + item.childIDs = nextChildIDs;
1470 +
1471 + for (var i = 0; i < nextChildIDs.length; i++) {
1472 + var nextChildID = nextChildIDs[i];
1473 + var nextChild = getItem(nextChildID);
1474 + !nextChild ? "development" !== 'production' ? invariant(false, 'Expected hook events to fire for the child before its parent includes it in onSetChildren().') : _prodInvariant('140') : void 0;
1475 + !(nextChild.childIDs != null || typeof nextChild.element !== 'object' || nextChild.element == null) ? "development" !== 'production' ? invariant(false, 'Expected onSetChildren() to fire for a container child before its parent includes it in onSetChildren().') : _prodInvariant('141') : void 0;
1476 + !nextChild.isMounted ? "development" !== 'production' ? invariant(false, 'Expected onMountComponent() to fire for the child before its parent includes it in onSetChildren().') : _prodInvariant('71') : void 0;
1477 + if (nextChild.parentID == null) {
1478 + nextChild.parentID = id;
1479 + // TODO: This shouldn't be necessary but mounting a new root during in
1480 + // componentWillMount currently causes not-yet-mounted components to
1481 + // be purged from our tree data so their parent id is missing.
1482 + }
1483 + !(nextChild.parentID === id) ? "development" !== 'production' ? invariant(false, 'Expected onBeforeMountComponent() parent and onSetChildren() to be consistent (%s has parents %s and %s).', nextChildID, nextChild.parentID, id) : _prodInvariant('142', nextChildID, nextChild.parentID, id) : void 0;
1484 + }
1485 + },
1486 + onBeforeMountComponent: function (id, element, parentID) {
1487 + var item = {
1488 + element: element,
1489 + parentID: parentID,
1490 + text: null,
1491 + childIDs: [],
1492 + isMounted: false,
1493 + updateCount: 0
1494 + };
1495 + setItem(id, item);
1496 + },
1497 + onBeforeUpdateComponent: function (id, element) {
1498 + var item = getItem(id);
1499 + if (!item || !item.isMounted) {
1500 + // We may end up here as a result of setState() in componentWillUnmount().
1501 + // In this case, ignore the element.
1502 + return;
1503 + }
1504 + item.element = element;
1505 + },
1506 + onMountComponent: function (id) {
1507 + var item = getItem(id);
1508 + invariant(item, 'Item must have been set');
1509 + item.isMounted = true;
1510 + var isRoot = item.parentID === 0;
1511 + if (isRoot) {
1512 + addRoot(id);
1513 + }
1514 + },
1515 + onUpdateComponent: function (id) {
1516 + var item = getItem(id);
1517 + if (!item || !item.isMounted) {
1518 + // We may end up here as a result of setState() in componentWillUnmount().
1519 + // In this case, ignore the element.
1520 + return;
1521 + }
1522 + item.updateCount++;
1523 + },
1524 + onUnmountComponent: function (id) {
1525 + var item = getItem(id);
1526 + if (item) {
1527 + // We need to check if it exists.
1528 + // `item` might not exist if it is inside an error boundary, and a sibling
1529 + // error boundary child threw while mounting. Then this instance never
1530 + // got a chance to mount, but it still gets an unmounting event during
1531 + // the error boundary cleanup.
1532 + item.isMounted = false;
1533 + var isRoot = item.parentID === 0;
1534 + if (isRoot) {
1535 + removeRoot(id);
1536 + }
1537 + }
1538 + unmountedIDs.push(id);
1539 + },
1540 + purgeUnmountedComponents: function () {
1541 + if (ReactComponentTreeHook._preventPurging) {
1542 + // Should only be used for testing.
1543 + return;
1544 + }
1545 +
1546 + for (var i = 0; i < unmountedIDs.length; i++) {
1547 + var id = unmountedIDs[i];
1548 + purgeDeep(id);
1549 + }
1550 + unmountedIDs.length = 0;
1551 + },
1552 + isMounted: function (id) {
1553 + var item = getItem(id);
1554 + return item ? item.isMounted : false;
1555 + },
1556 + getCurrentStackAddendum: function (topElement) {
1557 + var info = '';
1558 + if (topElement) {
1559 + var name = getDisplayName(topElement);
1560 + var owner = topElement._owner;
1561 + info += describeComponentFrame(name, topElement._source, owner && getComponentName(owner));
1562 + }
1563 +
1564 + var currentOwner = ReactCurrentOwner.current;
1565 + if (currentOwner) {
1566 + if (typeof currentOwner.tag === 'number') {
1567 + var workInProgress = currentOwner;
1568 + // Safe because if current owner exists, we are reconciling,
1569 + // and it is guaranteed to be the work-in-progress version.
1570 + info += ReactComponentTreeHook.getStackAddendumByWorkInProgressFiber(workInProgress);
1571 + } else if (typeof currentOwner._debugID === 'number') {
1572 + info += ReactComponentTreeHook.getStackAddendumByID(currentOwner._debugID);
1573 + }
1574 + }
1575 + return info;
1576 + },
1577 + getStackAddendumByID: function (id) {
1578 + var info = '';
1579 + while (id) {
1580 + info += describeID(id);
1581 + id = ReactComponentTreeHook.getParentID(id);
1582 + }
1583 + return info;
1584 + },
1585 +
1586 +
1587 + // This function can only be called with a work-in-progress fiber and
1588 + // only during begin or complete phase. Do not call it under any other
1589 + // circumstances.
1590 + getStackAddendumByWorkInProgressFiber: function (workInProgress) {
1591 + var info = '';
1592 + var node = workInProgress;
1593 + do {
1594 + info += describeFiber(node);
1595 + // Otherwise this return pointer might point to the wrong tree:
1596 + node = node['return'];
1597 + } while (node);
1598 + return info;
1599 + },
1600 + getChildIDs: function (id) {
1601 + var item = getItem(id);
1602 + return item ? item.childIDs : [];
1603 + },
1604 + getDisplayName: function (id) {
1605 + var element = ReactComponentTreeHook.getElement(id);
1606 + if (!element) {
1607 + return null;
1608 + }
1609 + return getDisplayName(element);
1610 + },
1611 + getElement: function (id) {
1612 + var item = getItem(id);
1613 + return item ? item.element : null;
1614 + },
1615 + getOwnerID: function (id) {
1616 + var element = ReactComponentTreeHook.getElement(id);
1617 + if (!element || !element._owner) {
1618 + return null;
1619 + }
1620 + return element._owner._debugID;
1621 + },
1622 + getParentID: function (id) {
1623 + var item = getItem(id);
1624 + return item ? item.parentID : null;
1625 + },
1626 + getSource: function (id) {
1627 + var item = getItem(id);
1628 + var element = item ? item.element : null;
1629 + var source = element != null ? element._source : null;
1630 + return source;
1631 + },
1632 + getText: function (id) {
1633 + var element = ReactComponentTreeHook.getElement(id);
1634 + if (typeof element === 'string') {
1635 + return element;
1636 + } else if (typeof element === 'number') {
1637 + return '' + element;
1638 + } else {
1639 + return null;
1640 + }
1641 + },
1642 + getUpdateCount: function (id) {
1643 + var item = getItem(id);
1644 + return item ? item.updateCount : 0;
1645 + },
1646 +
1647 +
1648 + getRootIDs: getRootIDs,
1649 + getRegisteredIDs: getItemIDs
1650 +};
1651 +
1652 +module.exports = ReactComponentTreeHook;
1653 +},{"17":17,"22":22,"25":25,"29":29,"30":30,"8":8}],8:[function(_dereq_,module,exports){
1654 +/**
1655 + * Copyright 2013-present, Facebook, Inc.
1656 + * All rights reserved.
1657 + *
1658 + * This source code is licensed under the BSD-style license found in the
1659 + * LICENSE file in the root directory of this source tree. An additional grant
1660 + * of patent rights can be found in the PATENTS file in the same directory.
1661 + *
1662 + *
1663 + */
1664 +
1665 +'use strict';
1666 +
1667 +/**
1668 + * Keeps track of the current owner.
1669 + *
1670 + * The current owner is the component who should own any components that are
1671 + * currently being constructed.
1672 + */
1673 +var ReactCurrentOwner = {
1674 +
1675 + /**
1676 + * @internal
1677 + * @type {ReactComponent}
1678 + */
1679 + current: null
1680 +
1681 +};
1682 +
1683 +module.exports = ReactCurrentOwner;
1684 +},{}],9:[function(_dereq_,module,exports){
1685 +/**
1686 + * Copyright 2013-present, Facebook, Inc.
1687 + * All rights reserved.
1688 + *
1689 + * This source code is licensed under the BSD-style license found in the
1690 + * LICENSE file in the root directory of this source tree. An additional grant
1691 + * of patent rights can be found in the PATENTS file in the same directory.
1692 + *
1693 + */
1694 +
1695 +'use strict';
1696 +
1697 +var ReactElement = _dereq_(10);
1698 +
1699 +/**
1700 + * Create a factory that creates HTML tag elements.
1701 + *
1702 + * @private
1703 + */
1704 +var createDOMFactory = ReactElement.createFactory;
1705 +if ("development" !== 'production') {
1706 + var ReactElementValidator = _dereq_(12);
1707 + createDOMFactory = ReactElementValidator.createFactory;
1708 +}
1709 +
1710 +/**
1711 + * Creates a mapping from supported HTML tags to `ReactDOMComponent` classes.
1712 + * This is also accessible via `React.DOM`.
1713 + *
1714 + * @public
1715 + */
1716 +var ReactDOMFactories = {
1717 + a: createDOMFactory('a'),
1718 + abbr: createDOMFactory('abbr'),
1719 + address: createDOMFactory('address'),
1720 + area: createDOMFactory('area'),
1721 + article: createDOMFactory('article'),
1722 + aside: createDOMFactory('aside'),
1723 + audio: createDOMFactory('audio'),
1724 + b: createDOMFactory('b'),
1725 + base: createDOMFactory('base'),
1726 + bdi: createDOMFactory('bdi'),
1727 + bdo: createDOMFactory('bdo'),
1728 + big: createDOMFactory('big'),
1729 + blockquote: createDOMFactory('blockquote'),
1730 + body: createDOMFactory('body'),
1731 + br: createDOMFactory('br'),
1732 + button: createDOMFactory('button'),
1733 + canvas: createDOMFactory('canvas'),
1734 + caption: createDOMFactory('caption'),
1735 + cite: createDOMFactory('cite'),
1736 + code: createDOMFactory('code'),
1737 + col: createDOMFactory('col'),
1738 + colgroup: createDOMFactory('colgroup'),
1739 + data: createDOMFactory('data'),
1740 + datalist: createDOMFactory('datalist'),
1741 + dd: createDOMFactory('dd'),
1742 + del: createDOMFactory('del'),
1743 + details: createDOMFactory('details'),
1744 + dfn: createDOMFactory('dfn'),
1745 + dialog: createDOMFactory('dialog'),
1746 + div: createDOMFactory('div'),
1747 + dl: createDOMFactory('dl'),
1748 + dt: createDOMFactory('dt'),
1749 + em: createDOMFactory('em'),
1750 + embed: createDOMFactory('embed'),
1751 + fieldset: createDOMFactory('fieldset'),
1752 + figcaption: createDOMFactory('figcaption'),
1753 + figure: createDOMFactory('figure'),
1754 + footer: createDOMFactory('footer'),
1755 + form: createDOMFactory('form'),
1756 + h1: createDOMFactory('h1'),
1757 + h2: createDOMFactory('h2'),
1758 + h3: createDOMFactory('h3'),
1759 + h4: createDOMFactory('h4'),
1760 + h5: createDOMFactory('h5'),
1761 + h6: createDOMFactory('h6'),
1762 + head: createDOMFactory('head'),
1763 + header: createDOMFactory('header'),
1764 + hgroup: createDOMFactory('hgroup'),
1765 + hr: createDOMFactory('hr'),
1766 + html: createDOMFactory('html'),
1767 + i: createDOMFactory('i'),
1768 + iframe: createDOMFactory('iframe'),
1769 + img: createDOMFactory('img'),
1770 + input: createDOMFactory('input'),
1771 + ins: createDOMFactory('ins'),
1772 + kbd: createDOMFactory('kbd'),
1773 + keygen: createDOMFactory('keygen'),
1774 + label: createDOMFactory('label'),
1775 + legend: createDOMFactory('legend'),
1776 + li: createDOMFactory('li'),
1777 + link: createDOMFactory('link'),
1778 + main: createDOMFactory('main'),
1779 + map: createDOMFactory('map'),
1780 + mark: createDOMFactory('mark'),
1781 + menu: createDOMFactory('menu'),
1782 + menuitem: createDOMFactory('menuitem'),
1783 + meta: createDOMFactory('meta'),
1784 + meter: createDOMFactory('meter'),
1785 + nav: createDOMFactory('nav'),
1786 + noscript: createDOMFactory('noscript'),
1787 + object: createDOMFactory('object'),
1788 + ol: createDOMFactory('ol'),
1789 + optgroup: createDOMFactory('optgroup'),
1790 + option: createDOMFactory('option'),
1791 + output: createDOMFactory('output'),
1792 + p: createDOMFactory('p'),
1793 + param: createDOMFactory('param'),
1794 + picture: createDOMFactory('picture'),
1795 + pre: createDOMFactory('pre'),
1796 + progress: createDOMFactory('progress'),
1797 + q: createDOMFactory('q'),
1798 + rp: createDOMFactory('rp'),
1799 + rt: createDOMFactory('rt'),
1800 + ruby: createDOMFactory('ruby'),
1801 + s: createDOMFactory('s'),
1802 + samp: createDOMFactory('samp'),
1803 + script: createDOMFactory('script'),
1804 + section: createDOMFactory('section'),
1805 + select: createDOMFactory('select'),
1806 + small: createDOMFactory('small'),
1807 + source: createDOMFactory('source'),
1808 + span: createDOMFactory('span'),
1809 + strong: createDOMFactory('strong'),
1810 + style: createDOMFactory('style'),
1811 + sub: createDOMFactory('sub'),
1812 + summary: createDOMFactory('summary'),
1813 + sup: createDOMFactory('sup'),
1814 + table: createDOMFactory('table'),
1815 + tbody: createDOMFactory('tbody'),
1816 + td: createDOMFactory('td'),
1817 + textarea: createDOMFactory('textarea'),
1818 + tfoot: createDOMFactory('tfoot'),
1819 + th: createDOMFactory('th'),
1820 + thead: createDOMFactory('thead'),
1821 + time: createDOMFactory('time'),
1822 + title: createDOMFactory('title'),
1823 + tr: createDOMFactory('tr'),
1824 + track: createDOMFactory('track'),
1825 + u: createDOMFactory('u'),
1826 + ul: createDOMFactory('ul'),
1827 + 'var': createDOMFactory('var'),
1828 + video: createDOMFactory('video'),
1829 + wbr: createDOMFactory('wbr'),
1830 +
1831 + // SVG
1832 + circle: createDOMFactory('circle'),
1833 + clipPath: createDOMFactory('clipPath'),
1834 + defs: createDOMFactory('defs'),
1835 + ellipse: createDOMFactory('ellipse'),
1836 + g: createDOMFactory('g'),
1837 + image: createDOMFactory('image'),
1838 + line: createDOMFactory('line'),
1839 + linearGradient: createDOMFactory('linearGradient'),
1840 + mask: createDOMFactory('mask'),
1841 + path: createDOMFactory('path'),
1842 + pattern: createDOMFactory('pattern'),
1843 + polygon: createDOMFactory('polygon'),
1844 + polyline: createDOMFactory('polyline'),
1845 + radialGradient: createDOMFactory('radialGradient'),
1846 + rect: createDOMFactory('rect'),
1847 + stop: createDOMFactory('stop'),
1848 + svg: createDOMFactory('svg'),
1849 + text: createDOMFactory('text'),
1850 + tspan: createDOMFactory('tspan')
1851 +};
1852 +
1853 +module.exports = ReactDOMFactories;
1854 +},{"10":10,"12":12}],10:[function(_dereq_,module,exports){
1855 +/**
1856 + * Copyright 2014-present, Facebook, Inc.
1857 + * All rights reserved.
1858 + *
1859 + * This source code is licensed under the BSD-style license found in the
1860 + * LICENSE file in the root directory of this source tree. An additional grant
1861 + * of patent rights can be found in the PATENTS file in the same directory.
1862 + *
1863 + */
1864 +
1865 +'use strict';
1866 +
1867 +var _assign = _dereq_(31);
1868 +
1869 +var ReactCurrentOwner = _dereq_(8);
1870 +
1871 +var warning = _dereq_(30);
1872 +var canDefineProperty = _dereq_(20);
1873 +var hasOwnProperty = Object.prototype.hasOwnProperty;
1874 +
1875 +var REACT_ELEMENT_TYPE = _dereq_(11);
1876 +
1877 +var RESERVED_PROPS = {
1878 + key: true,
1879 + ref: true,
1880 + __self: true,
1881 + __source: true
1882 +};
1883 +
1884 +var specialPropKeyWarningShown, specialPropRefWarningShown;
1885 +
1886 +function hasValidRef(config) {
1887 + if ("development" !== 'production') {
1888 + if (hasOwnProperty.call(config, 'ref')) {
1889 + var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;
1890 + if (getter && getter.isReactWarning) {
1891 + return false;
1892 + }
1893 + }
1894 + }
1895 + return config.ref !== undefined;
1896 +}
1897 +
1898 +function hasValidKey(config) {
1899 + if ("development" !== 'production') {
1900 + if (hasOwnProperty.call(config, 'key')) {
1901 + var getter = Object.getOwnPropertyDescriptor(config, 'key').get;
1902 + if (getter && getter.isReactWarning) {
1903 + return false;
1904 + }
1905 + }
1906 + }
1907 + return config.key !== undefined;
1908 +}
1909 +
1910 +function defineKeyPropWarningGetter(props, displayName) {
1911 + var warnAboutAccessingKey = function () {
1912 + if (!specialPropKeyWarningShown) {
1913 + specialPropKeyWarningShown = true;
1914 + "development" !== 'production' ? warning(false, '%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', displayName) : void 0;
1915 + }
1916 + };
1917 + warnAboutAccessingKey.isReactWarning = true;
1918 + Object.defineProperty(props, 'key', {
1919 + get: warnAboutAccessingKey,
1920 + configurable: true
1921 + });
1922 +}
1923 +
1924 +function defineRefPropWarningGetter(props, displayName) {
1925 + var warnAboutAccessingRef = function () {
1926 + if (!specialPropRefWarningShown) {
1927 + specialPropRefWarningShown = true;
1928 + "development" !== 'production' ? warning(false, '%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', displayName) : void 0;
1929 + }
1930 + };
1931 + warnAboutAccessingRef.isReactWarning = true;
1932 + Object.defineProperty(props, 'ref', {
1933 + get: warnAboutAccessingRef,
1934 + configurable: true
1935 + });
1936 +}
1937 +
1938 +/**
1939 + * Factory method to create a new React element. This no longer adheres to
1940 + * the class pattern, so do not use new to call it. Also, no instanceof check
1941 + * will work. Instead test $$typeof field against Symbol.for('react.element') to check
1942 + * if something is a React Element.
1943 + *
1944 + * @param {*} type
1945 + * @param {*} key
1946 + * @param {string|object} ref
1947 + * @param {*} self A *temporary* helper to detect places where `this` is
1948 + * different from the `owner` when React.createElement is called, so that we
1949 + * can warn. We want to get rid of owner and replace string `ref`s with arrow
1950 + * functions, and as long as `this` and owner are the same, there will be no
1951 + * change in behavior.
1952 + * @param {*} source An annotation object (added by a transpiler or otherwise)
1953 + * indicating filename, line number, and/or other information.
1954 + * @param {*} owner
1955 + * @param {*} props
1956 + * @internal
1957 + */
1958 +var ReactElement = function (type, key, ref, self, source, owner, props) {
1959 + var element = {
1960 + // This tag allow us to uniquely identify this as a React Element
1961 + $$typeof: REACT_ELEMENT_TYPE,
1962 +
1963 + // Built-in properties that belong on the element
1964 + type: type,
1965 + key: key,
1966 + ref: ref,
1967 + props: props,
1968 +
1969 + // Record the component responsible for creating this element.
1970 + _owner: owner
1971 + };
1972 +
1973 + if ("development" !== 'production') {
1974 + // The validation flag is currently mutative. We put it on
1975 + // an external backing store so that we can freeze the whole object.
1976 + // This can be replaced with a WeakMap once they are implemented in
1977 + // commonly used development environments.
1978 + element._store = {};
1979 +
1980 + // To make comparing ReactElements easier for testing purposes, we make
1981 + // the validation flag non-enumerable (where possible, which should
1982 + // include every environment we run tests in), so the test framework
1983 + // ignores it.
1984 + if (canDefineProperty) {
1985 + Object.defineProperty(element._store, 'validated', {
1986 + configurable: false,
1987 + enumerable: false,
1988 + writable: true,
1989 + value: false
1990 + });
1991 + // self and source are DEV only properties.
1992 + Object.defineProperty(element, '_self', {
1993 + configurable: false,
1994 + enumerable: false,
1995 + writable: false,
1996 + value: self
1997 + });
1998 + // Two elements created in two different places should be considered
1999 + // equal for testing purposes and therefore we hide it from enumeration.
2000 + Object.defineProperty(element, '_source', {
2001 + configurable: false,
2002 + enumerable: false,
2003 + writable: false,
2004 + value: source
2005 + });
2006 + } else {
2007 + element._store.validated = false;
2008 + element._self = self;
2009 + element._source = source;
2010 + }
2011 + if (Object.freeze) {
2012 + Object.freeze(element.props);
2013 + Object.freeze(element);
2014 + }
2015 + }
2016 +
2017 + return element;
2018 +};
2019 +
2020 +/**
2021 + * Create and return a new ReactElement of the given type.
2022 + * See https://facebook.github.io/react/docs/react-api.html#createelement
2023 + */
2024 +ReactElement.createElement = function (type, config, children) {
2025 + var propName;
2026 +
2027 + // Reserved names are extracted
2028 + var props = {};
2029 +
2030 + var key = null;
2031 + var ref = null;
2032 + var self = null;
2033 + var source = null;
2034 +
2035 + if (config != null) {
2036 + if (hasValidRef(config)) {
2037 + ref = config.ref;
2038 + }
2039 + if (hasValidKey(config)) {
2040 + key = '' + config.key;
2041 + }
2042 +
2043 + self = config.__self === undefined ? null : config.__self;
2044 + source = config.__source === undefined ? null : config.__source;
2045 + // Remaining properties are added to a new props object
2046 + for (propName in config) {
2047 + if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
2048 + props[propName] = config[propName];
2049 + }
2050 + }
2051 + }
2052 +
2053 + // Children can be more than one argument, and those are transferred onto
2054 + // the newly allocated props object.
2055 + var childrenLength = arguments.length - 2;
2056 + if (childrenLength === 1) {
2057 + props.children = children;
2058 + } else if (childrenLength > 1) {
2059 + var childArray = Array(childrenLength);
2060 + for (var i = 0; i < childrenLength; i++) {
2061 + childArray[i] = arguments[i + 2];
2062 + }
2063 + if ("development" !== 'production') {
2064 + if (Object.freeze) {
2065 + Object.freeze(childArray);
2066 + }
2067 + }
2068 + props.children = childArray;
2069 + }
2070 +
2071 + // Resolve default props
2072 + if (type && type.defaultProps) {
2073 + var defaultProps = type.defaultProps;
2074 + for (propName in defaultProps) {
2075 + if (props[propName] === undefined) {
2076 + props[propName] = defaultProps[propName];
2077 + }
2078 + }
2079 + }
2080 + if ("development" !== 'production') {
2081 + if (key || ref) {
2082 + if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {
2083 + var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;
2084 + if (key) {
2085 + defineKeyPropWarningGetter(props, displayName);
2086 + }
2087 + if (ref) {
2088 + defineRefPropWarningGetter(props, displayName);
2089 + }
2090 + }
2091 + }
2092 + }
2093 + return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
2094 +};
2095 +
2096 +/**
2097 + * Return a function that produces ReactElements of a given type.
2098 + * See https://facebook.github.io/react/docs/react-api.html#createfactory
2099 + */
2100 +ReactElement.createFactory = function (type) {
2101 + var factory = ReactElement.createElement.bind(null, type);
2102 + // Expose the type on the factory and the prototype so that it can be
2103 + // easily accessed on elements. E.g. `<Foo />.type === Foo`.
2104 + // This should not be named `constructor` since this may not be the function
2105 + // that created the element, and it may not even be a constructor.
2106 + // Legacy hook TODO: Warn if this is accessed
2107 + factory.type = type;
2108 + return factory;
2109 +};
2110 +
2111 +ReactElement.cloneAndReplaceKey = function (oldElement, newKey) {
2112 + var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props);
2113 +
2114 + return newElement;
2115 +};
2116 +
2117 +/**
2118 + * Clone and return a new ReactElement using element as the starting point.
2119 + * See https://facebook.github.io/react/docs/react-api.html#cloneelement
2120 + */
2121 +ReactElement.cloneElement = function (element, config, children) {
2122 + var propName;
2123 +
2124 + // Original props are copied
2125 + var props = _assign({}, element.props);
2126 +
2127 + // Reserved names are extracted
2128 + var key = element.key;
2129 + var ref = element.ref;
2130 + // Self is preserved since the owner is preserved.
2131 + var self = element._self;
2132 + // Source is preserved since cloneElement is unlikely to be targeted by a
2133 + // transpiler, and the original source is probably a better indicator of the
2134 + // true owner.
2135 + var source = element._source;
2136 +
2137 + // Owner will be preserved, unless ref is overridden
2138 + var owner = element._owner;
2139 +
2140 + if (config != null) {
2141 + if (hasValidRef(config)) {
2142 + // Silently steal the ref from the parent.
2143 + ref = config.ref;
2144 + owner = ReactCurrentOwner.current;
2145 + }
2146 + if (hasValidKey(config)) {
2147 + key = '' + config.key;
2148 + }
2149 +
2150 + // Remaining properties override existing props
2151 + var defaultProps;
2152 + if (element.type && element.type.defaultProps) {
2153 + defaultProps = element.type.defaultProps;
2154 + }
2155 + for (propName in config) {
2156 + if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
2157 + if (config[propName] === undefined && defaultProps !== undefined) {
2158 + // Resolve default props
2159 + props[propName] = defaultProps[propName];
2160 + } else {
2161 + props[propName] = config[propName];
2162 + }
2163 + }
2164 + }
2165 + }
2166 +
2167 + // Children can be more than one argument, and those are transferred onto
2168 + // the newly allocated props object.
2169 + var childrenLength = arguments.length - 2;
2170 + if (childrenLength === 1) {
2171 + props.children = children;
2172 + } else if (childrenLength > 1) {
2173 + var childArray = Array(childrenLength);
2174 + for (var i = 0; i < childrenLength; i++) {
2175 + childArray[i] = arguments[i + 2];
2176 + }
2177 + props.children = childArray;
2178 + }
2179 +
2180 + return ReactElement(element.type, key, ref, self, source, owner, props);
2181 +};
2182 +
2183 +/**
2184 + * Verifies the object is a ReactElement.
2185 + * See https://facebook.github.io/react/docs/react-api.html#isvalidelement
2186 + * @param {?object} object
2187 + * @return {boolean} True if `object` is a valid component.
2188 + * @final
2189 + */
2190 +ReactElement.isValidElement = function (object) {
2191 + return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
2192 +};
2193 +
2194 +module.exports = ReactElement;
2195 +},{"11":11,"20":20,"30":30,"31":31,"8":8}],11:[function(_dereq_,module,exports){
2196 +/**
2197 + * Copyright 2014-present, Facebook, Inc.
2198 + * All rights reserved.
2199 + *
2200 + * This source code is licensed under the BSD-style license found in the
2201 + * LICENSE file in the root directory of this source tree. An additional grant
2202 + * of patent rights can be found in the PATENTS file in the same directory.
2203 + *
2204 + *
2205 + */
2206 +
2207 +'use strict';
2208 +
2209 +// The Symbol used to tag the ReactElement type. If there is no native Symbol
2210 +// nor polyfill, then a plain number is used for performance.
2211 +
2212 +var REACT_ELEMENT_TYPE = typeof Symbol === 'function' && Symbol['for'] && Symbol['for']('react.element') || 0xeac7;
2213 +
2214 +module.exports = REACT_ELEMENT_TYPE;
2215 +},{}],12:[function(_dereq_,module,exports){
2216 +/**
2217 + * Copyright 2014-present, Facebook, Inc.
2218 + * All rights reserved.
2219 + *
2220 + * This source code is licensed under the BSD-style license found in the
2221 + * LICENSE file in the root directory of this source tree. An additional grant
2222 + * of patent rights can be found in the PATENTS file in the same directory.
2223 + *
2224 + */
2225 +
2226 +/**
2227 + * ReactElementValidator provides a wrapper around a element factory
2228 + * which validates the props passed to the element. This is intended to be
2229 + * used only in DEV and could be replaced by a static type checker for languages
2230 + * that support it.
2231 + */
2232 +
2233 +'use strict';
2234 +
2235 +var ReactCurrentOwner = _dereq_(8);
2236 +var ReactComponentTreeHook = _dereq_(7);
2237 +var ReactElement = _dereq_(10);
2238 +
2239 +var checkReactTypeSpec = _dereq_(21);
2240 +
2241 +var canDefineProperty = _dereq_(20);
2242 +var getComponentName = _dereq_(22);
2243 +var getIteratorFn = _dereq_(23);
2244 +var warning = _dereq_(30);
2245 +
2246 +function getDeclarationErrorAddendum() {
2247 + if (ReactCurrentOwner.current) {
2248 + var name = getComponentName(ReactCurrentOwner.current);
2249 + if (name) {
2250 + return ' Check the render method of `' + name + '`.';
2251 + }
2252 + }
2253 + return '';
2254 +}
2255 +
2256 +/**
2257 + * Warn if there's no key explicitly set on dynamic arrays of children or
2258 + * object keys are not valid. This allows us to keep track of children between
2259 + * updates.
2260 + */
2261 +var ownerHasKeyUseWarning = {};
2262 +
2263 +function getCurrentComponentErrorInfo(parentType) {
2264 + var info = getDeclarationErrorAddendum();
2265 +
2266 + if (!info) {
2267 + var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;
2268 + if (parentName) {
2269 + info = ' Check the top-level render call using <' + parentName + '>.';
2270 + }
2271 + }
2272 + return info;
2273 +}
2274 +
2275 +/**
2276 + * Warn if the element doesn't have an explicit key assigned to it.
2277 + * This element is in an array. The array could grow and shrink or be
2278 + * reordered. All children that haven't already been validated are required to
2279 + * have a "key" property assigned to it. Error statuses are cached so a warning
2280 + * will only be shown once.
2281 + *
2282 + * @internal
2283 + * @param {ReactElement} element Element that requires a key.
2284 + * @param {*} parentType element's parent's type.
2285 + */
2286 +function validateExplicitKey(element, parentType) {
2287 + if (!element._store || element._store.validated || element.key != null) {
2288 + return;
2289 + }
2290 + element._store.validated = true;
2291 +
2292 + var memoizer = ownerHasKeyUseWarning.uniqueKey || (ownerHasKeyUseWarning.uniqueKey = {});
2293 +
2294 + var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
2295 + if (memoizer[currentComponentErrorInfo]) {
2296 + return;
2297 + }
2298 + memoizer[currentComponentErrorInfo] = true;
2299 +
2300 + // Usually the current owner is the offender, but if it accepts children as a
2301 + // property, it may be the creator of the child that's responsible for
2302 + // assigning it a key.
2303 + var childOwner = '';
2304 + if (element && element._owner && element._owner !== ReactCurrentOwner.current) {
2305 + // Give the component that originally created this child.
2306 + childOwner = ' It was passed a child from ' + getComponentName(element._owner) + '.';
2307 + }
2308 +
2309 + "development" !== 'production' ? warning(false, 'Each child in an array or iterator should have a unique "key" prop.' + '%s%s See https://fb.me/react-warning-keys for more information.%s', currentComponentErrorInfo, childOwner, ReactComponentTreeHook.getCurrentStackAddendum(element)) : void 0;
2310 +}
2311 +
2312 +/**
2313 + * Ensure that every element either is passed in a static location, in an
2314 + * array with an explicit keys property defined, or in an object literal
2315 + * with valid key property.
2316 + *
2317 + * @internal
2318 + * @param {ReactNode} node Statically passed child of any type.
2319 + * @param {*} parentType node's parent's type.
2320 + */
2321 +function validateChildKeys(node, parentType) {
2322 + if (typeof node !== 'object') {
2323 + return;
2324 + }
2325 + if (Array.isArray(node)) {
2326 + for (var i = 0; i < node.length; i++) {
2327 + var child = node[i];
2328 + if (ReactElement.isValidElement(child)) {
2329 + validateExplicitKey(child, parentType);
2330 + }
2331 + }
2332 + } else if (ReactElement.isValidElement(node)) {
2333 + // This element was passed in a valid location.
2334 + if (node._store) {
2335 + node._store.validated = true;
2336 + }
2337 + } else if (node) {
2338 + var iteratorFn = getIteratorFn(node);
2339 + // Entry iterators provide implicit keys.
2340 + if (iteratorFn) {
2341 + if (iteratorFn !== node.entries) {
2342 + var iterator = iteratorFn.call(node);
2343 + var step;
2344 + while (!(step = iterator.next()).done) {
2345 + if (ReactElement.isValidElement(step.value)) {
2346 + validateExplicitKey(step.value, parentType);
2347 + }
2348 + }
2349 + }
2350 + }
2351 + }
2352 +}
2353 +
2354 +/**
2355 + * Given an element, validate that its props follow the propTypes definition,
2356 + * provided by the type.
2357 + *
2358 + * @param {ReactElement} element
2359 + */
2360 +function validatePropTypes(element) {
2361 + var componentClass = element.type;
2362 + if (typeof componentClass !== 'function') {
2363 + return;
2364 + }
2365 + var name = componentClass.displayName || componentClass.name;
2366 + if (componentClass.propTypes) {
2367 + checkReactTypeSpec(componentClass.propTypes, element.props, 'prop', name, element, null);
2368 + }
2369 + if (typeof componentClass.getDefaultProps === 'function') {
2370 + "development" !== 'production' ? warning(componentClass.getDefaultProps.isReactClassApproved, 'getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.') : void 0;
2371 + }
2372 +}
2373 +
2374 +var ReactElementValidator = {
2375 +
2376 + createElement: function (type, props, children) {
2377 + var validType = typeof type === 'string' || typeof type === 'function' || type !== null && typeof type === 'object' && typeof type.tag === 'number';
2378 + // We warn in this case but don't throw. We expect the element creation to
2379 + // succeed and there will likely be errors in render.
2380 + if (!validType) {
2381 + if (typeof type !== 'function' && typeof type !== 'string') {
2382 + var info = '';
2383 + if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
2384 + info += ' You likely forgot to export your component from the file ' + 'it\'s defined in.';
2385 + }
2386 + info += getDeclarationErrorAddendum();
2387 + "development" !== 'production' ? warning(false, 'React.createElement: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', type == null ? type : typeof type, info) : void 0;
2388 + }
2389 + }
2390 +
2391 + var element = ReactElement.createElement.apply(this, arguments);
2392 +
2393 + // The result can be nullish if a mock or a custom function is used.
2394 + // TODO: Drop this when these are no longer allowed as the type argument.
2395 + if (element == null) {
2396 + return element;
2397 + }
2398 +
2399 + // Skip key warning if the type isn't valid since our key validation logic
2400 + // doesn't expect a non-string/function type and can throw confusing errors.
2401 + // We don't want exception behavior to differ between dev and prod.
2402 + // (Rendering will throw with a helpful message and as soon as the type is
2403 + // fixed, the key warnings will appear.)
2404 + if (validType) {
2405 + for (var i = 2; i < arguments.length; i++) {
2406 + validateChildKeys(arguments[i], type);
2407 + }
2408 + }
2409 +
2410 + validatePropTypes(element);
2411 +
2412 + return element;
2413 + },
2414 +
2415 + createFactory: function (type) {
2416 + var validatedFactory = ReactElementValidator.createElement.bind(null, type);
2417 + // Legacy hook TODO: Warn if this is accessed
2418 + validatedFactory.type = type;
2419 +
2420 + if ("development" !== 'production') {
2421 + if (canDefineProperty) {
2422 + Object.defineProperty(validatedFactory, 'type', {
2423 + enumerable: false,
2424 + get: function () {
2425 + "development" !== 'production' ? warning(false, 'Factory.type is deprecated. Access the class directly ' + 'before passing it to createFactory.') : void 0;
2426 + Object.defineProperty(this, 'type', {
2427 + value: type
2428 + });
2429 + return type;
2430 + }
2431 + });
2432 + }
2433 + }
2434 +
2435 + return validatedFactory;
2436 + },
2437 +
2438 + cloneElement: function (element, props, children) {
2439 + var newElement = ReactElement.cloneElement.apply(this, arguments);
2440 + for (var i = 2; i < arguments.length; i++) {
2441 + validateChildKeys(arguments[i], newElement.type);
2442 + }
2443 + validatePropTypes(newElement);
2444 + return newElement;
2445 + }
2446 +
2447 +};
2448 +
2449 +module.exports = ReactElementValidator;
2450 +},{"10":10,"20":20,"21":21,"22":22,"23":23,"30":30,"7":7,"8":8}],13:[function(_dereq_,module,exports){
2451 +/**
2452 + * Copyright 2015-present, Facebook, Inc.
2453 + * All rights reserved.
2454 + *
2455 + * This source code is licensed under the BSD-style license found in the
2456 + * LICENSE file in the root directory of this source tree. An additional grant
2457 + * of patent rights can be found in the PATENTS file in the same directory.
2458 + *
2459 + */
2460 +
2461 +'use strict';
2462 +
2463 +var warning = _dereq_(30);
2464 +
2465 +function warnNoop(publicInstance, callerName) {
2466 + if ("development" !== 'production') {
2467 + var constructor = publicInstance.constructor;
2468 + "development" !== 'production' ? warning(false, '%s(...): Can only update a mounted or mounting component. ' + 'This usually means you called %s() on an unmounted component. ' + 'This is a no-op. Please check the code for the %s component.', callerName, callerName, constructor && (constructor.displayName || constructor.name) || 'ReactClass') : void 0;
2469 + }
2470 +}
2471 +
2472 +/**
2473 + * This is the abstract API for an update queue.
2474 + */
2475 +var ReactNoopUpdateQueue = {
2476 +
2477 + /**
2478 + * Checks whether or not this composite component is mounted.
2479 + * @param {ReactClass} publicInstance The instance we want to test.
2480 + * @return {boolean} True if mounted, false otherwise.
2481 + * @protected
2482 + * @final
2483 + */
2484 + isMounted: function (publicInstance) {
2485 + return false;
2486 + },
2487 +
2488 + /**
2489 + * Forces an update. This should only be invoked when it is known with
2490 + * certainty that we are **not** in a DOM transaction.
2491 + *
2492 + * You may want to call this when you know that some deeper aspect of the
2493 + * component's state has changed but `setState` was not called.
2494 + *
2495 + * This will not invoke `shouldComponentUpdate`, but it will invoke
2496 + * `componentWillUpdate` and `componentDidUpdate`.
2497 + *
2498 + * @param {ReactClass} publicInstance The instance that should rerender.
2499 + * @param {?function} callback Called after component is updated.
2500 + * @param {?string} Name of the calling function in the public API.
2501 + * @internal
2502 + */
2503 + enqueueForceUpdate: function (publicInstance, callback, callerName) {
2504 + warnNoop(publicInstance, 'forceUpdate');
2505 + },
2506 +
2507 + /**
2508 + * Replaces all of the state. Always use this or `setState` to mutate state.
2509 + * You should treat `this.state` as immutable.
2510 + *
2511 + * There is no guarantee that `this.state` will be immediately updated, so
2512 + * accessing `this.state` after calling this method may return the old value.
2513 + *
2514 + * @param {ReactClass} publicInstance The instance that should rerender.
2515 + * @param {object} completeState Next state.
2516 + * @param {?function} callback Called after component is updated.
2517 + * @param {?string} Name of the calling function in the public API.
2518 + * @internal
2519 + */
2520 + enqueueReplaceState: function (publicInstance, completeState, callback, callerName) {
2521 + warnNoop(publicInstance, 'replaceState');
2522 + },
2523 +
2524 + /**
2525 + * Sets a subset of the state. This only exists because _pendingState is
2526 + * internal. This provides a merging strategy that is not available to deep
2527 + * properties which is confusing. TODO: Expose pendingState or don't use it
2528 + * during the merge.
2529 + *
2530 + * @param {ReactClass} publicInstance The instance that should rerender.
2531 + * @param {object} partialState Next partial state to be merged with state.
2532 + * @param {?function} callback Called after component is updated.
2533 + * @param {?string} Name of the calling function in the public API.
2534 + * @internal
2535 + */
2536 + enqueueSetState: function (publicInstance, partialState, callback, callerName) {
2537 + warnNoop(publicInstance, 'setState');
2538 + }
2539 +};
2540 +
2541 +module.exports = ReactNoopUpdateQueue;
2542 +},{"30":30}],14:[function(_dereq_,module,exports){
2543 +/**
2544 + * Copyright 2013-present, Facebook, Inc.
2545 + * All rights reserved.
2546 + *
2547 + * This source code is licensed under the BSD-style license found in the
2548 + * LICENSE file in the root directory of this source tree. An additional grant
2549 + * of patent rights can be found in the PATENTS file in the same directory.
2550 + *
2551 + *
2552 + */
2553 +
2554 +'use strict';
2555 +
2556 +var ReactPropTypeLocationNames = {};
2557 +
2558 +if ("development" !== 'production') {
2559 + ReactPropTypeLocationNames = {
2560 + prop: 'prop',
2561 + context: 'context',
2562 + childContext: 'child context'
2563 + };
2564 +}
2565 +
2566 +module.exports = ReactPropTypeLocationNames;
2567 +},{}],15:[function(_dereq_,module,exports){
2568 +/**
2569 + * Copyright 2013-present, Facebook, Inc.
2570 + * All rights reserved.
2571 + *
2572 + * This source code is licensed under the BSD-style license found in the
2573 + * LICENSE file in the root directory of this source tree. An additional grant
2574 + * of patent rights can be found in the PATENTS file in the same directory.
2575 + *
2576 + */
2577 +
2578 +'use strict';
2579 +
2580 +var _prodInvariant = _dereq_(25);
2581 +
2582 +var ReactElement = _dereq_(10);
2583 +var ReactPropTypeLocationNames = _dereq_(14);
2584 +
2585 +var emptyFunction = _dereq_(27);
2586 +var getIteratorFn = _dereq_(23);
2587 +var invariant = _dereq_(29);
2588 +var warning = _dereq_(30);
2589 +
2590 +/**
2591 + * Collection of methods that allow declaration and validation of props that are
2592 + * supplied to React components. Example usage:
2593 + *
2594 + * var Props = require('ReactPropTypes');
2595 + * var MyArticle = React.createClass({
2596 + * propTypes: {
2597 + * // An optional string prop named "description".
2598 + * description: Props.string,
2599 + *
2600 + * // A required enum prop named "category".
2601 + * category: Props.oneOf(['News','Photos']).isRequired,
2602 + *
2603 + * // A prop named "dialog" that requires an instance of Dialog.
2604 + * dialog: Props.instanceOf(Dialog).isRequired
2605 + * },
2606 + * render: function() { ... }
2607 + * });
2608 + *
2609 + * A more formal specification of how these methods are used:
2610 + *
2611 + * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
2612 + * decl := ReactPropTypes.{type}(.isRequired)?
2613 + *
2614 + * Each and every declaration produces a function with the same signature. This
2615 + * allows the creation of custom validation functions. For example:
2616 + *
2617 + * var MyLink = React.createClass({
2618 + * propTypes: {
2619 + * // An optional string or URI prop named "href".
2620 + * href: function(props, propName, componentName) {
2621 + * var propValue = props[propName];
2622 + * if (propValue != null && typeof propValue !== 'string' &&
2623 + * !(propValue instanceof URI)) {
2624 + * return new Error(
2625 + * 'Expected a string or an URI for ' + propName + ' in ' +
2626 + * componentName
2627 + * );
2628 + * }
2629 + * }
2630 + * },
2631 + * render: function() {...}
2632 + * });
2633 + *
2634 + * @internal
2635 + */
2636 +
2637 +var ANONYMOUS = '<<anonymous>>';
2638 +
2639 +var ReactPropTypes;
2640 +
2641 +if ("development" !== 'production') {
2642 + // Keep in sync with production version below
2643 + ReactPropTypes = {
2644 + array: createPrimitiveTypeChecker('array'),
2645 + bool: createPrimitiveTypeChecker('boolean'),
2646 + func: createPrimitiveTypeChecker('function'),
2647 + number: createPrimitiveTypeChecker('number'),
2648 + object: createPrimitiveTypeChecker('object'),
2649 + string: createPrimitiveTypeChecker('string'),
2650 + symbol: createPrimitiveTypeChecker('symbol'),
2651 +
2652 + any: createAnyTypeChecker(),
2653 + arrayOf: createArrayOfTypeChecker,
2654 + element: createElementTypeChecker(),
2655 + instanceOf: createInstanceTypeChecker,
2656 + node: createNodeChecker(),
2657 + objectOf: createObjectOfTypeChecker,
2658 + oneOf: createEnumTypeChecker,
2659 + oneOfType: createUnionTypeChecker,
2660 + shape: createShapeTypeChecker
2661 + };
2662 +} else {
2663 + var productionTypeChecker = function () {
2664 + invariant(false, 'React.PropTypes type checking code is stripped in production.');
2665 + };
2666 + productionTypeChecker.isRequired = productionTypeChecker;
2667 + var getProductionTypeChecker = function () {
2668 + return productionTypeChecker;
2669 + };
2670 + // Keep in sync with development version above
2671 + ReactPropTypes = {
2672 + array: productionTypeChecker,
2673 + bool: productionTypeChecker,
2674 + func: productionTypeChecker,
2675 + number: productionTypeChecker,
2676 + object: productionTypeChecker,
2677 + string: productionTypeChecker,
2678 + symbol: productionTypeChecker,
2679 +
2680 + any: productionTypeChecker,
2681 + arrayOf: getProductionTypeChecker,
2682 + element: productionTypeChecker,
2683 + instanceOf: getProductionTypeChecker,
2684 + node: productionTypeChecker,
2685 + objectOf: getProductionTypeChecker,
2686 + oneOf: getProductionTypeChecker,
2687 + oneOfType: getProductionTypeChecker,
2688 + shape: getProductionTypeChecker
2689 + };
2690 +}
2691 +
2692 +/**
2693 + * inlined Object.is polyfill to avoid requiring consumers ship their own
2694 + * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
2695 + */
2696 +/*eslint-disable no-self-compare*/
2697 +function is(x, y) {
2698 + // SameValue algorithm
2699 + if (x === y) {
2700 + // Steps 1-5, 7-10
2701 + // Steps 6.b-6.e: +0 != -0
2702 + return x !== 0 || 1 / x === 1 / y;
2703 + } else {
2704 + // Step 6.a: NaN == NaN
2705 + return x !== x && y !== y;
2706 + }
2707 +}
2708 +/*eslint-enable no-self-compare*/
2709 +
2710 +/**
2711 + * We use an Error-like object for backward compatibility as people may call
2712 + * PropTypes directly and inspect their output. However we don't use real
2713 + * Errors anymore. We don't inspect their stack anyway, and creating them
2714 + * is prohibitively expensive if they are created too often, such as what
2715 + * happens in oneOfType() for any type before the one that matched.
2716 + */
2717 +function PropTypeError(message) {
2718 + this.message = message;
2719 + this.stack = '';
2720 +}
2721 +// Make `instanceof Error` still work for returned errors.
2722 +PropTypeError.prototype = Error.prototype;
2723 +
2724 +function createChainableTypeChecker(validate) {
2725 + function checkType(isRequired, props, propName, componentName, location, propFullName) {
2726 + componentName = componentName || ANONYMOUS;
2727 + propFullName = propFullName || propName;
2728 + if (props[propName] == null) {
2729 + var locationName = ReactPropTypeLocationNames[location];
2730 + if (isRequired) {
2731 + if (props[propName] === null) {
2732 + return new PropTypeError('The ' + locationName + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
2733 + }
2734 + return new PropTypeError('The ' + locationName + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
2735 + }
2736 + return null;
2737 + } else {
2738 + return validate(props, propName, componentName, location, propFullName);
2739 + }
2740 + }
2741 +
2742 + var chainedCheckType = checkType.bind(null, false);
2743 + chainedCheckType.isRequired = checkType.bind(null, true);
2744 +
2745 + return chainedCheckType;
2746 +}
2747 +
2748 +function createPrimitiveTypeChecker(expectedType) {
2749 + function validate(props, propName, componentName, location, propFullName) {
2750 + var propValue = props[propName];
2751 + var propType = getPropType(propValue);
2752 + if (propType !== expectedType) {
2753 + var locationName = ReactPropTypeLocationNames[location];
2754 + // `propValue` being instance of, say, date/regexp, pass the 'object'
2755 + // check, but we can offer a more precise error message here rather than
2756 + // 'of type `object`'.
2757 + var preciseType = getPreciseType(propValue);
2758 +
2759 + return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));
2760 + }
2761 + return null;
2762 + }
2763 + return createChainableTypeChecker(validate);
2764 +}
2765 +
2766 +function createAnyTypeChecker() {
2767 + return createChainableTypeChecker(emptyFunction.thatReturns(null));
2768 +}
2769 +
2770 +function createArrayOfTypeChecker(typeChecker) {
2771 + function validate(props, propName, componentName, location, propFullName) {
2772 + if (typeof typeChecker !== 'function') {
2773 + return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
2774 + }
2775 + var propValue = props[propName];
2776 + if (!Array.isArray(propValue)) {
2777 + var locationName = ReactPropTypeLocationNames[location];
2778 + var propType = getPropType(propValue);
2779 + return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
2780 + }
2781 + for (var i = 0; i < propValue.length; i++) {
2782 + var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']');
2783 + if (error instanceof Error) {
2784 + return error;
2785 + }
2786 + }
2787 + return null;
2788 + }
2789 + return createChainableTypeChecker(validate);
2790 +}
2791 +
2792 +function createElementTypeChecker() {
2793 + function validate(props, propName, componentName, location, propFullName) {
2794 + var propValue = props[propName];
2795 + if (!ReactElement.isValidElement(propValue)) {
2796 + var locationName = ReactPropTypeLocationNames[location];
2797 + var propType = getPropType(propValue);
2798 + return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
2799 + }
2800 + return null;
2801 + }
2802 + return createChainableTypeChecker(validate);
2803 +}
2804 +
2805 +function createInstanceTypeChecker(expectedClass) {
2806 + function validate(props, propName, componentName, location, propFullName) {
2807 + if (!(props[propName] instanceof expectedClass)) {
2808 + var locationName = ReactPropTypeLocationNames[location];
2809 + var expectedClassName = expectedClass.name || ANONYMOUS;
2810 + var actualClassName = getClassName(props[propName]);
2811 + return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
2812 + }
2813 + return null;
2814 + }
2815 + return createChainableTypeChecker(validate);
2816 +}
2817 +
2818 +function createEnumTypeChecker(expectedValues) {
2819 + if (!Array.isArray(expectedValues)) {
2820 + "development" !== 'production' ? warning(false, 'Invalid argument supplied to oneOf, expected an instance of array.') : void 0;
2821 + return emptyFunction.thatReturnsNull;
2822 + }
2823 +
2824 + function validate(props, propName, componentName, location, propFullName) {
2825 + var propValue = props[propName];
2826 + for (var i = 0; i < expectedValues.length; i++) {
2827 + if (is(propValue, expectedValues[i])) {
2828 + return null;
2829 + }
2830 + }
2831 +
2832 + var locationName = ReactPropTypeLocationNames[location];
2833 + var valuesString = JSON.stringify(expectedValues);
2834 + return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
2835 + }
2836 + return createChainableTypeChecker(validate);
2837 +}
2838 +
2839 +function createObjectOfTypeChecker(typeChecker) {
2840 + function validate(props, propName, componentName, location, propFullName) {
2841 + if (typeof typeChecker !== 'function') {
2842 + return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
2843 + }
2844 + var propValue = props[propName];
2845 + var propType = getPropType(propValue);
2846 + if (propType !== 'object') {
2847 + var locationName = ReactPropTypeLocationNames[location];
2848 + return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
2849 + }
2850 + for (var key in propValue) {
2851 + if (propValue.hasOwnProperty(key)) {
2852 + var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key);
2853 + if (error instanceof Error) {
2854 + return error;
2855 + }
2856 + }
2857 + }
2858 + return null;
2859 + }
2860 + return createChainableTypeChecker(validate);
2861 +}
2862 +
2863 +function createUnionTypeChecker(arrayOfTypeCheckers) {
2864 + if (!Array.isArray(arrayOfTypeCheckers)) {
2865 + "development" !== 'production' ? warning(false, 'Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;
2866 + return emptyFunction.thatReturnsNull;
2867 + }
2868 +
2869 + function validate(props, propName, componentName, location, propFullName) {
2870 + for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
2871 + var checker = arrayOfTypeCheckers[i];
2872 + if (checker(props, propName, componentName, location, propFullName) == null) {
2873 + return null;
2874 + }
2875 + }
2876 +
2877 + var locationName = ReactPropTypeLocationNames[location];
2878 + return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));
2879 + }
2880 + return createChainableTypeChecker(validate);
2881 +}
2882 +
2883 +function createNodeChecker() {
2884 + function validate(props, propName, componentName, location, propFullName) {
2885 + if (!isNode(props[propName])) {
2886 + var locationName = ReactPropTypeLocationNames[location];
2887 + return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
2888 + }
2889 + return null;
2890 + }
2891 + return createChainableTypeChecker(validate);
2892 +}
2893 +
2894 +function createShapeTypeChecker(shapeTypes) {
2895 + function validate(props, propName, componentName, location, propFullName) {
2896 + var propValue = props[propName];
2897 + var propType = getPropType(propValue);
2898 + if (propType !== 'object') {
2899 + var locationName = ReactPropTypeLocationNames[location];
2900 + return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
2901 + }
2902 + for (var key in shapeTypes) {
2903 + var checker = shapeTypes[key];
2904 + if (!checker) {
2905 + continue;
2906 + }
2907 + var error = checker(propValue, key, componentName, location, propFullName + '.' + key);
2908 + if (error) {
2909 + return error;
2910 + }
2911 + }
2912 + return null;
2913 + }
2914 + return createChainableTypeChecker(validate);
2915 +}
2916 +
2917 +function isNode(propValue) {
2918 + switch (typeof propValue) {
2919 + case 'number':
2920 + case 'string':
2921 + case 'undefined':
2922 + return true;
2923 + case 'boolean':
2924 + return !propValue;
2925 + case 'object':
2926 + if (Array.isArray(propValue)) {
2927 + return propValue.every(isNode);
2928 + }
2929 + if (propValue === null || ReactElement.isValidElement(propValue)) {
2930 + return true;
2931 + }
2932 +
2933 + var iteratorFn = getIteratorFn(propValue);
2934 + if (iteratorFn) {
2935 + var iterator = iteratorFn.call(propValue);
2936 + var step;
2937 + if (iteratorFn !== propValue.entries) {
2938 + while (!(step = iterator.next()).done) {
2939 + if (!isNode(step.value)) {
2940 + return false;
2941 + }
2942 + }
2943 + } else {
2944 + // Iterator will provide entry [k,v] tuples rather than values.
2945 + while (!(step = iterator.next()).done) {
2946 + var entry = step.value;
2947 + if (entry) {
2948 + if (!isNode(entry[1])) {
2949 + return false;
2950 + }
2951 + }
2952 + }
2953 + }
2954 + } else {
2955 + return false;
2956 + }
2957 +
2958 + return true;
2959 + default:
2960 + return false;
2961 + }
2962 +}
2963 +
2964 +function isSymbol(propType, propValue) {
2965 + // Native Symbol.
2966 + if (propType === 'symbol') {
2967 + return true;
2968 + }
2969 +
2970 + // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
2971 + if (propValue['@@toStringTag'] === 'Symbol') {
2972 + return true;
2973 + }
2974 +
2975 + // Fallback for non-spec compliant Symbols which are polyfilled.
2976 + if (typeof Symbol === 'function' && propValue instanceof Symbol) {
2977 + return true;
2978 + }
2979 +
2980 + return false;
2981 +}
2982 +
2983 +// Equivalent of `typeof` but with special handling for array and regexp.
2984 +function getPropType(propValue) {
2985 + var propType = typeof propValue;
2986 + if (Array.isArray(propValue)) {
2987 + return 'array';
2988 + }
2989 + if (propValue instanceof RegExp) {
2990 + // Old webkits (at least until Android 4.0) return 'function' rather than
2991 + // 'object' for typeof a RegExp. We'll normalize this here so that /bla/
2992 + // passes PropTypes.object.
2993 + return 'object';
2994 + }
2995 + if (isSymbol(propType, propValue)) {
2996 + return 'symbol';
2997 + }
2998 + return propType;
2999 +}
3000 +
3001 +// This handles more types than `getPropType`. Only used for error messages.
3002 +// See `createPrimitiveTypeChecker`.
3003 +function getPreciseType(propValue) {
3004 + var propType = getPropType(propValue);
3005 + if (propType === 'object') {
3006 + if (propValue instanceof Date) {
3007 + return 'date';
3008 + } else if (propValue instanceof RegExp) {
3009 + return 'regexp';
3010 + }
3011 + }
3012 + return propType;
3013 +}
3014 +
3015 +// Returns class name of the object, if any.
3016 +function getClassName(propValue) {
3017 + if (!propValue.constructor || !propValue.constructor.name) {
3018 + return ANONYMOUS;
3019 + }
3020 + return propValue.constructor.name;
3021 +}
3022 +
3023 +module.exports = ReactPropTypes;
3024 +},{"10":10,"14":14,"23":23,"25":25,"27":27,"29":29,"30":30}],16:[function(_dereq_,module,exports){
3025 +/**
3026 + * Copyright 2013-present, Facebook, Inc.
3027 + * All rights reserved.
3028 + *
3029 + * This source code is licensed under the BSD-style license found in the
3030 + * LICENSE file in the root directory of this source tree. An additional grant
3031 + * of patent rights can be found in the PATENTS file in the same directory.
3032 + *
3033 + */
3034 +
3035 +'use strict';
3036 +
3037 +var _assign = _dereq_(31);
3038 +
3039 +var ReactComponent = _dereq_(6);
3040 +var ReactNoopUpdateQueue = _dereq_(13);
3041 +
3042 +var emptyObject = _dereq_(28);
3043 +
3044 +/**
3045 + * Base class helpers for the updating state of a component.
3046 + */
3047 +function ReactPureComponent(props, context, updater) {
3048 + // Duplicated from ReactComponent.
3049 + this.props = props;
3050 + this.context = context;
3051 + this.refs = emptyObject;
3052 + // We initialize the default updater but the real one gets injected by the
3053 + // renderer.
3054 + this.updater = updater || ReactNoopUpdateQueue;
3055 +}
3056 +
3057 +function ComponentDummy() {}
3058 +ComponentDummy.prototype = ReactComponent.prototype;
3059 +ReactPureComponent.prototype = new ComponentDummy();
3060 +ReactPureComponent.prototype.constructor = ReactPureComponent;
3061 +// Avoid an extra prototype jump for these methods.
3062 +_assign(ReactPureComponent.prototype, ReactComponent.prototype);
3063 +ReactPureComponent.prototype.isPureReactComponent = true;
3064 +
3065 +module.exports = ReactPureComponent;
3066 +},{"13":13,"28":28,"31":31,"6":6}],17:[function(_dereq_,module,exports){
3067 +/**
3068 + * Copyright 2013-present, Facebook, Inc.
3069 + * All rights reserved.
3070 + *
3071 + * This source code is licensed under the BSD-style license found in the
3072 + * LICENSE file in the root directory of this source tree. An additional grant
3073 + * of patent rights can be found in the PATENTS file in the same directory.
3074 + *
3075 + *
3076 + */
3077 +
3078 +'use strict';
3079 +
3080 +module.exports = {
3081 + IndeterminateComponent: 0, // Before we know whether it is functional or class
3082 + FunctionalComponent: 1,
3083 + ClassComponent: 2,
3084 + HostRoot: 3, // Root of a host tree. Could be nested inside another node.
3085 + HostPortal: 4, // A subtree. Could be an entry point to a different renderer.
3086 + HostComponent: 5,
3087 + HostText: 6,
3088 + CoroutineComponent: 7,
3089 + CoroutineHandlerPhase: 8,
3090 + YieldComponent: 9,
3091 + Fragment: 10
3092 +};
3093 +},{}],18:[function(_dereq_,module,exports){
3094 +/**
3095 + * Copyright 2013-present, Facebook, Inc.
3096 + * All rights reserved.
3097 + *
3098 + * This source code is licensed under the BSD-style license found in the
3099 + * LICENSE file in the root directory of this source tree. An additional grant
3100 + * of patent rights can be found in the PATENTS file in the same directory.
3101 + *
3102 + */
3103 +
3104 +'use strict';
3105 +
3106 +var _assign = _dereq_(31);
3107 +
3108 +var React = _dereq_(3);
3109 +
3110 +// `version` will be added here by the React module.
3111 +var ReactUMDEntry = _assign({
3112 + __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: {
3113 + ReactCurrentOwner: _dereq_(8)
3114 + }
3115 +}, React);
3116 +
3117 +if ("development" !== 'production') {
3118 + _assign(ReactUMDEntry.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, {
3119 + // ReactComponentTreeHook should not be included in production.
3120 + ReactComponentTreeHook: _dereq_(7)
3121 + });
3122 +}
3123 +
3124 +module.exports = ReactUMDEntry;
3125 +},{"3":3,"31":31,"7":7,"8":8}],19:[function(_dereq_,module,exports){
3126 +/**
3127 + * Copyright 2013-present, Facebook, Inc.
3128 + * All rights reserved.
3129 + *
3130 + * This source code is licensed under the BSD-style license found in the
3131 + * LICENSE file in the root directory of this source tree. An additional grant
3132 + * of patent rights can be found in the PATENTS file in the same directory.
3133 + *
3134 + */
3135 +
3136 +'use strict';
3137 +
3138 +module.exports = '16.0.0-alpha';
3139 +},{}],20:[function(_dereq_,module,exports){
3140 +/**
3141 + * Copyright 2013-present, Facebook, Inc.
3142 + * All rights reserved.
3143 + *
3144 + * This source code is licensed under the BSD-style license found in the
3145 + * LICENSE file in the root directory of this source tree. An additional grant
3146 + * of patent rights can be found in the PATENTS file in the same directory.
3147 + *
3148 + *
3149 + */
3150 +
3151 +'use strict';
3152 +
3153 +var canDefineProperty = false;
3154 +if ("development" !== 'production') {
3155 + try {
3156 + // $FlowFixMe https://github.com/facebook/flow/issues/285
3157 + Object.defineProperty({}, 'x', { get: function () {} });
3158 + canDefineProperty = true;
3159 + } catch (x) {
3160 + // IE will fail on defineProperty
3161 + }
3162 +}
3163 +
3164 +module.exports = canDefineProperty;
3165 +},{}],21:[function(_dereq_,module,exports){
3166 +(function (process){
3167 +/**
3168 + * Copyright 2013-present, Facebook, Inc.
3169 + * All rights reserved.
3170 + *
3171 + * This source code is licensed under the BSD-style license found in the
3172 + * LICENSE file in the root directory of this source tree. An additional grant
3173 + * of patent rights can be found in the PATENTS file in the same directory.
3174 + *
3175 + */
3176 +
3177 +'use strict';
3178 +
3179 +var _prodInvariant = _dereq_(25);
3180 +
3181 +var ReactPropTypeLocationNames = _dereq_(14);
3182 +
3183 +var invariant = _dereq_(29);
3184 +var warning = _dereq_(30);
3185 +
3186 +var ReactComponentTreeHook;
3187 +
3188 +if (typeof process !== 'undefined' && process.env && "development" === 'test') {
3189 + // Temporary hack.
3190 + // Inline requires don't work well with Jest:
3191 + // https://github.com/facebook/react/issues/7240
3192 + // Remove the inline requires when we don't need them anymore:
3193 + // https://github.com/facebook/react/pull/7178
3194 + ReactComponentTreeHook = _dereq_(7);
3195 +}
3196 +
3197 +var loggedTypeFailures = {};
3198 +
3199 +/**
3200 + * Assert that the values match with the type specs.
3201 + * Error messages are memorized and will only be shown once.
3202 + *
3203 + * @param {object} typeSpecs Map of name to a ReactPropType
3204 + * @param {object} values Runtime values that need to be type-checked
3205 + * @param {string} location e.g. "prop", "context", "child context"
3206 + * @param {string} componentName Name of the component for error messages.
3207 + * @param {?object} element The React element that is being type-checked
3208 + * @param {?number} workInProgressOrDebugID The React component instance that is being type-checked
3209 + * @private
3210 + */
3211 +function checkReactTypeSpec(typeSpecs, values, location, componentName, element,
3212 +// It is only safe to pass fiber if it is the work-in-progress version, and
3213 +workInProgressOrDebugID) {
3214 + for (var typeSpecName in typeSpecs) {
3215 + if (typeSpecs.hasOwnProperty(typeSpecName)) {
3216 + var error;
3217 + // Prop type validation may throw. In case they do, we don't want to
3218 + // fail the render phase where it didn't fail before. So we log it.
3219 + // After these have been cleaned up, we'll let them throw.
3220 + try {
3221 + // This is intentionally an invariant that gets caught. It's the same
3222 + // behavior as without this statement except with a better message.
3223 + !(typeof typeSpecs[typeSpecName] === 'function') ? "development" !== 'production' ? invariant(false, '%s: %s type `%s` is invalid; it must be a function, usually from React.PropTypes.', componentName || 'React class', ReactPropTypeLocationNames[location], typeSpecName) : _prodInvariant('84', componentName || 'React class', ReactPropTypeLocationNames[location], typeSpecName) : void 0;
3224 + error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location);
3225 + } catch (ex) {
3226 + error = ex;
3227 + }
3228 + "development" !== 'production' ? warning(!error || error instanceof Error, '%s: type specification of %s `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', ReactPropTypeLocationNames[location], typeSpecName, typeof error) : void 0;
3229 + if (error instanceof Error && !(error.message in loggedTypeFailures)) {
3230 + // Only monitor this failure once because there tends to be a lot of the
3231 + // same error.
3232 + loggedTypeFailures[error.message] = true;
3233 +
3234 + var componentStackInfo = '';
3235 +
3236 + if ("development" !== 'production') {
3237 + if (!ReactComponentTreeHook) {
3238 + ReactComponentTreeHook = _dereq_(7);
3239 + }
3240 + if (workInProgressOrDebugID != null) {
3241 + if (typeof workInProgressOrDebugID === 'number') {
3242 + // DebugID from Stack.
3243 + var debugID = workInProgressOrDebugID;
3244 + componentStackInfo = ReactComponentTreeHook.getStackAddendumByID(debugID);
3245 + } else if (typeof workInProgressOrDebugID.tag === 'number') {
3246 + // This is a Fiber.
3247 + // The stack will only be correct if this is a work in progress
3248 + // version and we're calling it during reconciliation.
3249 + var workInProgress = workInProgressOrDebugID;
3250 + componentStackInfo = ReactComponentTreeHook.getStackAddendumByWorkInProgressFiber(workInProgress);
3251 + }
3252 + } else if (element !== null) {
3253 + componentStackInfo = ReactComponentTreeHook.getCurrentStackAddendum(element);
3254 + }
3255 + }
3256 +
3257 + "development" !== 'production' ? warning(false, 'Failed %s type: %s%s', location, error.message, componentStackInfo) : void 0;
3258 + }
3259 + }
3260 + }
3261 +}
3262 +
3263 +module.exports = checkReactTypeSpec;
3264 +}).call(this,undefined)
3265 +},{"14":14,"25":25,"29":29,"30":30,"7":7}],22:[function(_dereq_,module,exports){
3266 +/**
3267 + * Copyright 2013-present, Facebook, Inc.
3268 + * All rights reserved.
3269 + *
3270 + * This source code is licensed under the BSD-style license found in the
3271 + * LICENSE file in the root directory of this source tree. An additional grant
3272 + * of patent rights can be found in the PATENTS file in the same directory.
3273 + *
3274 + *
3275 + */
3276 +
3277 +'use strict';
3278 +
3279 +function getComponentName(instanceOrFiber) {
3280 + if ("development" !== 'production') {
3281 + if (typeof instanceOrFiber.getName === 'function') {
3282 + // Stack reconciler
3283 + var instance = instanceOrFiber;
3284 + return instance.getName() || 'Component';
3285 + }
3286 + if (typeof instanceOrFiber.tag === 'number') {
3287 + // Fiber reconciler
3288 + var fiber = instanceOrFiber;
3289 + var type = fiber.type;
3290 +
3291 + if (typeof type === 'string') {
3292 + return type;
3293 + }
3294 + if (typeof type === 'function') {
3295 + return type.displayName || type.name || null;
3296 + }
3297 + }
3298 + }
3299 + return null;
3300 +}
3301 +
3302 +module.exports = getComponentName;
3303 +},{}],23:[function(_dereq_,module,exports){
3304 +/**
3305 + * Copyright 2013-present, Facebook, Inc.
3306 + * All rights reserved.
3307 + *
3308 + * This source code is licensed under the BSD-style license found in the
3309 + * LICENSE file in the root directory of this source tree. An additional grant
3310 + * of patent rights can be found in the PATENTS file in the same directory.
3311 + *
3312 + *
3313 + */
3314 +
3315 +'use strict';
3316 +
3317 +/* global Symbol */
3318 +
3319 +var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
3320 +var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
3321 +
3322 +/**
3323 + * Returns the iterator method function contained on the iterable object.
3324 + *
3325 + * Be sure to invoke the function with the iterable as context:
3326 + *
3327 + * var iteratorFn = getIteratorFn(myIterable);
3328 + * if (iteratorFn) {
3329 + * var iterator = iteratorFn.call(myIterable);
3330 + * ...
3331 + * }
3332 + *
3333 + * @param {?object} maybeIterable
3334 + * @return {?function}
3335 + */
3336 +function getIteratorFn(maybeIterable) {
3337 + var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
3338 + if (typeof iteratorFn === 'function') {
3339 + return iteratorFn;
3340 + }
3341 +}
3342 +
3343 +module.exports = getIteratorFn;
3344 +},{}],24:[function(_dereq_,module,exports){
3345 +/**
3346 + * Copyright 2013-present, Facebook, Inc.
3347 + * All rights reserved.
3348 + *
3349 + * This source code is licensed under the BSD-style license found in the
3350 + * LICENSE file in the root directory of this source tree. An additional grant
3351 + * of patent rights can be found in the PATENTS file in the same directory.
3352 + *
3353 + */
3354 +'use strict';
3355 +
3356 +var _prodInvariant = _dereq_(25);
3357 +
3358 +var ReactElement = _dereq_(10);
3359 +
3360 +var invariant = _dereq_(29);
3361 +
3362 +/**
3363 + * Returns the first child in a collection of children and verifies that there
3364 + * is only one child in the collection.
3365 + *
3366 + * See https://facebook.github.io/react/docs/react-api.html#react.children.only
3367 + *
3368 + * The current implementation of this function assumes that a single child gets
3369 + * passed without a wrapper, but the purpose of this helper function is to
3370 + * abstract away the particular structure of children.
3371 + *
3372 + * @param {?object} children Child collection structure.
3373 + * @return {ReactElement} The first and only `ReactElement` contained in the
3374 + * structure.
3375 + */
3376 +function onlyChild(children) {
3377 + !ReactElement.isValidElement(children) ? "development" !== 'production' ? invariant(false, 'React.Children.only expected to receive a single React element child.') : _prodInvariant('143') : void 0;
3378 + return children;
3379 +}
3380 +
3381 +module.exports = onlyChild;
3382 +},{"10":10,"25":25,"29":29}],25:[function(_dereq_,module,exports){
3383 +/**
3384 + * Copyright (c) 2013-present, Facebook, Inc.
3385 + * All rights reserved.
3386 + *
3387 + * This source code is licensed under the BSD-style license found in the
3388 + * LICENSE file in the root directory of this source tree. An additional grant
3389 + * of patent rights can be found in the PATENTS file in the same directory.
3390 + *
3391 + *
3392 + */
3393 +'use strict';
3394 +
3395 +/**
3396 + * WARNING: DO NOT manually require this module.
3397 + * This is a replacement for `invariant(...)` used by the error code system
3398 + * and will _only_ be required by the corresponding babel pass.
3399 + * It always throws.
3400 + */
3401 +
3402 +function reactProdInvariant(code) {
3403 + var argCount = arguments.length - 1;
3404 +
3405 + var message = 'Minified React error #' + code + '; visit ' + 'http://facebook.github.io/react/docs/error-decoder.html?invariant=' + code;
3406 +
3407 + for (var argIdx = 0; argIdx < argCount; argIdx++) {
3408 + message += '&args[]=' + encodeURIComponent(arguments[argIdx + 1]);
3409 + }
3410 +
3411 + message += ' for the full message or use the non-minified dev environment' + ' for full errors and additional helpful warnings.';
3412 +
3413 + var error = new Error(message);
3414 + error.name = 'Invariant Violation';
3415 + error.framesToPop = 1; // we don't care about reactProdInvariant's own frame
3416 +
3417 + throw error;
3418 +}
3419 +
3420 +module.exports = reactProdInvariant;
3421 +},{}],26:[function(_dereq_,module,exports){
3422 +/**
3423 + * Copyright 2013-present, Facebook, Inc.
3424 + * All rights reserved.
3425 + *
3426 + * This source code is licensed under the BSD-style license found in the
3427 + * LICENSE file in the root directory of this source tree. An additional grant
3428 + * of patent rights can be found in the PATENTS file in the same directory.
3429 + *
3430 + */
3431 +
3432 +'use strict';
3433 +
3434 +var _prodInvariant = _dereq_(25);
3435 +
3436 +var ReactCurrentOwner = _dereq_(8);
3437 +var REACT_ELEMENT_TYPE = _dereq_(11);
3438 +
3439 +var getIteratorFn = _dereq_(23);
3440 +var invariant = _dereq_(29);
3441 +var KeyEscapeUtils = _dereq_(1);
3442 +var warning = _dereq_(30);
3443 +
3444 +var SEPARATOR = '.';
3445 +var SUBSEPARATOR = ':';
3446 +
3447 +/**
3448 + * This is inlined from ReactElement since this file is shared between
3449 + * isomorphic and renderers. We could extract this to a
3450 + *
3451 + */
3452 +
3453 +/**
3454 + * TODO: Test that a single child and an array with one item have the same key
3455 + * pattern.
3456 + */
3457 +
3458 +var didWarnAboutMaps = false;
3459 +
3460 +/**
3461 + * Generate a key string that identifies a component within a set.
3462 + *
3463 + * @param {*} component A component that could contain a manual key.
3464 + * @param {number} index Index that is used if a manual key is not provided.
3465 + * @return {string}
3466 + */
3467 +function getComponentKey(component, index) {
3468 + // Do some typechecking here since we call this blindly. We want to ensure
3469 + // that we don't block potential future ES APIs.
3470 + if (component && typeof component === 'object' && component.key != null) {
3471 + // Explicit key
3472 + return KeyEscapeUtils.escape(component.key);
3473 + }
3474 + // Implicit key determined by the index in the set
3475 + return index.toString(36);
3476 +}
3477 +
3478 +/**
3479 + * @param {?*} children Children tree container.
3480 + * @param {!string} nameSoFar Name of the key path so far.
3481 + * @param {!function} callback Callback to invoke with each child found.
3482 + * @param {?*} traverseContext Used to pass information throughout the traversal
3483 + * process.
3484 + * @return {!number} The number of children in this subtree.
3485 + */
3486 +function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext) {
3487 + var type = typeof children;
3488 +
3489 + if (type === 'undefined' || type === 'boolean') {
3490 + // All of the above are perceived as null.
3491 + children = null;
3492 + }
3493 +
3494 + if (children === null || type === 'string' || type === 'number' ||
3495 + // The following is inlined from ReactElement. This means we can optimize
3496 + // some checks. React Fiber also inlines this logic for similar purposes.
3497 + type === 'object' && children.$$typeof === REACT_ELEMENT_TYPE) {
3498 + callback(traverseContext, children,
3499 + // If it's the only child, treat the name as if it was wrapped in an array
3500 + // so that it's consistent if the number of children grows.
3501 + nameSoFar === '' ? SEPARATOR + getComponentKey(children, 0) : nameSoFar);
3502 + return 1;
3503 + }
3504 +
3505 + var child;
3506 + var nextName;
3507 + var subtreeCount = 0; // Count of children found in the current subtree.
3508 + var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR;
3509 +
3510 + if (Array.isArray(children)) {
3511 + for (var i = 0; i < children.length; i++) {
3512 + child = children[i];
3513 + nextName = nextNamePrefix + getComponentKey(child, i);
3514 + subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
3515 + }
3516 + } else {
3517 + var iteratorFn = getIteratorFn(children);
3518 + if (iteratorFn) {
3519 + var iterator = iteratorFn.call(children);
3520 + var step;
3521 + if (iteratorFn !== children.entries) {
3522 + var ii = 0;
3523 + while (!(step = iterator.next()).done) {
3524 + child = step.value;
3525 + nextName = nextNamePrefix + getComponentKey(child, ii++);
3526 + subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
3527 + }
3528 + } else {
3529 + if ("development" !== 'production') {
3530 + var mapsAsChildrenAddendum = '';
3531 + if (ReactCurrentOwner.current) {
3532 + var mapsAsChildrenOwnerName = ReactCurrentOwner.current.getName();
3533 + if (mapsAsChildrenOwnerName) {
3534 + mapsAsChildrenAddendum = ' Check the render method of `' + mapsAsChildrenOwnerName + '`.';
3535 + }
3536 + }
3537 + "development" !== 'production' ? warning(didWarnAboutMaps, 'Using Maps as children is not yet fully supported. It is an ' + 'experimental feature that might be removed. Convert it to a ' + 'sequence / iterable of keyed ReactElements instead.%s', mapsAsChildrenAddendum) : void 0;
3538 + didWarnAboutMaps = true;
3539 + }
3540 + // Iterator will provide entry [k,v] tuples rather than values.
3541 + while (!(step = iterator.next()).done) {
3542 + var entry = step.value;
3543 + if (entry) {
3544 + child = entry[1];
3545 + nextName = nextNamePrefix + KeyEscapeUtils.escape(entry[0]) + SUBSEPARATOR + getComponentKey(child, 0);
3546 + subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
3547 + }
3548 + }
3549 + }
3550 + } else if (type === 'object') {
3551 + var addendum = '';
3552 + if ("development" !== 'production') {
3553 + addendum = ' If you meant to render a collection of children, use an array ' + 'instead or wrap the object using createFragment(object) from the ' + 'React add-ons.';
3554 + if (children._isReactElement) {
3555 + addendum = ' It looks like you\'re using an element created by a different ' + 'version of React. Make sure to use only one copy of React.';
3556 + }
3557 + if (ReactCurrentOwner.current) {
3558 + var name = ReactCurrentOwner.current.getName();
3559 + if (name) {
3560 + addendum += ' Check the render method of `' + name + '`.';
3561 + }
3562 + }
3563 + }
3564 + var childrenString = String(children);
3565 + !false ? "development" !== 'production' ? invariant(false, 'Objects are not valid as a React child (found: %s).%s', childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString, addendum) : _prodInvariant('31', childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString, addendum) : void 0;
3566 + }
3567 + }
3568 +
3569 + return subtreeCount;
3570 +}
3571 +
3572 +/**
3573 + * Traverses children that are typically specified as `props.children`, but
3574 + * might also be specified through attributes:
3575 + *
3576 + * - `traverseAllChildren(this.props.children, ...)`
3577 + * - `traverseAllChildren(this.props.leftPanelChildren, ...)`
3578 + *
3579 + * The `traverseContext` is an optional argument that is passed through the
3580 + * entire traversal. It can be used to store accumulations or anything else that
3581 + * the callback might find relevant.
3582 + *
3583 + * @param {?*} children Children tree object.
3584 + * @param {!function} callback To invoke upon traversing each child.
3585 + * @param {?*} traverseContext Context for traversal.
3586 + * @return {!number} The number of children in this subtree.
3587 + */
3588 +function traverseAllChildren(children, callback, traverseContext) {
3589 + if (children == null) {
3590 + return 0;
3591 + }
3592 +
3593 + return traverseAllChildrenImpl(children, '', callback, traverseContext);
3594 +}
3595 +
3596 +module.exports = traverseAllChildren;
3597 +},{"1":1,"11":11,"23":23,"25":25,"29":29,"30":30,"8":8}],27:[function(_dereq_,module,exports){
3598 +"use strict";
3599 +
3600 +/**
3601 + * Copyright (c) 2013-present, Facebook, Inc.
3602 + * All rights reserved.
3603 + *
3604 + * This source code is licensed under the BSD-style license found in the
3605 + * LICENSE file in the root directory of this source tree. An additional grant
3606 + * of patent rights can be found in the PATENTS file in the same directory.
3607 + *
3608 + *
3609 + */
3610 +
3611 +function makeEmptyFunction(arg) {
3612 + return function () {
3613 + return arg;
3614 + };
3615 +}
3616 +
3617 +/**
3618 + * This function accepts and discards inputs; it has no side effects. This is
3619 + * primarily useful idiomatically for overridable function endpoints which
3620 + * always need to be callable, since JS lacks a null-call idiom ala Cocoa.
3621 + */
3622 +var emptyFunction = function emptyFunction() {};
3623 +
3624 +emptyFunction.thatReturns = makeEmptyFunction;
3625 +emptyFunction.thatReturnsFalse = makeEmptyFunction(false);
3626 +emptyFunction.thatReturnsTrue = makeEmptyFunction(true);
3627 +emptyFunction.thatReturnsNull = makeEmptyFunction(null);
3628 +emptyFunction.thatReturnsThis = function () {
3629 + return this;
3630 +};
3631 +emptyFunction.thatReturnsArgument = function (arg) {
3632 + return arg;
3633 +};
3634 +
3635 +module.exports = emptyFunction;
3636 +},{}],28:[function(_dereq_,module,exports){
3637 +/**
3638 + * Copyright (c) 2013-present, Facebook, Inc.
3639 + * All rights reserved.
3640 + *
3641 + * This source code is licensed under the BSD-style license found in the
3642 + * LICENSE file in the root directory of this source tree. An additional grant
3643 + * of patent rights can be found in the PATENTS file in the same directory.
3644 + *
3645 + */
3646 +
3647 +'use strict';
3648 +
3649 +var emptyObject = {};
3650 +
3651 +if ("development" !== 'production') {
3652 + Object.freeze(emptyObject);
3653 +}
3654 +
3655 +module.exports = emptyObject;
3656 +},{}],29:[function(_dereq_,module,exports){
3657 +/**
3658 + * Copyright (c) 2013-present, Facebook, Inc.
3659 + * All rights reserved.
3660 + *
3661 + * This source code is licensed under the BSD-style license found in the
3662 + * LICENSE file in the root directory of this source tree. An additional grant
3663 + * of patent rights can be found in the PATENTS file in the same directory.
3664 + *
3665 + */
3666 +
3667 +'use strict';
3668 +
3669 +/**
3670 + * Use invariant() to assert state which your program assumes to be true.
3671 + *
3672 + * Provide sprintf-style format (only %s is supported) and arguments
3673 + * to provide information about what broke and what you were
3674 + * expecting.
3675 + *
3676 + * The invariant message will be stripped in production, but the invariant
3677 + * will remain to ensure logic does not differ in production.
3678 + */
3679 +
3680 +function invariant(condition, format, a, b, c, d, e, f) {
3681 + if ("development" !== 'production') {
3682 + if (format === undefined) {
3683 + throw new Error('invariant requires an error message argument');
3684 + }
3685 + }
3686 +
3687 + if (!condition) {
3688 + var error;
3689 + if (format === undefined) {
3690 + error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');
3691 + } else {
3692 + var args = [a, b, c, d, e, f];
3693 + var argIndex = 0;
3694 + error = new Error(format.replace(/%s/g, function () {
3695 + return args[argIndex++];
3696 + }));
3697 + error.name = 'Invariant Violation';
3698 + }
3699 +
3700 + error.framesToPop = 1; // we don't care about invariant's own frame
3701 + throw error;
3702 + }
3703 +}
3704 +
3705 +module.exports = invariant;
3706 +},{}],30:[function(_dereq_,module,exports){
3707 +/**
3708 + * Copyright 2014-2015, Facebook, Inc.
3709 + * All rights reserved.
3710 + *
3711 + * This source code is licensed under the BSD-style license found in the
3712 + * LICENSE file in the root directory of this source tree. An additional grant
3713 + * of patent rights can be found in the PATENTS file in the same directory.
3714 + *
3715 + */
3716 +
3717 +'use strict';
3718 +
3719 +var emptyFunction = _dereq_(27);
3720 +
3721 +/**
3722 + * Similar to invariant but only logs a warning if the condition is not met.
3723 + * This can be used to log issues in development environments in critical
3724 + * paths. Removing the logging code for production environments will keep the
3725 + * same logic and follow the same code paths.
3726 + */
3727 +
3728 +var warning = emptyFunction;
3729 +
3730 +if ("development" !== 'production') {
3731 + (function () {
3732 + var printWarning = function printWarning(format) {
3733 + for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
3734 + args[_key - 1] = arguments[_key];
3735 + }
3736 +
3737 + var argIndex = 0;
3738 + var message = 'Warning: ' + format.replace(/%s/g, function () {
3739 + return args[argIndex++];
3740 + });
3741 + if (typeof console !== 'undefined') {
3742 + console.error(message);
3743 + }
3744 + try {
3745 + // --- Welcome to debugging React ---
3746 + // This error was thrown as a convenience so that you can use this stack
3747 + // to find the callsite that caused this warning to fire.
3748 + throw new Error(message);
3749 + } catch (x) {}
3750 + };
3751 +
3752 + warning = function warning(condition, format) {
3753 + if (format === undefined) {
3754 + throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');
3755 + }
3756 +
3757 + if (format.indexOf('Failed Composite propType: ') === 0) {
3758 + return; // Ignore CompositeComponent proptype check.
3759 + }
3760 +
3761 + if (!condition) {
3762 + for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
3763 + args[_key2 - 2] = arguments[_key2];
3764 + }
3765 +
3766 + printWarning.apply(undefined, [format].concat(args));
3767 + }
3768 + };
3769 + })();
3770 +}
3771 +
3772 +module.exports = warning;
3773 +},{"27":27}],31:[function(_dereq_,module,exports){
3774 +'use strict';
3775 +/* eslint-disable no-unused-vars */
3776 +var hasOwnProperty = Object.prototype.hasOwnProperty;
3777 +var propIsEnumerable = Object.prototype.propertyIsEnumerable;
3778 +
3779 +function toObject(val) {
3780 + if (val === null || val === undefined) {
3781 + throw new TypeError('Object.assign cannot be called with null or undefined');
3782 + }
3783 +
3784 + return Object(val);
3785 +}
3786 +
3787 +function shouldUseNative() {
3788 + try {
3789 + if (!Object.assign) {
3790 + return false;
3791 + }
3792 +
3793 + // Detect buggy property enumeration order in older V8 versions.
3794 +
3795 + // https://bugs.chromium.org/p/v8/issues/detail?id=4118
3796 + var test1 = new String('abc'); // eslint-disable-line
3797 + test1[5] = 'de';
3798 + if (Object.getOwnPropertyNames(test1)[0] === '5') {
3799 + return false;
3800 + }
3801 +
3802 + // https://bugs.chromium.org/p/v8/issues/detail?id=3056
3803 + var test2 = {};
3804 + for (var i = 0; i < 10; i++) {
3805 + test2['_' + String.fromCharCode(i)] = i;
3806 + }
3807 + var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
3808 + return test2[n];
3809 + });
3810 + if (order2.join('') !== '0123456789') {
3811 + return false;
3812 + }
3813 +
3814 + // https://bugs.chromium.org/p/v8/issues/detail?id=3056
3815 + var test3 = {};
3816 + 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
3817 + test3[letter] = letter;
3818 + });
3819 + if (Object.keys(Object.assign({}, test3)).join('') !==
3820 + 'abcdefghijklmnopqrst') {
3821 + return false;
3822 + }
3823 +
3824 + return true;
3825 + } catch (e) {
3826 + // We don't expect any of the above to throw, but better to be safe.
3827 + return false;
3828 + }
3829 +}
3830 +
3831 +module.exports = shouldUseNative() ? Object.assign : function (target, source) {
3832 + var from;
3833 + var to = toObject(target);
3834 + var symbols;
3835 +
3836 + for (var s = 1; s < arguments.length; s++) {
3837 + from = Object(arguments[s]);
3838 +
3839 + for (var key in from) {
3840 + if (hasOwnProperty.call(from, key)) {
3841 + to[key] = from[key];
3842 + }
3843 + }
3844 +
3845 + if (Object.getOwnPropertySymbols) {
3846 + symbols = Object.getOwnPropertySymbols(from);
3847 + for (var i = 0; i < symbols.length; i++) {
3848 + if (propIsEnumerable.call(from, symbols[i])) {
3849 + to[symbols[i]] = from[symbols[i]];
3850 + }
3851 + }
3852 + }
3853 + }
3854 +
3855 + return to;
3856 +};
3857 +
3858 +},{}]},{},[18])(18)
3859 +});
\ No newline at end of file
fixtures/inputs/README.md renamed
fixtures/inputs/index.html renamed
fixtures/react-loader.js renamed
fixtures/test.html renamed