Official Facebook Pixel - Version 3.0.0

Version Description

Download this release

Release Info

Developer Facebook
Plugin Icon Official Facebook Pixel
Version 3.0.0
Comparing to
See all releases

Code changes from version 2.2.2 to 3.0.0

Files changed (45) hide show
  1. changelog.txt +4 -0
  2. core/AAMFieldsExtractor.php +84 -0
  3. core/AAMSettingsFields.php +46 -0
  4. core/FacebookPluginConfig.php +21 -8
  5. core/FacebookServerSideEvent.php +19 -13
  6. core/FacebookWordpressOptions.php +168 -50
  7. core/FacebookWordpressPixelInjection.php +8 -10
  8. core/FacebookWordpressSettingsPage.php +125 -256
  9. core/FacebookWordpressSettingsRecorder.php +60 -0
  10. core/ServerEventAsyncTask.php +99 -8
  11. core/ServerEventFactory.php +130 -46
  12. facebook-for-wordpress.php +4 -2
  13. integration/FacebookWordpressEasyDigitalDownloads.php +1 -2
  14. js/fbe_allinone.js +21734 -0
  15. languages/official-facebook-pixel-ar_AR.po +3 -3
  16. languages/official-facebook-pixel-cs_CZ.po +3 -3
  17. languages/official-facebook-pixel-da_DK.po +3 -3
  18. languages/official-facebook-pixel-de_DE.po +3 -3
  19. languages/official-facebook-pixel-en_GB.po +3 -3
  20. languages/official-facebook-pixel-es_ES.po +3 -3
  21. languages/official-facebook-pixel-es_LA.po +3 -3
  22. languages/official-facebook-pixel-fi_FI.po +3 -3
  23. languages/official-facebook-pixel-fr_CA.po +3 -3
  24. languages/official-facebook-pixel-fr_FR.po +3 -3
  25. languages/official-facebook-pixel-he_IL.po +3 -3
  26. languages/official-facebook-pixel-it_IT.po +3 -3
  27. languages/official-facebook-pixel-ja_JP.po +3 -3
  28. languages/official-facebook-pixel-ko_KR.po +3 -3
  29. languages/official-facebook-pixel-nb_NO.po +3 -3
  30. languages/official-facebook-pixel-nl_NL.po +3 -3
  31. languages/official-facebook-pixel-pl_PL.po +3 -3
  32. languages/official-facebook-pixel-pt_BR.po +3 -3
  33. languages/official-facebook-pixel-pt_PT.po +3 -3
  34. languages/official-facebook-pixel-ru_RU.po +3 -3
  35. languages/official-facebook-pixel-sv_SE.po +3 -3
  36. languages/official-facebook-pixel-th_TH.po +3 -3
  37. languages/official-facebook-pixel-tr_TR.po +3 -3
  38. languages/official-facebook-pixel-vi_VN.po +3 -3
  39. languages/official-facebook-pixel-zh_CN.po +3 -3
  40. languages/official-facebook-pixel-zh_TW.po +3 -3
  41. languages/official-facebook-pixel.pot +4 -4
  42. readme.txt +15 -7
  43. vendor/autoload.php +1 -1
  44. vendor/composer/autoload_real.php +7 -7
  45. vendor/composer/autoload_static.php +4 -4
changelog.txt CHANGED
@@ -1,4 +1,8 @@
1
  *** Facebook for WordPress Changelog ***
 
 
 
 
2
  2020-12-08 version 2.2.2
3
  * Update Business SDK to v9.0.1
4
 
1
  *** Facebook for WordPress Changelog ***
2
+ 2021-01-06 version 3.0.0
3
+ * Adding Facebook Business Extension based configuration
4
+ * Renaming to Facebook for WordPress
5
+
6
  2020-12-08 version 2.2.2
7
  * Update Business SDK to v9.0.1
8
 
core/AAMFieldsExtractor.php ADDED
@@ -0,0 +1,84 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Copyright (C) 2015-present, Facebook, Inc.
4
+ *
5
+ * This program is free software; you can redistribute it and/or modify
6
+ * it under the terms of the GNU General Public License as published by
7
+ * the Free Software Foundation; version 2 of the License.
8
+ *
9
+ * This program is distributed in the hope that it will be useful,
10
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
+ * GNU General Public License for more details.
13
+ *
14
+ */
15
+
16
+ namespace FacebookPixelPlugin\Core;
17
+
18
+ use FacebookAds\Object\ServerSide\Normalizer;
19
+
20
+ final class AAMFieldsExtractor {
21
+ /**
22
+ * Filters the passed user data using the AAM settings of the pixel
23
+ * @param string[] $user_data_array
24
+ * @return string[]
25
+ */
26
+ public static function getNormalizedUserData($user_data_array) {
27
+ $aam_setttings = FacebookWordpressOptions::getAAMSettings();
28
+ if(!$user_data_array || !$aam_setttings ||
29
+ !$aam_setttings->getEnableAutomaticMatching()){
30
+ return array();
31
+ }
32
+
33
+ //Removing fields not enabled in AAM settings
34
+ foreach ($user_data_array as $key => $value) {
35
+ if(!in_array($key, $aam_setttings->getEnabledAutomaticMatchingFields())){
36
+ unset($user_data_array[$key]);
37
+ }
38
+ }
39
+
40
+ // Normalizing gender and date of birth
41
+ // According to https://developers.facebook.com/docs/facebook-pixel/advanced/advanced-matching
42
+ if(
43
+ array_key_exists(AAMSettingsFields::GENDER, $user_data_array)
44
+ && !empty($user_data_array[AAMSettingsFields::GENDER])
45
+ ){
46
+ $user_data_array[AAMSettingsFields::GENDER] =
47
+ $user_data_array[AAMSettingsFields::GENDER][0];
48
+ }
49
+ if(
50
+ array_key_exists(AAMSettingsFields::DATE_OF_BIRTH, $user_data_array)
51
+ ){
52
+ // strtotime() and date() return false for invalid parameters
53
+ $unix_timestamp =
54
+ strtotime($user_data_array[AAMSettingsFields::DATE_OF_BIRTH]);
55
+ if(!$unix_timestamp){
56
+ unset($user_data_array[AAMSettingsFields::DATE_OF_BIRTH]);
57
+ } else {
58
+ $formatted_date = date("Ymd", $unix_timestamp);
59
+ if(!$formatted_date){
60
+ unset($user_data_array[AAMSettingsFields::DATE_OF_BIRTH]);
61
+ } else {
62
+ $user_data_array[AAMSettingsFields::DATE_OF_BIRTH] = $formatted_date;
63
+ }
64
+ }
65
+ }
66
+ // Given that the format of advanced matching fields is the same in
67
+ // the Pixel and the Conversions API,
68
+ // we can use the business sdk for normalization
69
+ // Compare the documentation:
70
+ // https://developers.facebook.com/docs/marketing-api/conversions-api/parameters/customer-information-parameters
71
+ // https://developers.facebook.com/docs/facebook-pixel/advanced/advanced-matching
72
+ foreach($user_data_array as $field => $data){
73
+ try{
74
+ $normalized_value = Normalizer::normalize($field, $data);
75
+ $user_data_array[$field] = $normalized_value;
76
+ }
77
+ catch(\Exception $e){
78
+ unset($user_data_array[$field]);
79
+ }
80
+ }
81
+
82
+ return $user_data_array;
83
+ }
84
+ }
core/AAMSettingsFields.php ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * Copyright (C) 2017-present, Facebook, Inc.
4
+ *
5
+ * This program is free software; you can redistribute it and/or modify
6
+ * it under the terms of the GNU General Public License as published by
7
+ * the Free Software Foundation; version 2 of the License.
8
+ * This program is distributed in the hope that it will be useful,
9
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
+ * GNU General Public License for more details.
12
+ */
13
+
14
+ namespace FacebookPixelPlugin\Core;
15
+
16
+ /**
17
+ * Class that contains the keys used to identify each field in AAMSettings
18
+ */
19
+ abstract class AAMSettingsFields{
20
+ const EMAIL = "em";
21
+ const FIRST_NAME = "fn";
22
+ const LAST_NAME = "ln";
23
+ const GENDER = "ge";
24
+ const PHONE = "ph";
25
+ const CITY = "ct";
26
+ const STATE = "st";
27
+ const ZIP_CODE = "zp";
28
+ const DATE_OF_BIRTH = "db";
29
+ const COUNTRY = "country";
30
+ const EXTERNAL_ID = "external_id";
31
+ public static function getAllFields(){
32
+ return array(
33
+ self::EMAIL,
34
+ self::FIRST_NAME,
35
+ self::LAST_NAME,
36
+ self::GENDER,
37
+ self::PHONE,
38
+ self::CITY,
39
+ self::STATE,
40
+ self::ZIP_CODE,
41
+ self::DATE_OF_BIRTH,
42
+ self::COUNTRY,
43
+ self::EXTERNAL_ID,
44
+ );
45
+ }
46
+ }
core/FacebookPluginConfig.php CHANGED
@@ -20,15 +20,20 @@ namespace FacebookPixelPlugin\Core;
20
  defined('ABSPATH') or die('Direct access not allowed');
21
 
22
  class FacebookPluginConfig {
23
- const PLUGIN_VERSION = '2.2.2';
24
  const SOURCE = 'wordpress';
25
  const TEXT_DOMAIN = 'official-facebook-pixel';
 
26
 
27
  const ADMIN_CAPABILITY = 'manage_options';
28
  const ADMIN_DISMISS_PIXEL_ID_NOTICE = 'dismiss_pixel_id_notice';
29
  const ADMIN_IGNORE_PIXEL_ID_NOTICE = 'ignore_pixel_id_notice';
30
  const ADMIN_DISMISS_SSAPI_NOTICE = 'dismiss_ssapi__notice';
31
  const ADMIN_IGNORE_SSAPI_NOTICE = 'ignore_ssapi_notice';
 
 
 
 
32
  const ADMIN_MENU_SLUG = 'facebook_pixel_options';
33
  const ADMIN_MENU_TITLE = 'Facebook Pixel';
34
  const ADMIN_OPTION_GROUP = 'facebook_option_group';
@@ -37,15 +42,23 @@ class FacebookPluginConfig {
37
  const ADMIN_S2S_URL = 'https://developers.facebook.com/docs/marketing-api/conversions-api';
38
  const ADMIN_SECTION_ID = 'facebook_settings_section';
39
 
 
 
 
 
 
 
 
 
 
 
 
 
 
40
  const DEFAULT_PIXEL_ID = null;
41
- const PIXEL_ID_KEY = 'pixel_id';
42
- const SETTINGS_KEY = 'facebook_config';
43
- const USE_PII_KEY = 'use_pii';
44
- const USE_ADVANCED_MATCHING_DEFAULT = null;
45
- const USE_S2S_KEY = 'use_s2s';
46
  const DEFAULT_ACCESS_TOKEN = null;
47
- const ACCESS_TOKEN_KEY = 'access_token';
48
- const USE_S2S_DEFAULT = null;
49
 
50
  const IS_PIXEL_RENDERED = 'is_pixel_rendered';
51
  const IS_NOSCRIPT_RENDERED = 'is_noscript_rendered';
20
  defined('ABSPATH') or die('Direct access not allowed');
21
 
22
  class FacebookPluginConfig {
23
+ const PLUGIN_VERSION = '3.0.0';
24
  const SOURCE = 'wordpress';
25
  const TEXT_DOMAIN = 'official-facebook-pixel';
26
+ const PLUGIN_NAME = 'Facebook for WordPress';
27
 
28
  const ADMIN_CAPABILITY = 'manage_options';
29
  const ADMIN_DISMISS_PIXEL_ID_NOTICE = 'dismiss_pixel_id_notice';
30
  const ADMIN_IGNORE_PIXEL_ID_NOTICE = 'ignore_pixel_id_notice';
31
  const ADMIN_DISMISS_SSAPI_NOTICE = 'dismiss_ssapi__notice';
32
  const ADMIN_IGNORE_SSAPI_NOTICE = 'ignore_ssapi_notice';
33
+ const ADMIN_DISMISS_FBE_NOT_INSTALLED_NOTICE =
34
+ 'dismiss_fbe_not_installed_notice';
35
+ const ADMIN_IGNORE_FBE_NOT_INSTALLED_NOTICE =
36
+ 'ignore_fbe_not_installed_notice';
37
  const ADMIN_MENU_SLUG = 'facebook_pixel_options';
38
  const ADMIN_MENU_TITLE = 'Facebook Pixel';
39
  const ADMIN_OPTION_GROUP = 'facebook_option_group';
42
  const ADMIN_S2S_URL = 'https://developers.facebook.com/docs/marketing-api/conversions-api';
43
  const ADMIN_SECTION_ID = 'facebook_settings_section';
44
 
45
+ const SETTINGS_KEY = 'facebook_business_extension_config';
46
+ const PIXEL_ID_KEY = 'facebook_pixel_id';
47
+ const ACCESS_TOKEN_KEY = 'facebook_access_token';
48
+ const EXTERNAL_BUSINESS_ID_KEY = 'facebook_external_business_id';
49
+ const IS_FBE_INSTALLED_KEY = 'facebook_is_fbe_installed';
50
+ const AAM_SETTINGS_KEY = 'facebook_pixel_aam_settings';
51
+
52
+ // Keys used in the old settings
53
+ const OLD_SETTINGS_KEY = 'facebook_config';
54
+ const OLD_PIXEL_ID_KEY = 'pixel_id';
55
+ const OLD_ACCESS_TOKEN_KEY = 'access_token';
56
+ const OLD_USE_PII = 'use_pii';
57
+
58
  const DEFAULT_PIXEL_ID = null;
 
 
 
 
 
59
  const DEFAULT_ACCESS_TOKEN = null;
60
+ const DEFAULT_EXTERNAL_BUSINESS_ID_PREFIX = 'fbe_wordpress_';
61
+ const DEFAULT_IS_FBE_INSTALLED = '0';
62
 
63
  const IS_PIXEL_RENDERED = 'is_pixel_rendered';
64
  const IS_NOSCRIPT_RENDERED = 'is_noscript_rendered';
core/FacebookServerSideEvent.php CHANGED
@@ -21,6 +21,7 @@ use FacebookAds\Api;
21
  use FacebookAds\Object\ServerSide\Event;
22
  use FacebookAds\Object\ServerSide\EventRequest;
23
  use FacebookAds\Object\ServerSide\UserData;
 
24
 
25
  defined('ABSPATH') or die('Direct access not allowed');
26
 
@@ -43,16 +44,14 @@ class FacebookServerSideEvent {
43
 
44
  public function track($event, $sendNow = true) {
45
  $this->trackedEvents[] = $event;
46
- if( FacebookWordpressOptions::getUseS2S() ){
47
- if( $sendNow ){
48
- do_action( 'send_server_events',
49
- array($event),
50
- 1
51
- );
52
- }
53
- else{
54
- $this->pendingEvents[] = $event;
55
- }
56
  }
57
  }
58
 
@@ -89,12 +88,19 @@ class FacebookServerSideEvent {
89
  $access_token = FacebookWordpressOptions::getAccessToken();
90
  $agent = FacebookWordpressOptions::getAgentString();
91
 
92
- $api = Api::init(null, null, $access_token);
 
 
 
 
93
 
94
- $request = (new EventRequest($pixel_id))
95
  ->setEvents($events)
96
  ->setPartnerAgent($agent);
97
 
98
- $response = $request->execute();
 
 
 
99
  }
100
  }
21
  use FacebookAds\Object\ServerSide\Event;
22
  use FacebookAds\Object\ServerSide\EventRequest;
23
  use FacebookAds\Object\ServerSide\UserData;
24
+ use FacebookAds\Exception\Exception;
25
 
26
  defined('ABSPATH') or die('Direct access not allowed');
27
 
44
 
45
  public function track($event, $sendNow = true) {
46
  $this->trackedEvents[] = $event;
47
+ if( $sendNow ){
48
+ do_action( 'send_server_events',
49
+ array($event),
50
+ 1
51
+ );
52
+ }
53
+ else{
54
+ $this->pendingEvents[] = $event;
 
 
55
  }
56
  }
57
 
88
  $access_token = FacebookWordpressOptions::getAccessToken();
89
  $agent = FacebookWordpressOptions::getAgentString();
90
 
91
+ if(empty($pixel_id) || empty($access_token)){
92
+ return;
93
+ }
94
+ try{
95
+ $api = Api::init(null, null, $access_token);
96
 
97
+ $request = (new EventRequest($pixel_id))
98
  ->setEvents($events)
99
  ->setPartnerAgent($agent);
100
 
101
+ $response = $request->execute();
102
+ } catch (Exception $e) {
103
+ error_log(json_encode($e));
104
+ }
105
  }
106
  }
core/FacebookWordpressOptions.php CHANGED
@@ -17,17 +17,22 @@
17
 
18
  namespace FacebookPixelPlugin\Core;
19
 
 
 
20
  defined('ABSPATH') or die('Direct access not allowed');
21
 
22
  class FacebookWordpressOptions {
23
  private static $options = array();
24
  private static $userInfo = array();
25
  private static $versionInfo = array();
 
 
26
 
27
  public static function initialize() {
28
- self::setOptions();
29
- self::setUserInfo();
30
  self::setVersionInfo();
 
 
31
  }
32
 
33
  public static function getOptions() {
@@ -44,38 +49,72 @@ class FacebookWordpressOptions {
44
  ? '' : FacebookPluginConfig::DEFAULT_ACCESS_TOKEN;
45
  }
46
 
47
- // Default is on for unset config
48
- public static function getDefaultUsePIIKey() {
49
- return (!is_null(FacebookPluginConfig::USE_ADVANCED_MATCHING_DEFAULT)
50
- && !FacebookPluginConfig::USE_ADVANCED_MATCHING_DEFAULT) ? '0' : '1';
51
  }
52
 
53
- // We default not to send events through S2S, if the config is unset.
54
- public static function getDefaultUseS2SKey() {
55
- return (is_null(FacebookPluginConfig::USE_S2S_DEFAULT)
56
- || !FacebookPluginConfig::USE_S2S_DEFAULT) ? '0' : '1';
57
  }
58
 
59
- private static function setOptions() {
60
- self::$options = \get_option(
61
- FacebookPluginConfig::SETTINGS_KEY,
62
- array(
63
- FacebookPluginConfig::PIXEL_ID_KEY => self::getDefaultPixelID(),
64
- FacebookPluginConfig::USE_PII_KEY => self::getDefaultUsePIIKey(),
65
- FacebookPluginConfig::USE_S2S_KEY => self::getDefaultUseS2SKey(),
66
- FacebookPluginConfig::ACCESS_TOKEN_KEY => self::getDefaultAccessToken(),
67
- ));
68
-
69
- // we need esc_js because the id is set through the form
70
- if (array_key_exists(FacebookPluginConfig::PIXEL_ID_KEY, self::$options)) {
71
- self::$options[FacebookPluginConfig::PIXEL_ID_KEY] =
72
- esc_js(self::$options[FacebookPluginConfig::PIXEL_ID_KEY]);
73
  }
74
-
75
- if (array_key_exists(
76
- FacebookPluginConfig::ACCESS_TOKEN_KEY, self::$options)) {
77
- self::$options[FacebookPluginConfig::ACCESS_TOKEN_KEY] =
78
- esc_js(self::$options[FacebookPluginConfig::ACCESS_TOKEN_KEY]);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
79
  }
80
  }
81
 
@@ -87,30 +126,35 @@ class FacebookWordpressOptions {
87
  return self::getDefaultPixelID();
88
  }
89
 
90
- public static function getAccessToken() {
91
- if (array_key_exists(
92
- FacebookPluginConfig::ACCESS_TOKEN_KEY, self::$options)) {
93
- return self::$options[FacebookPluginConfig::ACCESS_TOKEN_KEY];
 
 
94
  }
95
 
96
- return self::getDefaultAccessToken();
97
  }
98
 
99
- public static function getUsePii() {
100
- if (array_key_exists(
101
- FacebookPluginConfig::USE_PII_KEY, self::$options)) {
102
- return self::$options[FacebookPluginConfig::USE_PII_KEY];
 
 
103
  }
104
 
105
- return self::getDefaultUsePIIKey();
106
  }
107
 
108
- public static function getUseS2S() {
109
- if (array_key_exists(FacebookPluginConfig::USE_S2S_KEY, self::$options)) {
110
- return self::$options[FacebookPluginConfig::USE_S2S_KEY];
 
111
  }
112
 
113
- return self::getDefaultUseS2SKey();
114
  }
115
 
116
  public static function getUserInfo() {
@@ -129,20 +173,20 @@ class FacebookWordpressOptions {
129
 
130
  public static function registerUserInfo() {
131
  $current_user = wp_get_current_user();
132
- $use_pii = self::getUsePii();
133
- if (0 === $current_user->ID || $use_pii !== '1') {
134
- // User not logged in or admin chose not to send PII.
135
  self::$userInfo = array();
136
  } else {
137
- self::$userInfo = array_filter(
138
  array(
139
  // Keys documented in
140
  // https://developers.facebook.com/docs/facebook-pixel/pixel-with-ads/conversion-tracking#advanced_match
141
- 'em' => $current_user->user_email,
142
- 'fn' => $current_user->user_firstname,
143
- 'ln' => $current_user->user_lastname
144
  ),
145
  function ($value) { return $value !== null && $value !== ''; });
 
146
  }
147
  }
148
 
@@ -167,4 +211,78 @@ class FacebookWordpressOptions {
167
  self::$versionInfo['version'],
168
  self::$versionInfo['pluginVersion']);
169
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
170
  }
17
 
18
  namespace FacebookPixelPlugin\Core;
19
 
20
+ use FacebookAds\Object\ServerSide\AdsPixelSettings;
21
+
22
  defined('ABSPATH') or die('Direct access not allowed');
23
 
24
  class FacebookWordpressOptions {
25
  private static $options = array();
26
  private static $userInfo = array();
27
  private static $versionInfo = array();
28
+ private static $aamSettings = null;
29
+ const AAM_SETTINGS_REFRESH_IN_MINUTES = 20;
30
 
31
  public static function initialize() {
32
+ self::initOptions();
 
33
  self::setVersionInfo();
34
+ self::setAAMSettings();
35
+ self::setUserInfo();
36
  }
37
 
38
  public static function getOptions() {
49
  ? '' : FacebookPluginConfig::DEFAULT_ACCESS_TOKEN;
50
  }
51
 
52
+ public static function getDefaultExternalBusinessId(){
53
+ return uniqid(
54
+ FacebookPluginConfig::DEFAULT_EXTERNAL_BUSINESS_ID_PREFIX.time().'_'
55
+ );
56
  }
57
 
58
+ public static function getDefaultIsFbeInstalled(){
59
+ return FacebookPluginConfig::DEFAULT_IS_FBE_INSTALLED;
 
 
60
  }
61
 
62
+ private static function initOptions() {
63
+ $old_options = \get_option(FacebookPluginConfig::OLD_SETTINGS_KEY);
64
+ $new_options = \get_option(FacebookPluginConfig::SETTINGS_KEY);
65
+ // If the new options are saved in WP database, they are used
66
+ if($new_options){
67
+ self::$options = $new_options;
 
 
 
 
 
 
 
 
68
  }
69
+ // Otherwise, the old options can be used
70
+ else{
71
+ // The pixel id and access token will be exported
72
+ if($old_options){
73
+ self::$options = array(
74
+ FacebookPluginConfig::EXTERNAL_BUSINESS_ID_KEY =>
75
+ self::getDefaultExternalBusinessId(),
76
+ FacebookPluginConfig::IS_FBE_INSTALLED_KEY =>
77
+ self::getDefaultIsFbeInstalled(),
78
+ );
79
+ if(
80
+ array_key_exists(FacebookPluginConfig::OLD_ACCESS_TOKEN_KEY,$old_options)
81
+ && !empty($old_options[FacebookPluginConfig::OLD_ACCESS_TOKEN_KEY])
82
+ ){
83
+ self::$options[FacebookPluginConfig::ACCESS_TOKEN_KEY] =
84
+ $old_options[FacebookPluginConfig::OLD_ACCESS_TOKEN_KEY];
85
+ }
86
+ else{
87
+ self::$options[FacebookPluginConfig::ACCESS_TOKEN_KEY] =
88
+ self::getDefaultAccessToken();
89
+ }
90
+ if(
91
+ array_key_exists(FacebookPluginConfig::OLD_PIXEL_ID_KEY,$old_options)
92
+ && !empty($old_options[FacebookPluginConfig::OLD_PIXEL_ID_KEY])
93
+ && is_numeric($old_options[FacebookPluginConfig::OLD_PIXEL_ID_KEY])
94
+ ){
95
+ self::$options[FacebookPluginConfig::PIXEL_ID_KEY] =
96
+ $old_options[FacebookPluginConfig::OLD_PIXEL_ID_KEY];
97
+ }
98
+ else{
99
+ self::$options[FacebookPluginConfig::PIXEL_ID_KEY] =
100
+ self::getDefaultPixelID();
101
+ }
102
+ }
103
+ // If no options are present, the default values are used
104
+ else{
105
+ self::$options = \get_option(
106
+ FacebookPluginConfig::SETTINGS_KEY,
107
+ array(
108
+ FacebookPluginConfig::PIXEL_ID_KEY => self::getDefaultPixelID(),
109
+ FacebookPluginConfig::ACCESS_TOKEN_KEY =>
110
+ self::getDefaultAccessToken(),
111
+ FacebookPluginConfig::EXTERNAL_BUSINESS_ID_KEY =>
112
+ self::getDefaultExternalBusinessId(),
113
+ FacebookPluginConfig::IS_FBE_INSTALLED_KEY =>
114
+ self::getDefaultIsFbeInstalled()
115
+ )
116
+ );
117
+ }
118
  }
119
  }
120
 
126
  return self::getDefaultPixelID();
127
  }
128
 
129
+ public static function getExternalBusinessId() {
130
+ if(
131
+ array_key_exists(FacebookPluginConfig::EXTERNAL_BUSINESS_ID_KEY,
132
+ self::$options)
133
+ ){
134
+ return self::$options[FacebookPluginConfig::EXTERNAL_BUSINESS_ID_KEY];
135
  }
136
 
137
+ return self::getDefaultExternalBusinessId();
138
  }
139
 
140
+ public static function getIsFbeInstalled(){
141
+ if(
142
+ array_key_exists(FacebookPluginConfig::IS_FBE_INSTALLED_KEY,
143
+ self::$options)
144
+ ){
145
+ return self::$options[FacebookPluginConfig::IS_FBE_INSTALLED_KEY];
146
  }
147
 
148
+ return self::getDefaultIsFbeInstalled();
149
  }
150
 
151
+ public static function getAccessToken() {
152
+ if (array_key_exists(
153
+ FacebookPluginConfig::ACCESS_TOKEN_KEY, self::$options)) {
154
+ return self::$options[FacebookPluginConfig::ACCESS_TOKEN_KEY];
155
  }
156
 
157
+ return self::getDefaultAccessToken();
158
  }
159
 
160
  public static function getUserInfo() {
173
 
174
  public static function registerUserInfo() {
175
  $current_user = wp_get_current_user();
176
+ if (0 === $current_user->ID ) {
177
+ // User not logged in
 
178
  self::$userInfo = array();
179
  } else {
180
+ $user_info = array_filter(
181
  array(
182
  // Keys documented in
183
  // https://developers.facebook.com/docs/facebook-pixel/pixel-with-ads/conversion-tracking#advanced_match
184
+ AAMSettingsFields::EMAIL => $current_user->user_email,
185
+ AAMSettingsFields::FIRST_NAME => $current_user->user_firstname,
186
+ AAMSettingsFields::LAST_NAME => $current_user->user_lastname
187
  ),
188
  function ($value) { return $value !== null && $value !== ''; });
189
+ self::$userInfo = AAMFieldsExtractor::getNormalizedUserData($user_info);
190
  }
191
  }
192
 
211
  self::$versionInfo['version'],
212
  self::$versionInfo['pluginVersion']);
213
  }
214
+
215
+ public static function getAAMSettings(){
216
+ return self::$aamSettings;
217
+ }
218
+
219
+ private static function setFbeBasedAAMSettings(){
220
+ $installed_pixel = self::getPixelId();
221
+ $settings_as_array = get_transient(FacebookPluginConfig::AAM_SETTINGS_KEY);
222
+ // If AAM_SETTINGS_KEY is present in the DB and corresponds to the installed
223
+ // pixel, it is converted into an AdsPixelSettings object
224
+ if( $settings_as_array !== false ){
225
+ $aam_settings = new AdsPixelSettings();
226
+ $aam_settings->setPixelId($settings_as_array['pixelId']);
227
+ $aam_settings->setEnableAutomaticMatching($settings_as_array['enableAutomaticMatching']);
228
+ $aam_settings->setEnabledAutomaticMatchingFields($settings_as_array['enabledAutomaticMatchingFields']);
229
+ if($installed_pixel == $aam_settings->getPixelId()){
230
+ self::$aamSettings = $aam_settings;
231
+ }
232
+ }
233
+ // If the settings are not present
234
+ // they are fetched from Facebook domain
235
+ // and cached in WP database if they are not null
236
+ if(!self::$aamSettings){
237
+ $refresh_interval =
238
+ self::AAM_SETTINGS_REFRESH_IN_MINUTES*MINUTE_IN_SECONDS;
239
+ $aam_settings = AdsPixelSettings::buildFromPixelId( $installed_pixel );
240
+ if($aam_settings){
241
+ $settings_as_array = array(
242
+ 'pixelId' => $aam_settings->getPixelId(),
243
+ 'enableAutomaticMatching' =>
244
+ $aam_settings->getEnableAutomaticMatching(),
245
+ 'enabledAutomaticMatchingFields' =>
246
+ $aam_settings->getEnabledAutomaticMatchingFields(),
247
+ );
248
+ set_transient(FacebookPluginConfig::AAM_SETTINGS_KEY,
249
+ $settings_as_array, $refresh_interval);
250
+ self::$aamSettings = $aam_settings;
251
+ }
252
+ }
253
+ }
254
+
255
+ private static function setOldAAMSettings(){
256
+ $old_options = \get_option(FacebookPluginConfig::OLD_SETTINGS_KEY);
257
+ if($old_options
258
+ && array_key_exists(FacebookPluginConfig::OLD_USE_PII, $old_options)
259
+ && $old_options[FacebookPluginConfig::OLD_USE_PII]){
260
+ self::$aamSettings = new AdsPixelSettings(
261
+ array(
262
+ 'enableAutomaticMatching' => true,
263
+ 'enabledAutomaticMatchingFields' =>
264
+ AAMSettingsFields::getAllFields(),
265
+ )
266
+ );
267
+ } else {
268
+ self::$aamSettings = new AdsPixelSettings(
269
+ array(
270
+ 'enableAutomaticMatching' => false,
271
+ 'enabledAutomaticMatchingFields' => array(),
272
+ )
273
+ );
274
+ }
275
+ }
276
+
277
+ private static function setAAMSettings(){
278
+ self::$aamSettings = null;
279
+ if( empty(self::getPixelId()) ){
280
+ return;
281
+ }
282
+ if(self::getIsFbeInstalled()){
283
+ self::setFbeBasedAAMSettings();
284
+ } else {
285
+ self::setOldAAMSettings();
286
+ }
287
+ }
288
  }
core/FacebookWordpressPixelInjection.php CHANGED
@@ -46,16 +46,14 @@ class FacebookWordpressPixelInjection {
46
  }
47
 
48
  public function sendPendingEvents(){
49
- if(FacebookWordpressOptions::getUseS2S()){
50
- $pending_events =
51
- FacebookServerSideEvent::getInstance()->getPendingEvents();
52
- if(count($pending_events) > 0){
53
- do_action(
54
- 'send_server_events',
55
- $pending_events,
56
- count($pending_events)
57
- );
58
- }
59
  }
60
  }
61
 
46
  }
47
 
48
  public function sendPendingEvents(){
49
+ $pending_events =
50
+ FacebookServerSideEvent::getInstance()->getPendingEvents();
51
+ if(count($pending_events) > 0){
52
+ do_action(
53
+ 'send_server_events',
54
+ $pending_events,
55
+ count($pending_events)
56
+ );
 
 
57
  }
58
  }
59
 
core/FacebookWordpressSettingsPage.php CHANGED
@@ -17,260 +17,160 @@
17
 
18
  namespace FacebookPixelPlugin\Core;
19
 
 
 
20
  defined('ABSPATH') or die('Direct access not allowed');
21
 
22
  class FacebookWordpressSettingsPage {
23
  private $optionsPage = '';
24
 
25
  public function __construct($plugin_name) {
26
- add_action('admin_menu', array($this, 'addMenu'));
27
- add_action('admin_init', array($this, 'registerSettingsPage'));
28
- add_action('admin_init', array($this, 'dismissNotices'));
29
- add_action('admin_enqueue_scripts', array($this, 'registerPluginStyles'));
30
- add_action('current_screen', array($this, 'registerNotices'));
31
  add_filter(
32
  'plugin_action_links_'.$plugin_name,
33
  array($this, 'addSettingsLink'));
 
 
 
 
 
 
 
 
 
 
 
 
 
34
  }
35
 
36
- public function addMenu() {
37
  $this->optionsPage = add_options_page(
38
  FacebookPluginConfig::ADMIN_PAGE_TITLE,
39
  FacebookPluginConfig::ADMIN_MENU_TITLE,
40
  FacebookPluginConfig::ADMIN_CAPABILITY,
41
  FacebookPluginConfig::ADMIN_MENU_SLUG,
42
- array($this, 'createMenuPage'));
43
  }
44
 
45
- public function createMenuPage() {
46
  if (!current_user_can(FacebookPluginConfig::ADMIN_CAPABILITY)) {
47
  wp_die(__(
48
  'You do not have sufficient permissions to access this page',
49
  FacebookPluginConfig::TEXT_DOMAIN));
50
  }
51
-
52
- printf(
53
- '
54
- <div class="wrap">
55
- <h2>%s</h2>
56
- <form action="options.php" method="POST">
57
- ',
58
- FacebookPluginConfig::ADMIN_PAGE_TITLE);
59
- settings_fields(FacebookPluginConfig::ADMIN_OPTION_GROUP);
60
- do_settings_sections(FacebookPluginConfig::ADMIN_MENU_SLUG);
61
- submit_button();
62
- printf(
63
- '
64
- </form>
65
- </div>
66
- ');
67
- }
68
-
69
- public function registerSettingsPage() {
70
- register_setting(
71
- FacebookPluginConfig::ADMIN_OPTION_GROUP,
72
- FacebookPluginConfig::SETTINGS_KEY,
73
- array($this, 'sanitizeInput'));
74
- add_settings_section(
75
- FacebookPluginConfig::ADMIN_SECTION_ID,
76
- null,
77
- array($this, 'sectionSubTitle'),
78
- FacebookPluginConfig::ADMIN_MENU_SLUG);
79
- add_settings_field(
80
- FacebookPluginConfig::PIXEL_ID_KEY,
81
- 'Pixel ID',
82
- array($this, 'pixelIdFormField'),
83
- FacebookPluginConfig::ADMIN_MENU_SLUG,
84
- FacebookPluginConfig::ADMIN_SECTION_ID);
85
- add_settings_field(
86
- FacebookPluginConfig::USE_PII_KEY,
87
- 'Use Advanced Matching on pixel?',
88
- array($this, 'usePiiFormField'),
89
- FacebookPluginConfig::ADMIN_MENU_SLUG,
90
- FacebookPluginConfig::ADMIN_SECTION_ID);
91
- add_settings_field(
92
- FacebookPluginConfig::USE_S2S_KEY,
93
- 'Use Conversions API?',
94
- array($this, 'useS2SFormField'),
95
- FacebookPluginConfig::ADMIN_MENU_SLUG,
96
- FacebookPluginConfig::ADMIN_SECTION_ID);
97
- add_settings_field(
98
- FacebookPluginConfig::ACCESS_TOKEN_KEY,
99
- 'Access Token',
100
- array($this, 'accessTokenFormField'),
101
- FacebookPluginConfig::ADMIN_MENU_SLUG,
102
- FacebookPluginConfig::ADMIN_SECTION_ID);
103
- }
104
-
105
- public function sanitizeInput($input) {
106
- $input[FacebookPluginConfig::USE_PII_KEY] =
107
- !empty($input[FacebookPluginConfig::USE_PII_KEY])
108
- ? '1'
109
- : '0';
110
- $input[FacebookPluginConfig::PIXEL_ID_KEY] =
111
- !empty($input[FacebookPluginConfig::PIXEL_ID_KEY])
112
- ? FacebookPluginUtils::isPositiveInteger($input[FacebookPluginConfig::PIXEL_ID_KEY])
113
- ? $input[FacebookPluginConfig::PIXEL_ID_KEY]
114
- : ''
115
- : FacebookPixel::getPixelId();
116
- return $input;
117
- }
118
-
119
- public function sectionSubTitle() {
120
- printf(
121
- esc_html__(
122
- 'Please note that we are now also supporting lower funnel pixel events
123
- for Contact Form 7, Easy Digital Downloads, Ninja Forms and WP Forms',
124
- FacebookPluginConfig::TEXT_DOMAIN));
125
  }
126
 
127
- public function pixelIdFormField() {
128
- $description = esc_html__(
129
- 'The unique identifier for your Facebook pixel.',
130
- FacebookPluginConfig::TEXT_DOMAIN);
131
-
132
- $pixel_id = FacebookWordpressOptions::getPixelId();
133
- printf(
134
- '
135
- <input name="%s" id="%s" value="%s" />
136
- <p class="description">%s</p>
137
- ',
138
- FacebookPluginConfig::SETTINGS_KEY . '[' .
139
- FacebookPluginConfig::PIXEL_ID_KEY . ']',
140
- FacebookPluginConfig::PIXEL_ID_KEY,
141
- isset($pixel_id)
142
- ? esc_attr($pixel_id)
143
- : '',
144
- $description);
145
  }
146
 
 
 
 
 
 
 
 
147
 
148
- public function accessTokenFormField() {
149
- $description = esc_html__(
150
- '',
151
- FacebookPluginConfig::TEXT_DOMAIN);
152
-
153
- $access_token = FacebookWordpressOptions::getAccessToken();
154
- $existing_access_token_value =
155
- isset($access_token) ? esc_attr($access_token) : '';
156
- $input_name = FacebookPluginConfig::SETTINGS_KEY .
157
- '[' . FacebookPluginConfig::ACCESS_TOKEN_KEY . ']';
158
-
159
- printf(
160
- '
161
- <textarea name="%s" id="%s" rows=4 cols=60 maxlength=250>%s</textarea>
162
- <p class="description">%s</p>
163
- ',
164
- $input_name,
165
- FacebookPluginConfig::ACCESS_TOKEN_KEY,
166
- $existing_access_token_value,
167
- $description);
 
 
 
 
 
 
 
 
 
 
 
 
168
  }
169
 
170
- public function usePiiFormField() {
171
- $link = sprintf(
172
- wp_kses(
173
- __(
174
- 'For businesses that operate in the European Union, you may need to
175
- take additional action. Read the <a href="%s" target="_blank">
176
- Cookie Consent Guide for Sites and Apps</a> for suggestions on
177
- complying with EU privacy requirements.',
178
- FacebookPluginConfig::TEXT_DOMAIN),
179
- array('a' => array('href' => array(), 'target' => array()))),
180
- esc_url(FacebookPluginConfig::ADMIN_PRIVACY_URL));
181
- printf(
182
- '
183
- <label for="%s">
184
- <input
185
- type="checkbox"
186
- name="%s"
187
- id="%s"
188
- value="1"
189
- ',
190
- FacebookPluginConfig::USE_PII_KEY,
191
- FacebookPluginConfig::SETTINGS_KEY . '[' .
192
- FacebookPluginConfig::USE_PII_KEY . ']',
193
- FacebookPluginConfig::USE_PII_KEY);
194
- checked(1, FacebookWordpressOptions::getUsePii());
195
- printf(
196
- '
197
- />
198
- %s
199
- </label>
200
- <p class="description">%s</p>
201
- ',
202
- esc_html__(
203
- 'Enabling Advanced Matching improves audience building.',
204
- FacebookPluginConfig::TEXT_DOMAIN),
205
- $link);
206
- }
207
-
208
- // Allow to the Plugin to send S2S Events
209
- public function useS2SFormField() {
210
- $link = sprintf(
211
- wp_kses(
212
- __(
213
- 'An access token is required to use the Conversions API.<br>
214
- <a href="%s" target="_blank"> Generate Access Token</a>',
215
- FacebookPluginConfig::TEXT_DOMAIN),
216
- array('a' => array('href' => array(), 'target' => array()))),
217
- esc_url(FacebookPluginConfig::ADMIN_S2S_URL));
218
- printf(
219
- '
220
- <label for="%s">
221
- <input
222
- type="checkbox"
223
- name="%s"
224
- id="%s"
225
- value="1"
226
- ',
227
- FacebookPluginConfig::USE_S2S_KEY,
228
- FacebookPluginConfig::SETTINGS_KEY . '[' .
229
- FacebookPluginConfig::USE_S2S_KEY . ']',
230
- FacebookPluginConfig::USE_S2S_KEY);
231
- checked(1, FacebookWordpressOptions::getUseS2S());
232
- printf(
233
- '
234
- />
235
- %s
236
- </label>
237
- <p class="description">%s</p>
238
- ',
239
- esc_html__(
240
- 'Also send events directly from your web server to Facebook through the
241
- Conversions API. This can help you capture more events.',
242
- FacebookPluginConfig::TEXT_DOMAIN),
243
- $link);
244
  }
245
 
246
-
247
  public function registerNotices() {
248
- // Update class field
249
- $pixel_id = FacebookWordpressOptions::getPixelId();
250
- $use_s2s = FacebookWordpressOptions::getUseS2S();
251
- $access_token = FacebookWordpressOptions::getAccessToken();
252
  $current_screen_id = get_current_screen()->id;
253
 
254
  if (current_user_can(FacebookPluginConfig::ADMIN_CAPABILITY) &&
255
- in_array($current_screen_id, array('dashboard', 'plugins'), true))
256
- {
257
- if (!FacebookPluginUtils::isPositiveInteger($pixel_id)
258
- && !get_user_meta(
259
- get_current_user_id(),
260
- FacebookPluginConfig::ADMIN_IGNORE_PIXEL_ID_NOTICE,
261
- true))
262
- {
263
- add_action('admin_notices', array($this, 'pixelIdNotSetNotice'));
264
- } else if ((!$use_s2s || empty($access_token))
265
- && !get_user_meta(
266
  get_current_user_id(),
267
- FacebookPluginConfig::ADMIN_IGNORE_SSAPI_NOTICE,
268
- true))
269
- {
270
- add_action('admin_notices',
271
- array($this, 'serverSideApiNotEnabledNotice'));
 
 
 
 
 
 
 
 
 
 
 
 
272
  }
 
 
 
 
 
 
 
273
  }
 
 
274
  }
275
 
276
  public function setNotice($notice, $dismiss_config) {
@@ -278,9 +178,7 @@ class FacebookWordpressSettingsPage {
278
  FacebookPluginConfig::ADMIN_MENU_SLUG);
279
 
280
  $link = sprintf(
281
- wp_kses(
282
- $notice,
283
- array('a' => array('href' => array()))),
284
  esc_url($url));
285
  printf(
286
  '
@@ -301,53 +199,24 @@ class FacebookWordpressSettingsPage {
301
  FacebookPluginConfig::TEXT_DOMAIN));
302
  }
303
 
304
- public function pixelIdNotSetNotice() {
 
305
  $this->setNotice(
306
- __('The Facebook Pixel plugin requires a Pixel ID.
307
- Click <a href="%s">here</a> to configure the plugin.',
308
  FacebookPluginConfig::TEXT_DOMAIN),
309
- FacebookPluginConfig::ADMIN_DISMISS_PIXEL_ID_NOTICE);
310
- }
311
-
312
- public function serverSideApiNotEnabledNotice() {
313
- $this->setNotice(
314
- __('The Facebook Pixel plugin now includes support for the Conversions
315
- API, which lets you send events directly from your page\'s website.
316
- Click <a href="%s">here</a> to configure the plugin.',
317
- FacebookPluginConfig::TEXT_DOMAIN),
318
- FacebookPluginConfig::ADMIN_DISMISS_SSAPI_NOTICE);
319
  }
320
 
321
  public function dismissNotices() {
322
  $user_id = get_current_user_id();
323
- if (isset($_GET[FacebookPluginConfig::ADMIN_DISMISS_PIXEL_ID_NOTICE])) {
 
 
324
  update_user_meta($user_id,
325
- FacebookPluginConfig::ADMIN_IGNORE_PIXEL_ID_NOTICE,
326
  true);
327
  }
328
 
329
- if (isset($_GET[FacebookPluginConfig::ADMIN_DISMISS_SSAPI_NOTICE])) {
330
- update_user_meta($user_id,
331
- FacebookPluginConfig::ADMIN_IGNORE_SSAPI_NOTICE,
332
- true);
333
- }
334
- }
335
-
336
- public function registerPluginStyles() {
337
- wp_register_style(
338
- FacebookPluginConfig::TEXT_DOMAIN,
339
- plugins_url('../css/admin.css', __FILE__));
340
- wp_enqueue_style(FacebookPluginConfig::TEXT_DOMAIN);
341
- }
342
-
343
- public function addSettingsLink($links) {
344
- $settings = array(
345
- 'settings' => sprintf(
346
- '<a href="%s">%s</a>',
347
- admin_url('options-general.php?page=' .
348
- FacebookPluginConfig::ADMIN_MENU_SLUG),
349
- 'Settings')
350
- );
351
- return array_merge($settings, $links);
352
  }
353
  }
17
 
18
  namespace FacebookPixelPlugin\Core;
19
 
20
+ use FacebookAds\ApiConfig;
21
+
22
  defined('ABSPATH') or die('Direct access not allowed');
23
 
24
  class FacebookWordpressSettingsPage {
25
  private $optionsPage = '';
26
 
27
  public function __construct($plugin_name) {
 
 
 
 
 
28
  add_filter(
29
  'plugin_action_links_'.$plugin_name,
30
  array($this, 'addSettingsLink'));
31
+ add_action('admin_menu', array($this, 'addMenuFbe'));
32
+ add_action('admin_init', array($this, 'dismissNotices'));
33
+ add_action('admin_enqueue_scripts', array($this, 'registerPluginScripts'));
34
+ add_action('current_screen', array($this, 'registerNotices'));
35
+ }
36
+
37
+ public function registerPluginScripts(){
38
+ wp_register_script('fbe_allinone_script',
39
+ plugins_url('../js/fbe_allinone.js', __FILE__));
40
+ wp_register_style(
41
+ FacebookPluginConfig::TEXT_DOMAIN,
42
+ plugins_url('../css/admin.css', __FILE__));
43
+ wp_enqueue_style(FacebookPluginConfig::TEXT_DOMAIN);
44
  }
45
 
46
+ public function addMenuFbe() {
47
  $this->optionsPage = add_options_page(
48
  FacebookPluginConfig::ADMIN_PAGE_TITLE,
49
  FacebookPluginConfig::ADMIN_MENU_TITLE,
50
  FacebookPluginConfig::ADMIN_CAPABILITY,
51
  FacebookPluginConfig::ADMIN_MENU_SLUG,
52
+ array($this, 'addFbeBox'));
53
  }
54
 
55
+ public function addFbeBox(){
56
  if (!current_user_can(FacebookPluginConfig::ADMIN_CAPABILITY)) {
57
  wp_die(__(
58
  'You do not have sufficient permissions to access this page',
59
  FacebookPluginConfig::TEXT_DOMAIN));
60
  }
61
+ $pixel_id_message = $this->getPreviousPixelIdMessage();
62
+ if($pixel_id_message){
63
+ echo $pixel_id_message;
64
+ }
65
+ echo $this->getFbeBrowserSettings();
66
+ wp_enqueue_script('fbe_allinone_script');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
67
  }
68
 
69
+ private function getPreviousPixelIdMessage(){
70
+ if(FacebookWordpressOptions::getIsFbeInstalled()){
71
+ return null;
72
+ }
73
+ $pixel_id = FacebookWordPressOptions::getPixelId();
74
+ if(empty($pixel_id)){
75
+ return null;
76
+ }
77
+ $message =
78
+ sprintf('<p>Reuse the pixel id from your previous setup: '.
79
+ '<strong>%s</strong></p>',
80
+ $pixel_id
81
+ );
82
+ return $message;
 
 
 
 
83
  }
84
 
85
+ private function getFbeBrowserSettings(){
86
+ ob_start();
87
+ ?>
88
+ <div>
89
+ <div id="fbe-iframe">
90
+ </div>
91
+ </div>
92
 
93
+ <script>
94
+ window.facebookBusinessExtensionConfig = {
95
+ pixelId: '<?php echo FacebookWordpressOptions::getPixelId() ?>'
96
+ ,popupOrigin: "https://business.facebook.com"
97
+ ,setSaveSettingsRoute: '<?php echo $this->getFbeSaveSettingsAjaxRoute() ?>'
98
+ ,externalBusinessId: '<?php echo FacebookWordpressOptions::getExternalBusinessId() ?>'
99
+ ,fbeLoginUrl: "https://business.facebook.com/fbe-iframe-get-started/?"
100
+ ,deleteConfigKeys: '<?php echo $this->getDeleteFbeSettingsAjaxRoute() ?>'
101
+ ,appId: '221646389321681'
102
+ ,timeZone: 'America/Los_Angeles'
103
+ ,installed: '<?php echo FacebookWordpressOptions::getIsFbeInstalled() ?>'
104
+ ,systemUserName: '<?php echo FacebookWordpressOptions::getExternalBusinessId() ?>' + '_system_user'
105
+ ,businessVertical: 'ECOMMERCE'
106
+ ,version: 'v8.0'
107
+ ,currency: 'USD'
108
+ ,businessName: 'Solutions Engineering Team'
109
+ ,debug: true
110
+ ,channel: 'CONVERSIONS_API'
111
+ };
112
+ console.log(JSON.stringify(window.facebookBusinessExtensionConfig));
113
+ </script>
114
+ <?php
115
+ $initialScript = ob_get_clean();
116
+ return $initialScript;
117
+ }
118
+
119
+ public function getFbeSaveSettingsAjaxRoute(){
120
+ return admin_url('admin-ajax.php?action=save_fbe_settings');
121
+ }
122
+
123
+ public function getDeleteFbeSettingsAjaxRoute(){
124
+ return admin_url('admin-ajax.php?action=delete_fbe_settings');
125
  }
126
 
127
+ public function addSettingsLink($links) {
128
+ $settings = array(
129
+ 'settings' => sprintf(
130
+ '<a href="%s">%s</a>',
131
+ admin_url('options-general.php?page=' .
132
+ FacebookPluginConfig::ADMIN_MENU_SLUG),
133
+ 'Settings')
134
+ );
135
+ return array_merge($settings, $links);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
136
  }
137
 
 
138
  public function registerNotices() {
139
+ $is_fbe_installed = FacebookWordpressOptions::getIsFbeInstalled();
 
 
 
140
  $current_screen_id = get_current_screen()->id;
141
 
142
  if (current_user_can(FacebookPluginConfig::ADMIN_CAPABILITY) &&
143
+ in_array($current_screen_id, array('dashboard', 'plugins'), true)){
144
+ if( $is_fbe_installed == '0' && !get_user_meta(
 
 
 
 
 
 
 
 
 
145
  get_current_user_id(),
146
+ FacebookPluginConfig::ADMIN_IGNORE_FBE_NOT_INSTALLED_NOTICE,
147
+ true)){
148
+ add_action('admin_notices', array($this, 'fbeNotInstalledNotice'));
149
+ }
150
+ }
151
+ }
152
+
153
+ public function getCustomizedFbeNotInstalledNotice(){
154
+ $valid_pixel_id = !empty(FacebookWordPressOptions:: getPixelId());
155
+ $valid_access_token = !empty(FacebookWordPressOptions::getAccessToken());
156
+ $message = '';
157
+ $plugin_name_tag = sprintf('<strong>%s</strong>',
158
+ FacebookPluginConfig::PLUGIN_NAME);
159
+ if($valid_pixel_id){
160
+ if($valid_access_token){
161
+ $message = sprintf('Easily manage your connection to Facebook with %s.',
162
+ $plugin_name_tag);
163
  }
164
+ else{
165
+ $message = sprintf('%s gives you access to the Conversions API.',
166
+ $plugin_name_tag);
167
+ }
168
+ }
169
+ else{
170
+ $message = sprintf('%s is almost ready.', $plugin_name_tag);
171
  }
172
+ return $message.' To complete your configuration, '.
173
+ '<a href="%s">follow the setup steps.</a>';
174
  }
175
 
176
  public function setNotice($notice, $dismiss_config) {
178
  FacebookPluginConfig::ADMIN_MENU_SLUG);
179
 
180
  $link = sprintf(
181
+ $notice,
 
 
182
  esc_url($url));
183
  printf(
184
  '
199
  FacebookPluginConfig::TEXT_DOMAIN));
200
  }
201
 
202
+ public function fbeNotInstalledNotice() {
203
+ $message = $this->getCustomizedFbeNotInstalledNotice();
204
  $this->setNotice(
205
+ __(
206
+ $message,
207
  FacebookPluginConfig::TEXT_DOMAIN),
208
+ FacebookPluginConfig::ADMIN_DISMISS_FBE_NOT_INSTALLED_NOTICE);
 
 
 
 
 
 
 
 
 
209
  }
210
 
211
  public function dismissNotices() {
212
  $user_id = get_current_user_id();
213
+ if (isset(
214
+ $_GET[FacebookPluginConfig::ADMIN_DISMISS_FBE_NOT_INSTALLED_NOTICE]
215
+ )){
216
  update_user_meta($user_id,
217
+ FacebookPluginConfig::ADMIN_IGNORE_FBE_NOT_INSTALLED_NOTICE,
218
  true);
219
  }
220
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
221
  }
222
  }
core/FacebookWordpressSettingsRecorder.php ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace FacebookPixelPlugin\Core;
3
+
4
+ class FacebookWordpressSettingsRecorder {
5
+
6
+ public function init(){
7
+ add_action('wp_ajax_save_fbe_settings', array($this, 'saveFbeSettings'));
8
+ add_action('wp_ajax_delete_fbe_settings',
9
+ array($this, 'deleteFbeSettings')
10
+ );
11
+ }
12
+
13
+ private function handleSuccessRequest($body){
14
+ $res = array(
15
+ 'success' => true,
16
+ 'msg' => $body,
17
+ );
18
+ wp_send_json($res);
19
+ return $res;
20
+ }
21
+
22
+ private function handleUnauthorizedRequest(){
23
+ $res = array(
24
+ 'success' => false,
25
+ 'msg' => 'Unauthorized user',
26
+ );
27
+ wp_send_json($res);
28
+ return $res;
29
+ }
30
+
31
+ public function saveFbeSettings(){
32
+ if (!current_user_can('administrator')) {
33
+ $this->handleUnauthorizedRequest();
34
+ }
35
+ $pixel_id = $_POST['pixelId'];
36
+ $access_token = $_POST['accessToken'];
37
+ $external_business_id = $_POST['externalBusinessId'];
38
+ $settings = array(
39
+ FacebookPluginConfig::PIXEL_ID_KEY => $pixel_id,
40
+ FacebookPluginConfig::ACCESS_TOKEN_KEY => $access_token,
41
+ FacebookPluginConfig::EXTERNAL_BUSINESS_ID_KEY =>
42
+ $external_business_id,
43
+ FacebookPluginConfig::IS_FBE_INSTALLED_KEY => '1'
44
+ );
45
+ \update_option(
46
+ FacebookPluginConfig::SETTINGS_KEY,
47
+ $settings
48
+ );
49
+ return $this->handleSuccessRequest($settings);
50
+ }
51
+
52
+ public function deleteFbeSettings(){
53
+ if (!current_user_can('administrator')) {
54
+ $this->handleUnauthorizedRequest();
55
+ }
56
+ \delete_option( FacebookPluginConfig::SETTINGS_KEY );
57
+ \delete_transient( FacebookPluginConfig::AAM_SETTINGS_KEY );
58
+ return $this->handleSuccessRequest('Done');
59
+ }
60
+ }
core/ServerEventAsyncTask.php CHANGED
@@ -19,16 +19,102 @@ namespace FacebookPixelPlugin\Core;
19
 
20
  use FacebookPixelPlugin\Core\FacebookServerSideEvent;
21
 
 
 
 
 
 
22
  defined('ABSPATH') or die('Direct access not allowed');
23
 
24
  class ServerEventAsyncTask extends \WP_Async_Task {
25
  protected $action = 'send_server_events';
26
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
27
  protected function prepare_data($data) {
28
  try {
29
  if (!empty($data)) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
30
  return array(
31
- 'event_data' => base64_encode(serialize($data[0])),
32
  'num_events'=>$data[1]
33
  );
34
  }
@@ -45,14 +131,19 @@ class ServerEventAsyncTask extends \WP_Async_Task {
45
  if( $num_events == 0 ){
46
  return;
47
  }
48
- $events = unserialize(base64_decode($_POST['event_data']));
49
- // When an array has just one object, the deserialization process
50
- // returns just the object
51
- // and we want an array
52
- if( $num_events == 1 ){
53
- $events = array( $events );
 
 
 
 
 
 
54
  }
55
-
56
  FacebookServerSideEvent::send($events);
57
  }
58
  catch (\Exception $ex) {
19
 
20
  use FacebookPixelPlugin\Core\FacebookServerSideEvent;
21
 
22
+ use FacebookAds\Object\ServerSide\Event;
23
+ use FacebookAds\Object\ServerSide\UserData;
24
+ use FacebookAds\Object\ServerSide\CustomData;
25
+ use FacebookAds\Object\ServerSide\Content;
26
+
27
  defined('ABSPATH') or die('Direct access not allowed');
28
 
29
  class ServerEventAsyncTask extends \WP_Async_Task {
30
  protected $action = 'send_server_events';
31
 
32
+ private function convert_user_data($user_data_normalized){
33
+ $norm_key_to_key = [
34
+ AAMSettingsFields::EMAIL => 'email',
35
+ AAMSettingsFields::FIRST_NAME => 'first_name',
36
+ AAMSettingsFields::LAST_NAME => 'last_name',
37
+ AAMSettingsFields::GENDER => 'gender',
38
+ AAMSettingsFields::DATE_OF_BIRTH => 'date_of_birth',
39
+ AAMSettingsFields::EXTERNAL_ID => 'external_id',
40
+ AAMSettingsFields::PHONE => 'phone',
41
+ AAMSettingsFields::CITY => 'city',
42
+ AAMSettingsFields::STATE => 'state',
43
+ AAMSettingsFields::ZIP_CODE => 'zip_code',
44
+ AAMSettingsFields::COUNTRY => 'country_code',
45
+ ];
46
+ $user_data = array();
47
+ foreach($user_data_normalized as $norm_key => $field){
48
+ if(array_key_exists($norm_key, $norm_key_to_key)){
49
+ $user_data[$norm_key_to_key[$norm_key]] = $field;
50
+ }
51
+ else{
52
+ $user_data[$norm_key] = $field;
53
+ }
54
+ }
55
+ return $user_data;
56
+ }
57
+
58
+ private function convert_array_to_event($event_as_array){
59
+ $event = new Event($event_as_array);
60
+ // If user_data exists, an UserData object is created
61
+ // and set
62
+ if(array_key_exists('user_data', $event_as_array)){
63
+ // The method convert_user_data converts the keys used in the
64
+ // normalized array to the keys used in the constructor of UserData
65
+ $user_data = new UserData($this->convert_user_data(
66
+ $event_as_array['user_data']
67
+ ));
68
+ $event->setUserData($user_data);
69
+ }
70
+ // If custom_data exists, a CustomData object is created and set
71
+ if(array_key_exists('custom_data', $event_as_array)){
72
+ $custom_data = new CustomData($event_as_array['custom_data']);
73
+ // If contents exists in custom_data, an array of Content is created
74
+ // and set
75
+ if(array_key_exists('contents', $event_as_array['custom_data'])){
76
+ $contents = array();
77
+ foreach(
78
+ $event_as_array['custom_data']['contents'] as $contents_as_array
79
+ ){
80
+ // The normalized contents array encodes product id as id
81
+ // but the constructor of Content requires product_id
82
+ if(array_key_exists('id', $contents_as_array)){
83
+ $contents_as_array['product_id'] = $contents_as_array['id'];
84
+ }
85
+ $contents[] = new Content($contents_as_array);
86
+ }
87
+ $custom_data->setContents($contents);
88
+ }
89
+ if(array_key_exists('fb_integration_tracking',
90
+ $event_as_array['custom_data'])){
91
+ $custom_data->addCustomProperty('fb_integration_tracking',
92
+ $event_as_array['custom_data']['fb_integration_tracking']);
93
+ }
94
+ $event->setCustomData($custom_data);
95
+ }
96
+ return $event;
97
+ }
98
+
99
  protected function prepare_data($data) {
100
  try {
101
  if (!empty($data)) {
102
+ $num_events = $data[1];
103
+ $events = $data[0];
104
+ // $data[0] can be a single event or an array
105
+ // We want to receive it as an array
106
+ if($num_events == 1){
107
+ $events = array($events);
108
+ }
109
+ // Each event is casted to a php array with normalize()
110
+ $events_as_array = array();
111
+ foreach($events as $event){
112
+ $events_as_array[] = $event->normalize();
113
+ }
114
+ // The array of events is converted to a JSON string
115
+ // and encoded in base 64
116
  return array(
117
+ 'event_data' => base64_encode(json_encode($events_as_array)),
118
  'num_events'=>$data[1]
119
  );
120
  }
131
  if( $num_events == 0 ){
132
  return;
133
  }
134
+ // $_POST['event_data'] is decoded from base 64, returning a JSON string
135
+ // and decoded as a php array
136
+ $events_as_array = json_decode(base64_decode($_POST['event_data']), true);
137
+ // If the passed json string is invalid, no processing is done
138
+ if(!$events_as_array){
139
+ return;
140
+ }
141
+ $events = array();
142
+ // Every event is a php array and casted to an Event object
143
+ foreach( $events_as_array as $event_as_array ){
144
+ $event = $this->convert_array_to_event($event_as_array);
145
+ $events[] = $event;
146
  }
 
147
  FacebookServerSideEvent::send($events);
148
  }
149
  catch (\Exception $ex) {
core/ServerEventFactory.php CHANGED
@@ -20,6 +20,10 @@ namespace FacebookPixelPlugin\Core;
20
  use FacebookAds\Object\ServerSide\Event;
21
  use FacebookAds\Object\ServerSide\UserData;
22
  use FacebookAds\Object\ServerSide\CustomData;
 
 
 
 
23
  use FacebookPixelPlugin\Core\EventIdGenerator;
24
  use FacebookPixelPlugin\Core\FacebookWordpressOptions;
25
 
@@ -134,6 +138,41 @@ class ServerEventFactory {
134
  | FILTER_FLAG_NO_RES_RANGE);
135
  }
136
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
137
  public static function safeCreateEvent(
138
  $event_name,
139
  $callback,
@@ -145,79 +184,124 @@ class ServerEventFactory {
145
 
146
  try {
147
  $data = call_user_func_array($callback, $arguments);
148
-
149
- if (FacebookWordpressOptions::getUsePii()) {
150
- $user_data = $event->getUserData();
151
- if (!empty($data['email'])) {
152
- $user_data->setEmail($data['email']);
153
- }
154
-
155
- if (!empty($data['first_name'])) {
156
- $user_data->setFirstName($data['first_name']);
157
- }
158
-
159
- if (!empty($data['last_name'])) {
160
- $user_data->setLastName($data['last_name']);
161
- }
162
-
163
- if (!empty($data['phone'])) {
164
- $user_data->setPhone($data['phone']);
165
- }
166
-
167
- if(!empty($data['state'])){
168
- $user_data->setState($data['state']);
169
- }
170
-
171
- if(!empty($data['country'])){
172
- $user_data->setCountryCode($data['country']);
173
- }
174
-
175
- if(!empty($data['city'])){
176
- $user_data->setCity($data['city']);
177
- }
178
-
179
- if(!empty($data['zip'])){
180
- $user_data->setZipCode($data['zip']);
181
- }
182
-
183
- if(!empty($data['gender'])){
184
- $user_data->setGender($data['gender']);
185
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
186
  }
187
 
188
  $custom_data = $event->getCustomData();
189
  $custom_data->addCustomProperty('fb_integration_tracking', $integration);
190
 
191
  if (!empty($data['currency'])) {
192
- $custom_data->setCurrency($data['currency']);
193
  }
194
 
195
  if (!empty($data['value'])) {
196
- $custom_data->setValue($data['value']);
197
  }
198
 
199
  if (!empty($data['contents'])) {
200
- $custom_data->setContents($data['contents']);
201
  }
202
 
203
  if (!empty($data['content_ids'])) {
204
- $custom_data->setContentIds($data['content_ids']);
205
  }
206
 
207
  if (!empty($data['content_type'])) {
208
- $custom_data->setContentType($data['content_type']);
209
  }
210
 
211
  if (!empty($data['num_items'])) {
212
- $custom_data->setNumItems($data['num_items']);
213
  }
214
 
215
  if (!empty($data['content_name'])) {
216
- $custom_data->setContentName($data['content_name']);
217
  }
218
 
219
  if (!empty($data['content_category'])){
220
- $custom_data->setContentCategory($data['content_category']);
221
  }
222
  } catch (\Exception $e) {
223
  // Need to log
20
  use FacebookAds\Object\ServerSide\Event;
21
  use FacebookAds\Object\ServerSide\UserData;
22
  use FacebookAds\Object\ServerSide\CustomData;
23
+ use FacebookAds\Object\ServerSide\Normalizer;
24
+
25
+ use FacebookPixelPlugin\Core\AAMFieldsExtractor;
26
+ use FacebookPixelPlugin\Core\AAMSettingsFields;
27
  use FacebookPixelPlugin\Core\EventIdGenerator;
28
  use FacebookPixelPlugin\Core\FacebookWordpressOptions;
29
 
138
  | FILTER_FLAG_NO_RES_RANGE);
139
  }
140
 
141
+ /*
142
+ Given that the data extracted by the integration classes is a mix of
143
+ user data and custom data,
144
+ this function splits these fields in two arrays
145
+ and user data is formatted with the AAM field setting
146
+ */
147
+ private static function splitUserDataAndCustomData($data){
148
+ $user_data = array();
149
+ $custom_data = array();
150
+ $key_to_aam_field = array(
151
+ 'email' => AAMSettingsFields::EMAIL,
152
+ 'first_name' => AAMSettingsFields::FIRST_NAME,
153
+ 'last_name' => AAMSettingsFields::LAST_NAME,
154
+ 'phone' => AAMSettingsFields::PHONE,
155
+ 'state' => AAMSettingsFields::STATE,
156
+ 'country' => AAMSettingsFields::COUNTRY,
157
+ 'city' => AAMSettingsFields::CITY,
158
+ 'zip' => AAMSettingsFields::ZIP_CODE,
159
+ 'gender' => AAMSettingsFields::GENDER,
160
+ 'date_of_birth' => AAMSettingsFields::DATE_OF_BIRTH,
161
+ );
162
+ foreach( $data as $key => $value ){
163
+ if( array_key_exists( $key, $key_to_aam_field ) ){
164
+ $user_data[$key_to_aam_field[$key]] = $value;
165
+ }
166
+ else{
167
+ $custom_data[$key] = $value;
168
+ }
169
+ }
170
+ return array(
171
+ 'user_data' => $user_data,
172
+ 'custom_data' => $custom_data
173
+ );
174
+ }
175
+
176
  public static function safeCreateEvent(
177
  $event_name,
178
  $callback,
184
 
185
  try {
186
  $data = call_user_func_array($callback, $arguments);
187
+ $data_split = self::splitUserDataAndCustomData($data);
188
+ $user_data_array = $data_split['user_data'];
189
+ $custom_data_array = $data_split['custom_data'];
190
+ $user_data_array =
191
+ AAMFieldsExtractor::getNormalizedUserData($user_data_array);
192
+
193
+ $user_data = $event->getUserData();
194
+
195
+ if(
196
+ array_key_exists(AAMSettingsFields::EMAIL, $user_data_array)
197
+ ){
198
+ $user_data->setEmail(
199
+ $user_data_array[AAMSettingsFields::EMAIL]
200
+ );
201
+ }
202
+ if(
203
+ array_key_exists(AAMSettingsFields::FIRST_NAME, $user_data_array)
204
+ ){
205
+ $user_data->setFirstName(
206
+ $user_data_array[AAMSettingsFields::FIRST_NAME]
207
+ );
208
+ }
209
+ if(
210
+ array_key_exists(AAMSettingsFields::LAST_NAME, $user_data_array)
211
+ ){
212
+ $user_data->setLastName(
213
+ $user_data_array[AAMSettingsFields::LAST_NAME]
214
+ );
215
+ }
216
+ if(
217
+ array_key_exists(AAMSettingsFields::GENDER, $user_data_array)
218
+ ){
219
+ $user_data->setGender(
220
+ $user_data_array[AAMSettingsFields::GENDER]
221
+ );
222
+ }
223
+ if(
224
+ array_key_exists(AAMSettingsFields::DATE_OF_BIRTH, $user_data_array)
225
+ ){
226
+ $user_data->setDateOfBirth(
227
+ $user_data_array[AAMSettingsFields::DATE_OF_BIRTH]);
228
+ }
229
+ if(
230
+ array_key_exists(AAMSettingsFields::EXTERNAL_ID, $user_data_array)
231
+ ){
232
+ $user_data->setExternalId(
233
+ Util::hash($user_data_array[AAMSettingsFields::EXTERNAL_ID])
234
+ );
235
+ }
236
+ if(
237
+ array_key_exists(AAMSettingsFields::PHONE, $user_data_array)
238
+ ){
239
+ $user_data->setPhone(
240
+ $user_data_array[AAMSettingsFields::PHONE]
241
+ );
242
+ }
243
+ if(
244
+ array_key_exists(AAMSettingsFields::CITY, $user_data_array)
245
+ ){
246
+ $user_data->setCity(
247
+ $user_data_array[AAMSettingsFields::CITY]
248
+ );
249
+ }
250
+ if(
251
+ array_key_exists(AAMSettingsFields::STATE, $user_data_array)
252
+ ){
253
+ $user_data->setState(
254
+ $user_data_array[AAMSettingsFields::STATE]
255
+ );
256
+ }
257
+ if(
258
+ array_key_exists(AAMSettingsFields::ZIP_CODE, $user_data_array)
259
+ ){
260
+ $user_data->setZipCode(
261
+ $user_data_array[AAMSettingsFields::ZIP_CODE]
262
+ );
263
+ }
264
+ if(
265
+ array_key_exists(AAMSettingsFields::COUNTRY, $user_data_array)
266
+ ){
267
+ $user_data->setCountryCode(
268
+ $user_data_array[AAMSettingsFields::COUNTRY]
269
+ );
270
  }
271
 
272
  $custom_data = $event->getCustomData();
273
  $custom_data->addCustomProperty('fb_integration_tracking', $integration);
274
 
275
  if (!empty($data['currency'])) {
276
+ $custom_data->setCurrency($custom_data_array['currency']);
277
  }
278
 
279
  if (!empty($data['value'])) {
280
+ $custom_data->setValue($custom_data_array['value']);
281
  }
282
 
283
  if (!empty($data['contents'])) {
284
+ $custom_data->setContents($custom_data_array['contents']);
285
  }
286
 
287
  if (!empty($data['content_ids'])) {
288
+ $custom_data->setContentIds($custom_data_array['content_ids']);
289
  }
290
 
291
  if (!empty($data['content_type'])) {
292
+ $custom_data->setContentType($custom_data_array['content_type']);
293
  }
294
 
295
  if (!empty($data['num_items'])) {
296
+ $custom_data->setNumItems($custom_data_array['num_items']);
297
  }
298
 
299
  if (!empty($data['content_name'])) {
300
+ $custom_data->setContentName($custom_data_array['content_name']);
301
  }
302
 
303
  if (!empty($data['content_category'])){
304
+ $custom_data->setContentCategory($custom_data_array['content_category']);
305
  }
306
  } catch (\Exception $e) {
307
  // Need to log
facebook-for-wordpress.php CHANGED
@@ -1,11 +1,11 @@
1
  <?php
2
  /**
3
- * Plugin Name: Official Facebook Pixel
4
  * Plugin URI: https://www.facebook.com/business/help/881403525362441
5
  * Description: <strong><em>***ATTENTION: After upgrade the plugin may be deactivated due to a known issue, to workaround please refresh this page and activate plugin.***</em></strong> The Facebook pixel is an analytics tool that helps you measure the effectiveness of your advertising. You can use the Facebook pixel to understand the actions people are taking on your website and reach audiences you care about.
6
  * Author: Facebook
7
  * Author URI: https://www.facebook.com/
8
- * Version: 2.2.2
9
  * Text Domain: official-facebook-pixel
10
  */
11
 
@@ -36,6 +36,7 @@ use FacebookPixelPlugin\Core\FacebookPluginConfig;
36
  use FacebookPixelPlugin\Core\FacebookWordpressOptions;
37
  use FacebookPixelPlugin\Core\FacebookWordpressPixelInjection;
38
  use FacebookPixelPlugin\Core\FacebookWordpressSettingsPage;
 
39
  use FacebookPixelPlugin\Core\ServerEventAsyncTask;
40
 
41
  class FacebookForWordpress {
@@ -77,6 +78,7 @@ class FacebookForWordpress {
77
  if (is_admin()) {
78
  $plugin_name = plugin_basename(__FILE__);
79
  new FacebookWordpressSettingsPage($plugin_name);
 
80
  }
81
  }
82
  }
1
  <?php
2
  /**
3
+ * Plugin Name: Facebook for WordPress
4
  * Plugin URI: https://www.facebook.com/business/help/881403525362441
5
  * Description: <strong><em>***ATTENTION: After upgrade the plugin may be deactivated due to a known issue, to workaround please refresh this page and activate plugin.***</em></strong> The Facebook pixel is an analytics tool that helps you measure the effectiveness of your advertising. You can use the Facebook pixel to understand the actions people are taking on your website and reach audiences you care about.
6
  * Author: Facebook
7
  * Author URI: https://www.facebook.com/
8
+ * Version: 3.0.0
9
  * Text Domain: official-facebook-pixel
10
  */
11
 
36
  use FacebookPixelPlugin\Core\FacebookWordpressOptions;
37
  use FacebookPixelPlugin\Core\FacebookWordpressPixelInjection;
38
  use FacebookPixelPlugin\Core\FacebookWordpressSettingsPage;
39
+ use FacebookPixelPlugin\Core\FacebookWordpressSettingsRecorder;
40
  use FacebookPixelPlugin\Core\ServerEventAsyncTask;
41
 
42
  class FacebookForWordpress {
78
  if (is_admin()) {
79
  $plugin_name = plugin_basename(__FILE__);
80
  new FacebookWordpressSettingsPage($plugin_name);
81
+ (new FacebookWordpressSettingsRecorder())->init();
82
  }
83
  }
84
  }
integration/FacebookWordpressEasyDigitalDownloads.php CHANGED
@@ -122,8 +122,7 @@ jQuery(document).ready(function ($) {
122
  }
123
 
124
  public static function injectAddToCartEventId(){
125
- if(FacebookPluginUtils::isInternalUser()
126
- || !FacebookWordpressOptions::getUseS2S()){
127
  return;
128
  }
129
  $eventId = EventIdGenerator::guidv4();
122
  }
123
 
124
  public static function injectAddToCartEventId(){
125
+ if(FacebookPluginUtils::isInternalUser()){
 
126
  return;
127
  }
128
  $eventId = EventIdGenerator::guidv4();
js/fbe_allinone.js ADDED
@@ -0,0 +1,21734 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
2
+ /**
3
+ * Copyright (c) 2016-present, Facebook, Inc.
4
+ * All rights reserved.
5
+ *
6
+ * This source code is licensed under the BSD-style license found in the
7
+ * LICENSE file in the root directory of this source tree. An additional grant
8
+ * of patent rights can be found in the PATENTS file in the code directory.
9
+ */
10
+ 'use strict';
11
+
12
+ var React = require('react');
13
+
14
+ var IEOverlay = function () {
15
+ var Overlay = React.createClass({
16
+ displayName: 'Overlay',
17
+
18
+ render: function render() {
19
+ var overLayStyles = {
20
+ width: '600px',
21
+ height: '150px',
22
+ position: 'relative',
23
+ top: '50%',
24
+ left: '50%',
25
+ marginTop: '-75px',
26
+ marginLeft: '-300px',
27
+ backgroundColor: 'white',
28
+ textAlign: 'center',
29
+ fontFamily: 'helvetica, arial, sans-serif',
30
+ zIndex: '11'
31
+ };
32
+
33
+ var h1Styles = {
34
+ fontSize: '24px',
35
+ lineHeight: '28px',
36
+ color: '#141823',
37
+ fontWeight: 'normal',
38
+ paddingTop: '44px'
39
+ };
40
+
41
+ var h2Styles = {
42
+ fontSize: '14px',
43
+ lineHeight: '20px',
44
+ color: '#9197a3',
45
+ fontWeight: 'normal'
46
+ };
47
+
48
+ return React.createElement(
49
+ 'div',
50
+ { style: overLayStyles, id: 'ieOverlay' },
51
+ React.createElement(
52
+ 'h1',
53
+ { style: h1Styles },
54
+ 'Internet Explorer Is Not Supported'
55
+ ),
56
+ React.createElement(
57
+ 'h2',
58
+ { style: h2Styles },
59
+ 'Please use a modern browser such as Google Chrome or Mozilla Firefox'
60
+ )
61
+ );
62
+ }
63
+ });
64
+
65
+ return {
66
+ render: function render() {
67
+ var containerId = 'page:main-container';
68
+ var containerEl = document.getElementById(containerId);
69
+ containerEl.style.position = 'relative';
70
+
71
+ var ieContainer = document.createElement('div');
72
+ ieContainer.id = 'ie-container';
73
+
74
+ ieContainer.style.width = '100%';
75
+ ieContainer.style.height = '100%';
76
+ ieContainer.style.position = 'absolute';
77
+ ieContainer.style.top = '0';
78
+ ieContainer.style.left = '0';
79
+ ieContainer.style.backgroundColor = 'rgba(0,0,0,0.3)';
80
+
81
+ containerEl.appendChild(ieContainer);
82
+ ReactDOM.render(React.createElement(Overlay, null), ieContainer);
83
+ }
84
+ };
85
+ }();
86
+
87
+ module.exports = IEOverlay;
88
+
89
+ },{"react":189}],2:[function(require,module,exports){
90
+ /**
91
+ * Copyright (c) 2016-present, Facebook, Inc.
92
+ * All rights reserved.
93
+ *
94
+ * This source code is licensed under the BSD-style license found in the
95
+ * LICENSE file in the root directory of this source tree. An additional grant
96
+ * of patent rights can be found in the PATENTS file in the code directory.
97
+ */
98
+ 'use strict';
99
+
100
+ var React = require('react');
101
+
102
+ var FBModal = React.createClass({
103
+ displayName: 'Modal',
104
+
105
+ render: function render() {
106
+ return React.createElement(
107
+ 'div',
108
+ { className: 'modal-container' },
109
+ React.createElement(
110
+ 'div',
111
+ { className: 'modal' },
112
+ React.createElement(
113
+ 'div',
114
+ { className: 'modal-header' },
115
+ this.props.title
116
+ ),
117
+ React.createElement(
118
+ 'div',
119
+ { className: 'modal-content' },
120
+ this.props.message
121
+ ),
122
+ React.createElement(
123
+ 'div',
124
+ { className: 'modal-close' },
125
+ React.createElement(
126
+ 'button',
127
+ { onClick: this.props.onClose, className: 'medium blue' },
128
+ 'OK'
129
+ )
130
+ )
131
+ )
132
+ );
133
+ }
134
+ });
135
+
136
+ module.exports = FBModal;
137
+
138
+ },{"react":189}],3:[function(require,module,exports){
139
+ /**
140
+ * Copyright (c) 2016-present, Facebook, Inc.
141
+ * All rights reserved.
142
+ *
143
+ * This source code is licensed under the BSD-style license found in the
144
+ * LICENSE file in the root directory of this source tree. An additional grant
145
+ * of patent rights can be found in the PATENTS file in the code directory.
146
+ */
147
+ 'use strict';
148
+
149
+ var React = require('react');
150
+ var ReactDOM = require('react-dom');
151
+ var IEOverlay = require('./IEOverlay');
152
+ var FBModal = require('./Modal');
153
+ var FBUtils = require('./utils');
154
+
155
+ var jQuery = (function (jQuery) {
156
+ if (jQuery && typeof jQuery === 'function') {
157
+ return jQuery;
158
+ } else {
159
+ console.error('window.jQuery is not valid or loaded, please check your magento 2 installation!');
160
+ // if jQuery is not there, we return a dummy jQuery obejct with ajax,
161
+ // so it will not break our following code
162
+ return {
163
+ ajax: function () {
164
+ }
165
+ };
166
+ }
167
+ })(window.jQuery);
168
+
169
+ var ajaxParam = function (params) {
170
+ if (window.FORM_KEY) {
171
+ params.form_key = window.FORM_KEY;
172
+ }
173
+ return params;
174
+ };
175
+
176
+ var FBEFlowContainer = React.createClass({
177
+
178
+ getDefaultProps: function() {
179
+ console.log("init props installed "+window.facebookBusinessExtensionConfig.installed);
180
+ return {
181
+ installed: window.facebookBusinessExtensionConfig.installed
182
+ };
183
+ },
184
+ getInitialState: function() {
185
+ console.log("change state");
186
+ return {installed: this.props.installed};
187
+ },
188
+
189
+ bindMessageEvents: function bindMessageEvents() {
190
+ var _this = this;
191
+ if (FBUtils.isIE() && window.MessageChannel) {
192
+ // do nothing, wait for our messaging utils to be ready
193
+ } else {
194
+ window.addEventListener('message', function (event) {
195
+ var origin = event.origin || event.originalEvent.origin;
196
+ if (FBUtils.urlFromSameDomain(origin, window.facebookBusinessExtensionConfig.popupOrigin)) {
197
+ // Make ajax calls to store data from fblogin and fb installs
198
+ _this.consoleLog("Message from fblogin ");
199
+ _this.saveFBLoginData(event.data);
200
+ }
201
+ }, false);
202
+ }
203
+ },
204
+ saveFBLoginData: function saveFBLoginData(data) {
205
+ var _this = this;
206
+ if (data) {
207
+ var responseObj = JSON.parse(data);
208
+ _this.consoleLog("Response from fb login -- " + data);
209
+ var accessToken = responseObj.access_token;
210
+ var success = responseObj.success;
211
+ var pixelId = responseObj.pixel_id;
212
+
213
+ if(success) {
214
+ let action = responseObj.action;
215
+ if(action != null && action === 'delete') {
216
+ // Delete asset ids stored in db instance.
217
+ _this.consoleLog("Successfully uninstalled FBE");
218
+ _this.deleteFBAssets();
219
+ }else if(action != null && action === 'create') {
220
+ _this.saveSettings(pixelId, accessToken, window.facebookBusinessExtensionConfig.externalBusinessId);
221
+ _this.setState({installed: 'true'});
222
+ }
223
+ }else {
224
+ _this.consoleLog("No response received after setup");
225
+ }
226
+ }
227
+ },
228
+ saveSettings: function saveSettings( pixelId, accessToken, externalBusinessId ){
229
+ var _this = this;
230
+ if(!pixelId){
231
+ console.error('Facebook Business Extension Error: got no pixel_id');
232
+ return;
233
+ }
234
+ if(!accessToken){
235
+ console.error('Facebook Business Extension Error: got no access token');
236
+ return;
237
+ }
238
+ if(!externalBusinessId){
239
+ console.error('Facebook Business Extension Error: got no external business id');
240
+ return;
241
+ }
242
+ jQuery.ajax({
243
+ type: 'post',
244
+ url: window.facebookBusinessExtensionConfig.setSaveSettingsRoute,
245
+ async : false,
246
+ data: ajaxParam({
247
+ pixelId: pixelId,
248
+ accessToken: accessToken,
249
+ externalBusinessId: externalBusinessId,
250
+ }),
251
+ success: function onSuccess(data, _textStatus, _jqXHR) {
252
+ var response = data;
253
+ let msg = '';
254
+ if (response.success) {
255
+ _this.setState({pixelId: pixelId});
256
+ msg = "The Facebook Pixel with ID: " + pixelId + " is now installed on your website.";
257
+ } else {
258
+ msg = "There was a problem saving the pixel. Please try again";
259
+ }
260
+ _this.consoleLog(msg);
261
+ },
262
+ error: function () {
263
+ console.error('There was a problem saving the pixel with id', pixelId);
264
+ }
265
+ });
266
+ },
267
+ deleteFBAssets: function deleteFBAssets() {
268
+ var _this = this;
269
+ jQuery.ajax({
270
+ type: 'delete',
271
+ url: window.facebookBusinessExtensionConfig.deleteConfigKeys,
272
+ success: function onSuccess(data, _textStatus, _jqXHR) {
273
+ let msg = '';
274
+ if(data.success) {
275
+ msg = data.message;
276
+ }else {
277
+ msg = data.error_message;
278
+ }
279
+ _this.consoleLog(msg);
280
+ _this.setState({installed: 'false'});
281
+ },
282
+ error: function() {
283
+ console.error('There was a problem deleting the connection, Please try again.');
284
+ }
285
+ });
286
+ },
287
+ componentDidMount: function componentDidMount() {
288
+ this.bindMessageEvents();
289
+ },
290
+ consoleLog: function consoleLog(message) {
291
+ if(window.facebookBusinessExtensionConfig.debug) {
292
+ console.log(message);
293
+ }
294
+ },
295
+ queryParams: function queryParams() {
296
+ return 'app_id='+window.facebookBusinessExtensionConfig.appId +
297
+ '&timezone='+window.facebookBusinessExtensionConfig.timeZone+
298
+ '&external_business_id='+window.facebookBusinessExtensionConfig.externalBusinessId+
299
+ '&installed='+this.state.installed+
300
+ '&system_user_name='+window.facebookBusinessExtensionConfig.systemUserName+
301
+ '&business_vertical='+window.facebookBusinessExtensionConfig.businessVertical+
302
+ '&version='+window.facebookBusinessExtensionConfig.version+
303
+ '&currency='+ window.facebookBusinessExtensionConfig.currency +
304
+ '&business_name='+ window.facebookBusinessExtensionConfig.businessName +
305
+ '&channel=' + window.facebookBusinessExtensionConfig.channel;
306
+ },
307
+ render: function render() {
308
+ var _this = this;
309
+ try {
310
+ _this.consoleLog("query params --"+_this.queryParams());
311
+ return React.createElement(
312
+ 'iframe',
313
+ {
314
+ src:window.facebookBusinessExtensionConfig.fbeLoginUrl + _this.queryParams(),
315
+ style: {border:'none',width:'1100px',height:'700px'}
316
+ }
317
+ );
318
+ } catch (err) {
319
+ console.error(err);
320
+ }
321
+ }
322
+ });
323
+
324
+ // Render
325
+ ReactDOM.render(
326
+ React.createElement(FBEFlowContainer, null),
327
+ document.getElementById('fbe-iframe')
328
+ );
329
+
330
+ // Code to display the above container.
331
+ var displayFBModal = function displayFBModal() {
332
+ if (FBUtils.isIE()) {
333
+ IEOverlay().render();
334
+ }
335
+ var QueryString = function () {
336
+ // This function is anonymous, is executed immediately and
337
+ // the return value is assigned to QueryString!
338
+ var query_string = {};
339
+ var query = window.location.search.substring(1);
340
+ var vars = query.split("&");
341
+ for (var i = 0; i < vars.length; i++) {
342
+ var pair = vars[i].split("=");
343
+ // If first entry with this name
344
+ if (typeof query_string[pair[0]] === "undefined") {
345
+ query_string[pair[0]] = decodeURIComponent(pair[1]);
346
+ // If second entry with this name
347
+ } else if (typeof query_string[pair[0]] === "string") {
348
+ var arr = [query_string[pair[0]], decodeURIComponent(pair[1])];
349
+ query_string[pair[0]] = arr;
350
+ // If third or later entry with this name
351
+ } else {
352
+ query_string[pair[0]].push(decodeURIComponent(pair[1]));
353
+ }
354
+ }
355
+ return query_string;
356
+ }();
357
+ if (QueryString.p) {
358
+ window.facebookBusinessExtensionConfig.popupOrigin = QueryString.p;
359
+ }
360
+ };
361
+
362
+ (function main() {
363
+ // Logic for when to display the container.
364
+ if (document.readyState === 'interactive') {
365
+ // in case the document is already rendered
366
+ displayFBModal();
367
+ } else if (document.addEventListener) {
368
+ // modern browsers
369
+ document.addEventListener('DOMContentLoaded', displayFBModal);
370
+ } else {
371
+ document.attachEvent('onreadystatechange', function () {
372
+ // IE <= 8
373
+ if (document.readyState === 'complete') {
374
+ displayFBModal();
375
+ }
376
+ });
377
+ }
378
+ })();
379
+
380
+ },{"./IEOverlay":1,"./Modal":2,"./utils":190,"react":189,"react-dom":34}],4:[function(require,module,exports){
381
+ (function (process){(function (){
382
+ /**
383
+ * Copyright (c) 2013-present, Facebook, Inc.
384
+ *
385
+ * This source code is licensed under the MIT license found in the
386
+ * LICENSE file in the root directory of this source tree.
387
+ *
388
+ */
389
+
390
+ 'use strict';
391
+
392
+ var _assign = require('object-assign');
393
+
394
+ // -- Inlined from fbjs --
395
+
396
+ var emptyObject = {};
397
+
398
+ if (process.env.NODE_ENV !== 'production') {
399
+ Object.freeze(emptyObject);
400
+ }
401
+
402
+ var validateFormat = function validateFormat(format) {};
403
+
404
+ if (process.env.NODE_ENV !== 'production') {
405
+ validateFormat = function validateFormat(format) {
406
+ if (format === undefined) {
407
+ throw new Error('invariant requires an error message argument');
408
+ }
409
+ };
410
+ }
411
+
412
+ function _invariant(condition, format, a, b, c, d, e, f) {
413
+ validateFormat(format);
414
+
415
+ if (!condition) {
416
+ var error;
417
+ if (format === undefined) {
418
+ error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');
419
+ } else {
420
+ var args = [a, b, c, d, e, f];
421
+ var argIndex = 0;
422
+ error = new Error(format.replace(/%s/g, function () {
423
+ return args[argIndex++];
424
+ }));
425
+ error.name = 'Invariant Violation';
426
+ }
427
+
428
+ error.framesToPop = 1; // we don't care about invariant's own frame
429
+ throw error;
430
+ }
431
+ }
432
+
433
+ var warning = function(){};
434
+
435
+ if (process.env.NODE_ENV !== 'production') {
436
+ var printWarning = function printWarning(format) {
437
+ for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
438
+ args[_key - 1] = arguments[_key];
439
+ }
440
+
441
+ var argIndex = 0;
442
+ var message = 'Warning: ' + format.replace(/%s/g, function () {
443
+ return args[argIndex++];
444
+ });
445
+ if (typeof console !== 'undefined') {
446
+ console.error(message);
447
+ }
448
+ try {
449
+ // --- Welcome to debugging React ---
450
+ // This error was thrown as a convenience so that you can use this stack
451
+ // to find the callsite that caused this warning to fire.
452
+ throw new Error(message);
453
+ } catch (x) {}
454
+ };
455
+
456
+ warning = function warning(condition, format) {
457
+ if (format === undefined) {
458
+ throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');
459
+ }
460
+
461
+ if (format.indexOf('Failed Composite propType: ') === 0) {
462
+ return; // Ignore CompositeComponent proptype check.
463
+ }
464
+
465
+ if (!condition) {
466
+ for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
467
+ args[_key2 - 2] = arguments[_key2];
468
+ }
469
+
470
+ printWarning.apply(undefined, [format].concat(args));
471
+ }
472
+ };
473
+ }
474
+
475
+ // /-- Inlined from fbjs --
476
+
477
+ var MIXINS_KEY = 'mixins';
478
+
479
+ // Helper function to allow the creation of anonymous functions which do not
480
+ // have .name set to the name of the variable being assigned to.
481
+ function identity(fn) {
482
+ return fn;
483
+ }
484
+
485
+ var ReactPropTypeLocationNames;
486
+ if (process.env.NODE_ENV !== 'production') {
487
+ ReactPropTypeLocationNames = {
488
+ prop: 'prop',
489
+ context: 'context',
490
+ childContext: 'child context'
491
+ };
492
+ } else {
493
+ ReactPropTypeLocationNames = {};
494
+ }
495
+
496
+ function factory(ReactComponent, isValidElement, ReactNoopUpdateQueue) {
497
+ /**
498
+ * Policies that describe methods in `ReactClassInterface`.
499
+ */
500
+
501
+ var injectedMixins = [];
502
+
503
+ /**
504
+ * Composite components are higher-level components that compose other composite
505
+ * or host components.
506
+ *
507
+ * To create a new type of `ReactClass`, pass a specification of
508
+ * your new class to `React.createClass`. The only requirement of your class
509
+ * specification is that you implement a `render` method.
510
+ *
511
+ * var MyComponent = React.createClass({
512
+ * render: function() {
513
+ * return <div>Hello World</div>;
514
+ * }
515
+ * });
516
+ *
517
+ * The class specification supports a specific protocol of methods that have
518
+ * special meaning (e.g. `render`). See `ReactClassInterface` for
519
+ * more the comprehensive protocol. Any other properties and methods in the
520
+ * class specification will be available on the prototype.
521
+ *
522
+ * @interface ReactClassInterface
523
+ * @internal
524
+ */
525
+ var ReactClassInterface = {
526
+ /**
527
+ * An array of Mixin objects to include when defining your component.
528
+ *
529
+ * @type {array}
530
+ * @optional
531
+ */
532
+ mixins: 'DEFINE_MANY',
533
+
534
+ /**
535
+ * An object containing properties and methods that should be defined on
536
+ * the component's constructor instead of its prototype (static methods).
537
+ *
538
+ * @type {object}
539
+ * @optional
540
+ */
541
+ statics: 'DEFINE_MANY',
542
+
543
+ /**
544
+ * Definition of prop types for this component.
545
+ *
546
+ * @type {object}
547
+ * @optional
548
+ */
549
+ propTypes: 'DEFINE_MANY',
550
+
551
+ /**
552
+ * Definition of context types for this component.
553
+ *
554
+ * @type {object}
555
+ * @optional
556
+ */
557
+ contextTypes: 'DEFINE_MANY',
558
+
559
+ /**
560
+ * Definition of context types this component sets for its children.
561
+ *
562
+ * @type {object}
563
+ * @optional
564
+ */
565
+ childContextTypes: 'DEFINE_MANY',
566
+
567
+ // ==== Definition methods ====
568
+
569
+ /**
570
+ * Invoked when the component is mounted. Values in the mapping will be set on
571
+ * `this.props` if that prop is not specified (i.e. using an `in` check).
572
+ *
573
+ * This method is invoked before `getInitialState` and therefore cannot rely
574
+ * on `this.state` or use `this.setState`.
575
+ *
576
+ * @return {object}
577
+ * @optional
578
+ */
579
+ getDefaultProps: 'DEFINE_MANY_MERGED',
580
+
581
+ /**
582
+ * Invoked once before the component is mounted. The return value will be used
583
+ * as the initial value of `this.state`.
584
+ *
585
+ * getInitialState: function() {
586
+ * return {
587
+ * isOn: false,
588
+ * fooBaz: new BazFoo()
589
+ * }
590
+ * }
591
+ *
592
+ * @return {object}
593
+ * @optional
594
+ */
595
+ getInitialState: 'DEFINE_MANY_MERGED',
596
+
597
+ /**
598
+ * @return {object}
599
+ * @optional
600
+ */
601
+ getChildContext: 'DEFINE_MANY_MERGED',
602
+
603
+ /**
604
+ * Uses props from `this.props` and state from `this.state` to render the
605
+ * structure of the component.
606
+ *
607
+ * No guarantees are made about when or how often this method is invoked, so
608
+ * it must not have side effects.
609
+ *
610
+ * render: function() {
611
+ * var name = this.props.name;
612
+ * return <div>Hello, {name}!</div>;
613
+ * }
614
+ *
615
+ * @return {ReactComponent}
616
+ * @required
617
+ */
618
+ render: 'DEFINE_ONCE',
619
+
620
+ // ==== Delegate methods ====
621
+
622
+ /**
623
+ * Invoked when the component is initially created and about to be mounted.
624
+ * This may have side effects, but any external subscriptions or data created
625
+ * by this method must be cleaned up in `componentWillUnmount`.
626
+ *
627
+ * @optional
628
+ */
629
+ componentWillMount: 'DEFINE_MANY',
630
+
631
+ /**
632
+ * Invoked when the component has been mounted and has a DOM representation.
633
+ * However, there is no guarantee that the DOM node is in the document.
634
+ *
635
+ * Use this as an opportunity to operate on the DOM when the component has
636
+ * been mounted (initialized and rendered) for the first time.
637
+ *
638
+ * @param {DOMElement} rootNode DOM element representing the component.
639
+ * @optional
640
+ */
641
+ componentDidMount: 'DEFINE_MANY',
642
+
643
+ /**
644
+ * Invoked before the component receives new props.
645
+ *
646
+ * Use this as an opportunity to react to a prop transition by updating the
647
+ * state using `this.setState`. Current props are accessed via `this.props`.
648
+ *
649
+ * componentWillReceiveProps: function(nextProps, nextContext) {
650
+ * this.setState({
651
+ * likesIncreasing: nextProps.likeCount > this.props.likeCount
652
+ * });
653
+ * }
654
+ *
655
+ * NOTE: There is no equivalent `componentWillReceiveState`. An incoming prop
656
+ * transition may cause a state change, but the opposite is not true. If you
657
+ * need it, you are probably looking for `componentWillUpdate`.
658
+ *
659
+ * @param {object} nextProps
660
+ * @optional
661
+ */
662
+ componentWillReceiveProps: 'DEFINE_MANY',
663
+
664
+ /**
665
+ * Invoked while deciding if the component should be updated as a result of
666
+ * receiving new props, state and/or context.
667
+ *
668
+ * Use this as an opportunity to `return false` when you're certain that the
669
+ * transition to the new props/state/context will not require a component
670
+ * update.
671
+ *
672
+ * shouldComponentUpdate: function(nextProps, nextState, nextContext) {
673
+ * return !equal(nextProps, this.props) ||
674
+ * !equal(nextState, this.state) ||
675
+ * !equal(nextContext, this.context);
676
+ * }
677
+ *
678
+ * @param {object} nextProps
679
+ * @param {?object} nextState
680
+ * @param {?object} nextContext
681
+ * @return {boolean} True if the component should update.
682
+ * @optional
683
+ */
684
+ shouldComponentUpdate: 'DEFINE_ONCE',
685
+
686
+ /**
687
+ * Invoked when the component is about to update due to a transition from
688
+ * `this.props`, `this.state` and `this.context` to `nextProps`, `nextState`
689
+ * and `nextContext`.
690
+ *
691
+ * Use this as an opportunity to perform preparation before an update occurs.
692
+ *
693
+ * NOTE: You **cannot** use `this.setState()` in this method.
694
+ *
695
+ * @param {object} nextProps
696
+ * @param {?object} nextState
697
+ * @param {?object} nextContext
698
+ * @param {ReactReconcileTransaction} transaction
699
+ * @optional
700
+ */
701
+ componentWillUpdate: 'DEFINE_MANY',
702
+
703
+ /**
704
+ * Invoked when the component's DOM representation has been updated.
705
+ *
706
+ * Use this as an opportunity to operate on the DOM when the component has
707
+ * been updated.
708
+ *
709
+ * @param {object} prevProps
710
+ * @param {?object} prevState
711
+ * @param {?object} prevContext
712
+ * @param {DOMElement} rootNode DOM element representing the component.
713
+ * @optional
714
+ */
715
+ componentDidUpdate: 'DEFINE_MANY',
716
+
717
+ /**
718
+ * Invoked when the component is about to be removed from its parent and have
719
+ * its DOM representation destroyed.
720
+ *
721
+ * Use this as an opportunity to deallocate any external resources.
722
+ *
723
+ * NOTE: There is no `componentDidUnmount` since your component will have been
724
+ * destroyed by that point.
725
+ *
726
+ * @optional
727
+ */
728
+ componentWillUnmount: 'DEFINE_MANY',
729
+
730
+ /**
731
+ * Replacement for (deprecated) `componentWillMount`.
732
+ *
733
+ * @optional
734
+ */
735
+ UNSAFE_componentWillMount: 'DEFINE_MANY',
736
+
737
+ /**
738
+ * Replacement for (deprecated) `componentWillReceiveProps`.
739
+ *
740
+ * @optional
741
+ */
742
+ UNSAFE_componentWillReceiveProps: 'DEFINE_MANY',
743
+
744
+ /**
745
+ * Replacement for (deprecated) `componentWillUpdate`.
746
+ *
747
+ * @optional
748
+ */
749
+ UNSAFE_componentWillUpdate: 'DEFINE_MANY',
750
+
751
+ // ==== Advanced methods ====
752
+
753
+ /**
754
+ * Updates the component's currently mounted DOM representation.
755
+ *
756
+ * By default, this implements React's rendering and reconciliation algorithm.
757
+ * Sophisticated clients may wish to override this.
758
+ *
759
+ * @param {ReactReconcileTransaction} transaction
760
+ * @internal
761
+ * @overridable
762
+ */
763
+ updateComponent: 'OVERRIDE_BASE'
764
+ };
765
+
766
+ /**
767
+ * Similar to ReactClassInterface but for static methods.
768
+ */
769
+ var ReactClassStaticInterface = {
770
+ /**
771
+ * This method is invoked after a component is instantiated and when it
772
+ * receives new props. Return an object to update state in response to
773
+ * prop changes. Return null to indicate no change to state.
774
+ *
775
+ * If an object is returned, its keys will be merged into the existing state.
776
+ *
777
+ * @return {object || null}
778
+ * @optional
779
+ */
780
+ getDerivedStateFromProps: 'DEFINE_MANY_MERGED'
781
+ };
782
+
783
+ /**
784
+ * Mapping from class specification keys to special processing functions.
785
+ *
786
+ * Although these are declared like instance properties in the specification
787
+ * when defining classes using `React.createClass`, they are actually static
788
+ * and are accessible on the constructor instead of the prototype. Despite
789
+ * being static, they must be defined outside of the "statics" key under
790
+ * which all other static methods are defined.
791
+ */
792
+ var RESERVED_SPEC_KEYS = {
793
+ displayName: function(Constructor, displayName) {
794
+ Constructor.displayName = displayName;
795
+ },
796
+ mixins: function(Constructor, mixins) {
797
+ if (mixins) {
798
+ for (var i = 0; i < mixins.length; i++) {
799
+ mixSpecIntoComponent(Constructor, mixins[i]);
800
+ }
801
+ }
802
+ },
803
+ childContextTypes: function(Constructor, childContextTypes) {
804
+ if (process.env.NODE_ENV !== 'production') {
805
+ validateTypeDef(Constructor, childContextTypes, 'childContext');
806
+ }
807
+ Constructor.childContextTypes = _assign(
808
+ {},
809
+ Constructor.childContextTypes,
810
+ childContextTypes
811
+ );
812
+ },
813
+ contextTypes: function(Constructor, contextTypes) {
814
+ if (process.env.NODE_ENV !== 'production') {
815
+ validateTypeDef(Constructor, contextTypes, 'context');
816
+ }
817
+ Constructor.contextTypes = _assign(
818
+ {},
819
+ Constructor.contextTypes,
820
+ contextTypes
821
+ );
822
+ },
823
+ /**
824
+ * Special case getDefaultProps which should move into statics but requires
825
+ * automatic merging.
826
+ */
827
+ getDefaultProps: function(Constructor, getDefaultProps) {
828
+ if (Constructor.getDefaultProps) {
829
+ Constructor.getDefaultProps = createMergedResultFunction(
830
+ Constructor.getDefaultProps,
831
+ getDefaultProps
832
+ );
833
+ } else {
834
+ Constructor.getDefaultProps = getDefaultProps;
835
+ }
836
+ },
837
+ propTypes: function(Constructor, propTypes) {
838
+ if (process.env.NODE_ENV !== 'production') {
839
+ validateTypeDef(Constructor, propTypes, 'prop');
840
+ }
841
+ Constructor.propTypes = _assign({}, Constructor.propTypes, propTypes);
842
+ },
843
+ statics: function(Constructor, statics) {
844
+ mixStaticSpecIntoComponent(Constructor, statics);
845
+ },
846
+ autobind: function() {}
847
+ };
848
+
849
+ function validateTypeDef(Constructor, typeDef, location) {
850
+ for (var propName in typeDef) {
851
+ if (typeDef.hasOwnProperty(propName)) {
852
+ // use a warning instead of an _invariant so components
853
+ // don't show up in prod but only in __DEV__
854
+ if (process.env.NODE_ENV !== 'production') {
855
+ warning(
856
+ typeof typeDef[propName] === 'function',
857
+ '%s: %s type `%s` is invalid; it must be a function, usually from ' +
858
+ 'React.PropTypes.',
859
+ Constructor.displayName || 'ReactClass',
860
+ ReactPropTypeLocationNames[location],
861
+ propName
862
+ );
863
+ }
864
+ }
865
+ }
866
+ }
867
+
868
+ function validateMethodOverride(isAlreadyDefined, name) {
869
+ var specPolicy = ReactClassInterface.hasOwnProperty(name)
870
+ ? ReactClassInterface[name]
871
+ : null;
872
+
873
+ // Disallow overriding of base class methods unless explicitly allowed.
874
+ if (ReactClassMixin.hasOwnProperty(name)) {
875
+ _invariant(
876
+ specPolicy === 'OVERRIDE_BASE',
877
+ 'ReactClassInterface: You are attempting to override ' +
878
+ '`%s` from your class specification. Ensure that your method names ' +
879
+ 'do not overlap with React methods.',
880
+ name
881
+ );
882
+ }
883
+
884
+ // Disallow defining methods more than once unless explicitly allowed.
885
+ if (isAlreadyDefined) {
886
+ _invariant(
887
+ specPolicy === 'DEFINE_MANY' || specPolicy === 'DEFINE_MANY_MERGED',
888
+ 'ReactClassInterface: You are attempting to define ' +
889
+ '`%s` on your component more than once. This conflict may be due ' +
890
+ 'to a mixin.',
891
+ name
892
+ );
893
+ }
894
+ }
895
+
896
+ /**
897
+ * Mixin helper which handles policy validation and reserved
898
+ * specification keys when building React classes.
899
+ */
900
+ function mixSpecIntoComponent(Constructor, spec) {
901
+ if (!spec) {
902
+ if (process.env.NODE_ENV !== 'production') {
903
+ var typeofSpec = typeof spec;
904
+ var isMixinValid = typeofSpec === 'object' && spec !== null;
905
+
906
+ if (process.env.NODE_ENV !== 'production') {
907
+ warning(
908
+ isMixinValid,
909
+ "%s: You're attempting to include a mixin that is either null " +
910
+ 'or not an object. Check the mixins included by the component, ' +
911
+ 'as well as any mixins they include themselves. ' +
912
+ 'Expected object but got %s.',
913
+ Constructor.displayName || 'ReactClass',
914
+ spec === null ? null : typeofSpec
915
+ );
916
+ }
917
+ }
918
+
919
+ return;
920
+ }
921
+
922
+ _invariant(
923
+ typeof spec !== 'function',
924
+ "ReactClass: You're attempting to " +
925
+ 'use a component class or function as a mixin. Instead, just use a ' +
926
+ 'regular object.'
927
+ );
928
+ _invariant(
929
+ !isValidElement(spec),
930
+ "ReactClass: You're attempting to " +
931
+ 'use a component as a mixin. Instead, just use a regular object.'
932
+ );
933
+
934
+ var proto = Constructor.prototype;
935
+ var autoBindPairs = proto.__reactAutoBindPairs;
936
+
937
+ // By handling mixins before any other properties, we ensure the same
938
+ // chaining order is applied to methods with DEFINE_MANY policy, whether
939
+ // mixins are listed before or after these methods in the spec.
940
+ if (spec.hasOwnProperty(MIXINS_KEY)) {
941
+ RESERVED_SPEC_KEYS.mixins(Constructor, spec.mixins);
942
+ }
943
+
944
+ for (var name in spec) {
945
+ if (!spec.hasOwnProperty(name)) {
946
+ continue;
947
+ }
948
+
949
+ if (name === MIXINS_KEY) {
950
+ // We have already handled mixins in a special case above.
951
+ continue;
952
+ }
953
+
954
+ var property = spec[name];
955
+ var isAlreadyDefined = proto.hasOwnProperty(name);
956
+ validateMethodOverride(isAlreadyDefined, name);
957
+
958
+ if (RESERVED_SPEC_KEYS.hasOwnProperty(name)) {
959
+ RESERVED_SPEC_KEYS[name](Constructor, property);
960
+ } else {
961
+ // Setup methods on prototype:
962
+ // The following member methods should not be automatically bound:
963
+ // 1. Expected ReactClass methods (in the "interface").
964
+ // 2. Overridden methods (that were mixed in).
965
+ var isReactClassMethod = ReactClassInterface.hasOwnProperty(name);
966
+ var isFunction = typeof property === 'function';
967
+ var shouldAutoBind =
968
+ isFunction &&
969
+ !isReactClassMethod &&
970
+ !isAlreadyDefined &&
971
+ spec.autobind !== false;
972
+
973
+ if (shouldAutoBind) {
974
+ autoBindPairs.push(name, property);
975
+ proto[name] = property;
976
+ } else {
977
+ if (isAlreadyDefined) {
978
+ var specPolicy = ReactClassInterface[name];
979
+
980
+ // These cases should already be caught by validateMethodOverride.
981
+ _invariant(
982
+ isReactClassMethod &&
983
+ (specPolicy === 'DEFINE_MANY_MERGED' ||
984
+ specPolicy === 'DEFINE_MANY'),
985
+ 'ReactClass: Unexpected spec policy %s for key %s ' +
986
+ 'when mixing in component specs.',
987
+ specPolicy,
988
+ name
989
+ );
990
+
991
+ // For methods which are defined more than once, call the existing
992
+ // methods before calling the new property, merging if appropriate.
993
+ if (specPolicy === 'DEFINE_MANY_MERGED') {
994
+ proto[name] = createMergedResultFunction(proto[name], property);
995
+ } else if (specPolicy === 'DEFINE_MANY') {
996
+ proto[name] = createChainedFunction(proto[name], property);
997
+ }
998
+ } else {
999
+ proto[name] = property;
1000
+ if (process.env.NODE_ENV !== 'production') {
1001
+ // Add verbose displayName to the function, which helps when looking
1002
+ // at profiling tools.
1003
+ if (typeof property === 'function' && spec.displayName) {
1004
+ proto[name].displayName = spec.displayName + '_' + name;
1005
+ }
1006
+ }
1007
+ }
1008
+ }
1009
+ }
1010
+ }
1011
+ }
1012
+
1013
+ function mixStaticSpecIntoComponent(Constructor, statics) {
1014
+ if (!statics) {
1015
+ return;
1016
+ }
1017
+
1018
+ for (var name in statics) {
1019
+ var property = statics[name];
1020
+ if (!statics.hasOwnProperty(name)) {
1021
+ continue;
1022
+ }
1023
+
1024
+ var isReserved = name in RESERVED_SPEC_KEYS;
1025
+ _invariant(
1026
+ !isReserved,
1027
+ 'ReactClass: You are attempting to define a reserved ' +
1028
+ 'property, `%s`, that shouldn\'t be on the "statics" key. Define it ' +
1029
+ 'as an instance property instead; it will still be accessible on the ' +
1030
+ 'constructor.',
1031
+ name
1032
+ );
1033
+
1034
+ var isAlreadyDefined = name in Constructor;
1035
+ if (isAlreadyDefined) {
1036
+ var specPolicy = ReactClassStaticInterface.hasOwnProperty(name)
1037
+ ? ReactClassStaticInterface[name]
1038
+ : null;
1039
+
1040
+ _invariant(
1041
+ specPolicy === 'DEFINE_MANY_MERGED',
1042
+ 'ReactClass: You are attempting to define ' +
1043
+ '`%s` on your component more than once. This conflict may be ' +
1044
+ 'due to a mixin.',
1045
+ name
1046
+ );
1047
+
1048
+ Constructor[name] = createMergedResultFunction(Constructor[name], property);
1049
+
1050
+ return;
1051
+ }
1052
+
1053
+ Constructor[name] = property;
1054
+ }
1055
+ }
1056
+
1057
+ /**
1058
+ * Merge two objects, but throw if both contain the same key.
1059
+ *
1060
+ * @param {object} one The first object, which is mutated.
1061
+ * @param {object} two The second object
1062
+ * @return {object} one after it has been mutated to contain everything in two.
1063
+ */
1064
+ function mergeIntoWithNoDuplicateKeys(one, two) {
1065
+ _invariant(
1066
+ one && two && typeof one === 'object' && typeof two === 'object',
1067
+ 'mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.'
1068
+ );
1069
+
1070
+ for (var key in two) {
1071
+ if (two.hasOwnProperty(key)) {
1072
+ _invariant(
1073
+ one[key] === undefined,
1074
+ 'mergeIntoWithNoDuplicateKeys(): ' +
1075
+ 'Tried to merge two objects with the same key: `%s`. This conflict ' +
1076
+ 'may be due to a mixin; in particular, this may be caused by two ' +
1077
+ 'getInitialState() or getDefaultProps() methods returning objects ' +
1078
+ 'with clashing keys.',
1079
+ key
1080
+ );
1081
+ one[key] = two[key];
1082
+ }
1083
+ }
1084
+ return one;
1085
+ }
1086
+
1087
+ /**
1088
+ * Creates a function that invokes two functions and merges their return values.
1089
+ *
1090
+ * @param {function} one Function to invoke first.
1091
+ * @param {function} two Function to invoke second.
1092
+ * @return {function} Function that invokes the two argument functions.
1093
+ * @private
1094
+ */
1095
+ function createMergedResultFunction(one, two) {
1096
+ return function mergedResult() {
1097
+ var a = one.apply(this, arguments);
1098
+ var b = two.apply(this, arguments);
1099
+ if (a == null) {
1100
+ return b;
1101
+ } else if (b == null) {
1102
+ return a;
1103
+ }
1104
+ var c = {};
1105
+ mergeIntoWithNoDuplicateKeys(c, a);
1106
+ mergeIntoWithNoDuplicateKeys(c, b);
1107
+ return c;
1108
+ };
1109
+ }
1110
+
1111
+ /**
1112
+ * Creates a function that invokes two functions and ignores their return vales.
1113
+ *
1114
+ * @param {function} one Function to invoke first.
1115
+ * @param {function} two Function to invoke second.
1116
+ * @return {function} Function that invokes the two argument functions.
1117
+ * @private
1118
+ */
1119
+ function createChainedFunction(one, two) {
1120
+ return function chainedFunction() {
1121
+ one.apply(this, arguments);
1122
+ two.apply(this, arguments);
1123
+ };
1124
+ }
1125
+
1126
+ /**
1127
+ * Binds a method to the component.
1128
+ *
1129
+ * @param {object} component Component whose method is going to be bound.
1130
+ * @param {function} method Method to be bound.
1131
+ * @return {function} The bound method.
1132
+ */
1133
+ function bindAutoBindMethod(component, method) {
1134
+ var boundMethod = method.bind(component);
1135
+ if (process.env.NODE_ENV !== 'production') {
1136
+ boundMethod.__reactBoundContext = component;
1137
+ boundMethod.__reactBoundMethod = method;
1138
+ boundMethod.__reactBoundArguments = null;
1139
+ var componentName = component.constructor.displayName;
1140
+ var _bind = boundMethod.bind;
1141
+ boundMethod.bind = function(newThis) {
1142
+ for (
1143
+ var _len = arguments.length,
1144
+ args = Array(_len > 1 ? _len - 1 : 0),
1145
+ _key = 1;
1146
+ _key < _len;
1147
+ _key++
1148
+ ) {
1149
+ args[_key - 1] = arguments[_key];
1150
+ }
1151
+
1152
+ // User is trying to bind() an autobound method; we effectively will
1153
+ // ignore the value of "this" that the user is trying to use, so
1154
+ // let's warn.
1155
+ if (newThis !== component && newThis !== null) {
1156
+ if (process.env.NODE_ENV !== 'production') {
1157
+ warning(
1158
+ false,
1159
+ 'bind(): React component methods may only be bound to the ' +
1160
+ 'component instance. See %s',
1161
+ componentName
1162
+ );
1163
+ }
1164
+ } else if (!args.length) {
1165
+ if (process.env.NODE_ENV !== 'production') {
1166
+ warning(
1167
+ false,
1168
+ 'bind(): You are binding a component method to the component. ' +
1169
+ 'React does this for you automatically in a high-performance ' +
1170
+ 'way, so you can safely remove this call. See %s',
1171
+ componentName
1172
+ );
1173
+ }
1174
+ return boundMethod;
1175
+ }
1176
+ var reboundMethod = _bind.apply(boundMethod, arguments);
1177
+ reboundMethod.__reactBoundContext = component;
1178
+ reboundMethod.__reactBoundMethod = method;
1179
+ reboundMethod.__reactBoundArguments = args;
1180
+ return reboundMethod;
1181
+ };
1182
+ }
1183
+ return boundMethod;
1184
+ }
1185
+
1186
+ /**
1187
+ * Binds all auto-bound methods in a component.
1188
+ *
1189
+ * @param {object} component Component whose method is going to be bound.
1190
+ */
1191
+ function bindAutoBindMethods(component) {
1192
+ var pairs = component.__reactAutoBindPairs;
1193
+ for (var i = 0; i < pairs.length; i += 2) {
1194
+ var autoBindKey = pairs[i];
1195
+ var method = pairs[i + 1];
1196
+ component[autoBindKey] = bindAutoBindMethod(component, method);
1197
+ }
1198
+ }
1199
+
1200
+ var IsMountedPreMixin = {
1201
+ componentDidMount: function() {
1202
+ this.__isMounted = true;
1203
+ }
1204
+ };
1205
+
1206
+ var IsMountedPostMixin = {
1207
+ componentWillUnmount: function() {
1208
+ this.__isMounted = false;
1209
+ }
1210
+ };
1211
+
1212
+ /**
1213
+ * Add more to the ReactClass base class. These are all legacy features and
1214
+ * therefore not already part of the modern ReactComponent.
1215
+ */
1216
+ var ReactClassMixin = {
1217
+ /**
1218
+ * TODO: This will be deprecated because state should always keep a consistent
1219
+ * type signature and the only use case for this, is to avoid that.
1220
+ */
1221
+ replaceState: function(newState, callback) {
1222
+ this.updater.enqueueReplaceState(this, newState, callback);
1223
+ },
1224
+
1225
+ /**
1226
+ * Checks whether or not this composite component is mounted.
1227
+ * @return {boolean} True if mounted, false otherwise.
1228
+ * @protected
1229
+ * @final
1230
+ */
1231
+ isMounted: function() {
1232
+ if (process.env.NODE_ENV !== 'production') {
1233
+ warning(
1234
+ this.__didWarnIsMounted,
1235
+ '%s: isMounted is deprecated. Instead, make sure to clean up ' +
1236
+ 'subscriptions and pending requests in componentWillUnmount to ' +
1237
+ 'prevent memory leaks.',
1238
+ (this.constructor && this.constructor.displayName) ||
1239
+ this.name ||
1240
+ 'Component'
1241
+ );
1242
+ this.__didWarnIsMounted = true;
1243
+ }
1244
+ return !!this.__isMounted;
1245
+ }
1246
+ };
1247
+
1248
+ var ReactClassComponent = function() {};
1249
+ _assign(
1250
+ ReactClassComponent.prototype,
1251
+ ReactComponent.prototype,
1252
+ ReactClassMixin
1253
+ );
1254
+
1255
+ /**
1256
+ * Creates a composite component class given a class specification.
1257
+ * See https://facebook.github.io/react/docs/top-level-api.html#react.createclass
1258
+ *
1259
+ * @param {object} spec Class specification (which must define `render`).
1260
+ * @return {function} Component constructor function.
1261
+ * @public
1262
+ */
1263
+ function createClass(spec) {
1264
+ // To keep our warnings more understandable, we'll use a little hack here to
1265
+ // ensure that Constructor.name !== 'Constructor'. This makes sure we don't
1266
+ // unnecessarily identify a class without displayName as 'Constructor'.
1267
+ var Constructor = identity(function(props, context, updater) {
1268
+ // This constructor gets overridden by mocks. The argument is used
1269
+ // by mocks to assert on what gets mounted.
1270
+
1271
+ if (process.env.NODE_ENV !== 'production') {
1272
+ warning(
1273
+ this instanceof Constructor,
1274
+ 'Something is calling a React component directly. Use a factory or ' +
1275
+ 'JSX instead. See: https://fb.me/react-legacyfactory'
1276
+ );
1277
+ }
1278
+
1279
+ // Wire up auto-binding
1280
+ if (this.__reactAutoBindPairs.length) {
1281
+ bindAutoBindMethods(this);
1282
+ }
1283
+
1284
+ this.props = props;
1285
+ this.context = context;
1286
+ this.refs = emptyObject;
1287
+ this.updater = updater || ReactNoopUpdateQueue;
1288
+
1289
+ this.state = null;
1290
+
1291
+ // ReactClasses doesn't have constructors. Instead, they use the
1292
+ // getInitialState and componentWillMount methods for initialization.
1293
+
1294
+ var initialState = this.getInitialState ? this.getInitialState() : null;
1295
+ if (process.env.NODE_ENV !== 'production') {
1296
+ // We allow auto-mocks to proceed as if they're returning null.
1297
+ if (
1298
+ initialState === undefined &&
1299
+ this.getInitialState._isMockFunction
1300
+ ) {
1301
+ // This is probably bad practice. Consider warning here and
1302
+ // deprecating this convenience.
1303
+ initialState = null;
1304
+ }
1305
+ }
1306
+ _invariant(
1307
+ typeof initialState === 'object' && !Array.isArray(initialState),
1308
+ '%s.getInitialState(): must return an object or null',
1309
+ Constructor.displayName || 'ReactCompositeComponent'
1310
+ );
1311
+
1312
+ this.state = initialState;
1313
+ });
1314
+ Constructor.prototype = new ReactClassComponent();
1315
+ Constructor.prototype.constructor = Constructor;
1316
+ Constructor.prototype.__reactAutoBindPairs = [];
1317
+
1318
+ injectedMixins.forEach(mixSpecIntoComponent.bind(null, Constructor));
1319
+
1320
+ mixSpecIntoComponent(Constructor, IsMountedPreMixin);
1321
+ mixSpecIntoComponent(Constructor, spec);
1322
+ mixSpecIntoComponent(Constructor, IsMountedPostMixin);
1323
+
1324
+ // Initialize the defaultProps property after all mixins have been merged.
1325
+ if (Constructor.getDefaultProps) {
1326
+ Constructor.defaultProps = Constructor.getDefaultProps();
1327
+ }
1328
+
1329
+ if (process.env.NODE_ENV !== 'production') {
1330
+ // This is a tag to indicate that the use of these method names is ok,
1331
+ // since it's used with createClass. If it's not, then it's likely a
1332
+ // mistake so we'll warn you to use the static property, property
1333
+ // initializer or constructor respectively.
1334
+ if (Constructor.getDefaultProps) {
1335
+ Constructor.getDefaultProps.isReactClassApproved = {};
1336
+ }
1337
+ if (Constructor.prototype.getInitialState) {
1338
+ Constructor.prototype.getInitialState.isReactClassApproved = {};
1339
+ }
1340
+ }
1341
+
1342
+ _invariant(
1343
+ Constructor.prototype.render,
1344
+ 'createClass(...): Class specification must implement a `render` method.'
1345
+ );
1346
+
1347
+ if (process.env.NODE_ENV !== 'production') {
1348
+ warning(
1349
+ !Constructor.prototype.componentShouldUpdate,
1350
+ '%s has a method called ' +
1351
+ 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' +
1352
+ 'The name is phrased as a question because the function is ' +
1353
+ 'expected to return a value.',
1354
+ spec.displayName || 'A component'
1355
+ );
1356
+ warning(
1357
+ !Constructor.prototype.componentWillRecieveProps,
1358
+ '%s has a method called ' +
1359
+ 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?',
1360
+ spec.displayName || 'A component'
1361
+ );
1362
+ warning(
1363
+ !Constructor.prototype.UNSAFE_componentWillRecieveProps,
1364
+ '%s has a method called UNSAFE_componentWillRecieveProps(). ' +
1365
+ 'Did you mean UNSAFE_componentWillReceiveProps()?',
1366
+ spec.displayName || 'A component'
1367
+ );
1368
+ }
1369
+
1370
+ // Reduce time spent doing lookups by setting these on the prototype.
1371
+ for (var methodName in ReactClassInterface) {
1372
+ if (!Constructor.prototype[methodName]) {
1373
+ Constructor.prototype[methodName] = null;
1374
+ }
1375
+ }
1376
+
1377
+ return Constructor;
1378
+ }
1379
+
1380
+ return createClass;
1381
+ }
1382
+
1383
+ module.exports = factory;
1384
+
1385
+ }).call(this)}).call(this,require('_process'))
1386
+ },{"_process":29,"object-assign":28}],5:[function(require,module,exports){
1387
+ (function (process){(function (){
1388
+ 'use strict';
1389
+
1390
+ /**
1391
+ * Copyright (c) 2013-present, Facebook, Inc.
1392
+ *
1393
+ * This source code is licensed under the MIT license found in the
1394
+ * LICENSE file in the root directory of this source tree.
1395
+ *
1396
+ * @typechecks
1397
+ */
1398
+
1399
+ var emptyFunction = require('./emptyFunction');
1400
+
1401
+ /**
1402
+ * Upstream version of event listener. Does not take into account specific
1403
+ * nature of platform.
1404
+ */
1405
+ var EventListener = {
1406
+ /**
1407
+ * Listen to DOM events during the bubble phase.
1408
+ *
1409
+ * @param {DOMEventTarget} target DOM element to register listener on.
1410
+ * @param {string} eventType Event type, e.g. 'click' or 'mouseover'.
1411
+ * @param {function} callback Callback function.
1412
+ * @return {object} Object with a `remove` method.
1413
+ */
1414
+ listen: function listen(target, eventType, callback) {
1415
+ if (target.addEventListener) {
1416
+ target.addEventListener(eventType, callback, false);
1417
+ return {
1418
+ remove: function remove() {
1419
+ target.removeEventListener(eventType, callback, false);
1420
+ }
1421
+ };
1422
+ } else if (target.attachEvent) {
1423
+ target.attachEvent('on' + eventType, callback);
1424
+ return {
1425
+ remove: function remove() {
1426
+ target.detachEvent('on' + eventType, callback);
1427
+ }
1428
+ };
1429
+ }
1430
+ },
1431
+
1432
+ /**
1433
+ * Listen to DOM events during the capture phase.
1434
+ *
1435
+ * @param {DOMEventTarget} target DOM element to register listener on.
1436
+ * @param {string} eventType Event type, e.g. 'click' or 'mouseover'.
1437
+ * @param {function} callback Callback function.
1438
+ * @return {object} Object with a `remove` method.
1439
+ */
1440
+ capture: function capture(target, eventType, callback) {
1441
+ if (target.addEventListener) {
1442
+ target.addEventListener(eventType, callback, true);
1443
+ return {
1444
+ remove: function remove() {
1445
+ target.removeEventListener(eventType, callback, true);
1446
+ }
1447
+ };
1448
+ } else {
1449
+ if (process.env.NODE_ENV !== 'production') {
1450
+ console.error('Attempted to listen to events during the capture phase on a ' + 'browser that does not support the capture phase. Your application ' + 'will not receive some events.');
1451
+ }
1452
+ return {
1453
+ remove: emptyFunction
1454
+ };
1455
+ }
1456
+ },
1457
+
1458
+ registerDefault: function registerDefault() {}
1459
+ };
1460
+
1461
+ module.exports = EventListener;
1462
+ }).call(this)}).call(this,require('_process'))
1463
+ },{"./emptyFunction":12,"_process":29}],6:[function(require,module,exports){
1464
+ /**
1465
+ * Copyright (c) 2013-present, Facebook, Inc.
1466
+ *
1467
+ * This source code is licensed under the MIT license found in the
1468
+ * LICENSE file in the root directory of this source tree.
1469
+ *
1470
+ */
1471
+
1472
+ 'use strict';
1473
+
1474
+ var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);
1475
+
1476
+ /**
1477
+ * Simple, lightweight module assisting with the detection and context of
1478
+ * Worker. Helps avoid circular dependencies and allows code to reason about
1479
+ * whether or not they are in a Worker, even if they never include the main
1480
+ * `ReactWorker` dependency.
1481
+ */
1482
+ var ExecutionEnvironment = {
1483
+
1484
+ canUseDOM: canUseDOM,
1485
+
1486
+ canUseWorkers: typeof Worker !== 'undefined',
1487
+
1488
+ canUseEventListeners: canUseDOM && !!(window.addEventListener || window.attachEvent),
1489
+
1490
+ canUseViewport: canUseDOM && !!window.screen,
1491
+
1492
+ isInWorker: !canUseDOM // For now, this is true - might change in the future.
1493
+
1494
+ };
1495
+
1496
+ module.exports = ExecutionEnvironment;
1497
+ },{}],7:[function(require,module,exports){
1498
+ "use strict";
1499
+
1500
+ /**
1501
+ * Copyright (c) 2013-present, Facebook, Inc.
1502
+ *
1503
+ * This source code is licensed under the MIT license found in the
1504
+ * LICENSE file in the root directory of this source tree.
1505
+ *
1506
+ * @typechecks
1507
+ */
1508
+
1509
+ var _hyphenPattern = /-(.)/g;
1510
+
1511
+ /**
1512
+ * Camelcases a hyphenated string, for example:
1513
+ *
1514
+ * > camelize('background-color')
1515
+ * < "backgroundColor"
1516
+ *
1517
+ * @param {string} string
1518
+ * @return {string}
1519
+ */
1520
+ function camelize(string) {
1521
+ return string.replace(_hyphenPattern, function (_, character) {
1522
+ return character.toUpperCase();
1523
+ });
1524
+ }
1525
+
1526
+ module.exports = camelize;
1527
+ },{}],8:[function(require,module,exports){
1528
+ /**
1529
+ * Copyright (c) 2013-present, Facebook, Inc.
1530
+ *
1531
+ * This source code is licensed under the MIT license found in the
1532
+ * LICENSE file in the root directory of this source tree.
1533
+ *
1534
+ * @typechecks
1535
+ */
1536
+
1537
+ 'use strict';
1538
+
1539
+ var camelize = require('./camelize');
1540
+
1541
+ var msPattern = /^-ms-/;
1542
+
1543
+ /**
1544
+ * Camelcases a hyphenated CSS property name, for example:
1545
+ *
1546
+ * > camelizeStyleName('background-color')
1547
+ * < "backgroundColor"
1548
+ * > camelizeStyleName('-moz-transition')
1549
+ * < "MozTransition"
1550
+ * > camelizeStyleName('-ms-transition')
1551
+ * < "msTransition"
1552
+ *
1553
+ * As Andi Smith suggests
1554
+ * (http://www.andismith.com/blog/2012/02/modernizr-prefixed/), an `-ms` prefix
1555
+ * is converted to lowercase `ms`.
1556
+ *
1557
+ * @param {string} string
1558
+ * @return {string}
1559
+ */
1560
+ function camelizeStyleName(string) {
1561
+ return camelize(string.replace(msPattern, 'ms-'));
1562
+ }
1563
+
1564
+ module.exports = camelizeStyleName;
1565
+ },{"./camelize":7}],9:[function(require,module,exports){
1566
+ 'use strict';
1567
+
1568
+ /**
1569
+ * Copyright (c) 2013-present, Facebook, Inc.
1570
+ *
1571
+ * This source code is licensed under the MIT license found in the
1572
+ * LICENSE file in the root directory of this source tree.
1573
+ *
1574
+ *
1575
+ */
1576
+
1577
+ var isTextNode = require('./isTextNode');
1578
+
1579
+ /*eslint-disable no-bitwise */
1580
+
1581
+ /**
1582
+ * Checks if a given DOM node contains or is another DOM node.
1583
+ */
1584
+ function containsNode(outerNode, innerNode) {
1585
+ if (!outerNode || !innerNode) {
1586
+ return false;
1587
+ } else if (outerNode === innerNode) {
1588
+ return true;
1589
+ } else if (isTextNode(outerNode)) {
1590
+ return false;
1591
+ } else if (isTextNode(innerNode)) {
1592
+ return containsNode(outerNode, innerNode.parentNode);
1593
+ } else if ('contains' in outerNode) {
1594
+ return outerNode.contains(innerNode);
1595
+ } else if (outerNode.compareDocumentPosition) {
1596
+ return !!(outerNode.compareDocumentPosition(innerNode) & 16);
1597
+ } else {
1598
+ return false;
1599
+ }
1600
+ }
1601
+
1602
+ module.exports = containsNode;
1603
+ },{"./isTextNode":22}],10:[function(require,module,exports){
1604
+ (function (process){(function (){
1605
+ 'use strict';
1606
+
1607
+ /**
1608
+ * Copyright (c) 2013-present, Facebook, Inc.
1609
+ *
1610
+ * This source code is licensed under the MIT license found in the
1611
+ * LICENSE file in the root directory of this source tree.
1612
+ *
1613
+ * @typechecks
1614
+ */
1615
+
1616
+ var invariant = require('./invariant');
1617
+
1618
+ /**
1619
+ * Convert array-like objects to arrays.
1620
+ *
1621
+ * This API assumes the caller knows the contents of the data type. For less
1622
+ * well defined inputs use createArrayFromMixed.
1623
+ *
1624
+ * @param {object|function|filelist} obj
1625
+ * @return {array}
1626
+ */
1627
+ function toArray(obj) {
1628
+ var length = obj.length;
1629
+
1630
+ // Some browsers builtin objects can report typeof 'function' (e.g. NodeList
1631
+ // in old versions of Safari).
1632
+ !(!Array.isArray(obj) && (typeof obj === 'object' || typeof obj === 'function')) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'toArray: Array-like object expected') : invariant(false) : void 0;
1633
+
1634
+ !(typeof length === 'number') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'toArray: Object needs a length property') : invariant(false) : void 0;
1635
+
1636
+ !(length === 0 || length - 1 in obj) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'toArray: Object should have keys for indices') : invariant(false) : void 0;
1637
+
1638
+ !(typeof obj.callee !== 'function') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'toArray: Object can\'t be `arguments`. Use rest params ' + '(function(...args) {}) or Array.from() instead.') : invariant(false) : void 0;
1639
+
1640
+ // Old IE doesn't give collections access to hasOwnProperty. Assume inputs
1641
+ // without method will throw during the slice call and skip straight to the
1642
+ // fallback.
1643
+ if (obj.hasOwnProperty) {
1644
+ try {
1645
+ return Array.prototype.slice.call(obj);
1646
+ } catch (e) {
1647
+ // IE < 9 does not support Array#slice on collections objects
1648
+ }
1649
+ }
1650
+
1651
+ // Fall back to copying key by key. This assumes all keys have a value,
1652
+ // so will not preserve sparsely populated inputs.
1653
+ var ret = Array(length);
1654
+ for (var ii = 0; ii < length; ii++) {
1655
+ ret[ii] = obj[ii];
1656
+ }
1657
+ return ret;
1658
+ }
1659
+
1660
+ /**
1661
+ * Perform a heuristic test to determine if an object is "array-like".
1662
+ *
1663
+ * A monk asked Joshu, a Zen master, "Has a dog Buddha nature?"
1664
+ * Joshu replied: "Mu."
1665
+ *
1666
+ * This function determines if its argument has "array nature": it returns
1667
+ * true if the argument is an actual array, an `arguments' object, or an
1668
+ * HTMLCollection (e.g. node.childNodes or node.getElementsByTagName()).
1669
+ *
1670
+ * It will return false for other array-like objects like Filelist.
1671
+ *
1672
+ * @param {*} obj
1673
+ * @return {boolean}
1674
+ */
1675
+ function hasArrayNature(obj) {
1676
+ return (
1677
+ // not null/false
1678
+ !!obj && (
1679
+ // arrays are objects, NodeLists are functions in Safari
1680
+ typeof obj == 'object' || typeof obj == 'function') &&
1681
+ // quacks like an array
1682
+ 'length' in obj &&
1683
+ // not window
1684
+ !('setInterval' in obj) &&
1685
+ // no DOM node should be considered an array-like
1686
+ // a 'select' element has 'length' and 'item' properties on IE8
1687
+ typeof obj.nodeType != 'number' && (
1688
+ // a real array
1689
+ Array.isArray(obj) ||
1690
+ // arguments
1691
+ 'callee' in obj ||
1692
+ // HTMLCollection/NodeList
1693
+ 'item' in obj)
1694
+ );
1695
+ }
1696
+
1697
+ /**
1698
+ * Ensure that the argument is an array by wrapping it in an array if it is not.
1699
+ * Creates a copy of the argument if it is already an array.
1700
+ *
1701
+ * This is mostly useful idiomatically:
1702
+ *
1703
+ * var createArrayFromMixed = require('createArrayFromMixed');
1704
+ *
1705
+ * function takesOneOrMoreThings(things) {
1706
+ * things = createArrayFromMixed(things);
1707
+ * ...
1708
+ * }
1709
+ *
1710
+ * This allows you to treat `things' as an array, but accept scalars in the API.
1711
+ *
1712
+ * If you need to convert an array-like object, like `arguments`, into an array
1713
+ * use toArray instead.
1714
+ *
1715
+ * @param {*} obj
1716
+ * @return {array}
1717
+ */
1718
+ function createArrayFromMixed(obj) {
1719
+ if (!hasArrayNature(obj)) {
1720
+ return [obj];
1721
+ } else if (Array.isArray(obj)) {
1722
+ return obj.slice();
1723
+ } else {
1724
+ return toArray(obj);
1725
+ }
1726
+ }
1727
+
1728
+ module.exports = createArrayFromMixed;
1729
+ }).call(this)}).call(this,require('_process'))
1730
+ },{"./invariant":20,"_process":29}],11:[function(require,module,exports){
1731
+ (function (process){(function (){
1732
+ 'use strict';
1733
+
1734
+ /**
1735
+ * Copyright (c) 2013-present, Facebook, Inc.
1736
+ *
1737
+ * This source code is licensed under the MIT license found in the
1738
+ * LICENSE file in the root directory of this source tree.
1739
+ *
1740
+ * @typechecks
1741
+ */
1742
+
1743
+ /*eslint-disable fb-www/unsafe-html*/
1744
+
1745
+ var ExecutionEnvironment = require('./ExecutionEnvironment');
1746
+
1747
+ var createArrayFromMixed = require('./createArrayFromMixed');
1748
+ var getMarkupWrap = require('./getMarkupWrap');
1749
+ var invariant = require('./invariant');
1750
+
1751
+ /**
1752
+ * Dummy container used to render all markup.
1753
+ */
1754
+ var dummyNode = ExecutionEnvironment.canUseDOM ? document.createElement('div') : null;
1755
+
1756
+ /**
1757
+ * Pattern used by `getNodeName`.
1758
+ */
1759
+ var nodeNamePattern = /^\s*<(\w+)/;
1760
+
1761
+ /**
1762
+ * Extracts the `nodeName` of the first element in a string of markup.
1763
+ *
1764
+ * @param {string} markup String of markup.
1765
+ * @return {?string} Node name of the supplied markup.
1766
+ */
1767
+ function getNodeName(markup) {
1768
+ var nodeNameMatch = markup.match(nodeNamePattern);
1769
+ return nodeNameMatch && nodeNameMatch[1].toLowerCase();
1770
+ }
1771
+
1772
+ /**
1773
+ * Creates an array containing the nodes rendered from the supplied markup. The
1774
+ * optionally supplied `handleScript` function will be invoked once for each
1775
+ * <script> element that is rendered. If no `handleScript` function is supplied,
1776
+ * an exception is thrown if any <script> elements are rendered.
1777
+ *
1778
+ * @param {string} markup A string of valid HTML markup.
1779
+ * @param {?function} handleScript Invoked once for each rendered <script>.
1780
+ * @return {array<DOMElement|DOMTextNode>} An array of rendered nodes.
1781
+ */
1782
+ function createNodesFromMarkup(markup, handleScript) {
1783
+ var node = dummyNode;
1784
+ !!!dummyNode ? process.env.NODE_ENV !== 'production' ? invariant(false, 'createNodesFromMarkup dummy not initialized') : invariant(false) : void 0;
1785
+ var nodeName = getNodeName(markup);
1786
+
1787
+ var wrap = nodeName && getMarkupWrap(nodeName);
1788
+ if (wrap) {
1789
+ node.innerHTML = wrap[1] + markup + wrap[2];
1790
+
1791
+ var wrapDepth = wrap[0];
1792
+ while (wrapDepth--) {
1793
+ node = node.lastChild;
1794
+ }
1795
+ } else {
1796
+ node.innerHTML = markup;
1797
+ }
1798
+
1799
+ var scripts = node.getElementsByTagName('script');
1800
+ if (scripts.length) {
1801
+ !handleScript ? process.env.NODE_ENV !== 'production' ? invariant(false, 'createNodesFromMarkup(...): Unexpected <script> element rendered.') : invariant(false) : void 0;
1802
+ createArrayFromMixed(scripts).forEach(handleScript);
1803
+ }
1804
+
1805
+ var nodes = Array.from(node.childNodes);
1806
+ while (node.lastChild) {
1807
+ node.removeChild(node.lastChild);
1808
+ }
1809
+ return nodes;
1810
+ }
1811
+
1812
+ module.exports = createNodesFromMarkup;
1813
+ }).call(this)}).call(this,require('_process'))
1814
+ },{"./ExecutionEnvironment":6,"./createArrayFromMixed":10,"./getMarkupWrap":16,"./invariant":20,"_process":29}],12:[function(require,module,exports){
1815
+ "use strict";
1816
+
1817
+ /**
1818
+ * Copyright (c) 2013-present, Facebook, Inc.
1819
+ *
1820
+ * This source code is licensed under the MIT license found in the
1821
+ * LICENSE file in the root directory of this source tree.
1822
+ *
1823
+ *
1824
+ */
1825
+
1826
+ function makeEmptyFunction(arg) {
1827
+ return function () {
1828
+ return arg;
1829
+ };
1830
+ }
1831
+
1832
+ /**
1833
+ * This function accepts and discards inputs; it has no side effects. This is
1834
+ * primarily useful idiomatically for overridable function endpoints which
1835
+ * always need to be callable, since JS lacks a null-call idiom ala Cocoa.
1836
+ */
1837
+ var emptyFunction = function emptyFunction() {};
1838
+
1839
+ emptyFunction.thatReturns = makeEmptyFunction;
1840
+ emptyFunction.thatReturnsFalse = makeEmptyFunction(false);
1841
+ emptyFunction.thatReturnsTrue = makeEmptyFunction(true);
1842
+ emptyFunction.thatReturnsNull = makeEmptyFunction(null);
1843
+ emptyFunction.thatReturnsThis = function () {
1844
+ return this;
1845
+ };
1846
+ emptyFunction.thatReturnsArgument = function (arg) {
1847
+ return arg;
1848
+ };
1849
+
1850
+ module.exports = emptyFunction;
1851
+ },{}],13:[function(require,module,exports){
1852
+ (function (process){(function (){
1853
+ /**
1854
+ * Copyright (c) 2013-present, Facebook, Inc.
1855
+ *
1856
+ * This source code is licensed under the MIT license found in the
1857
+ * LICENSE file in the root directory of this source tree.
1858
+ *
1859
+ */
1860
+
1861
+ 'use strict';
1862
+
1863
+ var emptyObject = {};
1864
+
1865
+ if (process.env.NODE_ENV !== 'production') {
1866
+ Object.freeze(emptyObject);
1867
+ }
1868
+
1869
+ module.exports = emptyObject;
1870
+ }).call(this)}).call(this,require('_process'))
1871
+ },{"_process":29}],14:[function(require,module,exports){
1872
+ /**
1873
+ * Copyright (c) 2013-present, Facebook, Inc.
1874
+ *
1875
+ * This source code is licensed under the MIT license found in the
1876
+ * LICENSE file in the root directory of this source tree.
1877
+ *
1878
+ */
1879
+
1880
+ 'use strict';
1881
+
1882
+ /**
1883
+ * @param {DOMElement} node input/textarea to focus
1884
+ */
1885
+
1886
+ function focusNode(node) {
1887
+ // IE8 can throw "Can't move focus to the control because it is invisible,
1888
+ // not enabled, or of a type that does not accept the focus." for all kinds of
1889
+ // reasons that are too expensive and fragile to test.
1890
+ try {
1891
+ node.focus();
1892
+ } catch (e) {}
1893
+ }
1894
+
1895
+ module.exports = focusNode;
1896
+ },{}],15:[function(require,module,exports){
1897
+ 'use strict';
1898
+
1899
+ /**
1900
+ * Copyright (c) 2013-present, Facebook, Inc.
1901
+ *
1902
+ * This source code is licensed under the MIT license found in the
1903
+ * LICENSE file in the root directory of this source tree.
1904
+ *
1905
+ * @typechecks
1906
+ */
1907
+
1908
+ /* eslint-disable fb-www/typeof-undefined */
1909
+
1910
+ /**
1911
+ * Same as document.activeElement but wraps in a try-catch block. In IE it is
1912
+ * not safe to call document.activeElement if there is nothing focused.
1913
+ *
1914
+ * The activeElement will be null only if the document or document body is not
1915
+ * yet defined.
1916
+ *
1917
+ * @param {?DOMDocument} doc Defaults to current document.
1918
+ * @return {?DOMElement}
1919
+ */
1920
+ function getActiveElement(doc) /*?DOMElement*/{
1921
+ doc = doc || (typeof document !== 'undefined' ? document : undefined);
1922
+ if (typeof doc === 'undefined') {
1923
+ return null;
1924
+ }
1925
+ try {
1926
+ return doc.activeElement || doc.body;
1927
+ } catch (e) {
1928
+ return doc.body;
1929
+ }
1930
+ }
1931
+
1932
+ module.exports = getActiveElement;
1933
+ },{}],16:[function(require,module,exports){
1934
+ (function (process){(function (){
1935
+ 'use strict';
1936
+
1937
+ /**
1938
+ * Copyright (c) 2013-present, Facebook, Inc.
1939
+ *
1940
+ * This source code is licensed under the MIT license found in the
1941
+ * LICENSE file in the root directory of this source tree.
1942
+ *
1943
+ */
1944
+
1945
+ /*eslint-disable fb-www/unsafe-html */
1946
+
1947
+ var ExecutionEnvironment = require('./ExecutionEnvironment');
1948
+
1949
+ var invariant = require('./invariant');
1950
+
1951
+ /**
1952
+ * Dummy container used to detect which wraps are necessary.
1953
+ */
1954
+ var dummyNode = ExecutionEnvironment.canUseDOM ? document.createElement('div') : null;
1955
+
1956
+ /**
1957
+ * Some browsers cannot use `innerHTML` to render certain elements standalone,
1958
+ * so we wrap them, render the wrapped nodes, then extract the desired node.
1959
+ *
1960
+ * In IE8, certain elements cannot render alone, so wrap all elements ('*').
1961
+ */
1962
+
1963
+ var shouldWrap = {};
1964
+
1965
+ var selectWrap = [1, '<select multiple="true">', '</select>'];
1966
+ var tableWrap = [1, '<table>', '</table>'];
1967
+ var trWrap = [3, '<table><tbody><tr>', '</tr></tbody></table>'];
1968
+
1969
+ var svgWrap = [1, '<svg xmlns="http://www.w3.org/2000/svg">', '</svg>'];
1970
+
1971
+ var markupWrap = {
1972
+ '*': [1, '?<div>', '</div>'],
1973
+
1974
+ 'area': [1, '<map>', '</map>'],
1975
+ 'col': [2, '<table><tbody></tbody><colgroup>', '</colgroup></table>'],
1976
+ 'legend': [1, '<fieldset>', '</fieldset>'],
1977
+ 'param': [1, '<object>', '</object>'],
1978
+ 'tr': [2, '<table><tbody>', '</tbody></table>'],
1979
+
1980
+ 'optgroup': selectWrap,
1981
+ 'option': selectWrap,
1982
+
1983
+ 'caption': tableWrap,
1984
+ 'colgroup': tableWrap,
1985
+ 'tbody': tableWrap,
1986
+ 'tfoot': tableWrap,
1987
+ 'thead': tableWrap,
1988
+
1989
+ 'td': trWrap,
1990
+ 'th': trWrap
1991
+ };
1992
+
1993
+ // Initialize the SVG elements since we know they'll always need to be wrapped
1994
+ // consistently. If they are created inside a <div> they will be initialized in
1995
+ // the wrong namespace (and will not display).
1996
+ var svgElements = ['circle', 'clipPath', 'defs', 'ellipse', 'g', 'image', 'line', 'linearGradient', 'mask', 'path', 'pattern', 'polygon', 'polyline', 'radialGradient', 'rect', 'stop', 'text', 'tspan'];
1997
+ svgElements.forEach(function (nodeName) {
1998
+ markupWrap[nodeName] = svgWrap;
1999
+ shouldWrap[nodeName] = true;
2000
+ });
2001
+
2002
+ /**
2003
+ * Gets the markup wrap configuration for the supplied `nodeName`.
2004
+ *
2005
+ * NOTE: This lazily detects which wraps are necessary for the current browser.
2006
+ *
2007
+ * @param {string} nodeName Lowercase `nodeName`.
2008
+ * @return {?array} Markup wrap configuration, if applicable.
2009
+ */
2010
+ function getMarkupWrap(nodeName) {
2011
+ !!!dummyNode ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Markup wrapping node not initialized') : invariant(false) : void 0;
2012
+ if (!markupWrap.hasOwnProperty(nodeName)) {
2013
+ nodeName = '*';
2014
+ }
2015
+ if (!shouldWrap.hasOwnProperty(nodeName)) {
2016
+ if (nodeName === '*') {
2017
+ dummyNode.innerHTML = '<link />';
2018
+ } else {
2019
+ dummyNode.innerHTML = '<' + nodeName + '></' + nodeName + '>';
2020
+ }
2021
+ shouldWrap[nodeName] = !dummyNode.firstChild;
2022
+ }
2023
+ return shouldWrap[nodeName] ? markupWrap[nodeName] : null;
2024
+ }
2025
+
2026
+ module.exports = getMarkupWrap;
2027
+ }).call(this)}).call(this,require('_process'))
2028
+ },{"./ExecutionEnvironment":6,"./invariant":20,"_process":29}],17:[function(require,module,exports){
2029
+ /**
2030
+ * Copyright (c) 2013-present, Facebook, Inc.
2031
+ *
2032
+ * This source code is licensed under the MIT license found in the
2033
+ * LICENSE file in the root directory of this source tree.
2034
+ *
2035
+ * @typechecks
2036
+ */
2037
+
2038
+ 'use strict';
2039
+
2040
+ /**
2041
+ * Gets the scroll position of the supplied element or window.
2042
+ *
2043
+ * The return values are unbounded, unlike `getScrollPosition`. This means they
2044
+ * may be negative or exceed the element boundaries (which is possible using
2045
+ * inertial scrolling).
2046
+ *
2047
+ * @param {DOMWindow|DOMElement} scrollable
2048
+ * @return {object} Map with `x` and `y` keys.
2049
+ */
2050
+
2051
+ function getUnboundedScrollPosition(scrollable) {
2052
+ if (scrollable.Window && scrollable instanceof scrollable.Window) {
2053
+ return {
2054
+ x: scrollable.pageXOffset || scrollable.document.documentElement.scrollLeft,
2055
+ y: scrollable.pageYOffset || scrollable.document.documentElement.scrollTop
2056
+ };
2057
+ }
2058
+ return {
2059
+ x: scrollable.scrollLeft,
2060
+ y: scrollable.scrollTop
2061
+ };
2062
+ }
2063
+
2064
+ module.exports = getUnboundedScrollPosition;
2065
+ },{}],18:[function(require,module,exports){
2066
+ 'use strict';
2067
+
2068
+ /**
2069
+ * Copyright (c) 2013-present, Facebook, Inc.
2070
+ *
2071
+ * This source code is licensed under the MIT license found in the
2072
+ * LICENSE file in the root directory of this source tree.
2073
+ *
2074
+ * @typechecks
2075
+ */
2076
+
2077
+ var _uppercasePattern = /([A-Z])/g;
2078
+
2079
+ /**
2080
+ * Hyphenates a camelcased string, for example:
2081
+ *
2082
+ * > hyphenate('backgroundColor')
2083
+ * < "background-color"
2084
+ *
2085
+ * For CSS style names, use `hyphenateStyleName` instead which works properly
2086
+ * with all vendor prefixes, including `ms`.
2087
+ *
2088
+ * @param {string} string
2089
+ * @return {string}
2090
+ */
2091
+ function hyphenate(string) {
2092
+ return string.replace(_uppercasePattern, '-$1').toLowerCase();
2093
+ }
2094
+
2095
+ module.exports = hyphenate;
2096
+ },{}],19:[function(require,module,exports){
2097
+ /**
2098
+ * Copyright (c) 2013-present, Facebook, Inc.
2099
+ *
2100
+ * This source code is licensed under the MIT license found in the
2101
+ * LICENSE file in the root directory of this source tree.
2102
+ *
2103
+ * @typechecks
2104
+ */
2105
+
2106
+ 'use strict';
2107
+
2108
+ var hyphenate = require('./hyphenate');
2109
+
2110
+ var msPattern = /^ms-/;
2111
+
2112
+ /**
2113
+ * Hyphenates a camelcased CSS property name, for example:
2114
+ *
2115
+ * > hyphenateStyleName('backgroundColor')
2116
+ * < "background-color"
2117
+ * > hyphenateStyleName('MozTransition')
2118
+ * < "-moz-transition"
2119
+ * > hyphenateStyleName('msTransition')
2120
+ * < "-ms-transition"
2121
+ *
2122
+ * As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix
2123
+ * is converted to `-ms-`.
2124
+ *
2125
+ * @param {string} string
2126
+ * @return {string}
2127
+ */
2128
+ function hyphenateStyleName(string) {
2129
+ return hyphenate(string).replace(msPattern, '-ms-');
2130
+ }
2131
+
2132
+ module.exports = hyphenateStyleName;
2133
+ },{"./hyphenate":18}],20:[function(require,module,exports){
2134
+ (function (process){(function (){
2135
+ /**
2136
+ * Copyright (c) 2013-present, Facebook, Inc.
2137
+ *
2138
+ * This source code is licensed under the MIT license found in the
2139
+ * LICENSE file in the root directory of this source tree.
2140
+ *
2141
+ */
2142
+
2143
+ 'use strict';
2144
+
2145
+ /**
2146
+ * Use invariant() to assert state which your program assumes to be true.
2147
+ *
2148
+ * Provide sprintf-style format (only %s is supported) and arguments
2149
+ * to provide information about what broke and what you were
2150
+ * expecting.
2151
+ *
2152
+ * The invariant message will be stripped in production, but the invariant
2153
+ * will remain to ensure logic does not differ in production.
2154
+ */
2155
+
2156
+ var validateFormat = function validateFormat(format) {};
2157
+
2158
+ if (process.env.NODE_ENV !== 'production') {
2159
+ validateFormat = function validateFormat(format) {
2160
+ if (format === undefined) {
2161
+ throw new Error('invariant requires an error message argument');
2162
+ }
2163
+ };
2164
+ }
2165
+
2166
+ function invariant(condition, format, a, b, c, d, e, f) {
2167
+ validateFormat(format);
2168
+
2169
+ if (!condition) {
2170
+ var error;
2171
+ if (format === undefined) {
2172
+ error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');
2173
+ } else {
2174
+ var args = [a, b, c, d, e, f];
2175
+ var argIndex = 0;
2176
+ error = new Error(format.replace(/%s/g, function () {
2177
+ return args[argIndex++];
2178
+ }));
2179
+ error.name = 'Invariant Violation';
2180
+ }
2181
+
2182
+ error.framesToPop = 1; // we don't care about invariant's own frame
2183
+ throw error;
2184
+ }
2185
+ }
2186
+
2187
+ module.exports = invariant;
2188
+ }).call(this)}).call(this,require('_process'))
2189
+ },{"_process":29}],21:[function(require,module,exports){
2190
+ 'use strict';
2191
+
2192
+ /**
2193
+ * Copyright (c) 2013-present, Facebook, Inc.
2194
+ *
2195
+ * This source code is licensed under the MIT license found in the
2196
+ * LICENSE file in the root directory of this source tree.
2197
+ *
2198
+ * @typechecks
2199
+ */
2200
+
2201
+ /**
2202
+ * @param {*} object The object to check.
2203
+ * @return {boolean} Whether or not the object is a DOM node.
2204
+ */
2205
+ function isNode(object) {
2206
+ var doc = object ? object.ownerDocument || object : document;
2207
+ var defaultView = doc.defaultView || window;
2208
+ return !!(object && (typeof defaultView.Node === 'function' ? object instanceof defaultView.Node : typeof object === 'object' && typeof object.nodeType === 'number' && typeof object.nodeName === 'string'));
2209
+ }
2210
+
2211
+ module.exports = isNode;
2212
+ },{}],22:[function(require,module,exports){
2213
+ 'use strict';
2214
+
2215
+ /**
2216
+ * Copyright (c) 2013-present, Facebook, Inc.
2217
+ *
2218
+ * This source code is licensed under the MIT license found in the
2219
+ * LICENSE file in the root directory of this source tree.
2220
+ *
2221
+ * @typechecks
2222
+ */
2223
+
2224
+ var isNode = require('./isNode');
2225
+
2226
+ /**
2227
+ * @param {*} object The object to check.
2228
+ * @return {boolean} Whether or not the object is a DOM text node.
2229
+ */
2230
+ function isTextNode(object) {
2231
+ return isNode(object) && object.nodeType == 3;
2232
+ }
2233
+
2234
+ module.exports = isTextNode;
2235
+ },{"./isNode":21}],23:[function(require,module,exports){
2236
+ /**
2237
+ * Copyright (c) 2013-present, Facebook, Inc.
2238
+ *
2239
+ * This source code is licensed under the MIT license found in the
2240
+ * LICENSE file in the root directory of this source tree.
2241
+ *
2242
+ *
2243
+ * @typechecks static-only
2244
+ */
2245
+
2246
+ 'use strict';
2247
+
2248
+ /**
2249
+ * Memoizes the return value of a function that accepts one string argument.
2250
+ */
2251
+
2252
+ function memoizeStringOnly(callback) {
2253
+ var cache = {};
2254
+ return function (string) {
2255
+ if (!cache.hasOwnProperty(string)) {
2256
+ cache[string] = callback.call(this, string);
2257
+ }
2258
+ return cache[string];
2259
+ };
2260
+ }
2261
+
2262
+ module.exports = memoizeStringOnly;
2263
+ },{}],24:[function(require,module,exports){
2264
+ /**
2265
+ * Copyright (c) 2013-present, Facebook, Inc.
2266
+ *
2267
+ * This source code is licensed under the MIT license found in the
2268
+ * LICENSE file in the root directory of this source tree.
2269
+ *
2270
+ * @typechecks
2271
+ */
2272
+
2273
+ 'use strict';
2274
+
2275
+ var ExecutionEnvironment = require('./ExecutionEnvironment');
2276
+
2277
+ var performance;
2278
+
2279
+ if (ExecutionEnvironment.canUseDOM) {
2280
+ performance = window.performance || window.msPerformance || window.webkitPerformance;
2281
+ }
2282
+
2283
+ module.exports = performance || {};
2284
+ },{"./ExecutionEnvironment":6}],25:[function(require,module,exports){
2285
+ 'use strict';
2286
+
2287
+ /**
2288
+ * Copyright (c) 2013-present, Facebook, Inc.
2289
+ *
2290
+ * This source code is licensed under the MIT license found in the
2291
+ * LICENSE file in the root directory of this source tree.
2292
+ *
2293
+ * @typechecks
2294
+ */
2295
+
2296
+ var performance = require('./performance');
2297
+
2298
+ var performanceNow;
2299
+
2300
+ /**
2301
+ * Detect if we can use `window.performance.now()` and gracefully fallback to
2302
+ * `Date.now()` if it doesn't exist. We need to support Firefox < 15 for now
2303
+ * because of Facebook's testing infrastructure.
2304
+ */
2305
+ if (performance.now) {
2306
+ performanceNow = function performanceNow() {
2307
+ return performance.now();
2308
+ };
2309
+ } else {
2310
+ performanceNow = function performanceNow() {
2311
+ return Date.now();
2312
+ };
2313
+ }
2314
+
2315
+ module.exports = performanceNow;
2316
+ },{"./performance":24}],26:[function(require,module,exports){
2317
+ /**
2318
+ * Copyright (c) 2013-present, Facebook, Inc.
2319
+ *
2320
+ * This source code is licensed under the MIT license found in the
2321
+ * LICENSE file in the root directory of this source tree.
2322
+ *
2323
+ * @typechecks
2324
+ *
2325
+ */
2326
+
2327
+ /*eslint-disable no-self-compare */
2328
+
2329
+ 'use strict';
2330
+
2331
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
2332
+
2333
+ /**
2334
+ * inlined Object.is polyfill to avoid requiring consumers ship their own
2335
+ * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
2336
+ */
2337
+ function is(x, y) {
2338
+ // SameValue algorithm
2339
+ if (x === y) {
2340
+ // Steps 1-5, 7-10
2341
+ // Steps 6.b-6.e: +0 != -0
2342
+ // Added the nonzero y check to make Flow happy, but it is redundant
2343
+ return x !== 0 || y !== 0 || 1 / x === 1 / y;
2344
+ } else {
2345
+ // Step 6.a: NaN == NaN
2346
+ return x !== x && y !== y;
2347
+ }
2348
+ }
2349
+
2350
+ /**
2351
+ * Performs equality by iterating through keys on an object and returning false
2352
+ * when any key has values which are not strictly equal between the arguments.
2353
+ * Returns true when the values of all keys are strictly equal.
2354
+ */
2355
+ function shallowEqual(objA, objB) {
2356
+ if (is(objA, objB)) {
2357
+ return true;
2358
+ }
2359
+
2360
+ if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {
2361
+ return false;
2362
+ }
2363
+
2364
+ var keysA = Object.keys(objA);
2365
+ var keysB = Object.keys(objB);
2366
+
2367
+ if (keysA.length !== keysB.length) {
2368
+ return false;
2369
+ }
2370
+
2371
+ // Test for A's keys different from B.
2372
+ for (var i = 0; i < keysA.length; i++) {
2373
+ if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {
2374
+ return false;
2375
+ }
2376
+ }
2377
+
2378
+ return true;
2379
+ }
2380
+
2381
+ module.exports = shallowEqual;
2382
+ },{}],27:[function(require,module,exports){
2383
+ (function (process){(function (){
2384
+ /**
2385
+ * Copyright (c) 2014-present, Facebook, Inc.
2386
+ *
2387
+ * This source code is licensed under the MIT license found in the
2388
+ * LICENSE file in the root directory of this source tree.
2389
+ *
2390
+ */
2391
+
2392
+ 'use strict';
2393
+
2394
+ var emptyFunction = require('./emptyFunction');
2395
+
2396
+ /**
2397
+ * Similar to invariant but only logs a warning if the condition is not met.
2398
+ * This can be used to log issues in development environments in critical
2399
+ * paths. Removing the logging code for production environments will keep the
2400
+ * same logic and follow the same code paths.
2401
+ */
2402
+
2403
+ var warning = emptyFunction;
2404
+
2405
+ if (process.env.NODE_ENV !== 'production') {
2406
+ var printWarning = function printWarning(format) {
2407
+ for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
2408
+ args[_key - 1] = arguments[_key];
2409
+ }
2410
+
2411
+ var argIndex = 0;
2412
+ var message = 'Warning: ' + format.replace(/%s/g, function () {
2413
+ return args[argIndex++];
2414
+ });
2415
+ if (typeof console !== 'undefined') {
2416
+ console.error(message);
2417
+ }
2418
+ try {
2419
+ // --- Welcome to debugging React ---
2420
+ // This error was thrown as a convenience so that you can use this stack
2421
+ // to find the callsite that caused this warning to fire.
2422
+ throw new Error(message);
2423
+ } catch (x) {}
2424
+ };
2425
+
2426
+ warning = function warning(condition, format) {
2427
+ if (format === undefined) {
2428
+ throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');
2429
+ }
2430
+
2431
+ if (format.indexOf('Failed Composite propType: ') === 0) {
2432
+ return; // Ignore CompositeComponent proptype check.
2433
+ }
2434
+
2435
+ if (!condition) {
2436
+ for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
2437
+ args[_key2 - 2] = arguments[_key2];
2438
+ }
2439
+
2440
+ printWarning.apply(undefined, [format].concat(args));
2441
+ }
2442
+ };
2443
+ }
2444
+
2445
+ module.exports = warning;
2446
+ }).call(this)}).call(this,require('_process'))
2447
+ },{"./emptyFunction":12,"_process":29}],28:[function(require,module,exports){
2448
+ /*
2449
+ object-assign
2450
+ (c) Sindre Sorhus
2451
+ @license MIT
2452
+ */
2453
+
2454
+ 'use strict';
2455
+ /* eslint-disable no-unused-vars */
2456
+ var getOwnPropertySymbols = Object.getOwnPropertySymbols;
2457
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
2458
+ var propIsEnumerable = Object.prototype.propertyIsEnumerable;
2459
+
2460
+ function toObject(val) {
2461
+ if (val === null || val === undefined) {
2462
+ throw new TypeError('Object.assign cannot be called with null or undefined');
2463
+ }
2464
+
2465
+ return Object(val);
2466
+ }
2467
+
2468
+ function shouldUseNative() {
2469
+ try {
2470
+ if (!Object.assign) {
2471
+ return false;
2472
+ }
2473
+
2474
+ // Detect buggy property enumeration order in older V8 versions.
2475
+
2476
+ // https://bugs.chromium.org/p/v8/issues/detail?id=4118
2477
+ var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
2478
+ test1[5] = 'de';
2479
+ if (Object.getOwnPropertyNames(test1)[0] === '5') {
2480
+ return false;
2481
+ }
2482
+
2483
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3056
2484
+ var test2 = {};
2485
+ for (var i = 0; i < 10; i++) {
2486
+ test2['_' + String.fromCharCode(i)] = i;
2487
+ }
2488
+ var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
2489
+ return test2[n];
2490
+ });
2491
+ if (order2.join('') !== '0123456789') {
2492
+ return false;
2493
+ }
2494
+
2495
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3056
2496
+ var test3 = {};
2497
+ 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
2498
+ test3[letter] = letter;
2499
+ });
2500
+ if (Object.keys(Object.assign({}, test3)).join('') !==
2501
+ 'abcdefghijklmnopqrst') {
2502
+ return false;
2503
+ }
2504
+
2505
+ return true;
2506
+ } catch (err) {
2507
+ // We don't expect any of the above to throw, but better to be safe.
2508
+ return false;
2509
+ }
2510
+ }
2511
+
2512
+ module.exports = shouldUseNative() ? Object.assign : function (target, source) {
2513
+ var from;
2514
+ var to = toObject(target);
2515
+ var symbols;
2516
+
2517
+ for (var s = 1; s < arguments.length; s++) {
2518
+ from = Object(arguments[s]);
2519
+
2520
+ for (var key in from) {
2521
+ if (hasOwnProperty.call(from, key)) {
2522
+ to[key] = from[key];
2523
+ }
2524
+ }
2525
+
2526
+ if (getOwnPropertySymbols) {
2527
+ symbols = getOwnPropertySymbols(from);
2528
+ for (var i = 0; i < symbols.length; i++) {
2529
+ if (propIsEnumerable.call(from, symbols[i])) {
2530
+ to[symbols[i]] = from[symbols[i]];
2531
+ }
2532
+ }
2533
+ }
2534
+ }
2535
+
2536
+ return to;
2537
+ };
2538
+
2539
+ },{}],29:[function(require,module,exports){
2540
+ // shim for using process in browser
2541
+ var process = module.exports = {};
2542
+
2543
+ // cached from whatever global is present so that test runners that stub it
2544
+ // don't break things. But we need to wrap it in a try catch in case it is
2545
+ // wrapped in strict mode code which doesn't define any globals. It's inside a
2546
+ // function because try/catches deoptimize in certain engines.
2547
+
2548
+ var cachedSetTimeout;
2549
+ var cachedClearTimeout;
2550
+
2551
+ function defaultSetTimout() {
2552
+ throw new Error('setTimeout has not been defined');
2553
+ }
2554
+ function defaultClearTimeout () {
2555
+ throw new Error('clearTimeout has not been defined');
2556
+ }
2557
+ (function () {
2558
+ try {
2559
+ if (typeof setTimeout === 'function') {
2560
+ cachedSetTimeout = setTimeout;
2561
+ } else {
2562
+ cachedSetTimeout = defaultSetTimout;
2563
+ }
2564
+ } catch (e) {
2565
+ cachedSetTimeout = defaultSetTimout;
2566
+ }
2567
+ try {
2568
+ if (typeof clearTimeout === 'function') {
2569
+ cachedClearTimeout = clearTimeout;
2570
+ } else {
2571
+ cachedClearTimeout = defaultClearTimeout;
2572
+ }
2573
+ } catch (e) {
2574
+ cachedClearTimeout = defaultClearTimeout;
2575
+ }
2576
+ } ())
2577
+ function runTimeout(fun) {
2578
+ if (cachedSetTimeout === setTimeout) {
2579
+ //normal enviroments in sane situations
2580
+ return setTimeout(fun, 0);
2581
+ }
2582
+ // if setTimeout wasn't available but was latter defined
2583
+ if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
2584
+ cachedSetTimeout = setTimeout;
2585
+ return setTimeout(fun, 0);
2586
+ }
2587
+ try {
2588
+ // when when somebody has screwed with setTimeout but no I.E. maddness
2589
+ return cachedSetTimeout(fun, 0);
2590
+ } catch(e){
2591
+ try {
2592
+ // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
2593
+ return cachedSetTimeout.call(null, fun, 0);
2594
+ } catch(e){
2595
+ // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
2596
+ return cachedSetTimeout.call(this, fun, 0);
2597
+ }
2598
+ }
2599
+
2600
+
2601
+ }
2602
+ function runClearTimeout(marker) {
2603
+ if (cachedClearTimeout === clearTimeout) {
2604
+ //normal enviroments in sane situations
2605
+ return clearTimeout(marker);
2606
+ }
2607
+ // if clearTimeout wasn't available but was latter defined
2608
+ if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
2609
+ cachedClearTimeout = clearTimeout;
2610
+ return clearTimeout(marker);
2611
+ }
2612
+ try {
2613
+ // when when somebody has screwed with setTimeout but no I.E. maddness
2614
+ return cachedClearTimeout(marker);
2615
+ } catch (e){
2616
+ try {
2617
+ // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
2618
+ return cachedClearTimeout.call(null, marker);
2619
+ } catch (e){
2620
+ // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
2621
+ // Some versions of I.E. have different rules for clearTimeout vs setTimeout
2622
+ return cachedClearTimeout.call(this, marker);
2623
+ }
2624
+ }
2625
+
2626
+
2627
+
2628
+ }
2629
+ var queue = [];
2630
+ var draining = false;
2631
+ var currentQueue;
2632
+ var queueIndex = -1;
2633
+
2634
+ function cleanUpNextTick() {
2635
+ if (!draining || !currentQueue) {
2636
+ return;
2637
+ }
2638
+ draining = false;
2639
+ if (currentQueue.length) {
2640
+ queue = currentQueue.concat(queue);
2641
+ } else {
2642
+ queueIndex = -1;
2643
+ }
2644
+ if (queue.length) {
2645
+ drainQueue();
2646
+ }
2647
+ }
2648
+
2649
+ function drainQueue() {
2650
+ if (draining) {
2651
+ return;
2652
+ }
2653
+ var timeout = runTimeout(cleanUpNextTick);
2654
+ draining = true;
2655
+
2656
+ var len = queue.length;
2657
+ while(len) {
2658
+ currentQueue = queue;
2659
+ queue = [];
2660
+ while (++queueIndex < len) {
2661
+ if (currentQueue) {
2662
+ currentQueue[queueIndex].run();
2663
+ }
2664
+ }
2665
+ queueIndex = -1;
2666
+ len = queue.length;
2667
+ }
2668
+ currentQueue = null;
2669
+ draining = false;
2670
+ runClearTimeout(timeout);
2671
+ }
2672
+
2673
+ process.nextTick = function (fun) {
2674
+ var args = new Array(arguments.length - 1);
2675
+ if (arguments.length > 1) {
2676
+ for (var i = 1; i < arguments.length; i++) {
2677
+ args[i - 1] = arguments[i];
2678
+ }
2679
+ }
2680
+ queue.push(new Item(fun, args));
2681
+ if (queue.length === 1 && !draining) {
2682
+ runTimeout(drainQueue);
2683
+ }
2684
+ };
2685
+
2686
+ // v8 likes predictible objects
2687
+ function Item(fun, array) {
2688
+ this.fun = fun;
2689
+ this.array = array;
2690
+ }
2691
+ Item.prototype.run = function () {
2692
+ this.fun.apply(null, this.array);
2693
+ };
2694
+ process.title = 'browser';
2695
+ process.browser = true;
2696
+ process.env = {};
2697
+ process.argv = [];
2698
+ process.version = ''; // empty string to avoid regexp issues
2699
+ process.versions = {};
2700
+
2701
+ function noop() {}
2702
+
2703
+ process.on = noop;
2704
+ process.addListener = noop;
2705
+ process.once = noop;
2706
+ process.off = noop;
2707
+ process.removeListener = noop;
2708
+ process.removeAllListeners = noop;
2709
+ process.emit = noop;
2710
+ process.prependListener = noop;
2711
+ process.prependOnceListener = noop;
2712
+
2713
+ process.listeners = function (name) { return [] }
2714
+
2715
+ process.binding = function (name) {
2716
+ throw new Error('process.binding is not supported');
2717
+ };
2718
+
2719
+ process.cwd = function () { return '/' };
2720
+ process.chdir = function (dir) {
2721
+ throw new Error('process.chdir is not supported');
2722
+ };
2723
+ process.umask = function() { return 0; };
2724
+
2725
+ },{}],30:[function(require,module,exports){
2726
+ (function (process){(function (){
2727
+ /**
2728
+ * Copyright (c) 2013-present, Facebook, Inc.
2729
+ *
2730
+ * This source code is licensed under the MIT license found in the
2731
+ * LICENSE file in the root directory of this source tree.
2732
+ */
2733
+
2734
+ 'use strict';
2735
+
2736
+ var printWarning = function() {};
2737
+
2738
+ if (process.env.NODE_ENV !== 'production') {
2739
+ var ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');
2740
+ var loggedTypeFailures = {};
2741
+ var has = Function.call.bind(Object.prototype.hasOwnProperty);
2742
+
2743
+ printWarning = function(text) {
2744
+ var message = 'Warning: ' + text;
2745
+ if (typeof console !== 'undefined') {
2746
+ console.error(message);
2747
+ }
2748
+ try {
2749
+ // --- Welcome to debugging React ---
2750
+ // This error was thrown as a convenience so that you can use this stack
2751
+ // to find the callsite that caused this warning to fire.
2752
+ throw new Error(message);
2753
+ } catch (x) {}
2754
+ };
2755
+ }
2756
+
2757
+ /**
2758
+ * Assert that the values match with the type specs.
2759
+ * Error messages are memorized and will only be shown once.
2760
+ *
2761
+ * @param {object} typeSpecs Map of name to a ReactPropType
2762
+ * @param {object} values Runtime values that need to be type-checked
2763
+ * @param {string} location e.g. "prop", "context", "child context"
2764
+ * @param {string} componentName Name of the component for error messages.
2765
+ * @param {?Function} getStack Returns the component stack.
2766
+ * @private
2767
+ */
2768
+ function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
2769
+ if (process.env.NODE_ENV !== 'production') {
2770
+ for (var typeSpecName in typeSpecs) {
2771
+ if (has(typeSpecs, typeSpecName)) {
2772
+ var error;
2773
+ // Prop type validation may throw. In case they do, we don't want to
2774
+ // fail the render phase where it didn't fail before. So we log it.
2775
+ // After these have been cleaned up, we'll let them throw.
2776
+ try {
2777
+ // This is intentionally an invariant that gets caught. It's the same
2778
+ // behavior as without this statement except with a better message.
2779
+ if (typeof typeSpecs[typeSpecName] !== 'function') {
2780
+ var err = Error(
2781
+ (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +
2782
+ 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.'
2783
+ );
2784
+ err.name = 'Invariant Violation';
2785
+ throw err;
2786
+ }
2787
+ error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
2788
+ } catch (ex) {
2789
+ error = ex;
2790
+ }
2791
+ if (error && !(error instanceof Error)) {
2792
+ printWarning(
2793
+ (componentName || 'React class') + ': type specification of ' +
2794
+ location + ' `' + typeSpecName + '` is invalid; the type checker ' +
2795
+ 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +
2796
+ 'You may have forgotten to pass an argument to the type checker ' +
2797
+ 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +
2798
+ 'shape all require an argument).'
2799
+ );
2800
+ }
2801
+ if (error instanceof Error && !(error.message in loggedTypeFailures)) {
2802
+ // Only monitor this failure once because there tends to be a lot of the
2803
+ // same error.
2804
+ loggedTypeFailures[error.message] = true;
2805
+
2806
+ var stack = getStack ? getStack() : '';
2807
+
2808
+ printWarning(
2809
+ 'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')
2810
+ );
2811
+ }
2812
+ }
2813
+ }
2814
+ }
2815
+ }
2816
+
2817
+ /**
2818
+ * Resets warning cache when testing.
2819
+ *
2820
+ * @private
2821
+ */
2822
+ checkPropTypes.resetWarningCache = function() {
2823
+ if (process.env.NODE_ENV !== 'production') {
2824
+ loggedTypeFailures = {};
2825
+ }
2826
+ }
2827
+
2828
+ module.exports = checkPropTypes;
2829
+
2830
+ }).call(this)}).call(this,require('_process'))
2831
+ },{"./lib/ReactPropTypesSecret":33,"_process":29}],31:[function(require,module,exports){
2832
+ /**
2833
+ * Copyright (c) 2013-present, Facebook, Inc.
2834
+ *
2835
+ * This source code is licensed under the MIT license found in the
2836
+ * LICENSE file in the root directory of this source tree.
2837
+ */
2838
+
2839
+ 'use strict';
2840
+
2841
+ // React 15.5 references this module, and assumes PropTypes are still callable in production.
2842
+ // Therefore we re-export development-only version with all the PropTypes checks here.
2843
+ // However if one is migrating to the `prop-types` npm library, they will go through the
2844
+ // `index.js` entry point, and it will branch depending on the environment.
2845
+ var factory = require('./factoryWithTypeCheckers');
2846
+ module.exports = function(isValidElement) {
2847
+ // It is still allowed in 15.5.
2848
+ var throwOnDirectAccess = false;
2849
+ return factory(isValidElement, throwOnDirectAccess);
2850
+ };
2851
+
2852
+ },{"./factoryWithTypeCheckers":32}],32:[function(require,module,exports){
2853
+ (function (process){(function (){
2854
+ /**
2855
+ * Copyright (c) 2013-present, Facebook, Inc.
2856
+ *
2857
+ * This source code is licensed under the MIT license found in the
2858
+ * LICENSE file in the root directory of this source tree.
2859
+ */
2860
+
2861
+ 'use strict';
2862
+
2863
+ var ReactIs = require('react-is');
2864
+ var assign = require('object-assign');
2865
+
2866
+ var ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');
2867
+ var checkPropTypes = require('./checkPropTypes');
2868
+
2869
+ var has = Function.call.bind(Object.prototype.hasOwnProperty);
2870
+ var printWarning = function() {};
2871
+
2872
+ if (process.env.NODE_ENV !== 'production') {
2873
+ printWarning = function(text) {
2874
+ var message = 'Warning: ' + text;
2875
+ if (typeof console !== 'undefined') {
2876
+ console.error(message);
2877
+ }
2878
+ try {
2879
+ // --- Welcome to debugging React ---
2880
+ // This error was thrown as a convenience so that you can use this stack
2881
+ // to find the callsite that caused this warning to fire.
2882
+ throw new Error(message);
2883
+ } catch (x) {}
2884
+ };
2885
+ }
2886
+
2887
+ function emptyFunctionThatReturnsNull() {
2888
+ return null;
2889
+ }
2890
+
2891
+ module.exports = function(isValidElement, throwOnDirectAccess) {
2892
+ /* global Symbol */
2893
+ var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
2894
+ var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
2895
+
2896
+ /**
2897
+ * Returns the iterator method function contained on the iterable object.
2898
+ *
2899
+ * Be sure to invoke the function with the iterable as context:
2900
+ *
2901
+ * var iteratorFn = getIteratorFn(myIterable);
2902
+ * if (iteratorFn) {
2903
+ * var iterator = iteratorFn.call(myIterable);
2904
+ * ...
2905
+ * }
2906
+ *
2907
+ * @param {?object} maybeIterable
2908
+ * @return {?function}
2909
+ */
2910
+ function getIteratorFn(maybeIterable) {
2911
+ var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
2912
+ if (typeof iteratorFn === 'function') {
2913
+ return iteratorFn;
2914
+ }
2915
+ }
2916
+
2917
+ /**
2918
+ * Collection of methods that allow declaration and validation of props that are
2919
+ * supplied to React components. Example usage:
2920
+ *
2921
+ * var Props = require('ReactPropTypes');
2922
+ * var MyArticle = React.createClass({
2923
+ * propTypes: {
2924
+ * // An optional string prop named "description".
2925
+ * description: Props.string,
2926
+ *
2927
+ * // A required enum prop named "category".
2928
+ * category: Props.oneOf(['News','Photos']).isRequired,
2929
+ *
2930
+ * // A prop named "dialog" that requires an instance of Dialog.
2931
+ * dialog: Props.instanceOf(Dialog).isRequired
2932
+ * },
2933
+ * render: function() { ... }
2934
+ * });
2935
+ *
2936
+ * A more formal specification of how these methods are used:
2937
+ *
2938
+ * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
2939
+ * decl := ReactPropTypes.{type}(.isRequired)?
2940
+ *
2941
+ * Each and every declaration produces a function with the same signature. This
2942
+ * allows the creation of custom validation functions. For example:
2943
+ *
2944
+ * var MyLink = React.createClass({
2945
+ * propTypes: {
2946
+ * // An optional string or URI prop named "href".
2947
+ * href: function(props, propName, componentName) {
2948
+ * var propValue = props[propName];
2949
+ * if (propValue != null && typeof propValue !== 'string' &&
2950
+ * !(propValue instanceof URI)) {
2951
+ * return new Error(
2952
+ * 'Expected a string or an URI for ' + propName + ' in ' +
2953
+ * componentName
2954
+ * );
2955
+ * }
2956
+ * }
2957
+ * },
2958
+ * render: function() {...}
2959
+ * });
2960
+ *
2961
+ * @internal
2962
+ */
2963
+
2964
+ var ANONYMOUS = '<<anonymous>>';
2965
+
2966
+ // Important!
2967
+ // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
2968
+ var ReactPropTypes = {
2969
+ array: createPrimitiveTypeChecker('array'),
2970
+ bool: createPrimitiveTypeChecker('boolean'),
2971
+ func: createPrimitiveTypeChecker('function'),
2972
+ number: createPrimitiveTypeChecker('number'),
2973
+ object: createPrimitiveTypeChecker('object'),
2974
+ string: createPrimitiveTypeChecker('string'),
2975
+ symbol: createPrimitiveTypeChecker('symbol'),
2976
+
2977
+ any: createAnyTypeChecker(),
2978
+ arrayOf: createArrayOfTypeChecker,
2979
+ element: createElementTypeChecker(),
2980
+ elementType: createElementTypeTypeChecker(),
2981
+ instanceOf: createInstanceTypeChecker,
2982
+ node: createNodeChecker(),
2983
+ objectOf: createObjectOfTypeChecker,
2984
+ oneOf: createEnumTypeChecker,
2985
+ oneOfType: createUnionTypeChecker,
2986
+ shape: createShapeTypeChecker,
2987
+ exact: createStrictShapeTypeChecker,
2988
+ };
2989
+
2990
+ /**
2991
+ * inlined Object.is polyfill to avoid requiring consumers ship their own
2992
+ * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
2993
+ */
2994
+ /*eslint-disable no-self-compare*/
2995
+ function is(x, y) {
2996
+ // SameValue algorithm
2997
+ if (x === y) {
2998
+ // Steps 1-5, 7-10
2999
+ // Steps 6.b-6.e: +0 != -0
3000
+ return x !== 0 || 1 / x === 1 / y;
3001
+ } else {
3002
+ // Step 6.a: NaN == NaN
3003
+ return x !== x && y !== y;
3004
+ }
3005
+ }
3006
+ /*eslint-enable no-self-compare*/
3007
+
3008
+ /**
3009
+ * We use an Error-like object for backward compatibility as people may call
3010
+ * PropTypes directly and inspect their output. However, we don't use real
3011
+ * Errors anymore. We don't inspect their stack anyway, and creating them
3012
+ * is prohibitively expensive if they are created too often, such as what
3013
+ * happens in oneOfType() for any type before the one that matched.
3014
+ */
3015
+ function PropTypeError(message) {
3016
+ this.message = message;
3017
+ this.stack = '';
3018
+ }
3019
+ // Make `instanceof Error` still work for returned errors.
3020
+ PropTypeError.prototype = Error.prototype;
3021
+
3022
+ function createChainableTypeChecker(validate) {
3023
+ if (process.env.NODE_ENV !== 'production') {
3024
+ var manualPropTypeCallCache = {};
3025
+ var manualPropTypeWarningCount = 0;
3026
+ }
3027
+ function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
3028
+ componentName = componentName || ANONYMOUS;
3029
+ propFullName = propFullName || propName;
3030
+
3031
+ if (secret !== ReactPropTypesSecret) {
3032
+ if (throwOnDirectAccess) {
3033
+ // New behavior only for users of `prop-types` package
3034
+ var err = new Error(
3035
+ 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
3036
+ 'Use `PropTypes.checkPropTypes()` to call them. ' +
3037
+ 'Read more at http://fb.me/use-check-prop-types'
3038
+ );
3039
+ err.name = 'Invariant Violation';
3040
+ throw err;
3041
+ } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {
3042
+ // Old behavior for people using React.PropTypes
3043
+ var cacheKey = componentName + ':' + propName;
3044
+ if (
3045
+ !manualPropTypeCallCache[cacheKey] &&
3046
+ // Avoid spamming the console because they are often not actionable except for lib authors
3047
+ manualPropTypeWarningCount < 3
3048
+ ) {
3049
+ printWarning(
3050
+ 'You are manually calling a React.PropTypes validation ' +
3051
+ 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +
3052
+ 'and will throw in the standalone `prop-types` package. ' +
3053
+ 'You may be seeing this warning due to a third-party PropTypes ' +
3054
+ 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'
3055
+ );
3056
+ manualPropTypeCallCache[cacheKey] = true;
3057
+ manualPropTypeWarningCount++;
3058
+ }
3059
+ }
3060
+ }
3061
+ if (props[propName] == null) {
3062
+ if (isRequired) {
3063
+ if (props[propName] === null) {
3064
+ return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
3065
+ }
3066
+ return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
3067
+ }
3068
+ return null;
3069
+ } else {
3070
+ return validate(props, propName, componentName, location, propFullName);
3071
+ }
3072
+ }
3073
+
3074
+ var chainedCheckType = checkType.bind(null, false);
3075
+ chainedCheckType.isRequired = checkType.bind(null, true);
3076
+
3077
+ return chainedCheckType;
3078
+ }
3079
+
3080
+ function createPrimitiveTypeChecker(expectedType) {
3081
+ function validate(props, propName, componentName, location, propFullName, secret) {
3082
+ var propValue = props[propName];
3083
+ var propType = getPropType(propValue);
3084
+ if (propType !== expectedType) {
3085
+ // `propValue` being instance of, say, date/regexp, pass the 'object'
3086
+ // check, but we can offer a more precise error message here rather than
3087
+ // 'of type `object`'.
3088
+ var preciseType = getPreciseType(propValue);
3089
+
3090
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));
3091
+ }
3092
+ return null;
3093
+ }
3094
+ return createChainableTypeChecker(validate);
3095
+ }
3096
+
3097
+ function createAnyTypeChecker() {
3098
+ return createChainableTypeChecker(emptyFunctionThatReturnsNull);
3099
+ }
3100
+
3101
+ function createArrayOfTypeChecker(typeChecker) {
3102
+ function validate(props, propName, componentName, location, propFullName) {
3103
+ if (typeof typeChecker !== 'function') {
3104
+ return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
3105
+ }
3106
+ var propValue = props[propName];
3107
+ if (!Array.isArray(propValue)) {
3108
+ var propType = getPropType(propValue);
3109
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
3110
+ }
3111
+ for (var i = 0; i < propValue.length; i++) {
3112
+ var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);
3113
+ if (error instanceof Error) {
3114
+ return error;
3115
+ }
3116
+ }
3117
+ return null;
3118
+ }
3119
+ return createChainableTypeChecker(validate);
3120
+ }
3121
+
3122
+ function createElementTypeChecker() {
3123
+ function validate(props, propName, componentName, location, propFullName) {
3124
+ var propValue = props[propName];
3125
+ if (!isValidElement(propValue)) {
3126
+ var propType = getPropType(propValue);
3127
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
3128
+ }
3129
+ return null;
3130
+ }
3131
+ return createChainableTypeChecker(validate);
3132
+ }
3133
+
3134
+ function createElementTypeTypeChecker() {
3135
+ function validate(props, propName, componentName, location, propFullName) {
3136
+ var propValue = props[propName];
3137
+ if (!ReactIs.isValidElementType(propValue)) {
3138
+ var propType = getPropType(propValue);
3139
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));
3140
+ }
3141
+ return null;
3142
+ }
3143
+ return createChainableTypeChecker(validate);
3144
+ }
3145
+
3146
+ function createInstanceTypeChecker(expectedClass) {
3147
+ function validate(props, propName, componentName, location, propFullName) {
3148
+ if (!(props[propName] instanceof expectedClass)) {
3149
+ var expectedClassName = expectedClass.name || ANONYMOUS;
3150
+ var actualClassName = getClassName(props[propName]);
3151
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
3152
+ }
3153
+ return null;
3154
+ }
3155
+ return createChainableTypeChecker(validate);
3156
+ }
3157
+
3158
+ function createEnumTypeChecker(expectedValues) {
3159
+ if (!Array.isArray(expectedValues)) {
3160
+ if (process.env.NODE_ENV !== 'production') {
3161
+ if (arguments.length > 1) {
3162
+ printWarning(
3163
+ 'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +
3164
+ 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'
3165
+ );
3166
+ } else {
3167
+ printWarning('Invalid argument supplied to oneOf, expected an array.');
3168
+ }
3169
+ }
3170
+ return emptyFunctionThatReturnsNull;
3171
+ }
3172
+
3173
+ function validate(props, propName, componentName, location, propFullName) {
3174
+ var propValue = props[propName];
3175
+ for (var i = 0; i < expectedValues.length; i++) {
3176
+ if (is(propValue, expectedValues[i])) {
3177
+ return null;
3178
+ }
3179
+ }
3180
+
3181
+ var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
3182
+ var type = getPreciseType(value);
3183
+ if (type === 'symbol') {
3184
+ return String(value);
3185
+ }
3186
+ return value;
3187
+ });
3188
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
3189
+ }
3190
+ return createChainableTypeChecker(validate);
3191
+ }
3192
+
3193
+ function createObjectOfTypeChecker(typeChecker) {
3194
+ function validate(props, propName, componentName, location, propFullName) {
3195
+ if (typeof typeChecker !== 'function') {
3196
+ return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
3197
+ }
3198
+ var propValue = props[propName];
3199
+ var propType = getPropType(propValue);
3200
+ if (propType !== 'object') {
3201
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
3202
+ }
3203
+ for (var key in propValue) {
3204
+ if (has(propValue, key)) {
3205
+ var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
3206
+ if (error instanceof Error) {
3207
+ return error;
3208
+ }
3209
+ }
3210
+ }
3211
+ return null;
3212
+ }
3213
+ return createChainableTypeChecker(validate);
3214
+ }
3215
+
3216
+ function createUnionTypeChecker(arrayOfTypeCheckers) {
3217
+ if (!Array.isArray(arrayOfTypeCheckers)) {
3218
+ process.env.NODE_ENV !== 'production' ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;
3219
+ return emptyFunctionThatReturnsNull;
3220
+ }
3221
+
3222
+ for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
3223
+ var checker = arrayOfTypeCheckers[i];
3224
+ if (typeof checker !== 'function') {
3225
+ printWarning(
3226
+ 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +
3227
+ 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'
3228
+ );
3229
+ return emptyFunctionThatReturnsNull;
3230
+ }
3231
+ }
3232
+
3233
+ function validate(props, propName, componentName, location, propFullName) {
3234
+ for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
3235
+ var checker = arrayOfTypeCheckers[i];
3236
+ if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) {
3237
+ return null;
3238
+ }
3239
+ }
3240
+
3241
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));
3242
+ }
3243
+ return createChainableTypeChecker(validate);
3244
+ }
3245
+
3246
+ function createNodeChecker() {
3247
+ function validate(props, propName, componentName, location, propFullName) {
3248
+ if (!isNode(props[propName])) {
3249
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
3250
+ }
3251
+ return null;
3252
+ }
3253
+ return createChainableTypeChecker(validate);
3254
+ }
3255
+
3256
+ function createShapeTypeChecker(shapeTypes) {
3257
+ function validate(props, propName, componentName, location, propFullName) {
3258
+ var propValue = props[propName];
3259
+ var propType = getPropType(propValue);
3260
+ if (propType !== 'object') {
3261
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
3262
+ }
3263
+ for (var key in shapeTypes) {
3264
+ var checker = shapeTypes[key];
3265
+ if (!checker) {
3266
+ continue;
3267
+ }
3268
+ var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
3269
+ if (error) {
3270
+ return error;
3271
+ }
3272
+ }
3273
+ return null;
3274
+ }
3275
+ return createChainableTypeChecker(validate);
3276
+ }
3277
+
3278
+ function createStrictShapeTypeChecker(shapeTypes) {
3279
+ function validate(props, propName, componentName, location, propFullName) {
3280
+ var propValue = props[propName];
3281
+ var propType = getPropType(propValue);
3282
+ if (propType !== 'object') {
3283
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
3284
+ }
3285
+ // We need to check all keys in case some are required but missing from
3286
+ // props.
3287
+ var allKeys = assign({}, props[propName], shapeTypes);
3288
+ for (var key in allKeys) {
3289
+ var checker = shapeTypes[key];
3290
+ if (!checker) {
3291
+ return new PropTypeError(
3292
+ 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +
3293
+ '\nBad object: ' + JSON.stringify(props[propName], null, ' ') +
3294
+ '\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')
3295
+ );
3296
+ }
3297
+ var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
3298
+ if (error) {
3299
+ return error;
3300
+ }
3301
+ }
3302
+ return null;
3303
+ }
3304
+
3305
+ return createChainableTypeChecker(validate);
3306
+ }
3307
+
3308
+ function isNode(propValue) {
3309
+ switch (typeof propValue) {
3310
+ case 'number':
3311
+ case 'string':
3312
+ case 'undefined':
3313
+ return true;
3314
+ case 'boolean':
3315
+ return !propValue;
3316
+ case 'object':
3317
+ if (Array.isArray(propValue)) {
3318
+ return propValue.every(isNode);
3319
+ }
3320
+ if (propValue === null || isValidElement(propValue)) {
3321
+ return true;
3322
+ }
3323
+
3324
+ var iteratorFn = getIteratorFn(propValue);
3325
+ if (iteratorFn) {
3326
+ var iterator = iteratorFn.call(propValue);
3327
+ var step;
3328
+ if (iteratorFn !== propValue.entries) {
3329
+ while (!(step = iterator.next()).done) {
3330
+ if (!isNode(step.value)) {
3331
+ return false;
3332
+ }
3333
+ }
3334
+ } else {
3335
+ // Iterator will provide entry [k,v] tuples rather than values.
3336
+ while (!(step = iterator.next()).done) {
3337
+ var entry = step.value;
3338
+ if (entry) {
3339
+ if (!isNode(entry[1])) {
3340
+ return false;
3341
+ }
3342
+ }
3343
+ }
3344
+ }
3345
+ } else {
3346
+ return false;
3347
+ }
3348
+
3349
+ return true;
3350
+ default:
3351
+ return false;
3352
+ }
3353
+ }
3354
+
3355
+ function isSymbol(propType, propValue) {
3356
+ // Native Symbol.
3357
+ if (propType === 'symbol') {
3358
+ return true;
3359
+ }
3360
+
3361
+ // falsy value can't be a Symbol
3362
+ if (!propValue) {
3363
+ return false;
3364
+ }
3365
+
3366
+ // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
3367
+ if (propValue['@@toStringTag'] === 'Symbol') {
3368
+ return true;
3369
+ }
3370
+
3371
+ // Fallback for non-spec compliant Symbols which are polyfilled.
3372
+ if (typeof Symbol === 'function' && propValue instanceof Symbol) {
3373
+ return true;
3374
+ }
3375
+
3376
+ return false;
3377
+ }
3378
+
3379
+ // Equivalent of `typeof` but with special handling for array and regexp.
3380
+ function getPropType(propValue) {
3381
+ var propType = typeof propValue;
3382
+ if (Array.isArray(propValue)) {
3383
+ return 'array';
3384
+ }
3385
+ if (propValue instanceof RegExp) {
3386
+ // Old webkits (at least until Android 4.0) return 'function' rather than
3387
+ // 'object' for typeof a RegExp. We'll normalize this here so that /bla/
3388
+ // passes PropTypes.object.
3389
+ return 'object';
3390
+ }
3391
+ if (isSymbol(propType, propValue)) {
3392
+ return 'symbol';
3393
+ }
3394
+ return propType;
3395
+ }
3396
+
3397
+ // This handles more types than `getPropType`. Only used for error messages.
3398
+ // See `createPrimitiveTypeChecker`.
3399
+ function getPreciseType(propValue) {
3400
+ if (typeof propValue === 'undefined' || propValue === null) {
3401
+ return '' + propValue;
3402
+ }
3403
+ var propType = getPropType(propValue);
3404
+ if (propType === 'object') {
3405
+ if (propValue instanceof Date) {
3406
+ return 'date';
3407
+ } else if (propValue instanceof RegExp) {
3408
+ return 'regexp';
3409
+ }
3410
+ }
3411
+ return propType;
3412
+ }
3413
+
3414
+ // Returns a string that is postfixed to a warning about an invalid type.
3415
+ // For example, "undefined" or "of type array"
3416
+ function getPostfixForTypeWarning(value) {
3417
+ var type = getPreciseType(value);
3418
+ switch (type) {
3419
+ case 'array':
3420
+ case 'object':
3421
+ return 'an ' + type;
3422
+ case 'boolean':
3423
+ case 'date':
3424
+ case 'regexp':
3425
+ return 'a ' + type;
3426
+ default:
3427
+ return type;
3428
+ }
3429
+ }
3430
+
3431
+ // Returns class name of the object, if any.
3432
+ function getClassName(propValue) {
3433
+ if (!propValue.constructor || !propValue.constructor.name) {
3434
+ return ANONYMOUS;
3435
+ }
3436
+ return propValue.constructor.name;
3437
+ }
3438
+
3439
+ ReactPropTypes.checkPropTypes = checkPropTypes;
3440
+ ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;
3441
+ ReactPropTypes.PropTypes = ReactPropTypes;
3442
+
3443
+ return ReactPropTypes;
3444
+ };
3445
+
3446
+ }).call(this)}).call(this,require('_process'))
3447
+ },{"./checkPropTypes":30,"./lib/ReactPropTypesSecret":33,"_process":29,"object-assign":28,"react-is":163}],33:[function(require,module,exports){
3448
+ /**
3449
+ * Copyright (c) 2013-present, Facebook, Inc.
3450
+ *
3451
+ * This source code is licensed under the MIT license found in the
3452
+ * LICENSE file in the root directory of this source tree.
3453
+ */
3454
+
3455
+ 'use strict';
3456
+
3457
+ var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
3458
+
3459
+ module.exports = ReactPropTypesSecret;
3460
+
3461
+ },{}],34:[function(require,module,exports){
3462
+ 'use strict';
3463
+
3464
+ module.exports = require('./lib/ReactDOM');
3465
+
3466
+ },{"./lib/ReactDOM":64}],35:[function(require,module,exports){
3467
+ /**
3468
+ * Copyright (c) 2013-present, Facebook, Inc.
3469
+ *
3470
+ * This source code is licensed under the MIT license found in the
3471
+ * LICENSE file in the root directory of this source tree.
3472
+ *
3473
+ */
3474
+
3475
+ 'use strict';
3476
+
3477
+ var ARIADOMPropertyConfig = {
3478
+ Properties: {
3479
+ // Global States and Properties
3480
+ 'aria-current': 0, // state
3481
+ 'aria-details': 0,
3482
+ 'aria-disabled': 0, // state
3483
+ 'aria-hidden': 0, // state
3484
+ 'aria-invalid': 0, // state
3485
+ 'aria-keyshortcuts': 0,
3486
+ 'aria-label': 0,
3487
+ 'aria-roledescription': 0,
3488
+ // Widget Attributes
3489
+ 'aria-autocomplete': 0,
3490
+ 'aria-checked': 0,
3491
+ 'aria-expanded': 0,
3492
+ 'aria-haspopup': 0,
3493
+ 'aria-level': 0,
3494
+ 'aria-modal': 0,
3495
+ 'aria-multiline': 0,
3496
+ 'aria-multiselectable': 0,
3497
+ 'aria-orientation': 0,
3498
+ 'aria-placeholder': 0,
3499
+ 'aria-pressed': 0,
3500
+ 'aria-readonly': 0,
3501
+ 'aria-required': 0,
3502
+ 'aria-selected': 0,
3503
+ 'aria-sort': 0,
3504
+ 'aria-valuemax': 0,
3505
+ 'aria-valuemin': 0,
3506
+ 'aria-valuenow': 0,
3507
+ 'aria-valuetext': 0,
3508
+ // Live Region Attributes
3509
+ 'aria-atomic': 0,
3510
+ 'aria-busy': 0,
3511
+ 'aria-live': 0,
3512
+ 'aria-relevant': 0,
3513
+ // Drag-and-Drop Attributes
3514
+ 'aria-dropeffect': 0,
3515
+ 'aria-grabbed': 0,
3516
+ // Relationship Attributes
3517
+ 'aria-activedescendant': 0,
3518
+ 'aria-colcount': 0,
3519
+ 'aria-colindex': 0,
3520
+ 'aria-colspan': 0,
3521
+ 'aria-controls': 0,
3522
+ 'aria-describedby': 0,
3523
+ 'aria-errormessage': 0,
3524
+ 'aria-flowto': 0,
3525
+ 'aria-labelledby': 0,
3526
+ 'aria-owns': 0,
3527
+ 'aria-posinset': 0,
3528
+ 'aria-rowcount': 0,
3529
+ 'aria-rowindex': 0,
3530
+ 'aria-rowspan': 0,
3531
+ 'aria-setsize': 0
3532
+ },
3533
+ DOMAttributeNames: {},
3534
+ DOMPropertyNames: {}
3535
+ };
3536
+
3537
+ module.exports = ARIADOMPropertyConfig;
3538
+ },{}],36:[function(require,module,exports){
3539
+ /**
3540
+ * Copyright (c) 2013-present, Facebook, Inc.
3541
+ *
3542
+ * This source code is licensed under the MIT license found in the
3543
+ * LICENSE file in the root directory of this source tree.
3544
+ *
3545
+ */
3546
+
3547
+ 'use strict';
3548
+
3549
+ var ReactDOMComponentTree = require('./ReactDOMComponentTree');
3550
+
3551
+ var focusNode = require('fbjs/lib/focusNode');
3552
+
3553
+ var AutoFocusUtils = {
3554
+ focusDOMComponent: function () {
3555
+ focusNode(ReactDOMComponentTree.getNodeFromInstance(this));
3556
+ }
3557
+ };
3558
+
3559
+ module.exports = AutoFocusUtils;
3560
+ },{"./ReactDOMComponentTree":67,"fbjs/lib/focusNode":14}],37:[function(require,module,exports){
3561
+ /**
3562
+ * Copyright (c) 2013-present, Facebook, Inc.
3563
+ *
3564
+ * This source code is licensed under the MIT license found in the
3565
+ * LICENSE file in the root directory of this source tree.
3566
+ *
3567
+ */
3568
+
3569
+ 'use strict';
3570
+
3571
+ var EventPropagators = require('./EventPropagators');
3572
+ var ExecutionEnvironment = require('fbjs/lib/ExecutionEnvironment');
3573
+ var FallbackCompositionState = require('./FallbackCompositionState');
3574
+ var SyntheticCompositionEvent = require('./SyntheticCompositionEvent');
3575
+ var SyntheticInputEvent = require('./SyntheticInputEvent');
3576
+
3577
+ var END_KEYCODES = [9, 13, 27, 32]; // Tab, Return, Esc, Space
3578
+ var START_KEYCODE = 229;
3579
+
3580
+ var canUseCompositionEvent = ExecutionEnvironment.canUseDOM && 'CompositionEvent' in window;
3581
+
3582
+ var documentMode = null;
3583
+ if (ExecutionEnvironment.canUseDOM && 'documentMode' in document) {
3584
+ documentMode = document.documentMode;
3585
+ }
3586
+
3587
+ // Webkit offers a very useful `textInput` event that can be used to
3588
+ // directly represent `beforeInput`. The IE `textinput` event is not as
3589
+ // useful, so we don't use it.
3590
+ var canUseTextInputEvent = ExecutionEnvironment.canUseDOM && 'TextEvent' in window && !documentMode && !isPresto();
3591
+
3592
+ // In IE9+, we have access to composition events, but the data supplied
3593
+ // by the native compositionend event may be incorrect. Japanese ideographic
3594
+ // spaces, for instance (\u3000) are not recorded correctly.
3595
+ var useFallbackCompositionData = ExecutionEnvironment.canUseDOM && (!canUseCompositionEvent || documentMode && documentMode > 8 && documentMode <= 11);
3596
+
3597
+ /**
3598
+ * Opera <= 12 includes TextEvent in window, but does not fire
3599
+ * text input events. Rely on keypress instead.
3600
+ */
3601
+ function isPresto() {
3602
+ var opera = window.opera;
3603
+ return typeof opera === 'object' && typeof opera.version === 'function' && parseInt(opera.version(), 10) <= 12;
3604
+ }
3605
+
3606
+ var SPACEBAR_CODE = 32;
3607
+ var SPACEBAR_CHAR = String.fromCharCode(SPACEBAR_CODE);
3608
+
3609
+ // Events and their corresponding property names.
3610
+ var eventTypes = {
3611
+ beforeInput: {
3612
+ phasedRegistrationNames: {
3613
+ bubbled: 'onBeforeInput',
3614
+ captured: 'onBeforeInputCapture'
3615
+ },
3616
+ dependencies: ['topCompositionEnd', 'topKeyPress', 'topTextInput', 'topPaste']
3617
+ },
3618
+ compositionEnd: {
3619
+ phasedRegistrationNames: {
3620
+ bubbled: 'onCompositionEnd',
3621
+ captured: 'onCompositionEndCapture'
3622
+ },
3623
+ dependencies: ['topBlur', 'topCompositionEnd', 'topKeyDown', 'topKeyPress', 'topKeyUp', 'topMouseDown']
3624
+ },
3625
+ compositionStart: {
3626
+ phasedRegistrationNames: {
3627
+ bubbled: 'onCompositionStart',
3628
+ captured: 'onCompositionStartCapture'
3629
+ },
3630
+ dependencies: ['topBlur', 'topCompositionStart', 'topKeyDown', 'topKeyPress', 'topKeyUp', 'topMouseDown']
3631
+ },
3632
+ compositionUpdate: {
3633
+ phasedRegistrationNames: {
3634
+ bubbled: 'onCompositionUpdate',
3635
+ captured: 'onCompositionUpdateCapture'
3636
+ },
3637
+ dependencies: ['topBlur', 'topCompositionUpdate', 'topKeyDown', 'topKeyPress', 'topKeyUp', 'topMouseDown']
3638
+ }
3639
+ };
3640
+
3641
+ // Track whether we've ever handled a keypress on the space key.
3642
+ var hasSpaceKeypress = false;
3643
+
3644
+ /**
3645
+ * Return whether a native keypress event is assumed to be a command.
3646
+ * This is required because Firefox fires `keypress` events for key commands
3647
+ * (cut, copy, select-all, etc.) even though no character is inserted.
3648
+ */
3649
+ function isKeypressCommand(nativeEvent) {
3650
+ return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&
3651
+ // ctrlKey && altKey is equivalent to AltGr, and is not a command.
3652
+ !(nativeEvent.ctrlKey && nativeEvent.altKey);
3653
+ }
3654
+
3655
+ /**
3656
+ * Translate native top level events into event types.
3657
+ *
3658
+ * @param {string} topLevelType
3659
+ * @return {object}
3660
+ */
3661
+ function getCompositionEventType(topLevelType) {
3662
+ switch (topLevelType) {
3663
+ case 'topCompositionStart':
3664
+ return eventTypes.compositionStart;
3665
+ case 'topCompositionEnd':
3666
+ return eventTypes.compositionEnd;
3667
+ case 'topCompositionUpdate':
3668
+ return eventTypes.compositionUpdate;
3669
+ }
3670
+ }
3671
+
3672
+ /**
3673
+ * Does our fallback best-guess model think this event signifies that
3674
+ * composition has begun?
3675
+ *
3676
+ * @param {string} topLevelType
3677
+ * @param {object} nativeEvent
3678
+ * @return {boolean}
3679
+ */
3680
+ function isFallbackCompositionStart(topLevelType, nativeEvent) {
3681
+ return topLevelType === 'topKeyDown' && nativeEvent.keyCode === START_KEYCODE;
3682
+ }
3683
+
3684
+ /**
3685
+ * Does our fallback mode think that this event is the end of composition?
3686
+ *
3687
+ * @param {string} topLevelType
3688
+ * @param {object} nativeEvent
3689
+ * @return {boolean}
3690
+ */
3691
+ function isFallbackCompositionEnd(topLevelType, nativeEvent) {
3692
+ switch (topLevelType) {
3693
+ case 'topKeyUp':
3694
+ // Command keys insert or clear IME input.
3695
+ return END_KEYCODES.indexOf(nativeEvent.keyCode) !== -1;
3696
+ case 'topKeyDown':
3697
+ // Expect IME keyCode on each keydown. If we get any other
3698
+ // code we must have exited earlier.
3699
+ return nativeEvent.keyCode !== START_KEYCODE;
3700
+ case 'topKeyPress':
3701
+ case 'topMouseDown':
3702
+ case 'topBlur':
3703
+ // Events are not possible without cancelling IME.
3704
+ return true;
3705
+ default:
3706
+ return false;
3707
+ }
3708
+ }
3709
+
3710
+ /**
3711
+ * Google Input Tools provides composition data via a CustomEvent,
3712
+ * with the `data` property populated in the `detail` object. If this
3713
+ * is available on the event object, use it. If not, this is a plain
3714
+ * composition event and we have nothing special to extract.
3715
+ *
3716
+ * @param {object} nativeEvent
3717
+ * @return {?string}
3718
+ */
3719
+ function getDataFromCustomEvent(nativeEvent) {
3720
+ var detail = nativeEvent.detail;
3721
+ if (typeof detail === 'object' && 'data' in detail) {
3722
+ return detail.data;
3723
+ }
3724
+ return null;
3725
+ }
3726
+
3727
+ // Track the current IME composition fallback object, if any.
3728
+ var currentComposition = null;
3729
+
3730
+ /**
3731
+ * @return {?object} A SyntheticCompositionEvent.
3732
+ */
3733
+ function extractCompositionEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget) {
3734
+ var eventType;
3735
+ var fallbackData;
3736
+
3737
+ if (canUseCompositionEvent) {
3738
+ eventType = getCompositionEventType(topLevelType);
3739
+ } else if (!currentComposition) {
3740
+ if (isFallbackCompositionStart(topLevelType, nativeEvent)) {
3741
+ eventType = eventTypes.compositionStart;
3742
+ }
3743
+ } else if (isFallbackCompositionEnd(topLevelType, nativeEvent)) {
3744
+ eventType = eventTypes.compositionEnd;
3745
+ }
3746
+
3747
+ if (!eventType) {
3748
+ return null;
3749
+ }
3750
+
3751
+ if (useFallbackCompositionData) {
3752
+ // The current composition is stored statically and must not be
3753
+ // overwritten while composition continues.
3754
+ if (!currentComposition && eventType === eventTypes.compositionStart) {
3755
+ currentComposition = FallbackCompositionState.getPooled(nativeEventTarget);
3756
+ } else if (eventType === eventTypes.compositionEnd) {
3757
+ if (currentComposition) {
3758
+ fallbackData = currentComposition.getData();
3759
+ }
3760
+ }
3761
+ }
3762
+
3763
+ var event = SyntheticCompositionEvent.getPooled(eventType, targetInst, nativeEvent, nativeEventTarget);
3764
+
3765
+ if (fallbackData) {
3766
+ // Inject data generated from fallback path into the synthetic event.
3767
+ // This matches the property of native CompositionEventInterface.
3768
+ event.data = fallbackData;
3769
+ } else {
3770
+ var customData = getDataFromCustomEvent(nativeEvent);
3771
+ if (customData !== null) {
3772
+ event.data = customData;
3773
+ }
3774
+ }
3775
+
3776
+ EventPropagators.accumulateTwoPhaseDispatches(event);
3777
+ return event;
3778
+ }
3779
+
3780
+ /**
3781
+ * @param {string} topLevelType Record from `EventConstants`.
3782
+ * @param {object} nativeEvent Native browser event.
3783
+ * @return {?string} The string corresponding to this `beforeInput` event.
3784
+ */
3785
+ function getNativeBeforeInputChars(topLevelType, nativeEvent) {
3786
+ switch (topLevelType) {
3787
+ case 'topCompositionEnd':
3788
+ return getDataFromCustomEvent(nativeEvent);
3789
+ case 'topKeyPress':
3790
+ /**
3791
+ * If native `textInput` events are available, our goal is to make
3792
+ * use of them. However, there is a special case: the spacebar key.
3793
+ * In Webkit, preventing default on a spacebar `textInput` event
3794
+ * cancels character insertion, but it *also* causes the browser
3795
+ * to fall back to its default spacebar behavior of scrolling the
3796
+ * page.
3797
+ *
3798
+ * Tracking at:
3799
+ * https://code.google.com/p/chromium/issues/detail?id=355103
3800
+ *
3801
+ * To avoid this issue, use the keypress event as if no `textInput`
3802
+ * event is available.
3803
+ */
3804
+ var which = nativeEvent.which;
3805
+ if (which !== SPACEBAR_CODE) {
3806
+ return null;
3807
+ }
3808
+
3809
+ hasSpaceKeypress = true;
3810
+ return SPACEBAR_CHAR;
3811
+
3812
+ case 'topTextInput':
3813
+ // Record the characters to be added to the DOM.
3814
+ var chars = nativeEvent.data;
3815
+
3816
+ // If it's a spacebar character, assume that we have already handled
3817
+ // it at the keypress level and bail immediately. Android Chrome
3818
+ // doesn't give us keycodes, so we need to blacklist it.
3819
+ if (chars === SPACEBAR_CHAR && hasSpaceKeypress) {
3820
+ return null;
3821
+ }
3822
+
3823
+ return chars;
3824
+
3825
+ default:
3826
+ // For other native event types, do nothing.
3827
+ return null;
3828
+ }
3829
+ }
3830
+
3831
+ /**
3832
+ * For browsers that do not provide the `textInput` event, extract the
3833
+ * appropriate string to use for SyntheticInputEvent.
3834
+ *
3835
+ * @param {string} topLevelType Record from `EventConstants`.
3836
+ * @param {object} nativeEvent Native browser event.
3837
+ * @return {?string} The fallback string for this `beforeInput` event.
3838
+ */
3839
+ function getFallbackBeforeInputChars(topLevelType, nativeEvent) {
3840
+ // If we are currently composing (IME) and using a fallback to do so,
3841
+ // try to extract the composed characters from the fallback object.
3842
+ // If composition event is available, we extract a string only at
3843
+ // compositionevent, otherwise extract it at fallback events.
3844
+ if (currentComposition) {
3845
+ if (topLevelType === 'topCompositionEnd' || !canUseCompositionEvent && isFallbackCompositionEnd(topLevelType, nativeEvent)) {
3846
+ var chars = currentComposition.getData();
3847
+ FallbackCompositionState.release(currentComposition);
3848
+ currentComposition = null;
3849
+ return chars;
3850
+ }
3851
+ return null;
3852
+ }
3853
+
3854
+ switch (topLevelType) {
3855
+ case 'topPaste':
3856
+ // If a paste event occurs after a keypress, throw out the input
3857
+ // chars. Paste events should not lead to BeforeInput events.
3858
+ return null;
3859
+ case 'topKeyPress':
3860
+ /**
3861
+ * As of v27, Firefox may fire keypress events even when no character
3862
+ * will be inserted. A few possibilities:
3863
+ *
3864
+ * - `which` is `0`. Arrow keys, Esc key, etc.
3865
+ *
3866
+ * - `which` is the pressed key code, but no char is available.
3867
+ * Ex: 'AltGr + d` in Polish. There is no modified character for
3868
+ * this key combination and no character is inserted into the
3869
+ * document, but FF fires the keypress for char code `100` anyway.
3870
+ * No `input` event will occur.
3871
+ *
3872
+ * - `which` is the pressed key code, but a command combination is
3873
+ * being used. Ex: `Cmd+C`. No character is inserted, and no
3874
+ * `input` event will occur.
3875
+ */
3876
+ if (nativeEvent.which && !isKeypressCommand(nativeEvent)) {
3877
+ return String.fromCharCode(nativeEvent.which);
3878
+ }
3879
+ return null;
3880
+ case 'topCompositionEnd':
3881
+ return useFallbackCompositionData ? null : nativeEvent.data;
3882
+ default:
3883
+ return null;
3884
+ }
3885
+ }
3886
+
3887
+ /**
3888
+ * Extract a SyntheticInputEvent for `beforeInput`, based on either native
3889
+ * `textInput` or fallback behavior.
3890
+ *
3891
+ * @return {?object} A SyntheticInputEvent.
3892
+ */
3893
+ function extractBeforeInputEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget) {
3894
+ var chars;
3895
+
3896
+ if (canUseTextInputEvent) {
3897
+ chars = getNativeBeforeInputChars(topLevelType, nativeEvent);
3898
+ } else {
3899
+ chars = getFallbackBeforeInputChars(topLevelType, nativeEvent);
3900
+ }
3901
+
3902
+ // If no characters are being inserted, no BeforeInput event should
3903
+ // be fired.
3904
+ if (!chars) {
3905
+ return null;
3906
+ }
3907
+
3908
+ var event = SyntheticInputEvent.getPooled(eventTypes.beforeInput, targetInst, nativeEvent, nativeEventTarget);
3909
+
3910
+ event.data = chars;
3911
+ EventPropagators.accumulateTwoPhaseDispatches(event);
3912
+ return event;
3913
+ }
3914
+
3915
+ /**
3916
+ * Create an `onBeforeInput` event to match
3917
+ * http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105/#events-inputevents.
3918
+ *
3919
+ * This event plugin is based on the native `textInput` event
3920
+ * available in Chrome, Safari, Opera, and IE. This event fires after
3921
+ * `onKeyPress` and `onCompositionEnd`, but before `onInput`.
3922
+ *
3923
+ * `beforeInput` is spec'd but not implemented in any browsers, and
3924
+ * the `input` event does not provide any useful information about what has
3925
+ * actually been added, contrary to the spec. Thus, `textInput` is the best
3926
+ * available event to identify the characters that have actually been inserted
3927
+ * into the target node.
3928
+ *
3929
+ * This plugin is also responsible for emitting `composition` events, thus
3930
+ * allowing us to share composition fallback code for both `beforeInput` and
3931
+ * `composition` event types.
3932
+ */
3933
+ var BeforeInputEventPlugin = {
3934
+ eventTypes: eventTypes,
3935
+
3936
+ extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
3937
+ return [extractCompositionEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget), extractBeforeInputEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget)];
3938
+ }
3939
+ };
3940
+
3941
+ module.exports = BeforeInputEventPlugin;
3942
+ },{"./EventPropagators":53,"./FallbackCompositionState":54,"./SyntheticCompositionEvent":118,"./SyntheticInputEvent":122,"fbjs/lib/ExecutionEnvironment":6}],38:[function(require,module,exports){
3943
+ /**
3944
+ * Copyright (c) 2013-present, Facebook, Inc.
3945
+ *
3946
+ * This source code is licensed under the MIT license found in the
3947
+ * LICENSE file in the root directory of this source tree.
3948
+ *
3949
+ */
3950
+
3951
+ 'use strict';
3952
+
3953
+ /**
3954
+ * CSS properties which accept numbers but are not in units of "px".
3955
+ */
3956
+
3957
+ var isUnitlessNumber = {
3958
+ animationIterationCount: true,
3959
+ borderImageOutset: true,
3960
+ borderImageSlice: true,
3961
+ borderImageWidth: true,
3962
+ boxFlex: true,
3963
+ boxFlexGroup: true,
3964
+ boxOrdinalGroup: true,
3965
+ columnCount: true,
3966
+ columns: true,
3967
+ flex: true,
3968
+ flexGrow: true,
3969
+ flexPositive: true,
3970
+ flexShrink: true,
3971
+ flexNegative: true,
3972
+ flexOrder: true,
3973
+ gridRow: true,
3974
+ gridRowEnd: true,
3975
+ gridRowSpan: true,
3976
+ gridRowStart: true,
3977
+ gridColumn: true,
3978
+ gridColumnEnd: true,
3979
+ gridColumnSpan: true,
3980
+ gridColumnStart: true,
3981
+ fontWeight: true,
3982
+ lineClamp: true,
3983
+ lineHeight: true,
3984
+ opacity: true,
3985
+ order: true,
3986
+ orphans: true,
3987
+ tabSize: true,
3988
+ widows: true,
3989
+ zIndex: true,
3990
+ zoom: true,
3991
+
3992
+ // SVG-related properties
3993
+ fillOpacity: true,
3994
+ floodOpacity: true,
3995
+ stopOpacity: true,
3996
+ strokeDasharray: true,
3997
+ strokeDashoffset: true,
3998
+ strokeMiterlimit: true,
3999
+ strokeOpacity: true,
4000
+ strokeWidth: true
4001
+ };
4002
+
4003
+ /**
4004
+ * @param {string} prefix vendor-specific prefix, eg: Webkit
4005
+ * @param {string} key style name, eg: transitionDuration
4006
+ * @return {string} style name prefixed with `prefix`, properly camelCased, eg:
4007
+ * WebkitTransitionDuration
4008
+ */
4009
+ function prefixKey(prefix, key) {
4010
+ return prefix + key.charAt(0).toUpperCase() + key.substring(1);
4011
+ }
4012
+
4013
+ /**
4014
+ * Support style names that may come passed in prefixed by adding permutations
4015
+ * of vendor prefixes.
4016
+ */
4017
+ var prefixes = ['Webkit', 'ms', 'Moz', 'O'];
4018
+
4019
+ // Using Object.keys here, or else the vanilla for-in loop makes IE8 go into an
4020
+ // infinite loop, because it iterates over the newly added props too.
4021
+ Object.keys(isUnitlessNumber).forEach(function (prop) {
4022
+ prefixes.forEach(function (prefix) {
4023
+ isUnitlessNumber[prefixKey(prefix, prop)] = isUnitlessNumber[prop];
4024
+ });
4025
+ });
4026
+
4027
+ /**
4028
+ * Most style properties can be unset by doing .style[prop] = '' but IE8
4029
+ * doesn't like doing that with shorthand properties so for the properties that
4030
+ * IE8 breaks on, which are listed here, we instead unset each of the
4031
+ * individual properties. See http://bugs.jquery.com/ticket/12385.
4032
+ * The 4-value 'clock' properties like margin, padding, border-width seem to
4033
+ * behave without any problems. Curiously, list-style works too without any
4034
+ * special prodding.
4035
+ */
4036
+ var shorthandPropertyExpansions = {
4037
+ background: {
4038
+ backgroundAttachment: true,
4039
+ backgroundColor: true,
4040
+ backgroundImage: true,
4041
+ backgroundPositionX: true,
4042
+ backgroundPositionY: true,
4043
+ backgroundRepeat: true
4044
+ },
4045
+ backgroundPosition: {
4046
+ backgroundPositionX: true,
4047
+ backgroundPositionY: true
4048
+ },
4049
+ border: {
4050
+ borderWidth: true,
4051
+ borderStyle: true,
4052
+ borderColor: true
4053
+ },
4054
+ borderBottom: {
4055
+ borderBottomWidth: true,
4056
+ borderBottomStyle: true,
4057
+ borderBottomColor: true
4058
+ },
4059
+ borderLeft: {
4060
+ borderLeftWidth: true,
4061
+ borderLeftStyle: true,
4062
+ borderLeftColor: true
4063
+ },
4064
+ borderRight: {
4065
+ borderRightWidth: true,
4066
+ borderRightStyle: true,
4067
+ borderRightColor: true
4068
+ },
4069
+ borderTop: {
4070
+ borderTopWidth: true,
4071
+ borderTopStyle: true,
4072
+ borderTopColor: true
4073
+ },
4074
+ font: {
4075
+ fontStyle: true,
4076
+ fontVariant: true,
4077
+ fontWeight: true,
4078
+ fontSize: true,
4079
+ lineHeight: true,
4080
+ fontFamily: true
4081
+ },
4082
+ outline: {
4083
+ outlineWidth: true,
4084
+ outlineStyle: true,
4085
+ outlineColor: true
4086
+ }
4087
+ };
4088
+
4089
+ var CSSProperty = {
4090
+ isUnitlessNumber: isUnitlessNumber,
4091
+ shorthandPropertyExpansions: shorthandPropertyExpansions
4092
+ };
4093
+
4094
+ module.exports = CSSProperty;
4095
+ },{}],39:[function(require,module,exports){
4096
+ (function (process){(function (){
4097
+ /**
4098
+ * Copyright (c) 2013-present, Facebook, Inc.
4099
+ *
4100
+ * This source code is licensed under the MIT license found in the
4101
+ * LICENSE file in the root directory of this source tree.
4102
+ *
4103
+ */
4104
+
4105
+ 'use strict';
4106
+
4107
+ var CSSProperty = require('./CSSProperty');
4108
+ var ExecutionEnvironment = require('fbjs/lib/ExecutionEnvironment');
4109
+ var ReactInstrumentation = require('./ReactInstrumentation');
4110
+
4111
+ var camelizeStyleName = require('fbjs/lib/camelizeStyleName');
4112
+ var dangerousStyleValue = require('./dangerousStyleValue');
4113
+ var hyphenateStyleName = require('fbjs/lib/hyphenateStyleName');
4114
+ var memoizeStringOnly = require('fbjs/lib/memoizeStringOnly');
4115
+ var warning = require('fbjs/lib/warning');
4116
+
4117
+ var processStyleName = memoizeStringOnly(function (styleName) {
4118
+ return hyphenateStyleName(styleName);
4119
+ });
4120
+
4121
+ var hasShorthandPropertyBug = false;
4122
+ var styleFloatAccessor = 'cssFloat';
4123
+ if (ExecutionEnvironment.canUseDOM) {
4124
+ var tempStyle = document.createElement('div').style;
4125
+ try {
4126
+ // IE8 throws "Invalid argument." if resetting shorthand style properties.
4127
+ tempStyle.font = '';
4128
+ } catch (e) {
4129
+ hasShorthandPropertyBug = true;
4130
+ }
4131
+ // IE8 only supports accessing cssFloat (standard) as styleFloat
4132
+ if (document.documentElement.style.cssFloat === undefined) {
4133
+ styleFloatAccessor = 'styleFloat';
4134
+ }
4135
+ }
4136
+
4137
+ if (process.env.NODE_ENV !== 'production') {
4138
+ // 'msTransform' is correct, but the other prefixes should be capitalized
4139
+ var badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/;
4140
+
4141
+ // style values shouldn't contain a semicolon
4142
+ var badStyleValueWithSemicolonPattern = /;\s*$/;
4143
+
4144
+ var warnedStyleNames = {};
4145
+ var warnedStyleValues = {};
4146
+ var warnedForNaNValue = false;
4147
+
4148
+ var warnHyphenatedStyleName = function (name, owner) {
4149
+ if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {
4150
+ return;
4151
+ }
4152
+
4153
+ warnedStyleNames[name] = true;
4154
+ process.env.NODE_ENV !== 'production' ? warning(false, 'Unsupported style property %s. Did you mean %s?%s', name, camelizeStyleName(name), checkRenderMessage(owner)) : void 0;
4155
+ };
4156
+
4157
+ var warnBadVendoredStyleName = function (name, owner) {
4158
+ if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {
4159
+ return;
4160
+ }
4161
+
4162
+ warnedStyleNames[name] = true;
4163
+ process.env.NODE_ENV !== '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;
4164
+ };
4165
+
4166
+ var warnStyleValueWithSemicolon = function (name, value, owner) {
4167
+ if (warnedStyleValues.hasOwnProperty(value) && warnedStyleValues[value]) {
4168
+ return;
4169
+ }
4170
+
4171
+ warnedStyleValues[value] = true;
4172
+ process.env.NODE_ENV !== 'production' ? warning(false, "Style property values shouldn't contain a semicolon.%s " + 'Try "%s: %s" instead.', checkRenderMessage(owner), name, value.replace(badStyleValueWithSemicolonPattern, '')) : void 0;
4173
+ };
4174
+
4175
+ var warnStyleValueIsNaN = function (name, value, owner) {
4176
+ if (warnedForNaNValue) {
4177
+ return;
4178
+ }
4179
+
4180
+ warnedForNaNValue = true;
4181
+ process.env.NODE_ENV !== 'production' ? warning(false, '`NaN` is an invalid value for the `%s` css style property.%s', name, checkRenderMessage(owner)) : void 0;
4182
+ };
4183
+
4184
+ var checkRenderMessage = function (owner) {
4185
+ if (owner) {
4186
+ var name = owner.getName();
4187
+ if (name) {
4188
+ return ' Check the render method of `' + name + '`.';
4189
+ }
4190
+ }
4191
+ return '';
4192
+ };
4193
+
4194
+ /**
4195
+ * @param {string} name
4196
+ * @param {*} value
4197
+ * @param {ReactDOMComponent} component
4198
+ */
4199
+ var warnValidStyle = function (name, value, component) {
4200
+ var owner;
4201
+ if (component) {
4202
+ owner = component._currentElement._owner;
4203
+ }
4204
+ if (name.indexOf('-') > -1) {
4205
+ warnHyphenatedStyleName(name, owner);
4206
+ } else if (badVendoredStyleNamePattern.test(name)) {
4207
+ warnBadVendoredStyleName(name, owner);
4208
+ } else if (badStyleValueWithSemicolonPattern.test(value)) {
4209
+ warnStyleValueWithSemicolon(name, value, owner);
4210
+ }
4211
+
4212
+ if (typeof value === 'number' && isNaN(value)) {
4213
+ warnStyleValueIsNaN(name, value, owner);
4214
+ }
4215
+ };
4216
+ }
4217
+
4218
+ /**
4219
+ * Operations for dealing with CSS properties.
4220
+ */
4221
+ var CSSPropertyOperations = {
4222
+ /**
4223
+ * Serializes a mapping of style properties for use as inline styles:
4224
+ *
4225
+ * > createMarkupForStyles({width: '200px', height: 0})
4226
+ * "width:200px;height:0;"
4227
+ *
4228
+ * Undefined values are ignored so that declarative programming is easier.
4229
+ * The result should be HTML-escaped before insertion into the DOM.
4230
+ *
4231
+ * @param {object} styles
4232
+ * @param {ReactDOMComponent} component
4233
+ * @return {?string}
4234
+ */
4235
+ createMarkupForStyles: function (styles, component) {
4236
+ var serialized = '';
4237
+ for (var styleName in styles) {
4238
+ if (!styles.hasOwnProperty(styleName)) {
4239
+ continue;
4240
+ }
4241
+ var isCustomProperty = styleName.indexOf('--') === 0;
4242
+ var styleValue = styles[styleName];
4243
+ if (process.env.NODE_ENV !== 'production') {
4244
+ if (!isCustomProperty) {
4245
+ warnValidStyle(styleName, styleValue, component);
4246
+ }
4247
+ }
4248
+ if (styleValue != null) {
4249
+ serialized += processStyleName(styleName) + ':';
4250
+ serialized += dangerousStyleValue(styleName, styleValue, component, isCustomProperty) + ';';
4251
+ }
4252
+ }
4253
+ return serialized || null;
4254
+ },
4255
+
4256
+ /**
4257
+ * Sets the value for multiple styles on a node. If a value is specified as
4258
+ * '' (empty string), the corresponding style property will be unset.
4259
+ *
4260
+ * @param {DOMElement} node
4261
+ * @param {object} styles
4262
+ * @param {ReactDOMComponent} component
4263
+ */
4264
+ setValueForStyles: function (node, styles, component) {
4265
+ if (process.env.NODE_ENV !== 'production') {
4266
+ ReactInstrumentation.debugTool.onHostOperation({
4267
+ instanceID: component._debugID,
4268
+ type: 'update styles',
4269
+ payload: styles
4270
+ });
4271
+ }
4272
+
4273
+ var style = node.style;
4274
+ for (var styleName in styles) {
4275
+ if (!styles.hasOwnProperty(styleName)) {
4276
+ continue;
4277
+ }
4278
+ var isCustomProperty = styleName.indexOf('--') === 0;
4279
+ if (process.env.NODE_ENV !== 'production') {
4280
+ if (!isCustomProperty) {
4281
+ warnValidStyle(styleName, styles[styleName], component);
4282
+ }
4283
+ }
4284
+ var styleValue = dangerousStyleValue(styleName, styles[styleName], component, isCustomProperty);
4285
+ if (styleName === 'float' || styleName === 'cssFloat') {
4286
+ styleName = styleFloatAccessor;
4287
+ }
4288
+ if (isCustomProperty) {
4289
+ style.setProperty(styleName, styleValue);
4290
+ } else if (styleValue) {
4291
+ style[styleName] = styleValue;
4292
+ } else {
4293
+ var expansion = hasShorthandPropertyBug && CSSProperty.shorthandPropertyExpansions[styleName];
4294
+ if (expansion) {
4295
+ // Shorthand property that IE8 won't like unsetting, so unset each
4296
+ // component to placate it
4297
+ for (var individualStyleName in expansion) {
4298
+ style[individualStyleName] = '';
4299
+ }
4300
+ } else {
4301
+ style[styleName] = '';
4302
+ }
4303
+ }
4304
+ }
4305
+ }
4306
+ };
4307
+
4308
+ module.exports = CSSPropertyOperations;
4309
+ }).call(this)}).call(this,require('_process'))
4310
+ },{"./CSSProperty":38,"./ReactInstrumentation":96,"./dangerousStyleValue":135,"_process":29,"fbjs/lib/ExecutionEnvironment":6,"fbjs/lib/camelizeStyleName":8,"fbjs/lib/hyphenateStyleName":19,"fbjs/lib/memoizeStringOnly":23,"fbjs/lib/warning":27}],40:[function(require,module,exports){
4311
+ (function (process){(function (){
4312
+ /**
4313
+ * Copyright (c) 2013-present, Facebook, Inc.
4314
+ *
4315
+ * This source code is licensed under the MIT license found in the
4316
+ * LICENSE file in the root directory of this source tree.
4317
+ *
4318
+ *
4319
+ */
4320
+
4321
+ 'use strict';
4322
+
4323
+ var _prodInvariant = require('./reactProdInvariant');
4324
+
4325
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
4326
+
4327
+ var PooledClass = require('./PooledClass');
4328
+
4329
+ var invariant = require('fbjs/lib/invariant');
4330
+
4331
+ /**
4332
+ * A specialized pseudo-event module to help keep track of components waiting to
4333
+ * be notified when their DOM representations are available for use.
4334
+ *
4335
+ * This implements `PooledClass`, so you should never need to instantiate this.
4336
+ * Instead, use `CallbackQueue.getPooled()`.
4337
+ *
4338
+ * @class ReactMountReady
4339
+ * @implements PooledClass
4340
+ * @internal
4341
+ */
4342
+
4343
+ var CallbackQueue = function () {
4344
+ function CallbackQueue(arg) {
4345
+ _classCallCheck(this, CallbackQueue);
4346
+
4347
+ this._callbacks = null;
4348
+ this._contexts = null;
4349
+ this._arg = arg;
4350
+ }
4351
+
4352
+ /**
4353
+ * Enqueues a callback to be invoked when `notifyAll` is invoked.
4354
+ *
4355
+ * @param {function} callback Invoked when `notifyAll` is invoked.
4356
+ * @param {?object} context Context to call `callback` with.
4357
+ * @internal
4358
+ */
4359
+
4360
+
4361
+ CallbackQueue.prototype.enqueue = function enqueue(callback, context) {
4362
+ this._callbacks = this._callbacks || [];
4363
+ this._callbacks.push(callback);
4364
+ this._contexts = this._contexts || [];
4365
+ this._contexts.push(context);
4366
+ };
4367
+
4368
+ /**
4369
+ * Invokes all enqueued callbacks and clears the queue. This is invoked after
4370
+ * the DOM representation of a component has been created or updated.
4371
+ *
4372
+ * @internal
4373
+ */
4374
+
4375
+
4376
+ CallbackQueue.prototype.notifyAll = function notifyAll() {
4377
+ var callbacks = this._callbacks;
4378
+ var contexts = this._contexts;
4379
+ var arg = this._arg;
4380
+ if (callbacks && contexts) {
4381
+ !(callbacks.length === contexts.length) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Mismatched list of contexts in callback queue') : _prodInvariant('24') : void 0;
4382
+ this._callbacks = null;
4383
+ this._contexts = null;
4384
+ for (var i = 0; i < callbacks.length; i++) {
4385
+ callbacks[i].call(contexts[i], arg);
4386
+ }
4387
+ callbacks.length = 0;
4388
+ contexts.length = 0;
4389
+ }
4390
+ };
4391
+
4392
+ CallbackQueue.prototype.checkpoint = function checkpoint() {
4393
+ return this._callbacks ? this._callbacks.length : 0;
4394
+ };
4395
+
4396
+ CallbackQueue.prototype.rollback = function rollback(len) {
4397
+ if (this._callbacks && this._contexts) {
4398
+ this._callbacks.length = len;
4399
+ this._contexts.length = len;
4400
+ }
4401
+ };
4402
+
4403
+ /**
4404
+ * Resets the internal queue.
4405
+ *
4406
+ * @internal
4407
+ */
4408
+
4409
+
4410
+ CallbackQueue.prototype.reset = function reset() {
4411
+ this._callbacks = null;
4412
+ this._contexts = null;
4413
+ };
4414
+
4415
+ /**
4416
+ * `PooledClass` looks for this.
4417
+ */
4418
+
4419
+
4420
+ CallbackQueue.prototype.destructor = function destructor() {
4421
+ this.reset();
4422
+ };
4423
+
4424
+ return CallbackQueue;
4425
+ }();
4426
+
4427
+ module.exports = PooledClass.addPoolingTo(CallbackQueue);
4428
+ }).call(this)}).call(this,require('_process'))
4429
+ },{"./PooledClass":58,"./reactProdInvariant":154,"_process":29,"fbjs/lib/invariant":20}],41:[function(require,module,exports){
4430
+ /**
4431
+ * Copyright (c) 2013-present, Facebook, Inc.
4432
+ *
4433
+ * This source code is licensed under the MIT license found in the
4434
+ * LICENSE file in the root directory of this source tree.
4435
+ *
4436
+ */
4437
+
4438
+ 'use strict';
4439
+
4440
+ var EventPluginHub = require('./EventPluginHub');
4441
+ var EventPropagators = require('./EventPropagators');
4442
+ var ExecutionEnvironment = require('fbjs/lib/ExecutionEnvironment');
4443
+ var ReactDOMComponentTree = require('./ReactDOMComponentTree');
4444
+ var ReactUpdates = require('./ReactUpdates');
4445
+ var SyntheticEvent = require('./SyntheticEvent');
4446
+
4447
+ var inputValueTracking = require('./inputValueTracking');
4448
+ var getEventTarget = require('./getEventTarget');
4449
+ var isEventSupported = require('./isEventSupported');
4450
+ var isTextInputElement = require('./isTextInputElement');
4451
+
4452
+ var eventTypes = {
4453
+ change: {
4454
+ phasedRegistrationNames: {
4455
+ bubbled: 'onChange',
4456
+ captured: 'onChangeCapture'
4457
+ },
4458
+ dependencies: ['topBlur', 'topChange', 'topClick', 'topFocus', 'topInput', 'topKeyDown', 'topKeyUp', 'topSelectionChange']
4459
+ }
4460
+ };
4461
+
4462
+ function createAndAccumulateChangeEvent(inst, nativeEvent, target) {
4463
+ var event = SyntheticEvent.getPooled(eventTypes.change, inst, nativeEvent, target);
4464
+ event.type = 'change';
4465
+ EventPropagators.accumulateTwoPhaseDispatches(event);
4466
+ return event;
4467
+ }
4468
+ /**
4469
+ * For IE shims
4470
+ */
4471
+ var activeElement = null;
4472
+ var activeElementInst = null;
4473
+
4474
+ /**
4475
+ * SECTION: handle `change` event
4476
+ */
4477
+ function shouldUseChangeEvent(elem) {
4478
+ var nodeName = elem.nodeName && elem.nodeName.toLowerCase();
4479
+ return nodeName === 'select' || nodeName === 'input' && elem.type === 'file';
4480
+ }
4481
+
4482
+ var doesChangeEventBubble = false;
4483
+ if (ExecutionEnvironment.canUseDOM) {
4484
+ // See `handleChange` comment below
4485
+ doesChangeEventBubble = isEventSupported('change') && (!document.documentMode || document.documentMode > 8);
4486
+ }
4487
+
4488
+ function manualDispatchChangeEvent(nativeEvent) {
4489
+ var event = createAndAccumulateChangeEvent(activeElementInst, nativeEvent, getEventTarget(nativeEvent));
4490
+
4491
+ // If change and propertychange bubbled, we'd just bind to it like all the
4492
+ // other events and have it go through ReactBrowserEventEmitter. Since it
4493
+ // doesn't, we manually listen for the events and so we have to enqueue and
4494
+ // process the abstract event manually.
4495
+ //
4496
+ // Batching is necessary here in order to ensure that all event handlers run
4497
+ // before the next rerender (including event handlers attached to ancestor
4498
+ // elements instead of directly on the input). Without this, controlled
4499
+ // components don't work properly in conjunction with event bubbling because
4500
+ // the component is rerendered and the value reverted before all the event
4501
+ // handlers can run. See https://github.com/facebook/react/issues/708.
4502
+ ReactUpdates.batchedUpdates(runEventInBatch, event);
4503
+ }
4504
+
4505
+ function runEventInBatch(event) {
4506
+ EventPluginHub.enqueueEvents(event);
4507
+ EventPluginHub.processEventQueue(false);
4508
+ }
4509
+
4510
+ function startWatchingForChangeEventIE8(target, targetInst) {
4511
+ activeElement = target;
4512
+ activeElementInst = targetInst;
4513
+ activeElement.attachEvent('onchange', manualDispatchChangeEvent);
4514
+ }
4515
+
4516
+ function stopWatchingForChangeEventIE8() {
4517
+ if (!activeElement) {
4518
+ return;
4519
+ }
4520
+ activeElement.detachEvent('onchange', manualDispatchChangeEvent);
4521
+ activeElement = null;
4522
+ activeElementInst = null;
4523
+ }
4524
+
4525
+ function getInstIfValueChanged(targetInst, nativeEvent) {
4526
+ var updated = inputValueTracking.updateValueIfChanged(targetInst);
4527
+ var simulated = nativeEvent.simulated === true && ChangeEventPlugin._allowSimulatedPassThrough;
4528
+
4529
+ if (updated || simulated) {
4530
+ return targetInst;
4531
+ }
4532
+ }
4533
+
4534
+ function getTargetInstForChangeEvent(topLevelType, targetInst) {
4535
+ if (topLevelType === 'topChange') {
4536
+ return targetInst;
4537
+ }
4538
+ }
4539
+
4540
+ function handleEventsForChangeEventIE8(topLevelType, target, targetInst) {
4541
+ if (topLevelType === 'topFocus') {
4542
+ // stopWatching() should be a noop here but we call it just in case we
4543
+ // missed a blur event somehow.
4544
+ stopWatchingForChangeEventIE8();
4545
+ startWatchingForChangeEventIE8(target, targetInst);
4546
+ } else if (topLevelType === 'topBlur') {
4547
+ stopWatchingForChangeEventIE8();
4548
+ }
4549
+ }
4550
+
4551
+ /**
4552
+ * SECTION: handle `input` event
4553
+ */
4554
+ var isInputEventSupported = false;
4555
+ if (ExecutionEnvironment.canUseDOM) {
4556
+ // IE9 claims to support the input event but fails to trigger it when
4557
+ // deleting text, so we ignore its input events.
4558
+
4559
+ isInputEventSupported = isEventSupported('input') && (!document.documentMode || document.documentMode > 9);
4560
+ }
4561
+
4562
+ /**
4563
+ * (For IE <=9) Starts tracking propertychange events on the passed-in element
4564
+ * and override the value property so that we can distinguish user events from
4565
+ * value changes in JS.
4566
+ */
4567
+ function startWatchingForValueChange(target, targetInst) {
4568
+ activeElement = target;
4569
+ activeElementInst = targetInst;
4570
+ activeElement.attachEvent('onpropertychange', handlePropertyChange);
4571
+ }
4572
+
4573
+ /**
4574
+ * (For IE <=9) Removes the event listeners from the currently-tracked element,
4575
+ * if any exists.
4576
+ */
4577
+ function stopWatchingForValueChange() {
4578
+ if (!activeElement) {
4579
+ return;
4580
+ }
4581
+ activeElement.detachEvent('onpropertychange', handlePropertyChange);
4582
+
4583
+ activeElement = null;
4584
+ activeElementInst = null;
4585
+ }
4586
+
4587
+ /**
4588
+ * (For IE <=9) Handles a propertychange event, sending a `change` event if
4589
+ * the value of the active element has changed.
4590
+ */
4591
+ function handlePropertyChange(nativeEvent) {
4592
+ if (nativeEvent.propertyName !== 'value') {
4593
+ return;
4594
+ }
4595
+ if (getInstIfValueChanged(activeElementInst, nativeEvent)) {
4596
+ manualDispatchChangeEvent(nativeEvent);
4597
+ }
4598
+ }
4599
+
4600
+ function handleEventsForInputEventPolyfill(topLevelType, target, targetInst) {
4601
+ if (topLevelType === 'topFocus') {
4602
+ // In IE8, we can capture almost all .value changes by adding a
4603
+ // propertychange handler and looking for events with propertyName
4604
+ // equal to 'value'
4605
+ // In IE9, propertychange fires for most input events but is buggy and
4606
+ // doesn't fire when text is deleted, but conveniently, selectionchange
4607
+ // appears to fire in all of the remaining cases so we catch those and
4608
+ // forward the event if the value has changed
4609
+ // In either case, we don't want to call the event handler if the value
4610
+ // is changed from JS so we redefine a setter for `.value` that updates
4611
+ // our activeElementValue variable, allowing us to ignore those changes
4612
+ //
4613
+ // stopWatching() should be a noop here but we call it just in case we
4614
+ // missed a blur event somehow.
4615
+ stopWatchingForValueChange();
4616
+ startWatchingForValueChange(target, targetInst);
4617
+ } else if (topLevelType === 'topBlur') {
4618
+ stopWatchingForValueChange();
4619
+ }
4620
+ }
4621
+
4622
+ // For IE8 and IE9.
4623
+ function getTargetInstForInputEventPolyfill(topLevelType, targetInst, nativeEvent) {
4624
+ if (topLevelType === 'topSelectionChange' || topLevelType === 'topKeyUp' || topLevelType === 'topKeyDown') {
4625
+ // On the selectionchange event, the target is just document which isn't
4626
+ // helpful for us so just check activeElement instead.
4627
+ //
4628
+ // 99% of the time, keydown and keyup aren't necessary. IE8 fails to fire
4629
+ // propertychange on the first input event after setting `value` from a
4630
+ // script and fires only keydown, keypress, keyup. Catching keyup usually
4631
+ // gets it and catching keydown lets us fire an event for the first
4632
+ // keystroke if user does a key repeat (it'll be a little delayed: right
4633
+ // before the second keystroke). Other input methods (e.g., paste) seem to
4634
+ // fire selectionchange normally.
4635
+ return getInstIfValueChanged(activeElementInst, nativeEvent);
4636
+ }
4637
+ }
4638
+
4639
+ /**
4640
+ * SECTION: handle `click` event
4641
+ */
4642
+ function shouldUseClickEvent(elem) {
4643
+ // Use the `click` event to detect changes to checkbox and radio inputs.
4644
+ // This approach works across all browsers, whereas `change` does not fire
4645
+ // until `blur` in IE8.
4646
+ var nodeName = elem.nodeName;
4647
+ return nodeName && nodeName.toLowerCase() === 'input' && (elem.type === 'checkbox' || elem.type === 'radio');
4648
+ }
4649
+
4650
+ function getTargetInstForClickEvent(topLevelType, targetInst, nativeEvent) {
4651
+ if (topLevelType === 'topClick') {
4652
+ return getInstIfValueChanged(targetInst, nativeEvent);
4653
+ }
4654
+ }
4655
+
4656
+ function getTargetInstForInputOrChangeEvent(topLevelType, targetInst, nativeEvent) {
4657
+ if (topLevelType === 'topInput' || topLevelType === 'topChange') {
4658
+ return getInstIfValueChanged(targetInst, nativeEvent);
4659
+ }
4660
+ }
4661
+
4662
+ function handleControlledInputBlur(inst, node) {
4663
+ // TODO: In IE, inst is occasionally null. Why?
4664
+ if (inst == null) {
4665
+ return;
4666
+ }
4667
+
4668
+ // Fiber and ReactDOM keep wrapper state in separate places
4669
+ var state = inst._wrapperState || node._wrapperState;
4670
+
4671
+ if (!state || !state.controlled || node.type !== 'number') {
4672
+ return;
4673
+ }
4674
+
4675
+ // If controlled, assign the value attribute to the current value on blur
4676
+ var value = '' + node.value;
4677
+ if (node.getAttribute('value') !== value) {
4678
+ node.setAttribute('value', value);
4679
+ }
4680
+ }
4681
+
4682
+ /**
4683
+ * This plugin creates an `onChange` event that normalizes change events
4684
+ * across form elements. This event fires at a time when it's possible to
4685
+ * change the element's value without seeing a flicker.
4686
+ *
4687
+ * Supported elements are:
4688
+ * - input (see `isTextInputElement`)
4689
+ * - textarea
4690
+ * - select
4691
+ */
4692
+ var ChangeEventPlugin = {
4693
+ eventTypes: eventTypes,
4694
+
4695
+ _allowSimulatedPassThrough: true,
4696
+ _isInputEventSupported: isInputEventSupported,
4697
+
4698
+ extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
4699
+ var targetNode = targetInst ? ReactDOMComponentTree.getNodeFromInstance(targetInst) : window;
4700
+
4701
+ var getTargetInstFunc, handleEventFunc;
4702
+ if (shouldUseChangeEvent(targetNode)) {
4703
+ if (doesChangeEventBubble) {
4704
+ getTargetInstFunc = getTargetInstForChangeEvent;
4705
+ } else {
4706
+ handleEventFunc = handleEventsForChangeEventIE8;
4707
+ }
4708
+ } else if (isTextInputElement(targetNode)) {
4709
+ if (isInputEventSupported) {
4710
+ getTargetInstFunc = getTargetInstForInputOrChangeEvent;
4711
+ } else {
4712
+ getTargetInstFunc = getTargetInstForInputEventPolyfill;
4713
+ handleEventFunc = handleEventsForInputEventPolyfill;
4714
+ }
4715
+ } else if (shouldUseClickEvent(targetNode)) {
4716
+ getTargetInstFunc = getTargetInstForClickEvent;
4717
+ }
4718
+
4719
+ if (getTargetInstFunc) {
4720
+ var inst = getTargetInstFunc(topLevelType, targetInst, nativeEvent);
4721
+ if (inst) {
4722
+ var event = createAndAccumulateChangeEvent(inst, nativeEvent, nativeEventTarget);
4723
+ return event;
4724
+ }
4725
+ }
4726
+
4727
+ if (handleEventFunc) {
4728
+ handleEventFunc(topLevelType, targetNode, targetInst);
4729
+ }
4730
+
4731
+ // When blurring, set the value attribute for number inputs
4732
+ if (topLevelType === 'topBlur') {
4733
+ handleControlledInputBlur(targetInst, targetNode);
4734
+ }
4735
+ }
4736
+ };
4737
+
4738
+ module.exports = ChangeEventPlugin;
4739
+ },{"./EventPluginHub":50,"./EventPropagators":53,"./ReactDOMComponentTree":67,"./ReactUpdates":111,"./SyntheticEvent":120,"./getEventTarget":143,"./inputValueTracking":149,"./isEventSupported":151,"./isTextInputElement":152,"fbjs/lib/ExecutionEnvironment":6}],42:[function(require,module,exports){
4740
+ (function (process){(function (){
4741
+ /**
4742
+ * Copyright (c) 2013-present, Facebook, Inc.
4743
+ *
4744
+ * This source code is licensed under the MIT license found in the
4745
+ * LICENSE file in the root directory of this source tree.
4746
+ *
4747
+ */
4748
+
4749
+ 'use strict';
4750
+
4751
+ var DOMLazyTree = require('./DOMLazyTree');
4752
+ var Danger = require('./Danger');
4753
+ var ReactDOMComponentTree = require('./ReactDOMComponentTree');
4754
+ var ReactInstrumentation = require('./ReactInstrumentation');
4755
+
4756
+ var createMicrosoftUnsafeLocalFunction = require('./createMicrosoftUnsafeLocalFunction');
4757
+ var setInnerHTML = require('./setInnerHTML');
4758
+ var setTextContent = require('./setTextContent');
4759
+
4760
+ function getNodeAfter(parentNode, node) {
4761
+ // Special case for text components, which return [open, close] comments
4762
+ // from getHostNode.
4763
+ if (Array.isArray(node)) {
4764
+ node = node[1];
4765
+ }
4766
+ return node ? node.nextSibling : parentNode.firstChild;
4767
+ }
4768
+
4769
+ /**
4770
+ * Inserts `childNode` as a child of `parentNode` at the `index`.
4771
+ *
4772
+ * @param {DOMElement} parentNode Parent node in which to insert.
4773
+ * @param {DOMElement} childNode Child node to insert.
4774
+ * @param {number} index Index at which to insert the child.
4775
+ * @internal
4776
+ */
4777
+ var insertChildAt = createMicrosoftUnsafeLocalFunction(function (parentNode, childNode, referenceNode) {
4778
+ // We rely exclusively on `insertBefore(node, null)` instead of also using
4779
+ // `appendChild(node)`. (Using `undefined` is not allowed by all browsers so
4780
+ // we are careful to use `null`.)
4781
+ parentNode.insertBefore(childNode, referenceNode);
4782
+ });
4783
+
4784
+ function insertLazyTreeChildAt(parentNode, childTree, referenceNode) {
4785
+ DOMLazyTree.insertTreeBefore(parentNode, childTree, referenceNode);
4786
+ }
4787
+
4788
+ function moveChild(parentNode, childNode, referenceNode) {
4789
+ if (Array.isArray(childNode)) {
4790
+ moveDelimitedText(parentNode, childNode[0], childNode[1], referenceNode);
4791
+ } else {
4792
+ insertChildAt(parentNode, childNode, referenceNode);
4793
+ }
4794
+ }
4795
+
4796
+ function removeChild(parentNode, childNode) {
4797
+ if (Array.isArray(childNode)) {
4798
+ var closingComment = childNode[1];
4799
+ childNode = childNode[0];
4800
+ removeDelimitedText(parentNode, childNode, closingComment);
4801
+ parentNode.removeChild(closingComment);
4802
+ }
4803
+ parentNode.removeChild(childNode);
4804
+ }
4805
+
4806
+ function moveDelimitedText(parentNode, openingComment, closingComment, referenceNode) {
4807
+ var node = openingComment;
4808
+ while (true) {
4809
+ var nextNode = node.nextSibling;
4810
+ insertChildAt(parentNode, node, referenceNode);
4811
+ if (node === closingComment) {
4812
+ break;
4813
+ }
4814
+ node = nextNode;
4815
+ }
4816
+ }
4817
+
4818
+ function removeDelimitedText(parentNode, startNode, closingComment) {
4819
+ while (true) {
4820
+ var node = startNode.nextSibling;
4821
+ if (node === closingComment) {
4822
+ // The closing comment is removed by ReactMultiChild.
4823
+ break;
4824
+ } else {
4825
+ parentNode.removeChild(node);
4826
+ }
4827
+ }
4828
+ }
4829
+
4830
+ function replaceDelimitedText(openingComment, closingComment, stringText) {
4831
+ var parentNode = openingComment.parentNode;
4832
+ var nodeAfterComment = openingComment.nextSibling;
4833
+ if (nodeAfterComment === closingComment) {
4834
+ // There are no text nodes between the opening and closing comments; insert
4835
+ // a new one if stringText isn't empty.
4836
+ if (stringText) {
4837
+ insertChildAt(parentNode, document.createTextNode(stringText), nodeAfterComment);
4838
+ }
4839
+ } else {
4840
+ if (stringText) {
4841
+ // Set the text content of the first node after the opening comment, and
4842
+ // remove all following nodes up until the closing comment.
4843
+ setTextContent(nodeAfterComment, stringText);
4844
+ removeDelimitedText(parentNode, nodeAfterComment, closingComment);
4845
+ } else {
4846
+ removeDelimitedText(parentNode, openingComment, closingComment);
4847
+ }
4848
+ }
4849
+
4850
+ if (process.env.NODE_ENV !== 'production') {
4851
+ ReactInstrumentation.debugTool.onHostOperation({
4852
+ instanceID: ReactDOMComponentTree.getInstanceFromNode(openingComment)._debugID,
4853
+ type: 'replace text',
4854
+ payload: stringText
4855
+ });
4856
+ }
4857
+ }
4858
+
4859
+ var dangerouslyReplaceNodeWithMarkup = Danger.dangerouslyReplaceNodeWithMarkup;
4860
+ if (process.env.NODE_ENV !== 'production') {
4861
+ dangerouslyReplaceNodeWithMarkup = function (oldChild, markup, prevInstance) {
4862
+ Danger.dangerouslyReplaceNodeWithMarkup(oldChild, markup);
4863
+ if (prevInstance._debugID !== 0) {
4864
+ ReactInstrumentation.debugTool.onHostOperation({
4865
+ instanceID: prevInstance._debugID,
4866
+ type: 'replace with',
4867
+ payload: markup.toString()
4868
+ });
4869
+ } else {
4870
+ var nextInstance = ReactDOMComponentTree.getInstanceFromNode(markup.node);
4871
+ if (nextInstance._debugID !== 0) {
4872
+ ReactInstrumentation.debugTool.onHostOperation({
4873
+ instanceID: nextInstance._debugID,
4874
+ type: 'mount',
4875
+ payload: markup.toString()
4876
+ });
4877
+ }
4878
+ }
4879
+ };
4880
+ }
4881
+
4882
+ /**
4883
+ * Operations for updating with DOM children.
4884
+ */
4885
+ var DOMChildrenOperations = {
4886
+ dangerouslyReplaceNodeWithMarkup: dangerouslyReplaceNodeWithMarkup,
4887
+
4888
+ replaceDelimitedText: replaceDelimitedText,
4889
+
4890
+ /**
4891
+ * Updates a component's children by processing a series of updates. The
4892
+ * update configurations are each expected to have a `parentNode` property.
4893
+ *
4894
+ * @param {array<object>} updates List of update configurations.
4895
+ * @internal
4896
+ */
4897
+ processUpdates: function (parentNode, updates) {
4898
+ if (process.env.NODE_ENV !== 'production') {
4899
+ var parentNodeDebugID = ReactDOMComponentTree.getInstanceFromNode(parentNode)._debugID;
4900
+ }
4901
+
4902
+ for (var k = 0; k < updates.length; k++) {
4903
+ var update = updates[k];
4904
+ switch (update.type) {
4905
+ case 'INSERT_MARKUP':
4906
+ insertLazyTreeChildAt(parentNode, update.content, getNodeAfter(parentNode, update.afterNode));
4907
+ if (process.env.NODE_ENV !== 'production') {
4908
+ ReactInstrumentation.debugTool.onHostOperation({
4909
+ instanceID: parentNodeDebugID,
4910
+ type: 'insert child',
4911
+ payload: {
4912
+ toIndex: update.toIndex,
4913
+ content: update.content.toString()
4914
+ }
4915
+ });
4916
+ }
4917
+ break;
4918
+ case 'MOVE_EXISTING':
4919
+ moveChild(parentNode, update.fromNode, getNodeAfter(parentNode, update.afterNode));
4920
+ if (process.env.NODE_ENV !== 'production') {
4921
+ ReactInstrumentation.debugTool.onHostOperation({
4922
+ instanceID: parentNodeDebugID,
4923
+ type: 'move child',
4924
+ payload: { fromIndex: update.fromIndex, toIndex: update.toIndex }
4925
+ });
4926
+ }
4927
+ break;
4928
+ case 'SET_MARKUP':
4929
+ setInnerHTML(parentNode, update.content);
4930
+ if (process.env.NODE_ENV !== 'production') {
4931
+ ReactInstrumentation.debugTool.onHostOperation({
4932
+ instanceID: parentNodeDebugID,
4933
+ type: 'replace children',
4934
+ payload: update.content.toString()
4935
+ });
4936
+ }
4937
+ break;
4938
+ case 'TEXT_CONTENT':
4939
+ setTextContent(parentNode, update.content);
4940
+ if (process.env.NODE_ENV !== 'production') {
4941
+ ReactInstrumentation.debugTool.onHostOperation({
4942
+ instanceID: parentNodeDebugID,
4943
+ type: 'replace text',
4944
+ payload: update.content.toString()
4945
+ });
4946
+ }
4947
+ break;
4948
+ case 'REMOVE_NODE':
4949
+ removeChild(parentNode, update.fromNode);
4950
+ if (process.env.NODE_ENV !== 'production') {
4951
+ ReactInstrumentation.debugTool.onHostOperation({
4952
+ instanceID: parentNodeDebugID,
4953
+ type: 'remove child',
4954
+ payload: { fromIndex: update.fromIndex }
4955
+ });
4956
+ }
4957
+ break;
4958
+ }
4959
+ }
4960
+ }
4961
+ };
4962
+
4963
+ module.exports = DOMChildrenOperations;
4964
+ }).call(this)}).call(this,require('_process'))
4965
+ },{"./DOMLazyTree":43,"./Danger":47,"./ReactDOMComponentTree":67,"./ReactInstrumentation":96,"./createMicrosoftUnsafeLocalFunction":134,"./setInnerHTML":156,"./setTextContent":157,"_process":29}],43:[function(require,module,exports){
4966
+ /**
4967
+ * Copyright (c) 2015-present, Facebook, Inc.
4968
+ *
4969
+ * This source code is licensed under the MIT license found in the
4970
+ * LICENSE file in the root directory of this source tree.
4971
+ *
4972
+ */
4973
+
4974
+ 'use strict';
4975
+
4976
+ var DOMNamespaces = require('./DOMNamespaces');
4977
+ var setInnerHTML = require('./setInnerHTML');
4978
+
4979
+ var createMicrosoftUnsafeLocalFunction = require('./createMicrosoftUnsafeLocalFunction');
4980
+ var setTextContent = require('./setTextContent');
4981
+
4982
+ var ELEMENT_NODE_TYPE = 1;
4983
+ var DOCUMENT_FRAGMENT_NODE_TYPE = 11;
4984
+
4985
+ /**
4986
+ * In IE (8-11) and Edge, appending nodes with no children is dramatically
4987
+ * faster than appending a full subtree, so we essentially queue up the
4988
+ * .appendChild calls here and apply them so each node is added to its parent
4989
+ * before any children are added.
4990
+ *
4991
+ * In other browsers, doing so is slower or neutral compared to the other order
4992
+ * (in Firefox, twice as slow) so we only do this inversion in IE.
4993
+ *
4994
+ * See https://github.com/spicyj/innerhtml-vs-createelement-vs-clonenode.
4995
+ */
4996
+ var enableLazy = typeof document !== 'undefined' && typeof document.documentMode === 'number' || typeof navigator !== 'undefined' && typeof navigator.userAgent === 'string' && /\bEdge\/\d/.test(navigator.userAgent);
4997
+
4998
+ function insertTreeChildren(tree) {
4999
+ if (!enableLazy) {
5000
+ return;
5001
+ }
5002
+ var node = tree.node;
5003
+ var children = tree.children;
5004
+ if (children.length) {
5005
+ for (var i = 0; i < children.length; i++) {
5006
+ insertTreeBefore(node, children[i], null);
5007
+ }
5008
+ } else if (tree.html != null) {
5009
+ setInnerHTML(node, tree.html);
5010
+ } else if (tree.text != null) {
5011
+ setTextContent(node, tree.text);
5012
+ }
5013
+ }
5014
+
5015
+ var insertTreeBefore = createMicrosoftUnsafeLocalFunction(function (parentNode, tree, referenceNode) {
5016
+ // DocumentFragments aren't actually part of the DOM after insertion so
5017
+ // appending children won't update the DOM. We need to ensure the fragment
5018
+ // is properly populated first, breaking out of our lazy approach for just
5019
+ // this level. Also, some <object> plugins (like Flash Player) will read
5020
+ // <param> nodes immediately upon insertion into the DOM, so <object>
5021
+ // must also be populated prior to insertion into the DOM.
5022
+ 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)) {
5023
+ insertTreeChildren(tree);
5024
+ parentNode.insertBefore(tree.node, referenceNode);
5025
+ } else {
5026
+ parentNode.insertBefore(tree.node, referenceNode);
5027
+ insertTreeChildren(tree);
5028
+ }
5029
+ });
5030
+
5031
+ function replaceChildWithTree(oldNode, newTree) {
5032
+ oldNode.parentNode.replaceChild(newTree.node, oldNode);
5033
+ insertTreeChildren(newTree);
5034
+ }
5035
+
5036
+ function queueChild(parentTree, childTree) {
5037
+ if (enableLazy) {
5038
+ parentTree.children.push(childTree);
5039
+ } else {
5040
+ parentTree.node.appendChild(childTree.node);
5041
+ }
5042
+ }
5043
+
5044
+ function queueHTML(tree, html) {
5045
+ if (enableLazy) {
5046
+ tree.html = html;
5047
+ } else {
5048
+ setInnerHTML(tree.node, html);
5049
+ }
5050
+ }
5051
+
5052
+ function queueText(tree, text) {
5053
+ if (enableLazy) {
5054
+ tree.text = text;
5055
+ } else {
5056
+ setTextContent(tree.node, text);
5057
+ }
5058
+ }
5059
+
5060
+ function toString() {
5061
+ return this.node.nodeName;
5062
+ }
5063
+
5064
+ function DOMLazyTree(node) {
5065
+ return {
5066
+ node: node,
5067
+ children: [],
5068
+ html: null,
5069
+ text: null,
5070
+ toString: toString
5071
+ };
5072
+ }
5073
+
5074
+ DOMLazyTree.insertTreeBefore = insertTreeBefore;
5075
+ DOMLazyTree.replaceChildWithTree = replaceChildWithTree;
5076
+ DOMLazyTree.queueChild = queueChild;
5077
+ DOMLazyTree.queueHTML = queueHTML;
5078
+ DOMLazyTree.queueText = queueText;
5079
+
5080
+ module.exports = DOMLazyTree;
5081
+ },{"./DOMNamespaces":44,"./createMicrosoftUnsafeLocalFunction":134,"./setInnerHTML":156,"./setTextContent":157}],44:[function(require,module,exports){
5082
+ /**
5083
+ * Copyright (c) 2013-present, Facebook, Inc.
5084
+ *
5085
+ * This source code is licensed under the MIT license found in the
5086
+ * LICENSE file in the root directory of this source tree.
5087
+ *
5088
+ */
5089
+
5090
+ 'use strict';
5091
+
5092
+ var DOMNamespaces = {
5093
+ html: 'http://www.w3.org/1999/xhtml',
5094
+ mathml: 'http://www.w3.org/1998/Math/MathML',
5095
+ svg: 'http://www.w3.org/2000/svg'
5096
+ };
5097
+
5098
+ module.exports = DOMNamespaces;
5099
+ },{}],45:[function(require,module,exports){
5100
+ (function (process){(function (){
5101
+ /**
5102
+ * Copyright (c) 2013-present, Facebook, Inc.
5103
+ *
5104
+ * This source code is licensed under the MIT license found in the
5105
+ * LICENSE file in the root directory of this source tree.
5106
+ *
5107
+ */
5108
+
5109
+ 'use strict';
5110
+
5111
+ var _prodInvariant = require('./reactProdInvariant');
5112
+
5113
+ var invariant = require('fbjs/lib/invariant');
5114
+
5115
+ function checkMask(value, bitmask) {
5116
+ return (value & bitmask) === bitmask;
5117
+ }
5118
+
5119
+ var DOMPropertyInjection = {
5120
+ /**
5121
+ * Mapping from normalized, camelcased property names to a configuration that
5122
+ * specifies how the associated DOM property should be accessed or rendered.
5123
+ */
5124
+ MUST_USE_PROPERTY: 0x1,
5125
+ HAS_BOOLEAN_VALUE: 0x4,
5126
+ HAS_NUMERIC_VALUE: 0x8,
5127
+ HAS_POSITIVE_NUMERIC_VALUE: 0x10 | 0x8,
5128
+ HAS_OVERLOADED_BOOLEAN_VALUE: 0x20,
5129
+
5130
+ /**
5131
+ * Inject some specialized knowledge about the DOM. This takes a config object
5132
+ * with the following properties:
5133
+ *
5134
+ * isCustomAttribute: function that given an attribute name will return true
5135
+ * if it can be inserted into the DOM verbatim. Useful for data-* or aria-*
5136
+ * attributes where it's impossible to enumerate all of the possible
5137
+ * attribute names,
5138
+ *
5139
+ * Properties: object mapping DOM property name to one of the
5140
+ * DOMPropertyInjection constants or null. If your attribute isn't in here,
5141
+ * it won't get written to the DOM.
5142
+ *
5143
+ * DOMAttributeNames: object mapping React attribute name to the DOM
5144
+ * attribute name. Attribute names not specified use the **lowercase**
5145
+ * normalized name.
5146
+ *
5147
+ * DOMAttributeNamespaces: object mapping React attribute name to the DOM
5148
+ * attribute namespace URL. (Attribute names not specified use no namespace.)
5149
+ *
5150
+ * DOMPropertyNames: similar to DOMAttributeNames but for DOM properties.
5151
+ * Property names not specified use the normalized name.
5152
+ *
5153
+ * DOMMutationMethods: Properties that require special mutation methods. If
5154
+ * `value` is undefined, the mutation method should unset the property.
5155
+ *
5156
+ * @param {object} domPropertyConfig the config as described above.
5157
+ */
5158
+ injectDOMPropertyConfig: function (domPropertyConfig) {
5159
+ var Injection = DOMPropertyInjection;
5160
+ var Properties = domPropertyConfig.Properties || {};
5161
+ var DOMAttributeNamespaces = domPropertyConfig.DOMAttributeNamespaces || {};
5162
+ var DOMAttributeNames = domPropertyConfig.DOMAttributeNames || {};
5163
+ var DOMPropertyNames = domPropertyConfig.DOMPropertyNames || {};
5164
+ var DOMMutationMethods = domPropertyConfig.DOMMutationMethods || {};
5165
+
5166
+ if (domPropertyConfig.isCustomAttribute) {
5167
+ DOMProperty._isCustomAttributeFunctions.push(domPropertyConfig.isCustomAttribute);
5168
+ }
5169
+
5170
+ for (var propName in Properties) {
5171
+ !!DOMProperty.properties.hasOwnProperty(propName) ? process.env.NODE_ENV !== '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;
5172
+
5173
+ var lowerCased = propName.toLowerCase();
5174
+ var propConfig = Properties[propName];
5175
+
5176
+ var propertyInfo = {
5177
+ attributeName: lowerCased,
5178
+ attributeNamespace: null,
5179
+ propertyName: propName,
5180
+ mutationMethod: null,
5181
+
5182
+ mustUseProperty: checkMask(propConfig, Injection.MUST_USE_PROPERTY),
5183
+ hasBooleanValue: checkMask(propConfig, Injection.HAS_BOOLEAN_VALUE),
5184
+ hasNumericValue: checkMask(propConfig, Injection.HAS_NUMERIC_VALUE),
5185
+ hasPositiveNumericValue: checkMask(propConfig, Injection.HAS_POSITIVE_NUMERIC_VALUE),
5186
+ hasOverloadedBooleanValue: checkMask(propConfig, Injection.HAS_OVERLOADED_BOOLEAN_VALUE)
5187
+ };
5188
+ !(propertyInfo.hasBooleanValue + propertyInfo.hasNumericValue + propertyInfo.hasOverloadedBooleanValue <= 1) ? process.env.NODE_ENV !== '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;
5189
+
5190
+ if (process.env.NODE_ENV !== 'production') {
5191
+ DOMProperty.getPossibleStandardName[lowerCased] = propName;
5192
+ }
5193
+
5194
+ if (DOMAttributeNames.hasOwnProperty(propName)) {
5195
+ var attributeName = DOMAttributeNames[propName];
5196
+ propertyInfo.attributeName = attributeName;
5197
+ if (process.env.NODE_ENV !== 'production') {
5198
+ DOMProperty.getPossibleStandardName[attributeName] = propName;
5199
+ }
5200
+ }
5201
+
5202
+ if (DOMAttributeNamespaces.hasOwnProperty(propName)) {
5203
+ propertyInfo.attributeNamespace = DOMAttributeNamespaces[propName];
5204
+ }
5205
+
5206
+ if (DOMPropertyNames.hasOwnProperty(propName)) {
5207
+ propertyInfo.propertyName = DOMPropertyNames[propName];
5208
+ }
5209
+
5210
+ if (DOMMutationMethods.hasOwnProperty(propName)) {
5211
+ propertyInfo.mutationMethod = DOMMutationMethods[propName];
5212
+ }
5213
+
5214
+ DOMProperty.properties[propName] = propertyInfo;
5215
+ }
5216
+ }
5217
+ };
5218
+
5219
+ /* eslint-disable max-len */
5220
+ 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';
5221
+ /* eslint-enable max-len */
5222
+
5223
+ /**
5224
+ * DOMProperty exports lookup objects that can be used like functions:
5225
+ *
5226
+ * > DOMProperty.isValid['id']
5227
+ * true
5228
+ * > DOMProperty.isValid['foobar']
5229
+ * undefined
5230
+ *
5231
+ * Although this may be confusing, it performs better in general.
5232
+ *
5233
+ * @see http://jsperf.com/key-exists
5234
+ * @see http://jsperf.com/key-missing
5235
+ */
5236
+ var DOMProperty = {
5237
+ ID_ATTRIBUTE_NAME: 'data-reactid',
5238
+ ROOT_ATTRIBUTE_NAME: 'data-reactroot',
5239
+
5240
+ ATTRIBUTE_NAME_START_CHAR: ATTRIBUTE_NAME_START_CHAR,
5241
+ ATTRIBUTE_NAME_CHAR: ATTRIBUTE_NAME_START_CHAR + '\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040',
5242
+
5243
+ /**
5244
+ * Map from property "standard name" to an object with info about how to set
5245
+ * the property in the DOM. Each object contains:
5246
+ *
5247
+ * attributeName:
5248
+ * Used when rendering markup or with `*Attribute()`.
5249
+ * attributeNamespace
5250
+ * propertyName:
5251
+ * Used on DOM node instances. (This includes properties that mutate due to
5252
+ * external factors.)
5253
+ * mutationMethod:
5254
+ * If non-null, used instead of the property or `setAttribute()` after
5255
+ * initial render.
5256
+ * mustUseProperty:
5257
+ * Whether the property must be accessed and mutated as an object property.
5258
+ * hasBooleanValue:
5259
+ * Whether the property should be removed when set to a falsey value.
5260
+ * hasNumericValue:
5261
+ * Whether the property must be numeric or parse as a numeric and should be
5262
+ * removed when set to a falsey value.
5263
+ * hasPositiveNumericValue:
5264
+ * Whether the property must be positive numeric or parse as a positive
5265
+ * numeric and should be removed when set to a falsey value.
5266
+ * hasOverloadedBooleanValue:
5267
+ * Whether the property can be used as a flag as well as with a value.
5268
+ * Removed when strictly equal to false; present without a value when
5269
+ * strictly equal to true; present with a value otherwise.
5270
+ */
5271
+ properties: {},
5272
+
5273
+ /**
5274
+ * Mapping from lowercase property names to the properly cased version, used
5275
+ * to warn in the case of missing properties. Available only in __DEV__.
5276
+ *
5277
+ * autofocus is predefined, because adding it to the property whitelist
5278
+ * causes unintended side effects.
5279
+ *
5280
+ * @type {Object}
5281
+ */
5282
+ getPossibleStandardName: process.env.NODE_ENV !== 'production' ? { autofocus: 'autoFocus' } : null,
5283
+
5284
+ /**
5285
+ * All of the isCustomAttribute() functions that have been injected.
5286
+ */
5287
+ _isCustomAttributeFunctions: [],
5288
+
5289
+ /**
5290
+ * Checks whether a property name is a custom attribute.
5291
+ * @method
5292
+ */
5293
+ isCustomAttribute: function (attributeName) {
5294
+ for (var i = 0; i < DOMProperty._isCustomAttributeFunctions.length; i++) {
5295
+ var isCustomAttributeFn = DOMProperty._isCustomAttributeFunctions[i];
5296
+ if (isCustomAttributeFn(attributeName)) {
5297
+ return true;
5298
+ }
5299
+ }
5300
+ return false;
5301
+ },
5302
+
5303
+ injection: DOMPropertyInjection
5304
+ };
5305
+
5306
+ module.exports = DOMProperty;
5307
+ }).call(this)}).call(this,require('_process'))
5308
+ },{"./reactProdInvariant":154,"_process":29,"fbjs/lib/invariant":20}],46:[function(require,module,exports){
5309
+ (function (process){(function (){
5310
+ /**
5311
+ * Copyright (c) 2013-present, Facebook, Inc.
5312
+ *
5313
+ * This source code is licensed under the MIT license found in the
5314
+ * LICENSE file in the root directory of this source tree.
5315
+ *
5316
+ */
5317
+
5318
+ 'use strict';
5319
+
5320
+ var DOMProperty = require('./DOMProperty');
5321
+ var ReactDOMComponentTree = require('./ReactDOMComponentTree');
5322
+ var ReactInstrumentation = require('./ReactInstrumentation');
5323
+
5324
+ var quoteAttributeValueForBrowser = require('./quoteAttributeValueForBrowser');
5325
+ var warning = require('fbjs/lib/warning');
5326
+
5327
+ var VALID_ATTRIBUTE_NAME_REGEX = new RegExp('^[' + DOMProperty.ATTRIBUTE_NAME_START_CHAR + '][' + DOMProperty.ATTRIBUTE_NAME_CHAR + ']*$');
5328
+ var illegalAttributeNameCache = {};
5329
+ var validatedAttributeNameCache = {};
5330
+
5331
+ function isAttributeNameSafe(attributeName) {
5332
+ if (validatedAttributeNameCache.hasOwnProperty(attributeName)) {
5333
+ return true;
5334
+ }
5335
+ if (illegalAttributeNameCache.hasOwnProperty(attributeName)) {
5336
+ return false;
5337
+ }
5338
+ if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) {
5339
+ validatedAttributeNameCache[attributeName] = true;
5340
+ return true;
5341
+ }
5342
+ illegalAttributeNameCache[attributeName] = true;
5343
+ process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid attribute name: `%s`', attributeName) : void 0;
5344
+ return false;
5345
+ }
5346
+
5347
+ function shouldIgnoreValue(propertyInfo, value) {
5348
+ return value == null || propertyInfo.hasBooleanValue && !value || propertyInfo.hasNumericValue && isNaN(value) || propertyInfo.hasPositiveNumericValue && value < 1 || propertyInfo.hasOverloadedBooleanValue && value === false;
5349
+ }
5350
+
5351
+ /**
5352
+ * Operations for dealing with DOM properties.
5353
+ */
5354
+ var DOMPropertyOperations = {
5355
+ /**
5356
+ * Creates markup for the ID property.
5357
+ *
5358
+ * @param {string} id Unescaped ID.
5359
+ * @return {string} Markup string.
5360
+ */
5361
+ createMarkupForID: function (id) {
5362
+ return DOMProperty.ID_ATTRIBUTE_NAME + '=' + quoteAttributeValueForBrowser(id);
5363
+ },
5364
+
5365
+ setAttributeForID: function (node, id) {
5366
+ node.setAttribute(DOMProperty.ID_ATTRIBUTE_NAME, id);
5367
+ },
5368
+
5369
+ createMarkupForRoot: function () {
5370
+ return DOMProperty.ROOT_ATTRIBUTE_NAME + '=""';
5371
+ },
5372
+
5373
+ setAttributeForRoot: function (node) {
5374
+ node.setAttribute(DOMProperty.ROOT_ATTRIBUTE_NAME, '');
5375
+ },
5376
+
5377
+ /**
5378
+ * Creates markup for a property.
5379
+ *
5380
+ * @param {string} name
5381
+ * @param {*} value
5382
+ * @return {?string} Markup string, or null if the property was invalid.
5383
+ */
5384
+ createMarkupForProperty: function (name, value) {
5385
+ var propertyInfo = DOMProperty.properties.hasOwnProperty(name) ? DOMProperty.properties[name] : null;
5386
+ if (propertyInfo) {
5387
+ if (shouldIgnoreValue(propertyInfo, value)) {
5388
+ return '';
5389
+ }
5390
+ var attributeName = propertyInfo.attributeName;
5391
+ if (propertyInfo.hasBooleanValue || propertyInfo.hasOverloadedBooleanValue && value === true) {
5392
+ return attributeName + '=""';
5393
+ }
5394
+ return attributeName + '=' + quoteAttributeValueForBrowser(value);
5395
+ } else if (DOMProperty.isCustomAttribute(name)) {
5396
+ if (value == null) {
5397
+ return '';
5398
+ }
5399
+ return name + '=' + quoteAttributeValueForBrowser(value);
5400
+ }
5401
+ return null;
5402
+ },
5403
+
5404
+ /**
5405
+ * Creates markup for a custom property.
5406
+ *
5407
+ * @param {string} name
5408
+ * @param {*} value
5409
+ * @return {string} Markup string, or empty string if the property was invalid.
5410
+ */
5411
+ createMarkupForCustomAttribute: function (name, value) {
5412
+ if (!isAttributeNameSafe(name) || value == null) {
5413
+ return '';
5414
+ }
5415
+ return name + '=' + quoteAttributeValueForBrowser(value);
5416
+ },
5417
+
5418
+ /**
5419
+ * Sets the value for a property on a node.
5420
+ *
5421
+ * @param {DOMElement} node
5422
+ * @param {string} name
5423
+ * @param {*} value
5424
+ */
5425
+ setValueForProperty: function (node, name, value) {
5426
+ var propertyInfo = DOMProperty.properties.hasOwnProperty(name) ? DOMProperty.properties[name] : null;
5427
+ if (propertyInfo) {
5428
+ var mutationMethod = propertyInfo.mutationMethod;
5429
+ if (mutationMethod) {
5430
+ mutationMethod(node, value);
5431
+ } else if (shouldIgnoreValue(propertyInfo, value)) {
5432
+ this.deleteValueForProperty(node, name);
5433
+ return;
5434
+ } else if (propertyInfo.mustUseProperty) {
5435
+ // Contrary to `setAttribute`, object properties are properly
5436
+ // `toString`ed by IE8/9.
5437
+ node[propertyInfo.propertyName] = value;
5438
+ } else {
5439
+ var attributeName = propertyInfo.attributeName;
5440
+ var namespace = propertyInfo.attributeNamespace;
5441
+ // `setAttribute` with objects becomes only `[object]` in IE8/9,
5442
+ // ('' + value) makes it output the correct toString()-value.
5443
+ if (namespace) {
5444
+ node.setAttributeNS(namespace, attributeName, '' + value);
5445
+ } else if (propertyInfo.hasBooleanValue || propertyInfo.hasOverloadedBooleanValue && value === true) {
5446
+ node.setAttribute(attributeName, '');
5447
+ } else {
5448
+ node.setAttribute(attributeName, '' + value);
5449
+ }
5450
+ }
5451
+ } else if (DOMProperty.isCustomAttribute(name)) {
5452
+ DOMPropertyOperations.setValueForAttribute(node, name, value);
5453
+ return;
5454
+ }
5455
+
5456
+ if (process.env.NODE_ENV !== 'production') {
5457
+ var payload = {};
5458
+ payload[name] = value;
5459
+ ReactInstrumentation.debugTool.onHostOperation({
5460
+ instanceID: ReactDOMComponentTree.getInstanceFromNode(node)._debugID,
5461
+ type: 'update attribute',
5462
+ payload: payload
5463
+ });
5464
+ }
5465
+ },
5466
+
5467
+ setValueForAttribute: function (node, name, value) {
5468
+ if (!isAttributeNameSafe(name)) {
5469
+ return;
5470
+ }
5471
+ if (value == null) {
5472
+ node.removeAttribute(name);
5473
+ } else {
5474
+ node.setAttribute(name, '' + value);
5475
+ }
5476
+
5477
+ if (process.env.NODE_ENV !== 'production') {
5478
+ var payload = {};
5479
+ payload[name] = value;
5480
+ ReactInstrumentation.debugTool.onHostOperation({
5481
+ instanceID: ReactDOMComponentTree.getInstanceFromNode(node)._debugID,
5482
+ type: 'update attribute',
5483
+ payload: payload
5484
+ });
5485
+ }
5486
+ },
5487
+
5488
+ /**
5489
+ * Deletes an attributes from a node.
5490
+ *
5491
+ * @param {DOMElement} node
5492
+ * @param {string} name
5493
+ */
5494
+ deleteValueForAttribute: function (node, name) {
5495
+ node.removeAttribute(name);
5496
+ if (process.env.NODE_ENV !== 'production') {
5497
+ ReactInstrumentation.debugTool.onHostOperation({
5498
+ instanceID: ReactDOMComponentTree.getInstanceFromNode(node)._debugID,
5499
+ type: 'remove attribute',
5500
+ payload: name
5501
+ });
5502
+ }
5503
+ },
5504
+
5505
+ /**
5506
+ * Deletes the value for a property on a node.
5507
+ *
5508
+ * @param {DOMElement} node
5509
+ * @param {string} name
5510
+ */
5511
+ deleteValueForProperty: function (node, name) {
5512
+ var propertyInfo = DOMProperty.properties.hasOwnProperty(name) ? DOMProperty.properties[name] : null;
5513
+ if (propertyInfo) {
5514
+ var mutationMethod = propertyInfo.mutationMethod;
5515
+ if (mutationMethod) {
5516
+ mutationMethod(node, undefined);
5517
+ } else if (propertyInfo.mustUseProperty) {
5518
+ var propName = propertyInfo.propertyName;
5519
+ if (propertyInfo.hasBooleanValue) {
5520
+ node[propName] = false;
5521
+ } else {
5522
+ node[propName] = '';
5523
+ }
5524
+ } else {
5525
+ node.removeAttribute(propertyInfo.attributeName);
5526
+ }
5527
+ } else if (DOMProperty.isCustomAttribute(name)) {
5528
+ node.removeAttribute(name);
5529
+ }
5530
+
5531
+ if (process.env.NODE_ENV !== 'production') {
5532
+ ReactInstrumentation.debugTool.onHostOperation({
5533
+ instanceID: ReactDOMComponentTree.getInstanceFromNode(node)._debugID,
5534
+ type: 'remove attribute',
5535
+ payload: name
5536
+ });
5537
+ }
5538
+ }
5539
+ };
5540
+
5541
+ module.exports = DOMPropertyOperations;
5542
+ }).call(this)}).call(this,require('_process'))
5543
+ },{"./DOMProperty":45,"./ReactDOMComponentTree":67,"./ReactInstrumentation":96,"./quoteAttributeValueForBrowser":153,"_process":29,"fbjs/lib/warning":27}],47:[function(require,module,exports){
5544
+ (function (process){(function (){
5545
+ /**
5546
+ * Copyright (c) 2013-present, Facebook, Inc.
5547
+ *
5548
+ * This source code is licensed under the MIT license found in the
5549
+ * LICENSE file in the root directory of this source tree.
5550
+ *
5551
+ */
5552
+
5553
+ 'use strict';
5554
+
5555
+ var _prodInvariant = require('./reactProdInvariant');
5556
+
5557
+ var DOMLazyTree = require('./DOMLazyTree');
5558
+ var ExecutionEnvironment = require('fbjs/lib/ExecutionEnvironment');
5559
+
5560
+ var createNodesFromMarkup = require('fbjs/lib/createNodesFromMarkup');
5561
+ var emptyFunction = require('fbjs/lib/emptyFunction');
5562
+ var invariant = require('fbjs/lib/invariant');
5563
+
5564
+ var Danger = {
5565
+ /**
5566
+ * Replaces a node with a string of markup at its current position within its
5567
+ * parent. The markup must render into a single root node.
5568
+ *
5569
+ * @param {DOMElement} oldChild Child node to replace.
5570
+ * @param {string} markup Markup to render in place of the child node.
5571
+ * @internal
5572
+ */
5573
+ dangerouslyReplaceNodeWithMarkup: function (oldChild, markup) {
5574
+ !ExecutionEnvironment.canUseDOM ? process.env.NODE_ENV !== '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;
5575
+ !markup ? process.env.NODE_ENV !== 'production' ? invariant(false, 'dangerouslyReplaceNodeWithMarkup(...): Missing markup.') : _prodInvariant('57') : void 0;
5576
+ !(oldChild.nodeName !== 'HTML') ? process.env.NODE_ENV !== '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;
5577
+
5578
+ if (typeof markup === 'string') {
5579
+ var newChild = createNodesFromMarkup(markup, emptyFunction)[0];
5580
+ oldChild.parentNode.replaceChild(newChild, oldChild);
5581
+ } else {
5582
+ DOMLazyTree.replaceChildWithTree(oldChild, markup);
5583
+ }
5584
+ }
5585
+ };
5586
+
5587
+ module.exports = Danger;
5588
+ }).call(this)}).call(this,require('_process'))
5589
+ },{"./DOMLazyTree":43,"./reactProdInvariant":154,"_process":29,"fbjs/lib/ExecutionEnvironment":6,"fbjs/lib/createNodesFromMarkup":11,"fbjs/lib/emptyFunction":12,"fbjs/lib/invariant":20}],48:[function(require,module,exports){
5590
+ /**
5591
+ * Copyright (c) 2013-present, Facebook, Inc.
5592
+ *
5593
+ * This source code is licensed under the MIT license found in the
5594
+ * LICENSE file in the root directory of this source tree.
5595
+ *
5596
+ */
5597
+
5598
+ 'use strict';
5599
+
5600
+ /**
5601
+ * Module that is injectable into `EventPluginHub`, that specifies a
5602
+ * deterministic ordering of `EventPlugin`s. A convenient way to reason about
5603
+ * plugins, without having to package every one of them. This is better than
5604
+ * having plugins be ordered in the same order that they are injected because
5605
+ * that ordering would be influenced by the packaging order.
5606
+ * `ResponderEventPlugin` must occur before `SimpleEventPlugin` so that
5607
+ * preventing default on events is convenient in `SimpleEventPlugin` handlers.
5608
+ */
5609
+
5610
+ var DefaultEventPluginOrder = ['ResponderEventPlugin', 'SimpleEventPlugin', 'TapEventPlugin', 'EnterLeaveEventPlugin', 'ChangeEventPlugin', 'SelectEventPlugin', 'BeforeInputEventPlugin'];
5611
+
5612
+ module.exports = DefaultEventPluginOrder;
5613
+ },{}],49:[function(require,module,exports){
5614
+ /**
5615
+ * Copyright (c) 2013-present, Facebook, Inc.
5616
+ *
5617
+ * This source code is licensed under the MIT license found in the
5618
+ * LICENSE file in the root directory of this source tree.
5619
+ *
5620
+ */
5621
+
5622
+ 'use strict';
5623
+
5624
+ var EventPropagators = require('./EventPropagators');
5625
+ var ReactDOMComponentTree = require('./ReactDOMComponentTree');
5626
+ var SyntheticMouseEvent = require('./SyntheticMouseEvent');
5627
+
5628
+ var eventTypes = {
5629
+ mouseEnter: {
5630
+ registrationName: 'onMouseEnter',
5631
+ dependencies: ['topMouseOut', 'topMouseOver']
5632
+ },
5633
+ mouseLeave: {
5634
+ registrationName: 'onMouseLeave',
5635
+ dependencies: ['topMouseOut', 'topMouseOver']
5636
+ }
5637
+ };
5638
+
5639
+ var EnterLeaveEventPlugin = {
5640
+ eventTypes: eventTypes,
5641
+
5642
+ /**
5643
+ * For almost every interaction we care about, there will be both a top-level
5644
+ * `mouseover` and `mouseout` event that occurs. Only use `mouseout` so that
5645
+ * we do not extract duplicate events. However, moving the mouse into the
5646
+ * browser from outside will not fire a `mouseout` event. In this case, we use
5647
+ * the `mouseover` top-level event.
5648
+ */
5649
+ extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
5650
+ if (topLevelType === 'topMouseOver' && (nativeEvent.relatedTarget || nativeEvent.fromElement)) {
5651
+ return null;
5652
+ }
5653
+ if (topLevelType !== 'topMouseOut' && topLevelType !== 'topMouseOver') {
5654
+ // Must not be a mouse in or mouse out - ignoring.
5655
+ return null;
5656
+ }
5657
+
5658
+ var win;
5659
+ if (nativeEventTarget.window === nativeEventTarget) {
5660
+ // `nativeEventTarget` is probably a window object.
5661
+ win = nativeEventTarget;
5662
+ } else {
5663
+ // TODO: Figure out why `ownerDocument` is sometimes undefined in IE8.
5664
+ var doc = nativeEventTarget.ownerDocument;
5665
+ if (doc) {
5666
+ win = doc.defaultView || doc.parentWindow;
5667
+ } else {
5668
+ win = window;
5669
+ }
5670
+ }
5671
+
5672
+ var from;
5673
+ var to;
5674
+ if (topLevelType === 'topMouseOut') {
5675
+ from = targetInst;
5676
+ var related = nativeEvent.relatedTarget || nativeEvent.toElement;
5677
+ to = related ? ReactDOMComponentTree.getClosestInstanceFromNode(related) : null;
5678
+ } else {
5679
+ // Moving to a node from outside the window.
5680
+ from = null;
5681
+ to = targetInst;
5682
+ }
5683
+
5684
+ if (from === to) {
5685
+ // Nothing pertains to our managed components.
5686
+ return null;
5687
+ }
5688
+
5689
+ var fromNode = from == null ? win : ReactDOMComponentTree.getNodeFromInstance(from);
5690
+ var toNode = to == null ? win : ReactDOMComponentTree.getNodeFromInstance(to);
5691
+
5692
+ var leave = SyntheticMouseEvent.getPooled(eventTypes.mouseLeave, from, nativeEvent, nativeEventTarget);
5693
+ leave.type = 'mouseleave';
5694
+ leave.target = fromNode;
5695
+ leave.relatedTarget = toNode;
5696
+
5697
+ var enter = SyntheticMouseEvent.getPooled(eventTypes.mouseEnter, to, nativeEvent, nativeEventTarget);
5698
+ enter.type = 'mouseenter';
5699
+ enter.target = toNode;
5700
+ enter.relatedTarget = fromNode;
5701
+
5702
+ EventPropagators.accumulateEnterLeaveDispatches(leave, enter, from, to);
5703
+
5704
+ return [leave, enter];
5705
+ }
5706
+ };
5707
+
5708
+ module.exports = EnterLeaveEventPlugin;
5709
+ },{"./EventPropagators":53,"./ReactDOMComponentTree":67,"./SyntheticMouseEvent":124}],50:[function(require,module,exports){
5710
+ (function (process){(function (){
5711
+ /**
5712
+ * Copyright (c) 2013-present, Facebook, Inc.
5713
+ *
5714
+ * This source code is licensed under the MIT license found in the
5715
+ * LICENSE file in the root directory of this source tree.
5716
+ *
5717
+ */
5718
+
5719
+ 'use strict';
5720
+
5721
+ var _prodInvariant = require('./reactProdInvariant');
5722
+
5723
+ var EventPluginRegistry = require('./EventPluginRegistry');
5724
+ var EventPluginUtils = require('./EventPluginUtils');
5725
+ var ReactErrorUtils = require('./ReactErrorUtils');
5726
+
5727
+ var accumulateInto = require('./accumulateInto');
5728
+ var forEachAccumulated = require('./forEachAccumulated');
5729
+ var invariant = require('fbjs/lib/invariant');
5730
+
5731
+ /**
5732
+ * Internal store for event listeners
5733
+ */
5734
+ var listenerBank = {};
5735
+
5736
+ /**
5737
+ * Internal queue of events that have accumulated their dispatches and are
5738
+ * waiting to have their dispatches executed.
5739
+ */
5740
+ var eventQueue = null;
5741
+
5742
+ /**
5743
+ * Dispatches an event and releases it back into the pool, unless persistent.
5744
+ *
5745
+ * @param {?object} event Synthetic event to be dispatched.
5746
+ * @param {boolean} simulated If the event is simulated (changes exn behavior)
5747
+ * @private
5748
+ */
5749
+ var executeDispatchesAndRelease = function (event, simulated) {
5750
+ if (event) {
5751
+ EventPluginUtils.executeDispatchesInOrder(event, simulated);
5752
+
5753
+ if (!event.isPersistent()) {
5754
+ event.constructor.release(event);
5755
+ }
5756
+ }
5757
+ };
5758
+ var executeDispatchesAndReleaseSimulated = function (e) {
5759
+ return executeDispatchesAndRelease(e, true);
5760
+ };
5761
+ var executeDispatchesAndReleaseTopLevel = function (e) {
5762
+ return executeDispatchesAndRelease(e, false);
5763
+ };
5764
+
5765
+ var getDictionaryKey = function (inst) {
5766
+ // Prevents V8 performance issue:
5767
+ // https://github.com/facebook/react/pull/7232
5768
+ return '.' + inst._rootNodeID;
5769
+ };
5770
+
5771
+ function isInteractive(tag) {
5772
+ return tag === 'button' || tag === 'input' || tag === 'select' || tag === 'textarea';
5773
+ }
5774
+
5775
+ function shouldPreventMouseEvent(name, type, props) {
5776
+ switch (name) {
5777
+ case 'onClick':
5778
+ case 'onClickCapture':
5779
+ case 'onDoubleClick':
5780
+ case 'onDoubleClickCapture':
5781
+ case 'onMouseDown':
5782
+ case 'onMouseDownCapture':
5783
+ case 'onMouseMove':
5784
+ case 'onMouseMoveCapture':
5785
+ case 'onMouseUp':
5786
+ case 'onMouseUpCapture':
5787
+ return !!(props.disabled && isInteractive(type));
5788
+ default:
5789
+ return false;
5790
+ }
5791
+ }
5792
+
5793
+ /**
5794
+ * This is a unified interface for event plugins to be installed and configured.
5795
+ *
5796
+ * Event plugins can implement the following properties:
5797
+ *
5798
+ * `extractEvents` {function(string, DOMEventTarget, string, object): *}
5799
+ * Required. When a top-level event is fired, this method is expected to
5800
+ * extract synthetic events that will in turn be queued and dispatched.
5801
+ *
5802
+ * `eventTypes` {object}
5803
+ * Optional, plugins that fire events must publish a mapping of registration
5804
+ * names that are used to register listeners. Values of this mapping must
5805
+ * be objects that contain `registrationName` or `phasedRegistrationNames`.
5806
+ *
5807
+ * `executeDispatch` {function(object, function, string)}
5808
+ * Optional, allows plugins to override how an event gets dispatched. By
5809
+ * default, the listener is simply invoked.
5810
+ *
5811
+ * Each plugin that is injected into `EventsPluginHub` is immediately operable.
5812
+ *
5813
+ * @public
5814
+ */
5815
+ var EventPluginHub = {
5816
+ /**
5817
+ * Methods for injecting dependencies.
5818
+ */
5819
+ injection: {
5820
+ /**
5821
+ * @param {array} InjectedEventPluginOrder
5822
+ * @public
5823
+ */
5824
+ injectEventPluginOrder: EventPluginRegistry.injectEventPluginOrder,
5825
+
5826
+ /**
5827
+ * @param {object} injectedNamesToPlugins Map from names to plugin modules.
5828
+ */
5829
+ injectEventPluginsByName: EventPluginRegistry.injectEventPluginsByName
5830
+ },
5831
+
5832
+ /**
5833
+ * Stores `listener` at `listenerBank[registrationName][key]`. Is idempotent.
5834
+ *
5835
+ * @param {object} inst The instance, which is the source of events.
5836
+ * @param {string} registrationName Name of listener (e.g. `onClick`).
5837
+ * @param {function} listener The callback to store.
5838
+ */
5839
+ putListener: function (inst, registrationName, listener) {
5840
+ !(typeof listener === 'function') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected %s listener to be a function, instead got type %s', registrationName, typeof listener) : _prodInvariant('94', registrationName, typeof listener) : void 0;
5841
+
5842
+ var key = getDictionaryKey(inst);
5843
+ var bankForRegistrationName = listenerBank[registrationName] || (listenerBank[registrationName] = {});
5844
+ bankForRegistrationName[key] = listener;
5845
+
5846
+ var PluginModule = EventPluginRegistry.registrationNameModules[registrationName];
5847
+ if (PluginModule && PluginModule.didPutListener) {
5848
+ PluginModule.didPutListener(inst, registrationName, listener);
5849
+ }
5850
+ },
5851
+
5852
+ /**
5853
+ * @param {object} inst The instance, which is the source of events.
5854
+ * @param {string} registrationName Name of listener (e.g. `onClick`).
5855
+ * @return {?function} The stored callback.
5856
+ */
5857
+ getListener: function (inst, registrationName) {
5858
+ // TODO: shouldPreventMouseEvent is DOM-specific and definitely should not
5859
+ // live here; needs to be moved to a better place soon
5860
+ var bankForRegistrationName = listenerBank[registrationName];
5861
+ if (shouldPreventMouseEvent(registrationName, inst._currentElement.type, inst._currentElement.props)) {
5862
+ return null;
5863
+ }
5864
+ var key = getDictionaryKey(inst);
5865
+ return bankForRegistrationName && bankForRegistrationName[key];
5866
+ },
5867
+
5868
+ /**
5869
+ * Deletes a listener from the registration bank.
5870
+ *
5871
+ * @param {object} inst The instance, which is the source of events.
5872
+ * @param {string} registrationName Name of listener (e.g. `onClick`).
5873
+ */
5874
+ deleteListener: function (inst, registrationName) {
5875
+ var PluginModule = EventPluginRegistry.registrationNameModules[registrationName];
5876
+ if (PluginModule && PluginModule.willDeleteListener) {
5877
+ PluginModule.willDeleteListener(inst, registrationName);
5878
+ }
5879
+
5880
+ var bankForRegistrationName = listenerBank[registrationName];
5881
+ // TODO: This should never be null -- when is it?
5882
+ if (bankForRegistrationName) {
5883
+ var key = getDictionaryKey(inst);
5884
+ delete bankForRegistrationName[key];
5885
+ }
5886
+ },
5887
+
5888
+ /**
5889
+ * Deletes all listeners for the DOM element with the supplied ID.
5890
+ *
5891
+ * @param {object} inst The instance, which is the source of events.
5892
+ */
5893
+ deleteAllListeners: function (inst) {
5894
+ var key = getDictionaryKey(inst);
5895
+ for (var registrationName in listenerBank) {
5896
+ if (!listenerBank.hasOwnProperty(registrationName)) {
5897
+ continue;
5898
+ }
5899
+
5900
+ if (!listenerBank[registrationName][key]) {
5901
+ continue;
5902
+ }
5903
+
5904
+ var PluginModule = EventPluginRegistry.registrationNameModules[registrationName];
5905
+ if (PluginModule && PluginModule.willDeleteListener) {
5906
+ PluginModule.willDeleteListener(inst, registrationName);
5907
+ }
5908
+
5909
+ delete listenerBank[registrationName][key];
5910
+ }
5911
+ },
5912
+
5913
+ /**
5914
+ * Allows registered plugins an opportunity to extract events from top-level
5915
+ * native browser events.
5916
+ *
5917
+ * @return {*} An accumulation of synthetic events.
5918
+ * @internal
5919
+ */
5920
+ extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
5921
+ var events;
5922
+ var plugins = EventPluginRegistry.plugins;
5923
+ for (var i = 0; i < plugins.length; i++) {
5924
+ // Not every plugin in the ordering may be loaded at runtime.
5925
+ var possiblePlugin = plugins[i];
5926
+ if (possiblePlugin) {
5927
+ var extractedEvents = possiblePlugin.extractEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget);
5928
+ if (extractedEvents) {
5929
+ events = accumulateInto(events, extractedEvents);
5930
+ }
5931
+ }
5932
+ }
5933
+ return events;
5934
+ },
5935
+
5936
+ /**
5937
+ * Enqueues a synthetic event that should be dispatched when
5938
+ * `processEventQueue` is invoked.
5939
+ *
5940
+ * @param {*} events An accumulation of synthetic events.
5941
+ * @internal
5942
+ */
5943
+ enqueueEvents: function (events) {
5944
+ if (events) {
5945
+ eventQueue = accumulateInto(eventQueue, events);
5946
+ }
5947
+ },
5948
+
5949
+ /**
5950
+ * Dispatches all synthetic events on the event queue.
5951
+ *
5952
+ * @internal
5953
+ */
5954
+ processEventQueue: function (simulated) {
5955
+ // Set `eventQueue` to null before processing it so that we can tell if more
5956
+ // events get enqueued while processing.
5957
+ var processingEventQueue = eventQueue;
5958
+ eventQueue = null;
5959
+ if (simulated) {
5960
+ forEachAccumulated(processingEventQueue, executeDispatchesAndReleaseSimulated);
5961
+ } else {
5962
+ forEachAccumulated(processingEventQueue, executeDispatchesAndReleaseTopLevel);
5963
+ }
5964
+ !!eventQueue ? process.env.NODE_ENV !== '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;
5965
+ // This would be a good time to rethrow if any of the event handlers threw.
5966
+ ReactErrorUtils.rethrowCaughtError();
5967
+ },
5968
+
5969
+ /**
5970
+ * These are needed for tests only. Do not use!
5971
+ */
5972
+ __purge: function () {
5973
+ listenerBank = {};
5974
+ },
5975
+
5976
+ __getListenerBank: function () {
5977
+ return listenerBank;
5978
+ }
5979
+ };
5980
+
5981
+ module.exports = EventPluginHub;
5982
+ }).call(this)}).call(this,require('_process'))
5983
+ },{"./EventPluginRegistry":51,"./EventPluginUtils":52,"./ReactErrorUtils":87,"./accumulateInto":131,"./forEachAccumulated":139,"./reactProdInvariant":154,"_process":29,"fbjs/lib/invariant":20}],51:[function(require,module,exports){
5984
+ (function (process){(function (){
5985
+ /**
5986
+ * Copyright (c) 2013-present, Facebook, Inc.
5987
+ *
5988
+ * This source code is licensed under the MIT license found in the
5989
+ * LICENSE file in the root directory of this source tree.
5990
+ *
5991
+ *
5992
+ */
5993
+
5994
+ 'use strict';
5995
+
5996
+ var _prodInvariant = require('./reactProdInvariant');
5997
+
5998
+ var invariant = require('fbjs/lib/invariant');
5999
+
6000
+ /**
6001
+ * Injectable ordering of event plugins.
6002
+ */
6003
+ var eventPluginOrder = null;
6004
+
6005
+ /**
6006
+ * Injectable mapping from names to event plugin modules.
6007
+ */
6008
+ var namesToPlugins = {};
6009
+
6010
+ /**
6011
+ * Recomputes the plugin list using the injected plugins and plugin ordering.
6012
+ *
6013
+ * @private
6014
+ */
6015
+ function recomputePluginOrdering() {
6016
+ if (!eventPluginOrder) {
6017
+ // Wait until an `eventPluginOrder` is injected.
6018
+ return;
6019
+ }
6020
+ for (var pluginName in namesToPlugins) {
6021
+ var pluginModule = namesToPlugins[pluginName];
6022
+ var pluginIndex = eventPluginOrder.indexOf(pluginName);
6023
+ !(pluginIndex > -1) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : _prodInvariant('96', pluginName) : void 0;
6024
+ if (EventPluginRegistry.plugins[pluginIndex]) {
6025
+ continue;
6026
+ }
6027
+ !pluginModule.extractEvents ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : _prodInvariant('97', pluginName) : void 0;
6028
+ EventPluginRegistry.plugins[pluginIndex] = pluginModule;
6029
+ var publishedEvents = pluginModule.eventTypes;
6030
+ for (var eventName in publishedEvents) {
6031
+ !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : _prodInvariant('98', eventName, pluginName) : void 0;
6032
+ }
6033
+ }
6034
+ }
6035
+
6036
+ /**
6037
+ * Publishes an event so that it can be dispatched by the supplied plugin.
6038
+ *
6039
+ * @param {object} dispatchConfig Dispatch configuration for the event.
6040
+ * @param {object} PluginModule Plugin publishing the event.
6041
+ * @return {boolean} True if the event was successfully published.
6042
+ * @private
6043
+ */
6044
+ function publishEventForPlugin(dispatchConfig, pluginModule, eventName) {
6045
+ !!EventPluginRegistry.eventNameDispatchConfigs.hasOwnProperty(eventName) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginHub: More than one plugin attempted to publish the same event name, `%s`.', eventName) : _prodInvariant('99', eventName) : void 0;
6046
+ EventPluginRegistry.eventNameDispatchConfigs[eventName] = dispatchConfig;
6047
+
6048
+ var phasedRegistrationNames = dispatchConfig.phasedRegistrationNames;
6049
+ if (phasedRegistrationNames) {
6050
+ for (var phaseName in phasedRegistrationNames) {
6051
+ if (phasedRegistrationNames.hasOwnProperty(phaseName)) {
6052
+ var phasedRegistrationName = phasedRegistrationNames[phaseName];
6053
+ publishRegistrationName(phasedRegistrationName, pluginModule, eventName);
6054
+ }
6055
+ }
6056
+ return true;
6057
+ } else if (dispatchConfig.registrationName) {
6058
+ publishRegistrationName(dispatchConfig.registrationName, pluginModule, eventName);
6059
+ return true;
6060
+ }
6061
+ return false;
6062
+ }
6063
+
6064
+ /**
6065
+ * Publishes a registration name that is used to identify dispatched events and
6066
+ * can be used with `EventPluginHub.putListener` to register listeners.
6067
+ *
6068
+ * @param {string} registrationName Registration name to add.
6069
+ * @param {object} PluginModule Plugin publishing the event.
6070
+ * @private
6071
+ */
6072
+ function publishRegistrationName(registrationName, pluginModule, eventName) {
6073
+ !!EventPluginRegistry.registrationNameModules[registrationName] ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginHub: More than one plugin attempted to publish the same registration name, `%s`.', registrationName) : _prodInvariant('100', registrationName) : void 0;
6074
+ EventPluginRegistry.registrationNameModules[registrationName] = pluginModule;
6075
+ EventPluginRegistry.registrationNameDependencies[registrationName] = pluginModule.eventTypes[eventName].dependencies;
6076
+
6077
+ if (process.env.NODE_ENV !== 'production') {
6078
+ var lowerCasedName = registrationName.toLowerCase();
6079
+ EventPluginRegistry.possibleRegistrationNames[lowerCasedName] = registrationName;
6080
+
6081
+ if (registrationName === 'onDoubleClick') {
6082
+ EventPluginRegistry.possibleRegistrationNames.ondblclick = registrationName;
6083
+ }
6084
+ }
6085
+ }
6086
+
6087
+ /**
6088
+ * Registers plugins so that they can extract and dispatch events.
6089
+ *
6090
+ * @see {EventPluginHub}
6091
+ */
6092
+ var EventPluginRegistry = {
6093
+ /**
6094
+ * Ordered list of injected plugins.
6095
+ */
6096
+ plugins: [],
6097
+
6098
+ /**
6099
+ * Mapping from event name to dispatch config
6100
+ */
6101
+ eventNameDispatchConfigs: {},
6102
+
6103
+ /**
6104
+ * Mapping from registration name to plugin module
6105
+ */
6106
+ registrationNameModules: {},
6107
+
6108
+ /**
6109
+ * Mapping from registration name to event name
6110
+ */
6111
+ registrationNameDependencies: {},
6112
+
6113
+ /**
6114
+ * Mapping from lowercase registration names to the properly cased version,
6115
+ * used to warn in the case of missing event handlers. Available
6116
+ * only in __DEV__.
6117
+ * @type {Object}
6118
+ */
6119
+ possibleRegistrationNames: process.env.NODE_ENV !== 'production' ? {} : null,
6120
+ // Trust the developer to only use possibleRegistrationNames in __DEV__
6121
+
6122
+ /**
6123
+ * Injects an ordering of plugins (by plugin name). This allows the ordering
6124
+ * to be decoupled from injection of the actual plugins so that ordering is
6125
+ * always deterministic regardless of packaging, on-the-fly injection, etc.
6126
+ *
6127
+ * @param {array} InjectedEventPluginOrder
6128
+ * @internal
6129
+ * @see {EventPluginHub.injection.injectEventPluginOrder}
6130
+ */
6131
+ injectEventPluginOrder: function (injectedEventPluginOrder) {
6132
+ !!eventPluginOrder ? process.env.NODE_ENV !== '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;
6133
+ // Clone the ordering so it cannot be dynamically mutated.
6134
+ eventPluginOrder = Array.prototype.slice.call(injectedEventPluginOrder);
6135
+ recomputePluginOrdering();
6136
+ },
6137
+
6138
+ /**
6139
+ * Injects plugins to be used by `EventPluginHub`. The plugin names must be
6140
+ * in the ordering injected by `injectEventPluginOrder`.
6141
+ *
6142
+ * Plugins can be injected as part of page initialization or on-the-fly.
6143
+ *
6144
+ * @param {object} injectedNamesToPlugins Map from names to plugin modules.
6145
+ * @internal
6146
+ * @see {EventPluginHub.injection.injectEventPluginsByName}
6147
+ */
6148
+ injectEventPluginsByName: function (injectedNamesToPlugins) {
6149
+ var isOrderingDirty = false;
6150
+ for (var pluginName in injectedNamesToPlugins) {
6151
+ if (!injectedNamesToPlugins.hasOwnProperty(pluginName)) {
6152
+ continue;
6153
+ }
6154
+ var pluginModule = injectedNamesToPlugins[pluginName];
6155
+ if (!namesToPlugins.hasOwnProperty(pluginName) || namesToPlugins[pluginName] !== pluginModule) {
6156
+ !!namesToPlugins[pluginName] ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginRegistry: Cannot inject two different event plugins using the same name, `%s`.', pluginName) : _prodInvariant('102', pluginName) : void 0;
6157
+ namesToPlugins[pluginName] = pluginModule;
6158
+ isOrderingDirty = true;
6159
+ }
6160
+ }
6161
+ if (isOrderingDirty) {
6162
+ recomputePluginOrdering();
6163
+ }
6164
+ },
6165
+
6166
+ /**
6167
+ * Looks up the plugin for the supplied event.
6168
+ *
6169
+ * @param {object} event A synthetic event.
6170
+ * @return {?object} The plugin that created the supplied event.
6171
+ * @internal
6172
+ */
6173
+ getPluginModuleForEvent: function (event) {
6174
+ var dispatchConfig = event.dispatchConfig;
6175
+ if (dispatchConfig.registrationName) {
6176
+ return EventPluginRegistry.registrationNameModules[dispatchConfig.registrationName] || null;
6177
+ }
6178
+ if (dispatchConfig.phasedRegistrationNames !== undefined) {
6179
+ // pulling phasedRegistrationNames out of dispatchConfig helps Flow see
6180
+ // that it is not undefined.
6181
+ var phasedRegistrationNames = dispatchConfig.phasedRegistrationNames;
6182
+
6183
+ for (var phase in phasedRegistrationNames) {
6184
+ if (!phasedRegistrationNames.hasOwnProperty(phase)) {
6185
+ continue;
6186
+ }
6187
+ var pluginModule = EventPluginRegistry.registrationNameModules[phasedRegistrationNames[phase]];
6188
+ if (pluginModule) {
6189
+ return pluginModule;
6190
+ }
6191
+ }
6192
+ }
6193
+ return null;
6194
+ },
6195
+
6196
+ /**
6197
+ * Exposed for unit testing.
6198
+ * @private
6199
+ */
6200
+ _resetEventPlugins: function () {
6201
+ eventPluginOrder = null;
6202
+ for (var pluginName in namesToPlugins) {
6203
+ if (namesToPlugins.hasOwnProperty(pluginName)) {
6204
+ delete namesToPlugins[pluginName];
6205
+ }
6206
+ }
6207
+ EventPluginRegistry.plugins.length = 0;
6208
+
6209
+ var eventNameDispatchConfigs = EventPluginRegistry.eventNameDispatchConfigs;
6210
+ for (var eventName in eventNameDispatchConfigs) {
6211
+ if (eventNameDispatchConfigs.hasOwnProperty(eventName)) {
6212
+ delete eventNameDispatchConfigs[eventName];
6213
+ }
6214
+ }
6215
+
6216
+ var registrationNameModules = EventPluginRegistry.registrationNameModules;
6217
+ for (var registrationName in registrationNameModules) {
6218
+ if (registrationNameModules.hasOwnProperty(registrationName)) {
6219
+ delete registrationNameModules[registrationName];
6220
+ }
6221
+ }
6222
+
6223
+ if (process.env.NODE_ENV !== 'production') {
6224
+ var possibleRegistrationNames = EventPluginRegistry.possibleRegistrationNames;
6225
+ for (var lowerCasedName in possibleRegistrationNames) {
6226
+ if (possibleRegistrationNames.hasOwnProperty(lowerCasedName)) {
6227
+ delete possibleRegistrationNames[lowerCasedName];
6228
+ }
6229
+ }
6230
+ }
6231
+ }
6232
+ };
6233
+
6234
+ module.exports = EventPluginRegistry;
6235
+ }).call(this)}).call(this,require('_process'))
6236
+ },{"./reactProdInvariant":154,"_process":29,"fbjs/lib/invariant":20}],52:[function(require,module,exports){
6237
+ (function (process){(function (){
6238
+ /**
6239
+ * Copyright (c) 2013-present, Facebook, Inc.
6240
+ *
6241
+ * This source code is licensed under the MIT license found in the
6242
+ * LICENSE file in the root directory of this source tree.
6243
+ *
6244
+ */
6245
+
6246
+ 'use strict';
6247
+
6248
+ var _prodInvariant = require('./reactProdInvariant');
6249
+
6250
+ var ReactErrorUtils = require('./ReactErrorUtils');
6251
+
6252
+ var invariant = require('fbjs/lib/invariant');
6253
+ var warning = require('fbjs/lib/warning');
6254
+
6255
+ /**
6256
+ * Injected dependencies:
6257
+ */
6258
+
6259
+ /**
6260
+ * - `ComponentTree`: [required] Module that can convert between React instances
6261
+ * and actual node references.
6262
+ */
6263
+ var ComponentTree;
6264
+ var TreeTraversal;
6265
+ var injection = {
6266
+ injectComponentTree: function (Injected) {
6267
+ ComponentTree = Injected;
6268
+ if (process.env.NODE_ENV !== 'production') {
6269
+ process.env.NODE_ENV !== 'production' ? warning(Injected && Injected.getNodeFromInstance && Injected.getInstanceFromNode, 'EventPluginUtils.injection.injectComponentTree(...): Injected ' + 'module is missing getNodeFromInstance or getInstanceFromNode.') : void 0;
6270
+ }
6271
+ },
6272
+ injectTreeTraversal: function (Injected) {
6273
+ TreeTraversal = Injected;
6274
+ if (process.env.NODE_ENV !== 'production') {
6275
+ process.env.NODE_ENV !== 'production' ? warning(Injected && Injected.isAncestor && Injected.getLowestCommonAncestor, 'EventPluginUtils.injection.injectTreeTraversal(...): Injected ' + 'module is missing isAncestor or getLowestCommonAncestor.') : void 0;
6276
+ }
6277
+ }
6278
+ };
6279
+
6280
+ function isEndish(topLevelType) {
6281
+ return topLevelType === 'topMouseUp' || topLevelType === 'topTouchEnd' || topLevelType === 'topTouchCancel';
6282
+ }
6283
+
6284
+ function isMoveish(topLevelType) {
6285
+ return topLevelType === 'topMouseMove' || topLevelType === 'topTouchMove';
6286
+ }
6287
+ function isStartish(topLevelType) {
6288
+ return topLevelType === 'topMouseDown' || topLevelType === 'topTouchStart';
6289
+ }
6290
+
6291
+ var validateEventDispatches;
6292
+ if (process.env.NODE_ENV !== 'production') {
6293
+ validateEventDispatches = function (event) {
6294
+ var dispatchListeners = event._dispatchListeners;
6295
+ var dispatchInstances = event._dispatchInstances;
6296
+
6297
+ var listenersIsArr = Array.isArray(dispatchListeners);
6298
+ var listenersLen = listenersIsArr ? dispatchListeners.length : dispatchListeners ? 1 : 0;
6299
+
6300
+ var instancesIsArr = Array.isArray(dispatchInstances);
6301
+ var instancesLen = instancesIsArr ? dispatchInstances.length : dispatchInstances ? 1 : 0;
6302
+
6303
+ process.env.NODE_ENV !== 'production' ? warning(instancesIsArr === listenersIsArr && instancesLen === listenersLen, 'EventPluginUtils: Invalid `event`.') : void 0;
6304
+ };
6305
+ }
6306
+
6307
+ /**
6308
+ * Dispatch the event to the listener.
6309
+ * @param {SyntheticEvent} event SyntheticEvent to handle
6310
+ * @param {boolean} simulated If the event is simulated (changes exn behavior)
6311
+ * @param {function} listener Application-level callback
6312
+ * @param {*} inst Internal component instance
6313
+ */
6314
+ function executeDispatch(event, simulated, listener, inst) {
6315
+ var type = event.type || 'unknown-event';
6316
+ event.currentTarget = EventPluginUtils.getNodeFromInstance(inst);
6317
+ if (simulated) {
6318
+ ReactErrorUtils.invokeGuardedCallbackWithCatch(type, listener, event);
6319
+ } else {
6320
+ ReactErrorUtils.invokeGuardedCallback(type, listener, event);
6321
+ }
6322
+ event.currentTarget = null;
6323
+ }
6324
+
6325
+ /**
6326
+ * Standard/simple iteration through an event's collected dispatches.
6327
+ */
6328
+ function executeDispatchesInOrder(event, simulated) {
6329
+ var dispatchListeners = event._dispatchListeners;
6330
+ var dispatchInstances = event._dispatchInstances;
6331
+ if (process.env.NODE_ENV !== 'production') {
6332
+ validateEventDispatches(event);
6333
+ }
6334
+ if (Array.isArray(dispatchListeners)) {
6335
+ for (var i = 0; i < dispatchListeners.length; i++) {
6336
+ if (event.isPropagationStopped()) {
6337
+ break;
6338
+ }
6339
+ // Listeners and Instances are two parallel arrays that are always in sync.
6340
+ executeDispatch(event, simulated, dispatchListeners[i], dispatchInstances[i]);
6341
+ }
6342
+ } else if (dispatchListeners) {
6343
+ executeDispatch(event, simulated, dispatchListeners, dispatchInstances);
6344
+ }
6345
+ event._dispatchListeners = null;
6346
+ event._dispatchInstances = null;
6347
+ }
6348
+
6349
+ /**
6350
+ * Standard/simple iteration through an event's collected dispatches, but stops
6351
+ * at the first dispatch execution returning true, and returns that id.
6352
+ *
6353
+ * @return {?string} id of the first dispatch execution who's listener returns
6354
+ * true, or null if no listener returned true.
6355
+ */
6356
+ function executeDispatchesInOrderStopAtTrueImpl(event) {
6357
+ var dispatchListeners = event._dispatchListeners;
6358
+ var dispatchInstances = event._dispatchInstances;
6359
+ if (process.env.NODE_ENV !== 'production') {
6360
+ validateEventDispatches(event);
6361
+ }
6362
+ if (Array.isArray(dispatchListeners)) {
6363
+ for (var i = 0; i < dispatchListeners.length; i++) {
6364
+ if (event.isPropagationStopped()) {
6365
+ break;
6366
+ }
6367
+ // Listeners and Instances are two parallel arrays that are always in sync.
6368
+ if (dispatchListeners[i](event, dispatchInstances[i])) {
6369
+ return dispatchInstances[i];
6370
+ }
6371
+ }
6372
+ } else if (dispatchListeners) {
6373
+ if (dispatchListeners(event, dispatchInstances)) {
6374
+ return dispatchInstances;
6375
+ }
6376
+ }
6377
+ return null;
6378
+ }
6379
+
6380
+ /**
6381
+ * @see executeDispatchesInOrderStopAtTrueImpl
6382
+ */
6383
+ function executeDispatchesInOrderStopAtTrue(event) {
6384
+ var ret = executeDispatchesInOrderStopAtTrueImpl(event);
6385
+ event._dispatchInstances = null;
6386
+ event._dispatchListeners = null;
6387
+ return ret;
6388
+ }
6389
+
6390
+ /**
6391
+ * Execution of a "direct" dispatch - there must be at most one dispatch
6392
+ * accumulated on the event or it is considered an error. It doesn't really make
6393
+ * sense for an event with multiple dispatches (bubbled) to keep track of the
6394
+ * return values at each dispatch execution, but it does tend to make sense when
6395
+ * dealing with "direct" dispatches.
6396
+ *
6397
+ * @return {*} The return value of executing the single dispatch.
6398
+ */
6399
+ function executeDirectDispatch(event) {
6400
+ if (process.env.NODE_ENV !== 'production') {
6401
+ validateEventDispatches(event);
6402
+ }
6403
+ var dispatchListener = event._dispatchListeners;
6404
+ var dispatchInstance = event._dispatchInstances;
6405
+ !!Array.isArray(dispatchListener) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'executeDirectDispatch(...): Invalid `event`.') : _prodInvariant('103') : void 0;
6406
+ event.currentTarget = dispatchListener ? EventPluginUtils.getNodeFromInstance(dispatchInstance) : null;
6407
+ var res = dispatchListener ? dispatchListener(event) : null;
6408
+ event.currentTarget = null;
6409
+ event._dispatchListeners = null;
6410
+ event._dispatchInstances = null;
6411
+ return res;
6412
+ }
6413
+
6414
+ /**
6415
+ * @param {SyntheticEvent} event
6416
+ * @return {boolean} True iff number of dispatches accumulated is greater than 0.
6417
+ */
6418
+ function hasDispatches(event) {
6419
+ return !!event._dispatchListeners;
6420
+ }
6421
+
6422
+ /**
6423
+ * General utilities that are useful in creating custom Event Plugins.
6424
+ */
6425
+ var EventPluginUtils = {
6426
+ isEndish: isEndish,
6427
+ isMoveish: isMoveish,
6428
+ isStartish: isStartish,
6429
+
6430
+ executeDirectDispatch: executeDirectDispatch,
6431
+ executeDispatchesInOrder: executeDispatchesInOrder,
6432
+ executeDispatchesInOrderStopAtTrue: executeDispatchesInOrderStopAtTrue,
6433
+ hasDispatches: hasDispatches,
6434
+
6435
+ getInstanceFromNode: function (node) {
6436
+ return ComponentTree.getInstanceFromNode(node);
6437
+ },
6438
+ getNodeFromInstance: function (node) {
6439
+ return ComponentTree.getNodeFromInstance(node);
6440
+ },
6441
+ isAncestor: function (a, b) {
6442
+ return TreeTraversal.isAncestor(a, b);
6443
+ },
6444
+ getLowestCommonAncestor: function (a, b) {
6445
+ return TreeTraversal.getLowestCommonAncestor(a, b);
6446
+ },
6447
+ getParentInstance: function (inst) {
6448
+ return TreeTraversal.getParentInstance(inst);
6449
+ },
6450
+ traverseTwoPhase: function (target, fn, arg) {
6451
+ return TreeTraversal.traverseTwoPhase(target, fn, arg);
6452
+ },
6453
+ traverseEnterLeave: function (from, to, fn, argFrom, argTo) {
6454
+ return TreeTraversal.traverseEnterLeave(from, to, fn, argFrom, argTo);
6455
+ },
6456
+
6457
+ injection: injection
6458
+ };
6459
+
6460
+ module.exports = EventPluginUtils;
6461
+ }).call(this)}).call(this,require('_process'))
6462
+ },{"./ReactErrorUtils":87,"./reactProdInvariant":154,"_process":29,"fbjs/lib/invariant":20,"fbjs/lib/warning":27}],53:[function(require,module,exports){
6463
+ (function (process){(function (){
6464
+ /**
6465
+ * Copyright (c) 2013-present, Facebook, Inc.
6466
+ *
6467
+ * This source code is licensed under the MIT license found in the
6468
+ * LICENSE file in the root directory of this source tree.
6469
+ *
6470
+ */
6471
+
6472
+ 'use strict';
6473
+
6474
+ var EventPluginHub = require('./EventPluginHub');
6475
+ var EventPluginUtils = require('./EventPluginUtils');
6476
+
6477
+ var accumulateInto = require('./accumulateInto');
6478
+ var forEachAccumulated = require('./forEachAccumulated');
6479
+ var warning = require('fbjs/lib/warning');
6480
+
6481
+ var getListener = EventPluginHub.getListener;
6482
+
6483
+ /**
6484
+ * Some event types have a notion of different registration names for different
6485
+ * "phases" of propagation. This finds listeners by a given phase.
6486
+ */
6487
+ function listenerAtPhase(inst, event, propagationPhase) {
6488
+ var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];
6489
+ return getListener(inst, registrationName);
6490
+ }
6491
+
6492
+ /**
6493
+ * Tags a `SyntheticEvent` with dispatched listeners. Creating this function
6494
+ * here, allows us to not have to bind or create functions for each event.
6495
+ * Mutating the event's members allows us to not have to create a wrapping
6496
+ * "dispatch" object that pairs the event with the listener.
6497
+ */
6498
+ function accumulateDirectionalDispatches(inst, phase, event) {
6499
+ if (process.env.NODE_ENV !== 'production') {
6500
+ process.env.NODE_ENV !== 'production' ? warning(inst, 'Dispatching inst must not be null') : void 0;
6501
+ }
6502
+ var listener = listenerAtPhase(inst, event, phase);
6503
+ if (listener) {
6504
+ event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);
6505
+ event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);
6506
+ }
6507
+ }
6508
+
6509
+ /**
6510
+ * Collect dispatches (must be entirely collected before dispatching - see unit
6511
+ * tests). Lazily allocate the array to conserve memory. We must loop through
6512
+ * each event and perform the traversal for each one. We cannot perform a
6513
+ * single traversal for the entire collection of events because each event may
6514
+ * have a different target.
6515
+ */
6516
+ function accumulateTwoPhaseDispatchesSingle(event) {
6517
+ if (event && event.dispatchConfig.phasedRegistrationNames) {
6518
+ EventPluginUtils.traverseTwoPhase(event._targetInst, accumulateDirectionalDispatches, event);
6519
+ }
6520
+ }
6521
+
6522
+ /**
6523
+ * Same as `accumulateTwoPhaseDispatchesSingle`, but skips over the targetID.
6524
+ */
6525
+ function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {
6526
+ if (event && event.dispatchConfig.phasedRegistrationNames) {
6527
+ var targetInst = event._targetInst;
6528
+ var parentInst = targetInst ? EventPluginUtils.getParentInstance(targetInst) : null;
6529
+ EventPluginUtils.traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);
6530
+ }
6531
+ }
6532
+
6533
+ /**
6534
+ * Accumulates without regard to direction, does not look for phased
6535
+ * registration names. Same as `accumulateDirectDispatchesSingle` but without
6536
+ * requiring that the `dispatchMarker` be the same as the dispatched ID.
6537
+ */
6538
+ function accumulateDispatches(inst, ignoredDirection, event) {
6539
+ if (event && event.dispatchConfig.registrationName) {
6540
+ var registrationName = event.dispatchConfig.registrationName;
6541
+ var listener = getListener(inst, registrationName);
6542
+ if (listener) {
6543
+ event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);
6544
+ event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);
6545
+ }
6546
+ }
6547
+ }
6548
+
6549
+ /**
6550
+ * Accumulates dispatches on an `SyntheticEvent`, but only for the
6551
+ * `dispatchMarker`.
6552
+ * @param {SyntheticEvent} event
6553
+ */
6554
+ function accumulateDirectDispatchesSingle(event) {
6555
+ if (event && event.dispatchConfig.registrationName) {
6556
+ accumulateDispatches(event._targetInst, null, event);
6557
+ }
6558
+ }
6559
+
6560
+ function accumulateTwoPhaseDispatches(events) {
6561
+ forEachAccumulated(events, accumulateTwoPhaseDispatchesSingle);
6562
+ }
6563
+
6564
+ function accumulateTwoPhaseDispatchesSkipTarget(events) {
6565
+ forEachAccumulated(events, accumulateTwoPhaseDispatchesSingleSkipTarget);
6566
+ }
6567
+
6568
+ function accumulateEnterLeaveDispatches(leave, enter, from, to) {
6569
+ EventPluginUtils.traverseEnterLeave(from, to, accumulateDispatches, leave, enter);
6570
+ }
6571
+
6572
+ function accumulateDirectDispatches(events) {
6573
+ forEachAccumulated(events, accumulateDirectDispatchesSingle);
6574
+ }
6575
+
6576
+ /**
6577
+ * A small set of propagation patterns, each of which will accept a small amount
6578
+ * of information, and generate a set of "dispatch ready event objects" - which
6579
+ * are sets of events that have already been annotated with a set of dispatched
6580
+ * listener functions/ids. The API is designed this way to discourage these
6581
+ * propagation strategies from actually executing the dispatches, since we
6582
+ * always want to collect the entire set of dispatches before executing event a
6583
+ * single one.
6584
+ *
6585
+ * @constructor EventPropagators
6586
+ */
6587
+ var EventPropagators = {
6588
+ accumulateTwoPhaseDispatches: accumulateTwoPhaseDispatches,
6589
+ accumulateTwoPhaseDispatchesSkipTarget: accumulateTwoPhaseDispatchesSkipTarget,
6590
+ accumulateDirectDispatches: accumulateDirectDispatches,
6591
+ accumulateEnterLeaveDispatches: accumulateEnterLeaveDispatches
6592
+ };
6593
+
6594
+ module.exports = EventPropagators;
6595
+ }).call(this)}).call(this,require('_process'))
6596
+ },{"./EventPluginHub":50,"./EventPluginUtils":52,"./accumulateInto":131,"./forEachAccumulated":139,"_process":29,"fbjs/lib/warning":27}],54:[function(require,module,exports){
6597
+ /**
6598
+ * Copyright (c) 2013-present, Facebook, Inc.
6599
+ *
6600
+ * This source code is licensed under the MIT license found in the
6601
+ * LICENSE file in the root directory of this source tree.
6602
+ *
6603
+ */
6604
+
6605
+ 'use strict';
6606
+
6607
+ var _assign = require('object-assign');
6608
+
6609
+ var PooledClass = require('./PooledClass');
6610
+
6611
+ var getTextContentAccessor = require('./getTextContentAccessor');
6612
+
6613
+ /**
6614
+ * This helper class stores information about text content of a target node,
6615
+ * allowing comparison of content before and after a given event.
6616
+ *
6617
+ * Identify the node where selection currently begins, then observe
6618
+ * both its text content and its current position in the DOM. Since the
6619
+ * browser may natively replace the target node during composition, we can
6620
+ * use its position to find its replacement.
6621
+ *
6622
+ * @param {DOMEventTarget} root
6623
+ */
6624
+ function FallbackCompositionState(root) {
6625
+ this._root = root;
6626
+ this._startText = this.getText();
6627
+ this._fallbackText = null;
6628
+ }
6629
+
6630
+ _assign(FallbackCompositionState.prototype, {
6631
+ destructor: function () {
6632
+ this._root = null;
6633
+ this._startText = null;
6634
+ this._fallbackText = null;
6635
+ },
6636
+
6637
+ /**
6638
+ * Get current text of input.
6639
+ *
6640
+ * @return {string}
6641
+ */
6642
+ getText: function () {
6643
+ if ('value' in this._root) {
6644
+ return this._root.value;
6645
+ }
6646
+ return this._root[getTextContentAccessor()];
6647
+ },
6648
+
6649
+ /**
6650
+ * Determine the differing substring between the initially stored
6651
+ * text content and the current content.
6652
+ *
6653
+ * @return {string}
6654
+ */
6655
+ getData: function () {
6656
+ if (this._fallbackText) {
6657
+ return this._fallbackText;
6658
+ }
6659
+
6660
+ var start;
6661
+ var startValue = this._startText;
6662
+ var startLength = startValue.length;
6663
+ var end;
6664
+ var endValue = this.getText();
6665
+ var endLength = endValue.length;
6666
+
6667
+ for (start = 0; start < startLength; start++) {
6668
+ if (startValue[start] !== endValue[start]) {
6669
+ break;
6670
+ }
6671
+ }
6672
+
6673
+ var minEnd = startLength - start;
6674
+ for (end = 1; end <= minEnd; end++) {
6675
+ if (startValue[startLength - end] !== endValue[endLength - end]) {
6676
+ break;
6677
+ }
6678
+ }
6679
+
6680
+ var sliceTail = end > 1 ? 1 - end : undefined;
6681
+ this._fallbackText = endValue.slice(start, sliceTail);
6682
+ return this._fallbackText;
6683
+ }
6684
+ });
6685
+
6686
+ PooledClass.addPoolingTo(FallbackCompositionState);
6687
+
6688
+ module.exports = FallbackCompositionState;
6689
+ },{"./PooledClass":58,"./getTextContentAccessor":147,"object-assign":28}],55:[function(require,module,exports){
6690
+ /**
6691
+ * Copyright (c) 2013-present, Facebook, Inc.
6692
+ *
6693
+ * This source code is licensed under the MIT license found in the
6694
+ * LICENSE file in the root directory of this source tree.
6695
+ *
6696
+ */
6697
+
6698
+ 'use strict';
6699
+
6700
+ var DOMProperty = require('./DOMProperty');
6701
+
6702
+ var MUST_USE_PROPERTY = DOMProperty.injection.MUST_USE_PROPERTY;
6703
+ var HAS_BOOLEAN_VALUE = DOMProperty.injection.HAS_BOOLEAN_VALUE;
6704
+ var HAS_NUMERIC_VALUE = DOMProperty.injection.HAS_NUMERIC_VALUE;
6705
+ var HAS_POSITIVE_NUMERIC_VALUE = DOMProperty.injection.HAS_POSITIVE_NUMERIC_VALUE;
6706
+ var HAS_OVERLOADED_BOOLEAN_VALUE = DOMProperty.injection.HAS_OVERLOADED_BOOLEAN_VALUE;
6707
+
6708
+ var HTMLDOMPropertyConfig = {
6709
+ isCustomAttribute: RegExp.prototype.test.bind(new RegExp('^(data|aria)-[' + DOMProperty.ATTRIBUTE_NAME_CHAR + ']*$')),
6710
+ Properties: {
6711
+ /**
6712
+ * Standard Properties
6713
+ */
6714
+ accept: 0,
6715
+ acceptCharset: 0,
6716
+ accessKey: 0,
6717
+ action: 0,
6718
+ allowFullScreen: HAS_BOOLEAN_VALUE,
6719
+ allowTransparency: 0,
6720
+ alt: 0,
6721
+ // specifies target context for links with `preload` type
6722
+ as: 0,
6723
+ async: HAS_BOOLEAN_VALUE,
6724
+ autoComplete: 0,
6725
+ // autoFocus is polyfilled/normalized by AutoFocusUtils
6726
+ // autoFocus: HAS_BOOLEAN_VALUE,
6727
+ autoPlay: HAS_BOOLEAN_VALUE,
6728
+ capture: HAS_BOOLEAN_VALUE,
6729
+ cellPadding: 0,
6730
+ cellSpacing: 0,
6731
+ charSet: 0,
6732
+ challenge: 0,
6733
+ checked: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
6734
+ cite: 0,
6735
+ classID: 0,
6736
+ className: 0,
6737
+ cols: HAS_POSITIVE_NUMERIC_VALUE,
6738
+ colSpan: 0,
6739
+ content: 0,
6740
+ contentEditable: 0,
6741
+ contextMenu: 0,
6742
+ controls: HAS_BOOLEAN_VALUE,
6743
+ controlsList: 0,
6744
+ coords: 0,
6745
+ crossOrigin: 0,
6746
+ data: 0, // For `<object />` acts as `src`.
6747
+ dateTime: 0,
6748
+ 'default': HAS_BOOLEAN_VALUE,
6749
+ defer: HAS_BOOLEAN_VALUE,
6750
+ dir: 0,
6751
+ disabled: HAS_BOOLEAN_VALUE,
6752
+ download: HAS_OVERLOADED_BOOLEAN_VALUE,
6753
+ draggable: 0,
6754
+ encType: 0,
6755
+ form: 0,
6756
+ formAction: 0,
6757
+ formEncType: 0,
6758
+ formMethod: 0,
6759
+ formNoValidate: HAS_BOOLEAN_VALUE,
6760
+ formTarget: 0,
6761
+ frameBorder: 0,
6762
+ headers: 0,
6763
+ height: 0,
6764
+ hidden: HAS_BOOLEAN_VALUE,
6765
+ high: 0,
6766
+ href: 0,
6767
+ hrefLang: 0,
6768
+ htmlFor: 0,
6769
+ httpEquiv: 0,
6770
+ icon: 0,
6771
+ id: 0,
6772
+ inputMode: 0,
6773
+ integrity: 0,
6774
+ is: 0,
6775
+ keyParams: 0,
6776
+ keyType: 0,
6777
+ kind: 0,
6778
+ label: 0,
6779
+ lang: 0,
6780
+ list: 0,
6781
+ loop: HAS_BOOLEAN_VALUE,
6782
+ low: 0,
6783
+ manifest: 0,
6784
+ marginHeight: 0,
6785
+ marginWidth: 0,
6786
+ max: 0,
6787
+ maxLength: 0,
6788
+ media: 0,
6789
+ mediaGroup: 0,
6790
+ method: 0,
6791
+ min: 0,
6792
+ minLength: 0,
6793
+ // Caution; `option.selected` is not updated if `select.multiple` is
6794
+ // disabled with `removeAttribute`.
6795
+ multiple: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
6796
+ muted: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
6797
+ name: 0,
6798
+ nonce: 0,
6799
+ noValidate: HAS_BOOLEAN_VALUE,
6800
+ open: HAS_BOOLEAN_VALUE,
6801
+ optimum: 0,
6802
+ pattern: 0,
6803
+ placeholder: 0,
6804
+ playsInline: HAS_BOOLEAN_VALUE,
6805
+ poster: 0,
6806
+ preload: 0,
6807
+ profile: 0,
6808
+ radioGroup: 0,
6809
+ readOnly: HAS_BOOLEAN_VALUE,
6810
+ referrerPolicy: 0,
6811
+ rel: 0,
6812
+ required: HAS_BOOLEAN_VALUE,
6813
+ reversed: HAS_BOOLEAN_VALUE,
6814
+ role: 0,
6815
+ rows: HAS_POSITIVE_NUMERIC_VALUE,
6816
+ rowSpan: HAS_NUMERIC_VALUE,
6817
+ sandbox: 0,
6818
+ scope: 0,
6819
+ scoped: HAS_BOOLEAN_VALUE,
6820
+ scrolling: 0,
6821
+ seamless: HAS_BOOLEAN_VALUE,
6822
+ selected: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
6823
+ shape: 0,
6824
+ size: HAS_POSITIVE_NUMERIC_VALUE,
6825
+ sizes: 0,
6826
+ span: HAS_POSITIVE_NUMERIC_VALUE,
6827
+ spellCheck: 0,
6828
+ src: 0,
6829
+ srcDoc: 0,
6830
+ srcLang: 0,
6831
+ srcSet: 0,
6832
+ start: HAS_NUMERIC_VALUE,
6833
+ step: 0,
6834
+ style: 0,
6835
+ summary: 0,
6836
+ tabIndex: 0,
6837
+ target: 0,
6838
+ title: 0,
6839
+ // Setting .type throws on non-<input> tags
6840
+ type: 0,
6841
+ useMap: 0,
6842
+ value: 0,
6843
+ width: 0,
6844
+ wmode: 0,
6845
+ wrap: 0,
6846
+
6847
+ /**
6848
+ * RDFa Properties
6849
+ */
6850
+ about: 0,
6851
+ datatype: 0,
6852
+ inlist: 0,
6853
+ prefix: 0,
6854
+ // property is also supported for OpenGraph in meta tags.
6855
+ property: 0,
6856
+ resource: 0,
6857
+ 'typeof': 0,
6858
+ vocab: 0,
6859
+
6860
+ /**
6861
+ * Non-standard Properties
6862
+ */
6863
+ // autoCapitalize and autoCorrect are supported in Mobile Safari for
6864
+ // keyboard hints.
6865
+ autoCapitalize: 0,
6866
+ autoCorrect: 0,
6867
+ // autoSave allows WebKit/Blink to persist values of input fields on page reloads
6868
+ autoSave: 0,
6869
+ // color is for Safari mask-icon link
6870
+ color: 0,
6871
+ // itemProp, itemScope, itemType are for
6872
+ // Microdata support. See http://schema.org/docs/gs.html
6873
+ itemProp: 0,
6874
+ itemScope: HAS_BOOLEAN_VALUE,
6875
+ itemType: 0,
6876
+ // itemID and itemRef are for Microdata support as well but
6877
+ // only specified in the WHATWG spec document. See
6878
+ // https://html.spec.whatwg.org/multipage/microdata.html#microdata-dom-api
6879
+ itemID: 0,
6880
+ itemRef: 0,
6881
+ // results show looking glass icon and recent searches on input
6882
+ // search fields in WebKit/Blink
6883
+ results: 0,
6884
+ // IE-only attribute that specifies security restrictions on an iframe
6885
+ // as an alternative to the sandbox attribute on IE<10
6886
+ security: 0,
6887
+ // IE-only attribute that controls focus behavior
6888
+ unselectable: 0
6889
+ },
6890
+ DOMAttributeNames: {
6891
+ acceptCharset: 'accept-charset',
6892
+ className: 'class',
6893
+ htmlFor: 'for',
6894
+ httpEquiv: 'http-equiv'
6895
+ },
6896
+ DOMPropertyNames: {},
6897
+ DOMMutationMethods: {
6898
+ value: function (node, value) {
6899
+ if (value == null) {
6900
+ return node.removeAttribute('value');
6901
+ }
6902
+
6903
+ // Number inputs get special treatment due to some edge cases in
6904
+ // Chrome. Let everything else assign the value attribute as normal.
6905
+ // https://github.com/facebook/react/issues/7253#issuecomment-236074326
6906
+ if (node.type !== 'number' || node.hasAttribute('value') === false) {
6907
+ node.setAttribute('value', '' + value);
6908
+ } else if (node.validity && !node.validity.badInput && node.ownerDocument.activeElement !== node) {
6909
+ // Don't assign an attribute if validation reports bad
6910
+ // input. Chrome will clear the value. Additionally, don't
6911
+ // operate on inputs that have focus, otherwise Chrome might
6912
+ // strip off trailing decimal places and cause the user's
6913
+ // cursor position to jump to the beginning of the input.
6914
+ //
6915
+ // In ReactDOMInput, we have an onBlur event that will trigger
6916
+ // this function again when focus is lost.
6917
+ node.setAttribute('value', '' + value);
6918
+ }
6919
+ }
6920
+ }
6921
+ };
6922
+
6923
+ module.exports = HTMLDOMPropertyConfig;
6924
+ },{"./DOMProperty":45}],56:[function(require,module,exports){
6925
+ /**
6926
+ * Copyright (c) 2013-present, Facebook, Inc.
6927
+ *
6928
+ * This source code is licensed under the MIT license found in the
6929
+ * LICENSE file in the root directory of this source tree.
6930
+ *
6931
+ *
6932
+ */
6933
+
6934
+ 'use strict';
6935
+
6936
+ /**
6937
+ * Escape and wrap key so it is safe to use as a reactid
6938
+ *
6939
+ * @param {string} key to be escaped.
6940
+ * @return {string} the escaped key.
6941
+ */
6942
+
6943
+ function escape(key) {
6944
+ var escapeRegex = /[=:]/g;
6945
+ var escaperLookup = {
6946
+ '=': '=0',
6947
+ ':': '=2'
6948
+ };
6949
+ var escapedString = ('' + key).replace(escapeRegex, function (match) {
6950
+ return escaperLookup[match];
6951
+ });
6952
+
6953
+ return '$' + escapedString;
6954
+ }
6955
+
6956
+ /**
6957
+ * Unescape and unwrap key for human-readable display
6958
+ *
6959
+ * @param {string} key to unescape.
6960
+ * @return {string} the unescaped key.
6961
+ */
6962
+ function unescape(key) {
6963
+ var unescapeRegex = /(=0|=2)/g;
6964
+ var unescaperLookup = {
6965
+ '=0': '=',
6966
+ '=2': ':'
6967
+ };
6968
+ var keySubstring = key[0] === '.' && key[1] === '$' ? key.substring(2) : key.substring(1);
6969
+
6970
+ return ('' + keySubstring).replace(unescapeRegex, function (match) {
6971
+ return unescaperLookup[match];
6972
+ });
6973
+ }
6974
+
6975
+ var KeyEscapeUtils = {
6976
+ escape: escape,
6977
+ unescape: unescape
6978
+ };
6979
+
6980
+ module.exports = KeyEscapeUtils;
6981
+ },{}],57:[function(require,module,exports){
6982
+ (function (process){(function (){
6983
+ /**
6984
+ * Copyright (c) 2013-present, Facebook, Inc.
6985
+ *
6986
+ * This source code is licensed under the MIT license found in the
6987
+ * LICENSE file in the root directory of this source tree.
6988
+ *
6989
+ */
6990
+
6991
+ 'use strict';
6992
+
6993
+ var _prodInvariant = require('./reactProdInvariant');
6994
+
6995
+ var ReactPropTypesSecret = require('./ReactPropTypesSecret');
6996
+ var propTypesFactory = require('prop-types/factory');
6997
+
6998
+ var React = require('react/lib/React');
6999
+ var PropTypes = propTypesFactory(React.isValidElement);
7000
+
7001
+ var invariant = require('fbjs/lib/invariant');
7002
+ var warning = require('fbjs/lib/warning');
7003
+
7004
+ var hasReadOnlyValue = {
7005
+ button: true,
7006
+ checkbox: true,
7007
+ image: true,
7008
+ hidden: true,
7009
+ radio: true,
7010
+ reset: true,
7011
+ submit: true
7012
+ };
7013
+
7014
+ function _assertSingleLink(inputProps) {
7015
+ !(inputProps.checkedLink == null || inputProps.valueLink == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Cannot provide a checkedLink and a valueLink. If you want to use checkedLink, you probably don\'t want to use valueLink and vice versa.') : _prodInvariant('87') : void 0;
7016
+ }
7017
+ function _assertValueLink(inputProps) {
7018
+ _assertSingleLink(inputProps);
7019
+ !(inputProps.value == null && inputProps.onChange == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Cannot provide a valueLink and a value or onChange event. If you want to use value or onChange, you probably don\'t want to use valueLink.') : _prodInvariant('88') : void 0;
7020
+ }
7021
+
7022
+ function _assertCheckedLink(inputProps) {
7023
+ _assertSingleLink(inputProps);
7024
+ !(inputProps.checked == null && inputProps.onChange == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Cannot provide a checkedLink and a checked property or onChange event. If you want to use checked or onChange, you probably don\'t want to use checkedLink') : _prodInvariant('89') : void 0;
7025
+ }
7026
+
7027
+ var propTypes = {
7028
+ value: function (props, propName, componentName) {
7029
+ if (!props[propName] || hasReadOnlyValue[props.type] || props.onChange || props.readOnly || props.disabled) {
7030
+ return null;
7031
+ }
7032
+ return new Error('You provided a `value` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultValue`. Otherwise, ' + 'set either `onChange` or `readOnly`.');
7033
+ },
7034
+ checked: function (props, propName, componentName) {
7035
+ if (!props[propName] || props.onChange || props.readOnly || props.disabled) {
7036
+ return null;
7037
+ }
7038
+ return new Error('You provided a `checked` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultChecked`. Otherwise, ' + 'set either `onChange` or `readOnly`.');
7039
+ },
7040
+ onChange: PropTypes.func
7041
+ };
7042
+
7043
+ var loggedTypeFailures = {};
7044
+ function getDeclarationErrorAddendum(owner) {
7045
+ if (owner) {
7046
+ var name = owner.getName();
7047
+ if (name) {
7048
+ return ' Check the render method of `' + name + '`.';
7049
+ }
7050
+ }
7051
+ return '';
7052
+ }
7053
+
7054
+ /**
7055
+ * Provide a linked `value` attribute for controlled forms. You should not use
7056
+ * this outside of the ReactDOM controlled form components.
7057
+ */
7058
+ var LinkedValueUtils = {
7059
+ checkPropTypes: function (tagName, props, owner) {
7060
+ for (var propName in propTypes) {
7061
+ if (propTypes.hasOwnProperty(propName)) {
7062
+ var error = propTypes[propName](props, propName, tagName, 'prop', null, ReactPropTypesSecret);
7063
+ }
7064
+ if (error instanceof Error && !(error.message in loggedTypeFailures)) {
7065
+ // Only monitor this failure once because there tends to be a lot of the
7066
+ // same error.
7067
+ loggedTypeFailures[error.message] = true;
7068
+
7069
+ var addendum = getDeclarationErrorAddendum(owner);
7070
+ process.env.NODE_ENV !== 'production' ? warning(false, 'Failed form propType: %s%s', error.message, addendum) : void 0;
7071
+ }
7072
+ }
7073
+ },
7074
+
7075
+ /**
7076
+ * @param {object} inputProps Props for form component
7077
+ * @return {*} current value of the input either from value prop or link.
7078
+ */
7079
+ getValue: function (inputProps) {
7080
+ if (inputProps.valueLink) {
7081
+ _assertValueLink(inputProps);
7082
+ return inputProps.valueLink.value;
7083
+ }
7084
+ return inputProps.value;
7085
+ },
7086
+
7087
+ /**
7088
+ * @param {object} inputProps Props for form component
7089
+ * @return {*} current checked status of the input either from checked prop
7090
+ * or link.
7091
+ */
7092
+ getChecked: function (inputProps) {
7093
+ if (inputProps.checkedLink) {
7094
+ _assertCheckedLink(inputProps);
7095
+ return inputProps.checkedLink.value;
7096
+ }
7097
+ return inputProps.checked;
7098
+ },
7099
+
7100
+ /**
7101
+ * @param {object} inputProps Props for form component
7102
+ * @param {SyntheticEvent} event change event to handle
7103
+ */
7104
+ executeOnChange: function (inputProps, event) {
7105
+ if (inputProps.valueLink) {
7106
+ _assertValueLink(inputProps);
7107
+ return inputProps.valueLink.requestChange(event.target.value);
7108
+ } else if (inputProps.checkedLink) {
7109
+ _assertCheckedLink(inputProps);
7110
+ return inputProps.checkedLink.requestChange(event.target.checked);
7111
+ } else if (inputProps.onChange) {
7112
+ return inputProps.onChange.call(undefined, event);
7113
+ }
7114
+ }
7115
+ };
7116
+
7117
+ module.exports = LinkedValueUtils;
7118
+ }).call(this)}).call(this,require('_process'))
7119
+ },{"./ReactPropTypesSecret":104,"./reactProdInvariant":154,"_process":29,"fbjs/lib/invariant":20,"fbjs/lib/warning":27,"prop-types/factory":31,"react/lib/React":166}],58:[function(require,module,exports){
7120
+ (function (process){(function (){
7121
+ /**
7122
+ * Copyright (c) 2013-present, Facebook, Inc.
7123
+ *
7124
+ * This source code is licensed under the MIT license found in the
7125
+ * LICENSE file in the root directory of this source tree.
7126
+ *
7127
+ *
7128
+ */
7129
+
7130
+ 'use strict';
7131
+
7132
+ var _prodInvariant = require('./reactProdInvariant');
7133
+
7134
+ var invariant = require('fbjs/lib/invariant');
7135
+
7136
+ /**
7137
+ * Static poolers. Several custom versions for each potential number of
7138
+ * arguments. A completely generic pooler is easy to implement, but would
7139
+ * require accessing the `arguments` object. In each of these, `this` refers to
7140
+ * the Class itself, not an instance. If any others are needed, simply add them
7141
+ * here, or in their own files.
7142
+ */
7143
+ var oneArgumentPooler = function (copyFieldsFrom) {
7144
+ var Klass = this;
7145
+ if (Klass.instancePool.length) {
7146
+ var instance = Klass.instancePool.pop();
7147
+ Klass.call(instance, copyFieldsFrom);
7148
+ return instance;
7149
+ } else {
7150
+ return new Klass(copyFieldsFrom);
7151
+ }
7152
+ };
7153
+
7154
+ var twoArgumentPooler = function (a1, a2) {
7155
+ var Klass = this;
7156
+ if (Klass.instancePool.length) {
7157
+ var instance = Klass.instancePool.pop();
7158
+ Klass.call(instance, a1, a2);
7159
+ return instance;
7160
+ } else {
7161
+ return new Klass(a1, a2);
7162
+ }
7163
+ };
7164
+
7165
+ var threeArgumentPooler = function (a1, a2, a3) {
7166
+ var Klass = this;
7167
+ if (Klass.instancePool.length) {
7168
+ var instance = Klass.instancePool.pop();
7169
+ Klass.call(instance, a1, a2, a3);
7170
+ return instance;
7171
+ } else {
7172
+ return new Klass(a1, a2, a3);
7173
+ }
7174
+ };
7175
+
7176
+ var fourArgumentPooler = function (a1, a2, a3, a4) {
7177
+ var Klass = this;
7178
+ if (Klass.instancePool.length) {
7179
+ var instance = Klass.instancePool.pop();
7180
+ Klass.call(instance, a1, a2, a3, a4);
7181
+ return instance;
7182
+ } else {
7183
+ return new Klass(a1, a2, a3, a4);
7184
+ }
7185
+ };
7186
+
7187
+ var standardReleaser = function (instance) {
7188
+ var Klass = this;
7189
+ !(instance instanceof Klass) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Trying to release an instance into a pool of a different type.') : _prodInvariant('25') : void 0;
7190
+ instance.destructor();
7191
+ if (Klass.instancePool.length < Klass.poolSize) {
7192
+ Klass.instancePool.push(instance);
7193
+ }
7194
+ };
7195
+
7196
+ var DEFAULT_POOL_SIZE = 10;
7197
+ var DEFAULT_POOLER = oneArgumentPooler;
7198
+
7199
+ /**
7200
+ * Augments `CopyConstructor` to be a poolable class, augmenting only the class
7201
+ * itself (statically) not adding any prototypical fields. Any CopyConstructor
7202
+ * you give this may have a `poolSize` property, and will look for a
7203
+ * prototypical `destructor` on instances.
7204
+ *
7205
+ * @param {Function} CopyConstructor Constructor that can be used to reset.
7206
+ * @param {Function} pooler Customizable pooler.
7207
+ */
7208
+ var addPoolingTo = function (CopyConstructor, pooler) {
7209
+ // Casting as any so that flow ignores the actual implementation and trusts
7210
+ // it to match the type we declared
7211
+ var NewKlass = CopyConstructor;
7212
+ NewKlass.instancePool = [];
7213
+ NewKlass.getPooled = pooler || DEFAULT_POOLER;
7214
+ if (!NewKlass.poolSize) {
7215
+ NewKlass.poolSize = DEFAULT_POOL_SIZE;
7216
+ }
7217
+ NewKlass.release = standardReleaser;
7218
+ return NewKlass;
7219
+ };
7220
+
7221
+ var PooledClass = {
7222
+ addPoolingTo: addPoolingTo,
7223
+ oneArgumentPooler: oneArgumentPooler,
7224
+ twoArgumentPooler: twoArgumentPooler,
7225
+ threeArgumentPooler: threeArgumentPooler,
7226
+ fourArgumentPooler: fourArgumentPooler
7227
+ };
7228
+
7229
+ module.exports = PooledClass;
7230
+ }).call(this)}).call(this,require('_process'))
7231
+ },{"./reactProdInvariant":154,"_process":29,"fbjs/lib/invariant":20}],59:[function(require,module,exports){
7232
+ /**
7233
+ * Copyright (c) 2013-present, Facebook, Inc.
7234
+ *
7235
+ * This source code is licensed under the MIT license found in the
7236
+ * LICENSE file in the root directory of this source tree.
7237
+ *
7238
+ */
7239
+
7240
+ 'use strict';
7241
+
7242
+ var _assign = require('object-assign');
7243
+
7244
+ var EventPluginRegistry = require('./EventPluginRegistry');
7245
+ var ReactEventEmitterMixin = require('./ReactEventEmitterMixin');
7246
+ var ViewportMetrics = require('./ViewportMetrics');
7247
+
7248
+ var getVendorPrefixedEventName = require('./getVendorPrefixedEventName');
7249
+ var isEventSupported = require('./isEventSupported');
7250
+
7251
+ /**
7252
+ * Summary of `ReactBrowserEventEmitter` event handling:
7253
+ *
7254
+ * - Top-level delegation is used to trap most native browser events. This
7255
+ * may only occur in the main thread and is the responsibility of
7256
+ * ReactEventListener, which is injected and can therefore support pluggable
7257
+ * event sources. This is the only work that occurs in the main thread.
7258
+ *
7259
+ * - We normalize and de-duplicate events to account for browser quirks. This
7260
+ * may be done in the worker thread.
7261
+ *
7262
+ * - Forward these native events (with the associated top-level type used to
7263
+ * trap it) to `EventPluginHub`, which in turn will ask plugins if they want
7264
+ * to extract any synthetic events.
7265
+ *
7266
+ * - The `EventPluginHub` will then process each event by annotating them with
7267
+ * "dispatches", a sequence of listeners and IDs that care about that event.
7268
+ *
7269
+ * - The `EventPluginHub` then dispatches the events.
7270
+ *
7271
+ * Overview of React and the event system:
7272
+ *
7273
+ * +------------+ .
7274
+ * | DOM | .
7275
+ * +------------+ .
7276
+ * | .
7277
+ * v .
7278
+ * +------------+ .
7279
+ * | ReactEvent | .
7280
+ * | Listener | .
7281
+ * +------------+ . +-----------+
7282
+ * | . +--------+|SimpleEvent|
7283
+ * | . | |Plugin |
7284
+ * +-----|------+ . v +-----------+
7285
+ * | | | . +--------------+ +------------+
7286
+ * | +-----------.--->|EventPluginHub| | Event |
7287
+ * | | . | | +-----------+ | Propagators|
7288
+ * | ReactEvent | . | | |TapEvent | |------------|
7289
+ * | Emitter | . | |<---+|Plugin | |other plugin|
7290
+ * | | . | | +-----------+ | utilities |
7291
+ * | +-----------.--->| | +------------+
7292
+ * | | | . +--------------+
7293
+ * +-----|------+ . ^ +-----------+
7294
+ * | . | |Enter/Leave|
7295
+ * + . +-------+|Plugin |
7296
+ * +-------------+ . +-----------+
7297
+ * | application | .
7298
+ * |-------------| .
7299
+ * | | .
7300
+ * | | .
7301
+ * +-------------+ .
7302
+ * .
7303
+ * React Core . General Purpose Event Plugin System
7304
+ */
7305
+
7306
+ var hasEventPageXY;
7307
+ var alreadyListeningTo = {};
7308
+ var isMonitoringScrollValue = false;
7309
+ var reactTopListenersCounter = 0;
7310
+
7311
+ // For events like 'submit' which don't consistently bubble (which we trap at a
7312
+ // lower node than `document`), binding at `document` would cause duplicate
7313
+ // events so we don't include them here
7314
+ var topEventMapping = {
7315
+ topAbort: 'abort',
7316
+ topAnimationEnd: getVendorPrefixedEventName('animationend') || 'animationend',
7317
+ topAnimationIteration: getVendorPrefixedEventName('animationiteration') || 'animationiteration',
7318
+ topAnimationStart: getVendorPrefixedEventName('animationstart') || 'animationstart',
7319
+ topBlur: 'blur',
7320
+ topCanPlay: 'canplay',
7321
+ topCanPlayThrough: 'canplaythrough',
7322
+ topChange: 'change',
7323
+ topClick: 'click',
7324
+ topCompositionEnd: 'compositionend',
7325
+ topCompositionStart: 'compositionstart',
7326
+ topCompositionUpdate: 'compositionupdate',
7327
+ topContextMenu: 'contextmenu',
7328
+ topCopy: 'copy',
7329
+ topCut: 'cut',
7330
+ topDoubleClick: 'dblclick',
7331
+ topDrag: 'drag',
7332
+ topDragEnd: 'dragend',
7333
+ topDragEnter: 'dragenter',
7334
+ topDragExit: 'dragexit',
7335
+ topDragLeave: 'dragleave',
7336
+ topDragOver: 'dragover',
7337
+ topDragStart: 'dragstart',
7338
+ topDrop: 'drop',
7339
+ topDurationChange: 'durationchange',
7340
+ topEmptied: 'emptied',
7341
+ topEncrypted: 'encrypted',
7342
+ topEnded: 'ended',
7343
+ topError: 'error',
7344
+ topFocus: 'focus',
7345
+ topInput: 'input',
7346
+ topKeyDown: 'keydown',
7347
+ topKeyPress: 'keypress',
7348
+ topKeyUp: 'keyup',
7349
+ topLoadedData: 'loadeddata',
7350
+ topLoadedMetadata: 'loadedmetadata',
7351
+ topLoadStart: 'loadstart',
7352
+ topMouseDown: 'mousedown',
7353
+ topMouseMove: 'mousemove',
7354
+ topMouseOut: 'mouseout',
7355
+ topMouseOver: 'mouseover',
7356
+ topMouseUp: 'mouseup',
7357
+ topPaste: 'paste',
7358
+ topPause: 'pause',
7359
+ topPlay: 'play',
7360
+ topPlaying: 'playing',
7361
+ topProgress: 'progress',
7362
+ topRateChange: 'ratechange',
7363
+ topScroll: 'scroll',
7364
+ topSeeked: 'seeked',
7365
+ topSeeking: 'seeking',
7366
+ topSelectionChange: 'selectionchange',
7367
+ topStalled: 'stalled',
7368
+ topSuspend: 'suspend',
7369
+ topTextInput: 'textInput',
7370
+ topTimeUpdate: 'timeupdate',
7371
+ topTouchCancel: 'touchcancel',
7372
+ topTouchEnd: 'touchend',
7373
+ topTouchMove: 'touchmove',
7374
+ topTouchStart: 'touchstart',
7375
+ topTransitionEnd: getVendorPrefixedEventName('transitionend') || 'transitionend',
7376
+ topVolumeChange: 'volumechange',
7377
+ topWaiting: 'waiting',
7378
+ topWheel: 'wheel'
7379
+ };
7380
+
7381
+ /**
7382
+ * To ensure no conflicts with other potential React instances on the page
7383
+ */
7384
+ var topListenersIDKey = '_reactListenersID' + String(Math.random()).slice(2);
7385
+
7386
+ function getListeningForDocument(mountAt) {
7387
+ // In IE8, `mountAt` is a host object and doesn't have `hasOwnProperty`
7388
+ // directly.
7389
+ if (!Object.prototype.hasOwnProperty.call(mountAt, topListenersIDKey)) {
7390
+ mountAt[topListenersIDKey] = reactTopListenersCounter++;
7391
+ alreadyListeningTo[mountAt[topListenersIDKey]] = {};
7392
+ }
7393
+ return alreadyListeningTo[mountAt[topListenersIDKey]];
7394
+ }
7395
+
7396
+ /**
7397
+ * `ReactBrowserEventEmitter` is used to attach top-level event listeners. For
7398
+ * example:
7399
+ *
7400
+ * EventPluginHub.putListener('myID', 'onClick', myFunction);
7401
+ *
7402
+ * This would allocate a "registration" of `('onClick', myFunction)` on 'myID'.
7403
+ *
7404
+ * @internal
7405
+ */
7406
+ var ReactBrowserEventEmitter = _assign({}, ReactEventEmitterMixin, {
7407
+ /**
7408
+ * Injectable event backend
7409
+ */
7410
+ ReactEventListener: null,
7411
+
7412
+ injection: {
7413
+ /**
7414
+ * @param {object} ReactEventListener
7415
+ */
7416
+ injectReactEventListener: function (ReactEventListener) {
7417
+ ReactEventListener.setHandleTopLevel(ReactBrowserEventEmitter.handleTopLevel);
7418
+ ReactBrowserEventEmitter.ReactEventListener = ReactEventListener;
7419
+ }
7420
+ },
7421
+
7422
+ /**
7423
+ * Sets whether or not any created callbacks should be enabled.
7424
+ *
7425
+ * @param {boolean} enabled True if callbacks should be enabled.
7426
+ */
7427
+ setEnabled: function (enabled) {
7428
+ if (ReactBrowserEventEmitter.ReactEventListener) {
7429
+ ReactBrowserEventEmitter.ReactEventListener.setEnabled(enabled);
7430
+ }
7431
+ },
7432
+
7433
+ /**
7434
+ * @return {boolean} True if callbacks are enabled.
7435
+ */
7436
+ isEnabled: function () {
7437
+ return !!(ReactBrowserEventEmitter.ReactEventListener && ReactBrowserEventEmitter.ReactEventListener.isEnabled());
7438
+ },
7439
+
7440
+ /**
7441
+ * We listen for bubbled touch events on the document object.
7442
+ *
7443
+ * Firefox v8.01 (and possibly others) exhibited strange behavior when
7444
+ * mounting `onmousemove` events at some node that was not the document
7445
+ * element. The symptoms were that if your mouse is not moving over something
7446
+ * contained within that mount point (for example on the background) the
7447
+ * top-level listeners for `onmousemove` won't be called. However, if you
7448
+ * register the `mousemove` on the document object, then it will of course
7449
+ * catch all `mousemove`s. This along with iOS quirks, justifies restricting
7450
+ * top-level listeners to the document object only, at least for these
7451
+ * movement types of events and possibly all events.
7452
+ *
7453
+ * @see http://www.quirksmode.org/blog/archives/2010/09/click_event_del.html
7454
+ *
7455
+ * Also, `keyup`/`keypress`/`keydown` do not bubble to the window on IE, but
7456
+ * they bubble to document.
7457
+ *
7458
+ * @param {string} registrationName Name of listener (e.g. `onClick`).
7459
+ * @param {object} contentDocumentHandle Document which owns the container
7460
+ */
7461
+ listenTo: function (registrationName, contentDocumentHandle) {
7462
+ var mountAt = contentDocumentHandle;
7463
+ var isListening = getListeningForDocument(mountAt);
7464
+ var dependencies = EventPluginRegistry.registrationNameDependencies[registrationName];
7465
+
7466
+ for (var i = 0; i < dependencies.length; i++) {
7467
+ var dependency = dependencies[i];
7468
+ if (!(isListening.hasOwnProperty(dependency) && isListening[dependency])) {
7469
+ if (dependency === 'topWheel') {
7470
+ if (isEventSupported('wheel')) {
7471
+ ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topWheel', 'wheel', mountAt);
7472
+ } else if (isEventSupported('mousewheel')) {
7473
+ ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topWheel', 'mousewheel', mountAt);
7474
+ } else {
7475
+ // Firefox needs to capture a different mouse scroll event.
7476
+ // @see http://www.quirksmode.org/dom/events/tests/scroll.html
7477
+ ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topWheel', 'DOMMouseScroll', mountAt);
7478
+ }
7479
+ } else if (dependency === 'topScroll') {
7480
+ if (isEventSupported('scroll', true)) {
7481
+ ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent('topScroll', 'scroll', mountAt);
7482
+ } else {
7483
+ ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topScroll', 'scroll', ReactBrowserEventEmitter.ReactEventListener.WINDOW_HANDLE);
7484
+ }
7485
+ } else if (dependency === 'topFocus' || dependency === 'topBlur') {
7486
+ if (isEventSupported('focus', true)) {
7487
+ ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent('topFocus', 'focus', mountAt);
7488
+ ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent('topBlur', 'blur', mountAt);
7489
+ } else if (isEventSupported('focusin')) {
7490
+ // IE has `focusin` and `focusout` events which bubble.
7491
+ // @see http://www.quirksmode.org/blog/archives/2008/04/delegating_the.html
7492
+ ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topFocus', 'focusin', mountAt);
7493
+ ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topBlur', 'focusout', mountAt);
7494
+ }
7495
+
7496
+ // to make sure blur and focus event listeners are only attached once
7497
+ isListening.topBlur = true;
7498
+ isListening.topFocus = true;
7499
+ } else if (topEventMapping.hasOwnProperty(dependency)) {
7500
+ ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(dependency, topEventMapping[dependency], mountAt);
7501
+ }
7502
+
7503
+ isListening[dependency] = true;
7504
+ }
7505
+ }
7506
+ },
7507
+
7508
+ trapBubbledEvent: function (topLevelType, handlerBaseName, handle) {
7509
+ return ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelType, handlerBaseName, handle);
7510
+ },
7511
+
7512
+ trapCapturedEvent: function (topLevelType, handlerBaseName, handle) {
7513
+ return ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent(topLevelType, handlerBaseName, handle);
7514
+ },
7515
+
7516
+ /**
7517
+ * Protect against document.createEvent() returning null
7518
+ * Some popup blocker extensions appear to do this:
7519
+ * https://github.com/facebook/react/issues/6887
7520
+ */
7521
+ supportsEventPageXY: function () {
7522
+ if (!document.createEvent) {
7523
+ return false;
7524
+ }
7525
+ var ev = document.createEvent('MouseEvent');
7526
+ return ev != null && 'pageX' in ev;
7527
+ },
7528
+
7529
+ /**
7530
+ * Listens to window scroll and resize events. We cache scroll values so that
7531
+ * application code can access them without triggering reflows.
7532
+ *
7533
+ * ViewportMetrics is only used by SyntheticMouse/TouchEvent and only when
7534
+ * pageX/pageY isn't supported (legacy browsers).
7535
+ *
7536
+ * NOTE: Scroll events do not bubble.
7537
+ *
7538
+ * @see http://www.quirksmode.org/dom/events/scroll.html
7539
+ */
7540
+ ensureScrollValueMonitoring: function () {
7541
+ if (hasEventPageXY === undefined) {
7542
+ hasEventPageXY = ReactBrowserEventEmitter.supportsEventPageXY();
7543
+ }
7544
+ if (!hasEventPageXY && !isMonitoringScrollValue) {
7545
+ var refresh = ViewportMetrics.refreshScrollValues;
7546
+ ReactBrowserEventEmitter.ReactEventListener.monitorScrollValue(refresh);
7547
+ isMonitoringScrollValue = true;
7548
+ }
7549
+ }
7550
+ });
7551
+
7552
+ module.exports = ReactBrowserEventEmitter;
7553
+ },{"./EventPluginRegistry":51,"./ReactEventEmitterMixin":88,"./ViewportMetrics":130,"./getVendorPrefixedEventName":148,"./isEventSupported":151,"object-assign":28}],60:[function(require,module,exports){
7554
+ (function (process){(function (){
7555
+ /**
7556
+ * Copyright (c) 2014-present, Facebook, Inc.
7557
+ *
7558
+ * This source code is licensed under the MIT license found in the
7559
+ * LICENSE file in the root directory of this source tree.
7560
+ *
7561
+ */
7562
+
7563
+ 'use strict';
7564
+
7565
+ var ReactReconciler = require('./ReactReconciler');
7566
+
7567
+ var instantiateReactComponent = require('./instantiateReactComponent');
7568
+ var KeyEscapeUtils = require('./KeyEscapeUtils');
7569
+ var shouldUpdateReactComponent = require('./shouldUpdateReactComponent');
7570
+ var traverseAllChildren = require('./traverseAllChildren');
7571
+ var warning = require('fbjs/lib/warning');
7572
+
7573
+ var ReactComponentTreeHook;
7574
+
7575
+ if (typeof process !== 'undefined' && process.env && process.env.NODE_ENV === 'test') {
7576
+ // Temporary hack.
7577
+ // Inline requires don't work well with Jest:
7578
+ // https://github.com/facebook/react/issues/7240
7579
+ // Remove the inline requires when we don't need them anymore:
7580
+ // https://github.com/facebook/react/pull/7178
7581
+ ReactComponentTreeHook = require('react/lib/ReactComponentTreeHook');
7582
+ }
7583
+
7584
+ function instantiateChild(childInstances, child, name, selfDebugID) {
7585
+ // We found a component instance.
7586
+ var keyUnique = childInstances[name] === undefined;
7587
+ if (process.env.NODE_ENV !== 'production') {
7588
+ if (!ReactComponentTreeHook) {
7589
+ ReactComponentTreeHook = require('react/lib/ReactComponentTreeHook');
7590
+ }
7591
+ if (!keyUnique) {
7592
+ process.env.NODE_ENV !== '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;
7593
+ }
7594
+ }
7595
+ if (child != null && keyUnique) {
7596
+ childInstances[name] = instantiateReactComponent(child, true);
7597
+ }
7598
+ }
7599
+
7600
+ /**
7601
+ * ReactChildReconciler provides helpers for initializing or updating a set of
7602
+ * children. Its output is suitable for passing it onto ReactMultiChild which
7603
+ * does diffed reordering and insertion.
7604
+ */
7605
+ var ReactChildReconciler = {
7606
+ /**
7607
+ * Generates a "mount image" for each of the supplied children. In the case
7608
+ * of `ReactDOMComponent`, a mount image is a string of markup.
7609
+ *
7610
+ * @param {?object} nestedChildNodes Nested child maps.
7611
+ * @return {?object} A set of child instances.
7612
+ * @internal
7613
+ */
7614
+ instantiateChildren: function (nestedChildNodes, transaction, context, selfDebugID) // 0 in production and for roots
7615
+ {
7616
+ if (nestedChildNodes == null) {
7617
+ return null;
7618
+ }
7619
+ var childInstances = {};
7620
+
7621
+ if (process.env.NODE_ENV !== 'production') {
7622
+ traverseAllChildren(nestedChildNodes, function (childInsts, child, name) {
7623
+ return instantiateChild(childInsts, child, name, selfDebugID);
7624
+ }, childInstances);
7625
+ } else {
7626
+ traverseAllChildren(nestedChildNodes, instantiateChild, childInstances);
7627
+ }
7628
+ return childInstances;
7629
+ },
7630
+
7631
+ /**
7632
+ * Updates the rendered children and returns a new set of children.
7633
+ *
7634
+ * @param {?object} prevChildren Previously initialized set of children.
7635
+ * @param {?object} nextChildren Flat child element maps.
7636
+ * @param {ReactReconcileTransaction} transaction
7637
+ * @param {object} context
7638
+ * @return {?object} A new set of child instances.
7639
+ * @internal
7640
+ */
7641
+ updateChildren: function (prevChildren, nextChildren, mountImages, removedNodes, transaction, hostParent, hostContainerInfo, context, selfDebugID) // 0 in production and for roots
7642
+ {
7643
+ // We currently don't have a way to track moves here but if we use iterators
7644
+ // instead of for..in we can zip the iterators and check if an item has
7645
+ // moved.
7646
+ // TODO: If nothing has changed, return the prevChildren object so that we
7647
+ // can quickly bailout if nothing has changed.
7648
+ if (!nextChildren && !prevChildren) {
7649
+ return;
7650
+ }
7651
+ var name;
7652
+ var prevChild;
7653
+ for (name in nextChildren) {
7654
+ if (!nextChildren.hasOwnProperty(name)) {
7655
+ continue;
7656
+ }
7657
+ prevChild = prevChildren && prevChildren[name];
7658
+ var prevElement = prevChild && prevChild._currentElement;
7659
+ var nextElement = nextChildren[name];
7660
+ if (prevChild != null && shouldUpdateReactComponent(prevElement, nextElement)) {
7661
+ ReactReconciler.receiveComponent(prevChild, nextElement, transaction, context);
7662
+ nextChildren[name] = prevChild;
7663
+ } else {
7664
+ if (prevChild) {
7665
+ removedNodes[name] = ReactReconciler.getHostNode(prevChild);
7666
+ ReactReconciler.unmountComponent(prevChild, false);
7667
+ }
7668
+ // The child must be instantiated before it's mounted.
7669
+ var nextChildInstance = instantiateReactComponent(nextElement, true);
7670
+ nextChildren[name] = nextChildInstance;
7671
+ // Creating mount image now ensures refs are resolved in right order
7672
+ // (see https://github.com/facebook/react/pull/7101 for explanation).
7673
+ var nextChildMountImage = ReactReconciler.mountComponent(nextChildInstance, transaction, hostParent, hostContainerInfo, context, selfDebugID);
7674
+ mountImages.push(nextChildMountImage);
7675
+ }
7676
+ }
7677
+ // Unmount children that are no longer present.
7678
+ for (name in prevChildren) {
7679
+ if (prevChildren.hasOwnProperty(name) && !(nextChildren && nextChildren.hasOwnProperty(name))) {
7680
+ prevChild = prevChildren[name];
7681
+ removedNodes[name] = ReactReconciler.getHostNode(prevChild);
7682
+ ReactReconciler.unmountComponent(prevChild, false);
7683
+ }
7684
+ }
7685
+ },
7686
+
7687
+ /**
7688
+ * Unmounts all rendered children. This should be used to clean up children
7689
+ * when this component is unmounted.
7690
+ *
7691
+ * @param {?object} renderedChildren Previously initialized set of children.
7692
+ * @internal
7693
+ */
7694
+ unmountChildren: function (renderedChildren, safely) {
7695
+ for (var name in renderedChildren) {
7696
+ if (renderedChildren.hasOwnProperty(name)) {
7697
+ var renderedChild = renderedChildren[name];
7698
+ ReactReconciler.unmountComponent(renderedChild, safely);
7699
+ }
7700
+ }
7701
+ }
7702
+ };
7703
+
7704
+ module.exports = ReactChildReconciler;
7705
+ }).call(this)}).call(this,require('_process'))
7706
+ },{"./KeyEscapeUtils":56,"./ReactReconciler":106,"./instantiateReactComponent":150,"./shouldUpdateReactComponent":158,"./traverseAllChildren":159,"_process":29,"fbjs/lib/warning":27,"react/lib/ReactComponentTreeHook":169}],61:[function(require,module,exports){
7707
+ /**
7708
+ * Copyright (c) 2013-present, Facebook, Inc.
7709
+ *
7710
+ * This source code is licensed under the MIT license found in the
7711
+ * LICENSE file in the root directory of this source tree.
7712
+ *
7713
+ */
7714
+
7715
+ 'use strict';
7716
+
7717
+ var DOMChildrenOperations = require('./DOMChildrenOperations');
7718
+ var ReactDOMIDOperations = require('./ReactDOMIDOperations');
7719
+
7720
+ /**
7721
+ * Abstracts away all functionality of the reconciler that requires knowledge of
7722
+ * the browser context. TODO: These callers should be refactored to avoid the
7723
+ * need for this injection.
7724
+ */
7725
+ var ReactComponentBrowserEnvironment = {
7726
+ processChildrenUpdates: ReactDOMIDOperations.dangerouslyProcessChildrenUpdates,
7727
+
7728
+ replaceNodeWithMarkup: DOMChildrenOperations.dangerouslyReplaceNodeWithMarkup
7729
+ };
7730
+
7731
+ module.exports = ReactComponentBrowserEnvironment;
7732
+ },{"./DOMChildrenOperations":42,"./ReactDOMIDOperations":71}],62:[function(require,module,exports){
7733
+ (function (process){(function (){
7734
+ /**
7735
+ * Copyright (c) 2014-present, Facebook, Inc.
7736
+ *
7737
+ * This source code is licensed under the MIT license found in the
7738
+ * LICENSE file in the root directory of this source tree.
7739
+ *
7740
+ *
7741
+ */
7742
+
7743
+ 'use strict';
7744
+
7745
+ var _prodInvariant = require('./reactProdInvariant');
7746
+
7747
+ var invariant = require('fbjs/lib/invariant');
7748
+
7749
+ var injected = false;
7750
+
7751
+ var ReactComponentEnvironment = {
7752
+ /**
7753
+ * Optionally injectable hook for swapping out mount images in the middle of
7754
+ * the tree.
7755
+ */
7756
+ replaceNodeWithMarkup: null,
7757
+
7758
+ /**
7759
+ * Optionally injectable hook for processing a queue of child updates. Will
7760
+ * later move into MultiChildComponents.
7761
+ */
7762
+ processChildrenUpdates: null,
7763
+
7764
+ injection: {
7765
+ injectEnvironment: function (environment) {
7766
+ !!injected ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactCompositeComponent: injectEnvironment() can only be called once.') : _prodInvariant('104') : void 0;
7767
+ ReactComponentEnvironment.replaceNodeWithMarkup = environment.replaceNodeWithMarkup;
7768
+ ReactComponentEnvironment.processChildrenUpdates = environment.processChildrenUpdates;
7769
+ injected = true;
7770
+ }
7771
+ }
7772
+ };
7773
+
7774
+ module.exports = ReactComponentEnvironment;
7775
+ }).call(this)}).call(this,require('_process'))
7776
+ },{"./reactProdInvariant":154,"_process":29,"fbjs/lib/invariant":20}],63:[function(require,module,exports){
7777
+ (function (process){(function (){
7778
+ /**
7779
+ * Copyright (c) 2013-present, Facebook, Inc.
7780
+ *
7781
+ * This source code is licensed under the MIT license found in the
7782
+ * LICENSE file in the root directory of this source tree.
7783
+ *
7784
+ */
7785
+
7786
+ 'use strict';
7787
+
7788
+ var _prodInvariant = require('./reactProdInvariant'),
7789
+ _assign = require('object-assign');
7790
+
7791
+ var React = require('react/lib/React');
7792
+ var ReactComponentEnvironment = require('./ReactComponentEnvironment');
7793
+ var ReactCurrentOwner = require('react/lib/ReactCurrentOwner');
7794
+ var ReactErrorUtils = require('./ReactErrorUtils');
7795
+ var ReactInstanceMap = require('./ReactInstanceMap');
7796
+ var ReactInstrumentation = require('./ReactInstrumentation');
7797
+ var ReactNodeTypes = require('./ReactNodeTypes');
7798
+ var ReactReconciler = require('./ReactReconciler');
7799
+
7800
+ if (process.env.NODE_ENV !== 'production') {
7801
+ var checkReactTypeSpec = require('./checkReactTypeSpec');
7802
+ }
7803
+
7804
+ var emptyObject = require('fbjs/lib/emptyObject');
7805
+ var invariant = require('fbjs/lib/invariant');
7806
+ var shallowEqual = require('fbjs/lib/shallowEqual');
7807
+ var shouldUpdateReactComponent = require('./shouldUpdateReactComponent');
7808
+ var warning = require('fbjs/lib/warning');
7809
+
7810
+ var CompositeTypes = {
7811
+ ImpureClass: 0,
7812
+ PureClass: 1,
7813
+ StatelessFunctional: 2
7814
+ };
7815
+
7816
+ function StatelessComponent(Component) {}
7817
+ StatelessComponent.prototype.render = function () {
7818
+ var Component = ReactInstanceMap.get(this)._currentElement.type;
7819
+ var element = Component(this.props, this.context, this.updater);
7820
+ warnIfInvalidElement(Component, element);
7821
+ return element;
7822
+ };
7823
+
7824
+ function warnIfInvalidElement(Component, element) {
7825
+ if (process.env.NODE_ENV !== 'production') {
7826
+ process.env.NODE_ENV !== '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;
7827
+ process.env.NODE_ENV !== 'production' ? warning(!Component.childContextTypes, '%s(...): childContextTypes cannot be defined on a functional component.', Component.displayName || Component.name || 'Component') : void 0;
7828
+ }
7829
+ }
7830
+
7831
+ function shouldConstruct(Component) {
7832
+ return !!(Component.prototype && Component.prototype.isReactComponent);
7833
+ }
7834
+
7835
+ function isPureComponent(Component) {
7836
+ return !!(Component.prototype && Component.prototype.isPureReactComponent);
7837
+ }
7838
+
7839
+ // Separated into a function to contain deoptimizations caused by try/finally.
7840
+ function measureLifeCyclePerf(fn, debugID, timerType) {
7841
+ if (debugID === 0) {
7842
+ // Top-level wrappers (see ReactMount) and empty components (see
7843
+ // ReactDOMEmptyComponent) are invisible to hooks and devtools.
7844
+ // Both are implementation details that should go away in the future.
7845
+ return fn();
7846
+ }
7847
+
7848
+ ReactInstrumentation.debugTool.onBeginLifeCycleTimer(debugID, timerType);
7849
+ try {
7850
+ return fn();
7851
+ } finally {
7852
+ ReactInstrumentation.debugTool.onEndLifeCycleTimer(debugID, timerType);
7853
+ }
7854
+ }
7855
+
7856
+ /**
7857
+ * ------------------ The Life-Cycle of a Composite Component ------------------
7858
+ *
7859
+ * - constructor: Initialization of state. The instance is now retained.
7860
+ * - componentWillMount
7861
+ * - render
7862
+ * - [children's constructors]
7863
+ * - [children's componentWillMount and render]
7864
+ * - [children's componentDidMount]
7865
+ * - componentDidMount
7866
+ *
7867
+ * Update Phases:
7868
+ * - componentWillReceiveProps (only called if parent updated)
7869
+ * - shouldComponentUpdate
7870
+ * - componentWillUpdate
7871
+ * - render
7872
+ * - [children's constructors or receive props phases]
7873
+ * - componentDidUpdate
7874
+ *
7875
+ * - componentWillUnmount
7876
+ * - [children's componentWillUnmount]
7877
+ * - [children destroyed]
7878
+ * - (destroyed): The instance is now blank, released by React and ready for GC.
7879
+ *
7880
+ * -----------------------------------------------------------------------------
7881
+ */
7882
+
7883
+ /**
7884
+ * An incrementing ID assigned to each component when it is mounted. This is
7885
+ * used to enforce the order in which `ReactUpdates` updates dirty components.
7886
+ *
7887
+ * @private
7888
+ */
7889
+ var nextMountID = 1;
7890
+
7891
+ /**
7892
+ * @lends {ReactCompositeComponent.prototype}
7893
+ */
7894
+ var ReactCompositeComponent = {
7895
+ /**
7896
+ * Base constructor for all composite component.
7897
+ *
7898
+ * @param {ReactElement} element
7899
+ * @final
7900
+ * @internal
7901
+ */
7902
+ construct: function (element) {
7903
+ this._currentElement = element;
7904
+ this._rootNodeID = 0;
7905
+ this._compositeType = null;
7906
+ this._instance = null;
7907
+ this._hostParent = null;
7908
+ this._hostContainerInfo = null;
7909
+
7910
+ // See ReactUpdateQueue
7911
+ this._updateBatchNumber = null;
7912
+ this._pendingElement = null;
7913
+ this._pendingStateQueue = null;
7914
+ this._pendingReplaceState = false;
7915
+ this._pendingForceUpdate = false;
7916
+
7917
+ this._renderedNodeType = null;
7918
+ this._renderedComponent = null;
7919
+ this._context = null;
7920
+ this._mountOrder = 0;
7921
+ this._topLevelWrapper = null;
7922
+
7923
+ // See ReactUpdates and ReactUpdateQueue.
7924
+ this._pendingCallbacks = null;
7925
+
7926
+ // ComponentWillUnmount shall only be called once
7927
+ this._calledComponentWillUnmount = false;
7928
+
7929
+ if (process.env.NODE_ENV !== 'production') {
7930
+ this._warnedAboutRefsInRender = false;
7931
+ }
7932
+ },
7933
+
7934
+ /**
7935
+ * Initializes the component, renders markup, and registers event listeners.
7936
+ *
7937
+ * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction
7938
+ * @param {?object} hostParent
7939
+ * @param {?object} hostContainerInfo
7940
+ * @param {?object} context
7941
+ * @return {?string} Rendered markup to be inserted into the DOM.
7942
+ * @final
7943
+ * @internal
7944
+ */
7945
+ mountComponent: function (transaction, hostParent, hostContainerInfo, context) {
7946
+ var _this = this;
7947
+
7948
+ this._context = context;
7949
+ this._mountOrder = nextMountID++;
7950
+ this._hostParent = hostParent;
7951
+ this._hostContainerInfo = hostContainerInfo;
7952
+
7953
+ var publicProps = this._currentElement.props;
7954
+ var publicContext = this._processContext(context);
7955
+
7956
+ var Component = this._currentElement.type;
7957
+
7958
+ var updateQueue = transaction.getUpdateQueue();
7959
+
7960
+ // Initialize the public class
7961
+ var doConstruct = shouldConstruct(Component);
7962
+ var inst = this._constructComponent(doConstruct, publicProps, publicContext, updateQueue);
7963
+ var renderedElement;
7964
+
7965
+ // Support functional components
7966
+ if (!doConstruct && (inst == null || inst.render == null)) {
7967
+ renderedElement = inst;
7968
+ warnIfInvalidElement(Component, renderedElement);
7969
+ !(inst === null || inst === false || React.isValidElement(inst)) ? process.env.NODE_ENV !== '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;
7970
+ inst = new StatelessComponent(Component);
7971
+ this._compositeType = CompositeTypes.StatelessFunctional;
7972
+ } else {
7973
+ if (isPureComponent(Component)) {
7974
+ this._compositeType = CompositeTypes.PureClass;
7975
+ } else {
7976
+ this._compositeType = CompositeTypes.ImpureClass;
7977
+ }
7978
+ }
7979
+
7980
+ if (process.env.NODE_ENV !== 'production') {
7981
+ // This will throw later in _renderValidatedComponent, but add an early
7982
+ // warning now to help debugging
7983
+ if (inst.render == null) {
7984
+ process.env.NODE_ENV !== '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;
7985
+ }
7986
+
7987
+ var propsMutated = inst.props !== publicProps;
7988
+ var componentName = Component.displayName || Component.name || 'Component';
7989
+
7990
+ process.env.NODE_ENV !== '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;
7991
+ }
7992
+
7993
+ // These should be set up in the constructor, but as a convenience for
7994
+ // simpler class abstractions, we set them up after the fact.
7995
+ inst.props = publicProps;
7996
+ inst.context = publicContext;
7997
+ inst.refs = emptyObject;
7998
+ inst.updater = updateQueue;
7999
+
8000
+ this._instance = inst;
8001
+
8002
+ // Store a reference from the instance back to the internal representation
8003
+ ReactInstanceMap.set(inst, this);
8004
+
8005
+ if (process.env.NODE_ENV !== 'production') {
8006
+ // Since plain JS classes are defined without any special initialization
8007
+ // logic, we can not catch common errors early. Therefore, we have to
8008
+ // catch them here, at initialization time, instead.
8009
+ process.env.NODE_ENV !== '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;
8010
+ process.env.NODE_ENV !== '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;
8011
+ process.env.NODE_ENV !== '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;
8012
+ process.env.NODE_ENV !== '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;
8013
+ process.env.NODE_ENV !== '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;
8014
+ process.env.NODE_ENV !== '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;
8015
+ process.env.NODE_ENV !== 'production' ? warning(typeof inst.componentWillRecieveProps !== 'function', '%s has a method called ' + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', this.getName() || 'A component') : void 0;
8016
+ }
8017
+
8018
+ var initialState = inst.state;
8019
+ if (initialState === undefined) {
8020
+ inst.state = initialState = null;
8021
+ }
8022
+ !(typeof initialState === 'object' && !Array.isArray(initialState)) ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s.state: must be set to an object or null', this.getName() || 'ReactCompositeComponent') : _prodInvariant('106', this.getName() || 'ReactCompositeComponent') : void 0;
8023
+
8024
+ this._pendingStateQueue = null;
8025
+ this._pendingReplaceState = false;
8026
+ this._pendingForceUpdate = false;
8027
+
8028
+ var markup;
8029
+ if (inst.unstable_handleError) {
8030
+ markup = this.performInitialMountWithErrorHandling(renderedElement, hostParent, hostContainerInfo, transaction, context);
8031
+ } else {
8032
+ markup = this.performInitialMount(renderedElement, hostParent, hostContainerInfo, transaction, context);
8033
+ }
8034
+
8035
+ if (inst.componentDidMount) {
8036
+ if (process.env.NODE_ENV !== 'production') {
8037
+ transaction.getReactMountReady().enqueue(function () {
8038
+ measureLifeCyclePerf(function () {
8039
+ return inst.componentDidMount();
8040
+ }, _this._debugID, 'componentDidMount');
8041
+ });
8042
+ } else {
8043
+ transaction.getReactMountReady().enqueue(inst.componentDidMount, inst);
8044
+ }
8045
+ }
8046
+
8047
+ return markup;
8048
+ },
8049
+
8050
+ _constructComponent: function (doConstruct, publicProps, publicContext, updateQueue) {
8051
+ if (process.env.NODE_ENV !== 'production' && !doConstruct) {
8052
+ ReactCurrentOwner.current = this;
8053
+ try {
8054
+ return this._constructComponentWithoutOwner(doConstruct, publicProps, publicContext, updateQueue);
8055
+ } finally {
8056
+ ReactCurrentOwner.current = null;
8057
+ }
8058
+ } else {
8059
+ return this._constructComponentWithoutOwner(doConstruct, publicProps, publicContext, updateQueue);
8060
+ }
8061
+ },
8062
+
8063
+ _constructComponentWithoutOwner: function (doConstruct, publicProps, publicContext, updateQueue) {
8064
+ var Component = this._currentElement.type;
8065
+
8066
+ if (doConstruct) {
8067
+ if (process.env.NODE_ENV !== 'production') {
8068
+ return measureLifeCyclePerf(function () {
8069
+ return new Component(publicProps, publicContext, updateQueue);
8070
+ }, this._debugID, 'ctor');
8071
+ } else {
8072
+ return new Component(publicProps, publicContext, updateQueue);
8073
+ }
8074
+ }
8075
+
8076
+ // This can still be an instance in case of factory components
8077
+ // but we'll count this as time spent rendering as the more common case.
8078
+ if (process.env.NODE_ENV !== 'production') {
8079
+ return measureLifeCyclePerf(function () {
8080
+ return Component(publicProps, publicContext, updateQueue);
8081
+ }, this._debugID, 'render');
8082
+ } else {
8083
+ return Component(publicProps, publicContext, updateQueue);
8084
+ }
8085
+ },
8086
+
8087
+ performInitialMountWithErrorHandling: function (renderedElement, hostParent, hostContainerInfo, transaction, context) {
8088
+ var markup;
8089
+ var checkpoint = transaction.checkpoint();
8090
+ try {
8091
+ markup = this.performInitialMount(renderedElement, hostParent, hostContainerInfo, transaction, context);
8092
+ } catch (e) {
8093
+ // Roll back to checkpoint, handle error (which may add items to the transaction), and take a new checkpoint
8094
+ transaction.rollback(checkpoint);
8095
+ this._instance.unstable_handleError(e);
8096
+ if (this._pendingStateQueue) {
8097
+ this._instance.state = this._processPendingState(this._instance.props, this._instance.context);
8098
+ }
8099
+ checkpoint = transaction.checkpoint();
8100
+
8101
+ this._renderedComponent.unmountComponent(true);
8102
+ transaction.rollback(checkpoint);
8103
+
8104
+ // Try again - we've informed the component about the error, so they can render an error message this time.
8105
+ // If this throws again, the error will bubble up (and can be caught by a higher error boundary).
8106
+ markup = this.performInitialMount(renderedElement, hostParent, hostContainerInfo, transaction, context);
8107
+ }
8108
+ return markup;
8109
+ },
8110
+
8111
+ performInitialMount: function (renderedElement, hostParent, hostContainerInfo, transaction, context) {
8112
+ var inst = this._instance;
8113
+
8114
+ var debugID = 0;
8115
+ if (process.env.NODE_ENV !== 'production') {
8116
+ debugID = this._debugID;
8117
+ }
8118
+
8119
+ if (inst.componentWillMount) {
8120
+ if (process.env.NODE_ENV !== 'production') {
8121
+ measureLifeCyclePerf(function () {
8122
+ return inst.componentWillMount();
8123
+ }, debugID, 'componentWillMount');
8124
+ } else {
8125
+ inst.componentWillMount();
8126
+ }
8127
+ // When mounting, calls to `setState` by `componentWillMount` will set
8128
+ // `this._pendingStateQueue` without triggering a re-render.
8129
+ if (this._pendingStateQueue) {
8130
+ inst.state = this._processPendingState(inst.props, inst.context);
8131
+ }
8132
+ }
8133
+
8134
+ // If not a stateless component, we now render
8135
+ if (renderedElement === undefined) {
8136
+ renderedElement = this._renderValidatedComponent();
8137
+ }
8138
+
8139
+ var nodeType = ReactNodeTypes.getType(renderedElement);
8140
+ this._renderedNodeType = nodeType;
8141
+ var child = this._instantiateReactComponent(renderedElement, nodeType !== ReactNodeTypes.EMPTY /* shouldHaveDebugID */
8142
+ );
8143
+ this._renderedComponent = child;
8144
+
8145
+ var markup = ReactReconciler.mountComponent(child, transaction, hostParent, hostContainerInfo, this._processChildContext(context), debugID);
8146
+
8147
+ if (process.env.NODE_ENV !== 'production') {
8148
+ if (debugID !== 0) {
8149
+ var childDebugIDs = child._debugID !== 0 ? [child._debugID] : [];
8150
+ ReactInstrumentation.debugTool.onSetChildren(debugID, childDebugIDs);
8151
+ }
8152
+ }
8153
+
8154
+ return markup;
8155
+ },
8156
+
8157
+ getHostNode: function () {
8158
+ return ReactReconciler.getHostNode(this._renderedComponent);
8159
+ },
8160
+
8161
+ /**
8162
+ * Releases any resources allocated by `mountComponent`.
8163
+ *
8164
+ * @final
8165
+ * @internal
8166
+ */
8167
+ unmountComponent: function (safely) {
8168
+ if (!this._renderedComponent) {
8169
+ return;
8170
+ }
8171
+
8172
+ var inst = this._instance;
8173
+
8174
+ if (inst.componentWillUnmount && !inst._calledComponentWillUnmount) {
8175
+ inst._calledComponentWillUnmount = true;
8176
+
8177
+ if (safely) {
8178
+ var name = this.getName() + '.componentWillUnmount()';
8179
+ ReactErrorUtils.invokeGuardedCallback(name, inst.componentWillUnmount.bind(inst));
8180
+ } else {
8181
+ if (process.env.NODE_ENV !== 'production') {
8182
+ measureLifeCyclePerf(function () {
8183
+ return inst.componentWillUnmount();
8184
+ }, this._debugID, 'componentWillUnmount');
8185
+ } else {
8186
+ inst.componentWillUnmount();
8187
+ }
8188
+ }
8189
+ }
8190
+
8191
+ if (this._renderedComponent) {
8192
+ ReactReconciler.unmountComponent(this._renderedComponent, safely);
8193
+ this._renderedNodeType = null;
8194
+ this._renderedComponent = null;
8195
+ this._instance = null;
8196
+ }
8197
+
8198
+ // Reset pending fields
8199
+ // Even if this component is scheduled for another update in ReactUpdates,
8200
+ // it would still be ignored because these fields are reset.
8201
+ this._pendingStateQueue = null;
8202
+ this._pendingReplaceState = false;
8203
+ this._pendingForceUpdate = false;
8204
+ this._pendingCallbacks = null;
8205
+ this._pendingElement = null;
8206
+
8207
+ // These fields do not really need to be reset since this object is no
8208
+ // longer accessible.
8209
+ this._context = null;
8210
+ this._rootNodeID = 0;
8211
+ this._topLevelWrapper = null;
8212
+
8213
+ // Delete the reference from the instance to this internal representation
8214
+ // which allow the internals to be properly cleaned up even if the user
8215
+ // leaks a reference to the public instance.
8216
+ ReactInstanceMap.remove(inst);
8217
+
8218
+ // Some existing components rely on inst.props even after they've been
8219
+ // destroyed (in event handlers).
8220
+ // TODO: inst.props = null;
8221
+ // TODO: inst.state = null;
8222
+ // TODO: inst.context = null;
8223
+ },
8224
+
8225
+ /**
8226
+ * Filters the context object to only contain keys specified in
8227
+ * `contextTypes`
8228
+ *
8229
+ * @param {object} context
8230
+ * @return {?object}
8231
+ * @private
8232
+ */
8233
+ _maskContext: function (context) {
8234
+ var Component = this._currentElement.type;
8235
+ var contextTypes = Component.contextTypes;
8236
+ if (!contextTypes) {
8237
+ return emptyObject;
8238
+ }
8239
+ var maskedContext = {};
8240
+ for (var contextName in contextTypes) {
8241
+ maskedContext[contextName] = context[contextName];
8242
+ }
8243
+ return maskedContext;
8244
+ },
8245
+
8246
+ /**
8247
+ * Filters the context object to only contain keys specified in
8248
+ * `contextTypes`, and asserts that they are valid.
8249
+ *
8250
+ * @param {object} context
8251
+ * @return {?object}
8252
+ * @private
8253
+ */
8254
+ _processContext: function (context) {
8255
+ var maskedContext = this._maskContext(context);
8256
+ if (process.env.NODE_ENV !== 'production') {
8257
+ var Component = this._currentElement.type;
8258
+ if (Component.contextTypes) {
8259
+ this._checkContextTypes(Component.contextTypes, maskedContext, 'context');
8260
+ }
8261
+ }
8262
+ return maskedContext;
8263
+ },
8264
+
8265
+ /**
8266
+ * @param {object} currentContext
8267
+ * @return {object}
8268
+ * @private
8269
+ */
8270
+ _processChildContext: function (currentContext) {
8271
+ var Component = this._currentElement.type;
8272
+ var inst = this._instance;
8273
+ var childContext;
8274
+
8275
+ if (inst.getChildContext) {
8276
+ if (process.env.NODE_ENV !== 'production') {
8277
+ ReactInstrumentation.debugTool.onBeginProcessingChildContext();
8278
+ try {
8279
+ childContext = inst.getChildContext();
8280
+ } finally {
8281
+ ReactInstrumentation.debugTool.onEndProcessingChildContext();
8282
+ }
8283
+ } else {
8284
+ childContext = inst.getChildContext();
8285
+ }
8286
+ }
8287
+
8288
+ if (childContext) {
8289
+ !(typeof Component.childContextTypes === 'object') ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().', this.getName() || 'ReactCompositeComponent') : _prodInvariant('107', this.getName() || 'ReactCompositeComponent') : void 0;
8290
+ if (process.env.NODE_ENV !== 'production') {
8291
+ this._checkContextTypes(Component.childContextTypes, childContext, 'child context');
8292
+ }
8293
+ for (var name in childContext) {
8294
+ !(name in Component.childContextTypes) ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s.getChildContext(): key "%s" is not defined in childContextTypes.', this.getName() || 'ReactCompositeComponent', name) : _prodInvariant('108', this.getName() || 'ReactCompositeComponent', name) : void 0;
8295
+ }
8296
+ return _assign({}, currentContext, childContext);
8297
+ }
8298
+ return currentContext;
8299
+ },
8300
+
8301
+ /**
8302
+ * Assert that the context types are valid
8303
+ *
8304
+ * @param {object} typeSpecs Map of context field to a ReactPropType
8305
+ * @param {object} values Runtime values that need to be type-checked
8306
+ * @param {string} location e.g. "prop", "context", "child context"
8307
+ * @private
8308
+ */
8309
+ _checkContextTypes: function (typeSpecs, values, location) {
8310
+ if (process.env.NODE_ENV !== 'production') {
8311
+ checkReactTypeSpec(typeSpecs, values, location, this.getName(), null, this._debugID);
8312
+ }
8313
+ },
8314
+
8315
+ receiveComponent: function (nextElement, transaction, nextContext) {
8316
+ var prevElement = this._currentElement;
8317
+ var prevContext = this._context;
8318
+
8319
+ this._pendingElement = null;
8320
+
8321
+ this.updateComponent(transaction, prevElement, nextElement, prevContext, nextContext);
8322
+ },
8323
+
8324
+ /**
8325
+ * If any of `_pendingElement`, `_pendingStateQueue`, or `_pendingForceUpdate`
8326
+ * is set, update the component.
8327
+ *
8328
+ * @param {ReactReconcileTransaction} transaction
8329
+ * @internal
8330
+ */
8331
+ performUpdateIfNecessary: function (transaction) {
8332
+ if (this._pendingElement != null) {
8333
+ ReactReconciler.receiveComponent(this, this._pendingElement, transaction, this._context);
8334
+ } else if (this._pendingStateQueue !== null || this._pendingForceUpdate) {
8335
+ this.updateComponent(transaction, this._currentElement, this._currentElement, this._context, this._context);
8336
+ } else {
8337
+ this._updateBatchNumber = null;
8338
+ }
8339
+ },
8340
+
8341
+ /**
8342
+ * Perform an update to a mounted component. The componentWillReceiveProps and
8343
+ * shouldComponentUpdate methods are called, then (assuming the update isn't
8344
+ * skipped) the remaining update lifecycle methods are called and the DOM
8345
+ * representation is updated.
8346
+ *
8347
+ * By default, this implements React's rendering and reconciliation algorithm.
8348
+ * Sophisticated clients may wish to override this.
8349
+ *
8350
+ * @param {ReactReconcileTransaction} transaction
8351
+ * @param {ReactElement} prevParentElement
8352
+ * @param {ReactElement} nextParentElement
8353
+ * @internal
8354
+ * @overridable
8355
+ */
8356
+ updateComponent: function (transaction, prevParentElement, nextParentElement, prevUnmaskedContext, nextUnmaskedContext) {
8357
+ var inst = this._instance;
8358
+ !(inst != null) ? process.env.NODE_ENV !== '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;
8359
+
8360
+ var willReceive = false;
8361
+ var nextContext;
8362
+
8363
+ // Determine if the context has changed or not
8364
+ if (this._context === nextUnmaskedContext) {
8365
+ nextContext = inst.context;
8366
+ } else {
8367
+ nextContext = this._processContext(nextUnmaskedContext);
8368
+ willReceive = true;
8369
+ }
8370
+
8371
+ var prevProps = prevParentElement.props;
8372
+ var nextProps = nextParentElement.props;
8373
+
8374
+ // Not a simple state update but a props update
8375
+ if (prevParentElement !== nextParentElement) {
8376
+ willReceive = true;
8377
+ }
8378
+
8379
+ // An update here will schedule an update but immediately set
8380
+ // _pendingStateQueue which will ensure that any state updates gets
8381
+ // immediately reconciled instead of waiting for the next batch.
8382
+ if (willReceive && inst.componentWillReceiveProps) {
8383
+ if (process.env.NODE_ENV !== 'production') {
8384
+ measureLifeCyclePerf(function () {
8385
+ return inst.componentWillReceiveProps(nextProps, nextContext);
8386
+ }, this._debugID, 'componentWillReceiveProps');
8387
+ } else {
8388
+ inst.componentWillReceiveProps(nextProps, nextContext);
8389
+ }
8390
+ }
8391
+
8392
+ var nextState = this._processPendingState(nextProps, nextContext);
8393
+ var shouldUpdate = true;
8394
+
8395
+ if (!this._pendingForceUpdate) {
8396
+ if (inst.shouldComponentUpdate) {
8397
+ if (process.env.NODE_ENV !== 'production') {
8398
+ shouldUpdate = measureLifeCyclePerf(function () {
8399
+ return inst.shouldComponentUpdate(nextProps, nextState, nextContext);
8400
+ }, this._debugID, 'shouldComponentUpdate');
8401
+ } else {
8402
+ shouldUpdate = inst.shouldComponentUpdate(nextProps, nextState, nextContext);
8403
+ }
8404
+ } else {
8405
+ if (this._compositeType === CompositeTypes.PureClass) {
8406
+ shouldUpdate = !shallowEqual(prevProps, nextProps) || !shallowEqual(inst.state, nextState);
8407
+ }
8408
+ }
8409
+ }
8410
+
8411
+ if (process.env.NODE_ENV !== 'production') {
8412
+ process.env.NODE_ENV !== '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;
8413
+ }
8414
+
8415
+ this._updateBatchNumber = null;
8416
+ if (shouldUpdate) {
8417
+ this._pendingForceUpdate = false;
8418
+ // Will set `this.props`, `this.state` and `this.context`.
8419
+ this._performComponentUpdate(nextParentElement, nextProps, nextState, nextContext, transaction, nextUnmaskedContext);
8420
+ } else {
8421
+ // If it's determined that a component should not update, we still want
8422
+ // to set props and state but we shortcut the rest of the update.
8423
+ this._currentElement = nextParentElement;
8424
+ this._context = nextUnmaskedContext;
8425
+ inst.props = nextProps;
8426
+ inst.state = nextState;
8427
+ inst.context = nextContext;
8428
+ }
8429
+ },
8430
+
8431
+ _processPendingState: function (props, context) {
8432
+ var inst = this._instance;
8433
+ var queue = this._pendingStateQueue;
8434
+ var replace = this._pendingReplaceState;
8435
+ this._pendingReplaceState = false;
8436
+ this._pendingStateQueue = null;
8437
+
8438
+ if (!queue) {
8439
+ return inst.state;
8440
+ }
8441
+
8442
+ if (replace && queue.length === 1) {
8443
+ return queue[0];
8444
+ }
8445
+
8446
+ var nextState = _assign({}, replace ? queue[0] : inst.state);
8447
+ for (var i = replace ? 1 : 0; i < queue.length; i++) {
8448
+ var partial = queue[i];
8449
+ _assign(nextState, typeof partial === 'function' ? partial.call(inst, nextState, props, context) : partial);
8450
+ }
8451
+
8452
+ return nextState;
8453
+ },
8454
+
8455
+ /**
8456
+ * Merges new props and state, notifies delegate methods of update and
8457
+ * performs update.
8458
+ *
8459
+ * @param {ReactElement} nextElement Next element
8460
+ * @param {object} nextProps Next public object to set as properties.
8461
+ * @param {?object} nextState Next object to set as state.
8462
+ * @param {?object} nextContext Next public object to set as context.
8463
+ * @param {ReactReconcileTransaction} transaction
8464
+ * @param {?object} unmaskedContext
8465
+ * @private
8466
+ */
8467
+ _performComponentUpdate: function (nextElement, nextProps, nextState, nextContext, transaction, unmaskedContext) {
8468
+ var _this2 = this;
8469
+
8470
+ var inst = this._instance;
8471
+
8472
+ var hasComponentDidUpdate = Boolean(inst.componentDidUpdate);
8473
+ var prevProps;
8474
+ var prevState;
8475
+ var prevContext;
8476
+ if (hasComponentDidUpdate) {
8477
+ prevProps = inst.props;
8478
+ prevState = inst.state;
8479
+ prevContext = inst.context;
8480
+ }
8481
+
8482
+ if (inst.componentWillUpdate) {
8483
+ if (process.env.NODE_ENV !== 'production') {
8484
+ measureLifeCyclePerf(function () {
8485
+ return inst.componentWillUpdate(nextProps, nextState, nextContext);
8486
+ }, this._debugID, 'componentWillUpdate');
8487
+ } else {
8488
+ inst.componentWillUpdate(nextProps, nextState, nextContext);
8489
+ }
8490
+ }
8491
+
8492
+ this._currentElement = nextElement;
8493
+ this._context = unmaskedContext;
8494
+ inst.props = nextProps;
8495
+ inst.state = nextState;
8496
+ inst.context = nextContext;
8497
+
8498
+ this._updateRenderedComponent(transaction, unmaskedContext);
8499
+
8500
+ if (hasComponentDidUpdate) {
8501
+ if (process.env.NODE_ENV !== 'production') {
8502
+ transaction.getReactMountReady().enqueue(function () {
8503
+ measureLifeCyclePerf(inst.componentDidUpdate.bind(inst, prevProps, prevState, prevContext), _this2._debugID, 'componentDidUpdate');
8504
+ });
8505
+ } else {
8506
+ transaction.getReactMountReady().enqueue(inst.componentDidUpdate.bind(inst, prevProps, prevState, prevContext), inst);
8507
+ }
8508
+ }
8509
+ },
8510
+
8511
+ /**
8512
+ * Call the component's `render` method and update the DOM accordingly.
8513
+ *
8514
+ * @param {ReactReconcileTransaction} transaction
8515
+ * @internal
8516
+ */
8517
+ _updateRenderedComponent: function (transaction, context) {
8518
+ var prevComponentInstance = this._renderedComponent;
8519
+ var prevRenderedElement = prevComponentInstance._currentElement;
8520
+ var nextRenderedElement = this._renderValidatedComponent();
8521
+
8522
+ var debugID = 0;
8523
+ if (process.env.NODE_ENV !== 'production') {
8524
+ debugID = this._debugID;
8525
+ }
8526
+
8527
+ if (shouldUpdateReactComponent(prevRenderedElement, nextRenderedElement)) {
8528
+ ReactReconciler.receiveComponent(prevComponentInstance, nextRenderedElement, transaction, this._processChildContext(context));
8529
+ } else {
8530
+ var oldHostNode = ReactReconciler.getHostNode(prevComponentInstance);
8531
+ ReactReconciler.unmountComponent(prevComponentInstance, false);
8532
+
8533
+ var nodeType = ReactNodeTypes.getType(nextRenderedElement);
8534
+ this._renderedNodeType = nodeType;
8535
+ var child = this._instantiateReactComponent(nextRenderedElement, nodeType !== ReactNodeTypes.EMPTY /* shouldHaveDebugID */
8536
+ );
8537
+ this._renderedComponent = child;
8538
+
8539
+ var nextMarkup = ReactReconciler.mountComponent(child, transaction, this._hostParent, this._hostContainerInfo, this._processChildContext(context), debugID);
8540
+
8541
+ if (process.env.NODE_ENV !== 'production') {
8542
+ if (debugID !== 0) {
8543
+ var childDebugIDs = child._debugID !== 0 ? [child._debugID] : [];
8544
+ ReactInstrumentation.debugTool.onSetChildren(debugID, childDebugIDs);
8545
+ }
8546
+ }
8547
+
8548
+ this._replaceNodeWithMarkup(oldHostNode, nextMarkup, prevComponentInstance);
8549
+ }
8550
+ },
8551
+
8552
+ /**
8553
+ * Overridden in shallow rendering.
8554
+ *
8555
+ * @protected
8556
+ */
8557
+ _replaceNodeWithMarkup: function (oldHostNode, nextMarkup, prevInstance) {
8558
+ ReactComponentEnvironment.replaceNodeWithMarkup(oldHostNode, nextMarkup, prevInstance);
8559
+ },
8560
+
8561
+ /**
8562
+ * @protected
8563
+ */
8564
+ _renderValidatedComponentWithoutOwnerOrContext: function () {
8565
+ var inst = this._instance;
8566
+ var renderedElement;
8567
+
8568
+ if (process.env.NODE_ENV !== 'production') {
8569
+ renderedElement = measureLifeCyclePerf(function () {
8570
+ return inst.render();
8571
+ }, this._debugID, 'render');
8572
+ } else {
8573
+ renderedElement = inst.render();
8574
+ }
8575
+
8576
+ if (process.env.NODE_ENV !== 'production') {
8577
+ // We allow auto-mocks to proceed as if they're returning null.
8578
+ if (renderedElement === undefined && inst.render._isMockFunction) {
8579
+ // This is probably bad practice. Consider warning here and
8580
+ // deprecating this convenience.
8581
+ renderedElement = null;
8582
+ }
8583
+ }
8584
+
8585
+ return renderedElement;
8586
+ },
8587
+
8588
+ /**
8589
+ * @private
8590
+ */
8591
+ _renderValidatedComponent: function () {
8592
+ var renderedElement;
8593
+ if (process.env.NODE_ENV !== 'production' || this._compositeType !== CompositeTypes.StatelessFunctional) {
8594
+ ReactCurrentOwner.current = this;
8595
+ try {
8596
+ renderedElement = this._renderValidatedComponentWithoutOwnerOrContext();
8597
+ } finally {
8598
+ ReactCurrentOwner.current = null;
8599
+ }
8600
+ } else {
8601
+ renderedElement = this._renderValidatedComponentWithoutOwnerOrContext();
8602
+ }
8603
+ !(
8604
+ // TODO: An `isValidNode` function would probably be more appropriate
8605
+ renderedElement === null || renderedElement === false || React.isValidElement(renderedElement)) ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s.render(): A valid React element (or null) must be returned. You may have returned undefined, an array or some other invalid object.', this.getName() || 'ReactCompositeComponent') : _prodInvariant('109', this.getName() || 'ReactCompositeComponent') : void 0;
8606
+
8607
+ return renderedElement;
8608
+ },
8609
+
8610
+ /**
8611
+ * Lazily allocates the refs object and stores `component` as `ref`.
8612
+ *
8613
+ * @param {string} ref Reference name.
8614
+ * @param {component} component Component to store as `ref`.
8615
+ * @final
8616
+ * @private
8617
+ */
8618
+ attachRef: function (ref, component) {
8619
+ var inst = this.getPublicInstance();
8620
+ !(inst != null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Stateless function components cannot have refs.') : _prodInvariant('110') : void 0;
8621
+ var publicComponentInstance = component.getPublicInstance();
8622
+ if (process.env.NODE_ENV !== 'production') {
8623
+ var componentName = component && component.getName ? component.getName() : 'a component';
8624
+ process.env.NODE_ENV !== 'production' ? warning(publicComponentInstance != null || component._compositeType !== CompositeTypes.StatelessFunctional, 'Stateless function components cannot be given refs ' + '(See ref "%s" in %s created by %s). ' + 'Attempts to access this ref will fail.', ref, componentName, this.getName()) : void 0;
8625
+ }
8626
+ var refs = inst.refs === emptyObject ? inst.refs = {} : inst.refs;
8627
+ refs[ref] = publicComponentInstance;
8628
+ },
8629
+
8630
+ /**
8631
+ * Detaches a reference name.
8632
+ *
8633
+ * @param {string} ref Name to dereference.
8634
+ * @final
8635
+ * @private
8636
+ */
8637
+ detachRef: function (ref) {
8638
+ var refs = this.getPublicInstance().refs;
8639
+ delete refs[ref];
8640
+ },
8641
+
8642
+ /**
8643
+ * Get a text description of the component that can be used to identify it
8644
+ * in error messages.
8645
+ * @return {string} The name or null.
8646
+ * @internal
8647
+ */
8648
+ getName: function () {
8649
+ var type = this._currentElement.type;
8650
+ var constructor = this._instance && this._instance.constructor;
8651
+ return type.displayName || constructor && constructor.displayName || type.name || constructor && constructor.name || null;
8652
+ },
8653
+
8654
+ /**
8655
+ * Get the publicly accessible representation of this component - i.e. what
8656
+ * is exposed by refs and returned by render. Can be null for stateless
8657
+ * components.
8658
+ *
8659
+ * @return {ReactComponent} the public component instance.
8660
+ * @internal
8661
+ */
8662
+ getPublicInstance: function () {
8663
+ var inst = this._instance;
8664
+ if (this._compositeType === CompositeTypes.StatelessFunctional) {
8665
+ return null;
8666
+ }
8667
+ return inst;
8668
+ },
8669
+
8670
+ // Stub
8671
+ _instantiateReactComponent: null
8672
+ };
8673
+
8674
+ module.exports = ReactCompositeComponent;
8675
+ }).call(this)}).call(this,require('_process'))
8676
+ },{"./ReactComponentEnvironment":62,"./ReactErrorUtils":87,"./ReactInstanceMap":95,"./ReactInstrumentation":96,"./ReactNodeTypes":101,"./ReactReconciler":106,"./checkReactTypeSpec":133,"./reactProdInvariant":154,"./shouldUpdateReactComponent":158,"_process":29,"fbjs/lib/emptyObject":13,"fbjs/lib/invariant":20,"fbjs/lib/shallowEqual":26,"fbjs/lib/warning":27,"object-assign":28,"react/lib/React":166,"react/lib/ReactCurrentOwner":170}],64:[function(require,module,exports){
8677
+ (function (process){(function (){
8678
+ /**
8679
+ * Copyright (c) 2013-present, Facebook, Inc.
8680
+ *
8681
+ * This source code is licensed under the MIT license found in the
8682
+ * LICENSE file in the root directory of this source tree.
8683
+ *
8684
+ */
8685
+
8686
+ /* globals __REACT_DEVTOOLS_GLOBAL_HOOK__*/
8687
+
8688
+ 'use strict';
8689
+
8690
+ var ReactDOMComponentTree = require('./ReactDOMComponentTree');
8691
+ var ReactDefaultInjection = require('./ReactDefaultInjection');
8692
+ var ReactMount = require('./ReactMount');
8693
+ var ReactReconciler = require('./ReactReconciler');
8694
+ var ReactUpdates = require('./ReactUpdates');
8695
+ var ReactVersion = require('./ReactVersion');
8696
+
8697
+ var findDOMNode = require('./findDOMNode');
8698
+ var getHostComponentFromComposite = require('./getHostComponentFromComposite');
8699
+ var renderSubtreeIntoContainer = require('./renderSubtreeIntoContainer');
8700
+ var warning = require('fbjs/lib/warning');
8701
+
8702
+ ReactDefaultInjection.inject();
8703
+
8704
+ var ReactDOM = {
8705
+ findDOMNode: findDOMNode,
8706
+ render: ReactMount.render,
8707
+ unmountComponentAtNode: ReactMount.unmountComponentAtNode,
8708
+ version: ReactVersion,
8709
+
8710
+ /* eslint-disable camelcase */
8711
+ unstable_batchedUpdates: ReactUpdates.batchedUpdates,
8712
+ unstable_renderSubtreeIntoContainer: renderSubtreeIntoContainer
8713
+ /* eslint-enable camelcase */
8714
+ };
8715
+
8716
+ // Inject the runtime into a devtools global hook regardless of browser.
8717
+ // Allows for debugging when the hook is injected on the page.
8718
+ if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.inject === 'function') {
8719
+ __REACT_DEVTOOLS_GLOBAL_HOOK__.inject({
8720
+ ComponentTree: {
8721
+ getClosestInstanceFromNode: ReactDOMComponentTree.getClosestInstanceFromNode,
8722
+ getNodeFromInstance: function (inst) {
8723
+ // inst is an internal instance (but could be a composite)
8724
+ if (inst._renderedComponent) {
8725
+ inst = getHostComponentFromComposite(inst);
8726
+ }
8727
+ if (inst) {
8728
+ return ReactDOMComponentTree.getNodeFromInstance(inst);
8729
+ } else {
8730
+ return null;
8731
+ }
8732
+ }
8733
+ },
8734
+ Mount: ReactMount,
8735
+ Reconciler: ReactReconciler
8736
+ });
8737
+ }
8738
+
8739
+ if (process.env.NODE_ENV !== 'production') {
8740
+ var ExecutionEnvironment = require('fbjs/lib/ExecutionEnvironment');
8741
+ if (ExecutionEnvironment.canUseDOM && window.top === window.self) {
8742
+ // First check if devtools is not installed
8743
+ if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined') {
8744
+ // If we're in Chrome or Firefox, provide a download link if not installed.
8745
+ if (navigator.userAgent.indexOf('Chrome') > -1 && navigator.userAgent.indexOf('Edge') === -1 || navigator.userAgent.indexOf('Firefox') > -1) {
8746
+ // Firefox does not have the issue with devtools loaded over file://
8747
+ var showFileUrlMessage = window.location.protocol.indexOf('http') === -1 && navigator.userAgent.indexOf('Firefox') === -1;
8748
+ console.debug('Download the React DevTools ' + (showFileUrlMessage ? 'and use an HTTP server (instead of a file: URL) ' : '') + 'for a better development experience: ' + 'https://fb.me/react-devtools');
8749
+ }
8750
+ }
8751
+
8752
+ var testFunc = function testFn() {};
8753
+ process.env.NODE_ENV !== 'production' ? warning((testFunc.name || testFunc.toString()).indexOf('testFn') !== -1, "It looks like you're using a minified copy of the development build " + 'of React. When deploying React apps to production, make sure to use ' + 'the production build which skips development warnings and is faster. ' + 'See https://fb.me/react-minification for more details.') : void 0;
8754
+
8755
+ // If we're in IE8, check to see if we are in compatibility mode and provide
8756
+ // information on preventing compatibility mode
8757
+ var ieCompatibilityMode = document.documentMode && document.documentMode < 8;
8758
+
8759
+ process.env.NODE_ENV !== 'production' ? warning(!ieCompatibilityMode, 'Internet Explorer is running in compatibility mode; please add the ' + 'following tag to your HTML to prevent this from happening: ' + '<meta http-equiv="X-UA-Compatible" content="IE=edge" />') : void 0;
8760
+
8761
+ var expectedFeatures = [
8762
+ // shims
8763
+ Array.isArray, Array.prototype.every, Array.prototype.forEach, Array.prototype.indexOf, Array.prototype.map, Date.now, Function.prototype.bind, Object.keys, String.prototype.trim];
8764
+
8765
+ for (var i = 0; i < expectedFeatures.length; i++) {
8766
+ if (!expectedFeatures[i]) {
8767
+ process.env.NODE_ENV !== 'production' ? warning(false, 'One or more ES5 shims expected by React are not available: ' + 'https://fb.me/react-warning-polyfills') : void 0;
8768
+ break;
8769
+ }
8770
+ }
8771
+ }
8772
+ }
8773
+
8774
+ if (process.env.NODE_ENV !== 'production') {
8775
+ var ReactInstrumentation = require('./ReactInstrumentation');
8776
+ var ReactDOMUnknownPropertyHook = require('./ReactDOMUnknownPropertyHook');
8777
+ var ReactDOMNullInputValuePropHook = require('./ReactDOMNullInputValuePropHook');
8778
+ var ReactDOMInvalidARIAHook = require('./ReactDOMInvalidARIAHook');
8779
+
8780
+ ReactInstrumentation.debugTool.addHook(ReactDOMUnknownPropertyHook);
8781
+ ReactInstrumentation.debugTool.addHook(ReactDOMNullInputValuePropHook);
8782
+ ReactInstrumentation.debugTool.addHook(ReactDOMInvalidARIAHook);
8783
+ }
8784
+
8785
+ module.exports = ReactDOM;
8786
+ }).call(this)}).call(this,require('_process'))
8787
+ },{"./ReactDOMComponentTree":67,"./ReactDOMInvalidARIAHook":73,"./ReactDOMNullInputValuePropHook":74,"./ReactDOMUnknownPropertyHook":81,"./ReactDefaultInjection":84,"./ReactInstrumentation":96,"./ReactMount":99,"./ReactReconciler":106,"./ReactUpdates":111,"./ReactVersion":112,"./findDOMNode":137,"./getHostComponentFromComposite":144,"./renderSubtreeIntoContainer":155,"_process":29,"fbjs/lib/ExecutionEnvironment":6,"fbjs/lib/warning":27}],65:[function(require,module,exports){
8788
+ (function (process){(function (){
8789
+ /**
8790
+ * Copyright (c) 2013-present, Facebook, Inc.
8791
+ *
8792
+ * This source code is licensed under the MIT license found in the
8793
+ * LICENSE file in the root directory of this source tree.
8794
+ *
8795
+ */
8796
+
8797
+ /* global hasOwnProperty:true */
8798
+
8799
+ 'use strict';
8800
+
8801
+ var _prodInvariant = require('./reactProdInvariant'),
8802
+ _assign = require('object-assign');
8803
+
8804
+ var AutoFocusUtils = require('./AutoFocusUtils');
8805
+ var CSSPropertyOperations = require('./CSSPropertyOperations');
8806
+ var DOMLazyTree = require('./DOMLazyTree');
8807
+ var DOMNamespaces = require('./DOMNamespaces');
8808
+ var DOMProperty = require('./DOMProperty');
8809
+ var DOMPropertyOperations = require('./DOMPropertyOperations');
8810
+ var EventPluginHub = require('./EventPluginHub');
8811
+ var EventPluginRegistry = require('./EventPluginRegistry');
8812
+ var ReactBrowserEventEmitter = require('./ReactBrowserEventEmitter');
8813
+ var ReactDOMComponentFlags = require('./ReactDOMComponentFlags');
8814
+ var ReactDOMComponentTree = require('./ReactDOMComponentTree');
8815
+ var ReactDOMInput = require('./ReactDOMInput');
8816
+ var ReactDOMOption = require('./ReactDOMOption');
8817
+ var ReactDOMSelect = require('./ReactDOMSelect');
8818
+ var ReactDOMTextarea = require('./ReactDOMTextarea');
8819
+ var ReactInstrumentation = require('./ReactInstrumentation');
8820
+ var ReactMultiChild = require('./ReactMultiChild');
8821
+ var ReactServerRenderingTransaction = require('./ReactServerRenderingTransaction');
8822
+
8823
+ var emptyFunction = require('fbjs/lib/emptyFunction');
8824
+ var escapeTextContentForBrowser = require('./escapeTextContentForBrowser');
8825
+ var invariant = require('fbjs/lib/invariant');
8826
+ var isEventSupported = require('./isEventSupported');
8827
+ var shallowEqual = require('fbjs/lib/shallowEqual');
8828
+ var inputValueTracking = require('./inputValueTracking');
8829
+ var validateDOMNesting = require('./validateDOMNesting');
8830
+ var warning = require('fbjs/lib/warning');
8831
+
8832
+ var Flags = ReactDOMComponentFlags;
8833
+ var deleteListener = EventPluginHub.deleteListener;
8834
+ var getNode = ReactDOMComponentTree.getNodeFromInstance;
8835
+ var listenTo = ReactBrowserEventEmitter.listenTo;
8836
+ var registrationNameModules = EventPluginRegistry.registrationNameModules;
8837
+
8838
+ // For quickly matching children type, to test if can be treated as content.
8839
+ var CONTENT_TYPES = { string: true, number: true };
8840
+
8841
+ var STYLE = 'style';
8842
+ var HTML = '__html';
8843
+ var RESERVED_PROPS = {
8844
+ children: null,
8845
+ dangerouslySetInnerHTML: null,
8846
+ suppressContentEditableWarning: null
8847
+ };
8848
+
8849
+ // Node type for document fragments (Node.DOCUMENT_FRAGMENT_NODE).
8850
+ var DOC_FRAGMENT_TYPE = 11;
8851
+
8852
+ function getDeclarationErrorAddendum(internalInstance) {
8853
+ if (internalInstance) {
8854
+ var owner = internalInstance._currentElement._owner || null;
8855
+ if (owner) {
8856
+ var name = owner.getName();
8857
+ if (name) {
8858
+ return ' This DOM node was rendered by `' + name + '`.';
8859
+ }
8860
+ }
8861
+ }
8862
+ return '';
8863
+ }
8864
+
8865
+ function friendlyStringify(obj) {
8866
+ if (typeof obj === 'object') {
8867
+ if (Array.isArray(obj)) {
8868
+ return '[' + obj.map(friendlyStringify).join(', ') + ']';
8869
+ } else {
8870
+ var pairs = [];
8871
+ for (var key in obj) {
8872
+ if (Object.prototype.hasOwnProperty.call(obj, key)) {
8873
+ var keyEscaped = /^[a-z$_][\w$_]*$/i.test(key) ? key : JSON.stringify(key);
8874
+ pairs.push(keyEscaped + ': ' + friendlyStringify(obj[key]));
8875
+ }
8876
+ }
8877
+ return '{' + pairs.join(', ') + '}';
8878
+ }
8879
+ } else if (typeof obj === 'string') {
8880
+ return JSON.stringify(obj);
8881
+ } else if (typeof obj === 'function') {
8882
+ return '[function object]';
8883
+ }
8884
+ // Differs from JSON.stringify in that undefined because undefined and that
8885
+ // inf and nan don't become null
8886
+ return String(obj);
8887
+ }
8888
+
8889
+ var styleMutationWarning = {};
8890
+
8891
+ function checkAndWarnForMutatedStyle(style1, style2, component) {
8892
+ if (style1 == null || style2 == null) {
8893
+ return;
8894
+ }
8895
+ if (shallowEqual(style1, style2)) {
8896
+ return;
8897
+ }
8898
+
8899
+ var componentName = component._tag;
8900
+ var owner = component._currentElement._owner;
8901
+ var ownerName;
8902
+ if (owner) {
8903
+ ownerName = owner.getName();
8904
+ }
8905
+
8906
+ var hash = ownerName + '|' + componentName;
8907
+
8908
+ if (styleMutationWarning.hasOwnProperty(hash)) {
8909
+ return;
8910
+ }
8911
+
8912
+ styleMutationWarning[hash] = true;
8913
+
8914
+ process.env.NODE_ENV !== 'production' ? warning(false, '`%s` was passed a style object that has previously been mutated. ' + 'Mutating `style` is deprecated. Consider cloning it beforehand. Check ' + 'the `render` %s. Previous style: %s. Mutated style: %s.', componentName, owner ? 'of `' + ownerName + '`' : 'using <' + componentName + '>', friendlyStringify(style1), friendlyStringify(style2)) : void 0;
8915
+ }
8916
+
8917
+ /**
8918
+ * @param {object} component
8919
+ * @param {?object} props
8920
+ */
8921
+ function assertValidProps(component, props) {
8922
+ if (!props) {
8923
+ return;
8924
+ }
8925
+ // Note the use of `==` which checks for null or undefined.
8926
+ if (voidElementTags[component._tag]) {
8927
+ !(props.children == null && props.dangerouslySetInnerHTML == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.%s', component._tag, component._currentElement._owner ? ' Check the render method of ' + component._currentElement._owner.getName() + '.' : '') : _prodInvariant('137', component._tag, component._currentElement._owner ? ' Check the render method of ' + component._currentElement._owner.getName() + '.' : '') : void 0;
8928
+ }
8929
+ if (props.dangerouslySetInnerHTML != null) {
8930
+ !(props.children == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Can only set one of `children` or `props.dangerouslySetInnerHTML`.') : _prodInvariant('60') : void 0;
8931
+ !(typeof props.dangerouslySetInnerHTML === 'object' && HTML in props.dangerouslySetInnerHTML) ? process.env.NODE_ENV !== 'production' ? invariant(false, '`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://fb.me/react-invariant-dangerously-set-inner-html for more information.') : _prodInvariant('61') : void 0;
8932
+ }
8933
+ if (process.env.NODE_ENV !== 'production') {
8934
+ process.env.NODE_ENV !== 'production' ? warning(props.innerHTML == null, 'Directly setting property `innerHTML` is not permitted. ' + 'For more information, lookup documentation on `dangerouslySetInnerHTML`.') : void 0;
8935
+ process.env.NODE_ENV !== 'production' ? warning(props.suppressContentEditableWarning || !props.contentEditable || props.children == null, 'A component is `contentEditable` and contains `children` managed by ' + 'React. It is now your responsibility to guarantee that none of ' + 'those nodes are unexpectedly modified or duplicated. This is ' + 'probably not intentional.') : void 0;
8936
+ process.env.NODE_ENV !== 'production' ? warning(props.onFocusIn == null && props.onFocusOut == null, 'React uses onFocus and onBlur instead of onFocusIn and onFocusOut. ' + 'All React events are normalized to bubble, so onFocusIn and onFocusOut ' + 'are not needed/supported by React.') : void 0;
8937
+ }
8938
+ !(props.style == null || typeof props.style === 'object') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + \'em\'}} when using JSX.%s', getDeclarationErrorAddendum(component)) : _prodInvariant('62', getDeclarationErrorAddendum(component)) : void 0;
8939
+ }
8940
+
8941
+ function enqueuePutListener(inst, registrationName, listener, transaction) {
8942
+ if (transaction instanceof ReactServerRenderingTransaction) {
8943
+ return;
8944
+ }
8945
+ if (process.env.NODE_ENV !== 'production') {
8946
+ // IE8 has no API for event capturing and the `onScroll` event doesn't
8947
+ // bubble.
8948
+ process.env.NODE_ENV !== 'production' ? warning(registrationName !== 'onScroll' || isEventSupported('scroll', true), "This browser doesn't support the `onScroll` event") : void 0;
8949
+ }
8950
+ var containerInfo = inst._hostContainerInfo;
8951
+ var isDocumentFragment = containerInfo._node && containerInfo._node.nodeType === DOC_FRAGMENT_TYPE;
8952
+ var doc = isDocumentFragment ? containerInfo._node : containerInfo._ownerDocument;
8953
+ listenTo(registrationName, doc);
8954
+ transaction.getReactMountReady().enqueue(putListener, {
8955
+ inst: inst,
8956
+ registrationName: registrationName,
8957
+ listener: listener
8958
+ });
8959
+ }
8960
+
8961
+ function putListener() {
8962
+ var listenerToPut = this;
8963
+ EventPluginHub.putListener(listenerToPut.inst, listenerToPut.registrationName, listenerToPut.listener);
8964
+ }
8965
+
8966
+ function inputPostMount() {
8967
+ var inst = this;
8968
+ ReactDOMInput.postMountWrapper(inst);
8969
+ }
8970
+
8971
+ function textareaPostMount() {
8972
+ var inst = this;
8973
+ ReactDOMTextarea.postMountWrapper(inst);
8974
+ }
8975
+
8976
+ function optionPostMount() {
8977
+ var inst = this;
8978
+ ReactDOMOption.postMountWrapper(inst);
8979
+ }
8980
+
8981
+ var setAndValidateContentChildDev = emptyFunction;
8982
+ if (process.env.NODE_ENV !== 'production') {
8983
+ setAndValidateContentChildDev = function (content) {
8984
+ var hasExistingContent = this._contentDebugID != null;
8985
+ var debugID = this._debugID;
8986
+ // This ID represents the inlined child that has no backing instance:
8987
+ var contentDebugID = -debugID;
8988
+
8989
+ if (content == null) {
8990
+ if (hasExistingContent) {
8991
+ ReactInstrumentation.debugTool.onUnmountComponent(this._contentDebugID);
8992
+ }
8993
+ this._contentDebugID = null;
8994
+ return;
8995
+ }
8996
+
8997
+ validateDOMNesting(null, String(content), this, this._ancestorInfo);
8998
+ this._contentDebugID = contentDebugID;
8999
+ if (hasExistingContent) {
9000
+ ReactInstrumentation.debugTool.onBeforeUpdateComponent(contentDebugID, content);
9001
+ ReactInstrumentation.debugTool.onUpdateComponent(contentDebugID);
9002
+ } else {
9003
+ ReactInstrumentation.debugTool.onBeforeMountComponent(contentDebugID, content, debugID);
9004
+ ReactInstrumentation.debugTool.onMountComponent(contentDebugID);
9005
+ ReactInstrumentation.debugTool.onSetChildren(debugID, [contentDebugID]);
9006
+ }
9007
+ };
9008
+ }
9009
+
9010
+ // There are so many media events, it makes sense to just
9011
+ // maintain a list rather than create a `trapBubbledEvent` for each
9012
+ var mediaEvents = {
9013
+ topAbort: 'abort',
9014
+ topCanPlay: 'canplay',
9015
+ topCanPlayThrough: 'canplaythrough',
9016
+ topDurationChange: 'durationchange',
9017
+ topEmptied: 'emptied',
9018
+ topEncrypted: 'encrypted',
9019
+ topEnded: 'ended',
9020
+ topError: 'error',
9021
+ topLoadedData: 'loadeddata',
9022
+ topLoadedMetadata: 'loadedmetadata',
9023
+ topLoadStart: 'loadstart',
9024
+ topPause: 'pause',
9025
+ topPlay: 'play',
9026
+ topPlaying: 'playing',
9027
+ topProgress: 'progress',
9028
+ topRateChange: 'ratechange',
9029
+ topSeeked: 'seeked',
9030
+ topSeeking: 'seeking',
9031
+ topStalled: 'stalled',
9032
+ topSuspend: 'suspend',
9033
+ topTimeUpdate: 'timeupdate',
9034
+ topVolumeChange: 'volumechange',
9035
+ topWaiting: 'waiting'
9036
+ };
9037
+
9038
+ function trackInputValue() {
9039
+ inputValueTracking.track(this);
9040
+ }
9041
+
9042
+ function trapBubbledEventsLocal() {
9043
+ var inst = this;
9044
+ // If a component renders to null or if another component fatals and causes
9045
+ // the state of the tree to be corrupted, `node` here can be null.
9046
+ !inst._rootNodeID ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Must be mounted to trap events') : _prodInvariant('63') : void 0;
9047
+ var node = getNode(inst);
9048
+ !node ? process.env.NODE_ENV !== 'production' ? invariant(false, 'trapBubbledEvent(...): Requires node to be rendered.') : _prodInvariant('64') : void 0;
9049
+
9050
+ switch (inst._tag) {
9051
+ case 'iframe':
9052
+ case 'object':
9053
+ inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent('topLoad', 'load', node)];
9054
+ break;
9055
+ case 'video':
9056
+ case 'audio':
9057
+ inst._wrapperState.listeners = [];
9058
+ // Create listener for each media event
9059
+ for (var event in mediaEvents) {
9060
+ if (mediaEvents.hasOwnProperty(event)) {
9061
+ inst._wrapperState.listeners.push(ReactBrowserEventEmitter.trapBubbledEvent(event, mediaEvents[event], node));
9062
+ }
9063
+ }
9064
+ break;
9065
+ case 'source':
9066
+ inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent('topError', 'error', node)];
9067
+ break;
9068
+ case 'img':
9069
+ inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent('topError', 'error', node), ReactBrowserEventEmitter.trapBubbledEvent('topLoad', 'load', node)];
9070
+ break;
9071
+ case 'form':
9072
+ inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent('topReset', 'reset', node), ReactBrowserEventEmitter.trapBubbledEvent('topSubmit', 'submit', node)];
9073
+ break;
9074
+ case 'input':
9075
+ case 'select':
9076
+ case 'textarea':
9077
+ inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent('topInvalid', 'invalid', node)];
9078
+ break;
9079
+ }
9080
+ }
9081
+
9082
+ function postUpdateSelectWrapper() {
9083
+ ReactDOMSelect.postUpdateWrapper(this);
9084
+ }
9085
+
9086
+ // For HTML, certain tags should omit their close tag. We keep a whitelist for
9087
+ // those special-case tags.
9088
+
9089
+ var omittedCloseTags = {
9090
+ area: true,
9091
+ base: true,
9092
+ br: true,
9093
+ col: true,
9094
+ embed: true,
9095
+ hr: true,
9096
+ img: true,
9097
+ input: true,
9098
+ keygen: true,
9099
+ link: true,
9100
+ meta: true,
9101
+ param: true,
9102
+ source: true,
9103
+ track: true,
9104
+ wbr: true
9105
+ // NOTE: menuitem's close tag should be omitted, but that causes problems.
9106
+ };
9107
+
9108
+ var newlineEatingTags = {
9109
+ listing: true,
9110
+ pre: true,
9111
+ textarea: true
9112
+ };
9113
+
9114
+ // For HTML, certain tags cannot have children. This has the same purpose as
9115
+ // `omittedCloseTags` except that `menuitem` should still have its closing tag.
9116
+
9117
+ var voidElementTags = _assign({
9118
+ menuitem: true
9119
+ }, omittedCloseTags);
9120
+
9121
+ // We accept any tag to be rendered but since this gets injected into arbitrary
9122
+ // HTML, we want to make sure that it's a safe tag.
9123
+ // http://www.w3.org/TR/REC-xml/#NT-Name
9124
+
9125
+ var VALID_TAG_REGEX = /^[a-zA-Z][a-zA-Z:_\.\-\d]*$/; // Simplified subset
9126
+ var validatedTagCache = {};
9127
+ var hasOwnProperty = {}.hasOwnProperty;
9128
+
9129
+ function validateDangerousTag(tag) {
9130
+ if (!hasOwnProperty.call(validatedTagCache, tag)) {
9131
+ !VALID_TAG_REGEX.test(tag) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Invalid tag: %s', tag) : _prodInvariant('65', tag) : void 0;
9132
+ validatedTagCache[tag] = true;
9133
+ }
9134
+ }
9135
+
9136
+ function isCustomComponent(tagName, props) {
9137
+ return tagName.indexOf('-') >= 0 || props.is != null;
9138
+ }
9139
+
9140
+ var globalIdCounter = 1;
9141
+
9142
+ /**
9143
+ * Creates a new React class that is idempotent and capable of containing other
9144
+ * React components. It accepts event listeners and DOM properties that are
9145
+ * valid according to `DOMProperty`.
9146
+ *
9147
+ * - Event listeners: `onClick`, `onMouseDown`, etc.
9148
+ * - DOM properties: `className`, `name`, `title`, etc.
9149
+ *
9150
+ * The `style` property functions differently from the DOM API. It accepts an
9151
+ * object mapping of style properties to values.
9152
+ *
9153
+ * @constructor ReactDOMComponent
9154
+ * @extends ReactMultiChild
9155
+ */
9156
+ function ReactDOMComponent(element) {
9157
+ var tag = element.type;
9158
+ validateDangerousTag(tag);
9159
+ this._currentElement = element;
9160
+ this._tag = tag.toLowerCase();
9161
+ this._namespaceURI = null;
9162
+ this._renderedChildren = null;
9163
+ this._previousStyle = null;
9164
+ this._previousStyleCopy = null;
9165
+ this._hostNode = null;
9166
+ this._hostParent = null;
9167
+ this._rootNodeID = 0;
9168
+ this._domID = 0;
9169
+ this._hostContainerInfo = null;
9170
+ this._wrapperState = null;
9171
+ this._topLevelWrapper = null;
9172
+ this._flags = 0;
9173
+ if (process.env.NODE_ENV !== 'production') {
9174
+ this._ancestorInfo = null;
9175
+ setAndValidateContentChildDev.call(this, null);
9176
+ }
9177
+ }
9178
+
9179
+ ReactDOMComponent.displayName = 'ReactDOMComponent';
9180
+
9181
+ ReactDOMComponent.Mixin = {
9182
+ /**
9183
+ * Generates root tag markup then recurses. This method has side effects and
9184
+ * is not idempotent.
9185
+ *
9186
+ * @internal
9187
+ * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction
9188
+ * @param {?ReactDOMComponent} the parent component instance
9189
+ * @param {?object} info about the host container
9190
+ * @param {object} context
9191
+ * @return {string} The computed markup.
9192
+ */
9193
+ mountComponent: function (transaction, hostParent, hostContainerInfo, context) {
9194
+ this._rootNodeID = globalIdCounter++;
9195
+ this._domID = hostContainerInfo._idCounter++;
9196
+ this._hostParent = hostParent;
9197
+ this._hostContainerInfo = hostContainerInfo;
9198
+
9199
+ var props = this._currentElement.props;
9200
+
9201
+ switch (this._tag) {
9202
+ case 'audio':
9203
+ case 'form':
9204
+ case 'iframe':
9205
+ case 'img':
9206
+ case 'link':
9207
+ case 'object':
9208
+ case 'source':
9209
+ case 'video':
9210
+ this._wrapperState = {
9211
+ listeners: null
9212
+ };
9213
+ transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this);
9214
+ break;
9215
+ case 'input':
9216
+ ReactDOMInput.mountWrapper(this, props, hostParent);
9217
+ props = ReactDOMInput.getHostProps(this, props);
9218
+ transaction.getReactMountReady().enqueue(trackInputValue, this);
9219
+ transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this);
9220
+ break;
9221
+ case 'option':
9222
+ ReactDOMOption.mountWrapper(this, props, hostParent);
9223
+ props = ReactDOMOption.getHostProps(this, props);
9224
+ break;
9225
+ case 'select':
9226
+ ReactDOMSelect.mountWrapper(this, props, hostParent);
9227
+ props = ReactDOMSelect.getHostProps(this, props);
9228
+ transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this);
9229
+ break;
9230
+ case 'textarea':
9231
+ ReactDOMTextarea.mountWrapper(this, props, hostParent);
9232
+ props = ReactDOMTextarea.getHostProps(this, props);
9233
+ transaction.getReactMountReady().enqueue(trackInputValue, this);
9234
+ transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this);
9235
+ break;
9236
+ }
9237
+
9238
+ assertValidProps(this, props);
9239
+
9240
+ // We create tags in the namespace of their parent container, except HTML
9241
+ // tags get no namespace.
9242
+ var namespaceURI;
9243
+ var parentTag;
9244
+ if (hostParent != null) {
9245
+ namespaceURI = hostParent._namespaceURI;
9246
+ parentTag = hostParent._tag;
9247
+ } else if (hostContainerInfo._tag) {
9248
+ namespaceURI = hostContainerInfo._namespaceURI;
9249
+ parentTag = hostContainerInfo._tag;
9250
+ }
9251
+ if (namespaceURI == null || namespaceURI === DOMNamespaces.svg && parentTag === 'foreignobject') {
9252
+ namespaceURI = DOMNamespaces.html;
9253
+ }
9254
+ if (namespaceURI === DOMNamespaces.html) {
9255
+ if (this._tag === 'svg') {
9256
+ namespaceURI = DOMNamespaces.svg;
9257
+ } else if (this._tag === 'math') {
9258
+ namespaceURI = DOMNamespaces.mathml;
9259
+ }
9260
+ }
9261
+ this._namespaceURI = namespaceURI;
9262
+
9263
+ if (process.env.NODE_ENV !== 'production') {
9264
+ var parentInfo;
9265
+ if (hostParent != null) {
9266
+ parentInfo = hostParent._ancestorInfo;
9267
+ } else if (hostContainerInfo._tag) {
9268
+ parentInfo = hostContainerInfo._ancestorInfo;
9269
+ }
9270
+ if (parentInfo) {
9271
+ // parentInfo should always be present except for the top-level
9272
+ // component when server rendering
9273
+ validateDOMNesting(this._tag, null, this, parentInfo);
9274
+ }
9275
+ this._ancestorInfo = validateDOMNesting.updatedAncestorInfo(parentInfo, this._tag, this);
9276
+ }
9277
+
9278
+ var mountImage;
9279
+ if (transaction.useCreateElement) {
9280
+ var ownerDocument = hostContainerInfo._ownerDocument;
9281
+ var el;
9282
+ if (namespaceURI === DOMNamespaces.html) {
9283
+ if (this._tag === 'script') {
9284
+ // Create the script via .innerHTML so its "parser-inserted" flag is
9285
+ // set to true and it does not execute
9286
+ var div = ownerDocument.createElement('div');
9287
+ var type = this._currentElement.type;
9288
+ div.innerHTML = '<' + type + '></' + type + '>';
9289
+ el = div.removeChild(div.firstChild);
9290
+ } else if (props.is) {
9291
+ el = ownerDocument.createElement(this._currentElement.type, props.is);
9292
+ } else {
9293
+ // Separate else branch instead of using `props.is || undefined` above becuase of a Firefox bug.
9294
+ // See discussion in https://github.com/facebook/react/pull/6896
9295
+ // and discussion in https://bugzilla.mozilla.org/show_bug.cgi?id=1276240
9296
+ el = ownerDocument.createElement(this._currentElement.type);
9297
+ }
9298
+ } else {
9299
+ el = ownerDocument.createElementNS(namespaceURI, this._currentElement.type);
9300
+ }
9301
+ ReactDOMComponentTree.precacheNode(this, el);
9302
+ this._flags |= Flags.hasCachedChildNodes;
9303
+ if (!this._hostParent) {
9304
+ DOMPropertyOperations.setAttributeForRoot(el);
9305
+ }
9306
+ this._updateDOMProperties(null, props, transaction);
9307
+ var lazyTree = DOMLazyTree(el);
9308
+ this._createInitialChildren(transaction, props, context, lazyTree);
9309
+ mountImage = lazyTree;
9310
+ } else {
9311
+ var tagOpen = this._createOpenTagMarkupAndPutListeners(transaction, props);
9312
+ var tagContent = this._createContentMarkup(transaction, props, context);
9313
+ if (!tagContent && omittedCloseTags[this._tag]) {
9314
+ mountImage = tagOpen + '/>';
9315
+ } else {
9316
+ mountImage = tagOpen + '>' + tagContent + '</' + this._currentElement.type + '>';
9317
+ }
9318
+ }
9319
+
9320
+ switch (this._tag) {
9321
+ case 'input':
9322
+ transaction.getReactMountReady().enqueue(inputPostMount, this);
9323
+ if (props.autoFocus) {
9324
+ transaction.getReactMountReady().enqueue(AutoFocusUtils.focusDOMComponent, this);
9325
+ }
9326
+ break;
9327
+ case 'textarea':
9328
+ transaction.getReactMountReady().enqueue(textareaPostMount, this);
9329
+ if (props.autoFocus) {
9330
+ transaction.getReactMountReady().enqueue(AutoFocusUtils.focusDOMComponent, this);
9331
+ }
9332
+ break;
9333
+ case 'select':
9334
+ if (props.autoFocus) {
9335
+ transaction.getReactMountReady().enqueue(AutoFocusUtils.focusDOMComponent, this);
9336
+ }
9337
+ break;
9338
+ case 'button':
9339
+ if (props.autoFocus) {
9340
+ transaction.getReactMountReady().enqueue(AutoFocusUtils.focusDOMComponent, this);
9341
+ }
9342
+ break;
9343
+ case 'option':
9344
+ transaction.getReactMountReady().enqueue(optionPostMount, this);
9345
+ break;
9346
+ }
9347
+
9348
+ return mountImage;
9349
+ },
9350
+
9351
+ /**
9352
+ * Creates markup for the open tag and all attributes.
9353
+ *
9354
+ * This method has side effects because events get registered.
9355
+ *
9356
+ * Iterating over object properties is faster than iterating over arrays.
9357
+ * @see http://jsperf.com/obj-vs-arr-iteration
9358
+ *
9359
+ * @private
9360
+ * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction
9361
+ * @param {object} props
9362
+ * @return {string} Markup of opening tag.
9363
+ */
9364
+ _createOpenTagMarkupAndPutListeners: function (transaction, props) {
9365
+ var ret = '<' + this._currentElement.type;
9366
+
9367
+ for (var propKey in props) {
9368
+ if (!props.hasOwnProperty(propKey)) {
9369
+ continue;
9370
+ }
9371
+ var propValue = props[propKey];
9372
+ if (propValue == null) {
9373
+ continue;
9374
+ }
9375
+ if (registrationNameModules.hasOwnProperty(propKey)) {
9376
+ if (propValue) {
9377
+ enqueuePutListener(this, propKey, propValue, transaction);
9378
+ }
9379
+ } else {
9380
+ if (propKey === STYLE) {
9381
+ if (propValue) {
9382
+ if (process.env.NODE_ENV !== 'production') {
9383
+ // See `_updateDOMProperties`. style block
9384
+ this._previousStyle = propValue;
9385
+ }
9386
+ propValue = this._previousStyleCopy = _assign({}, props.style);
9387
+ }
9388
+ propValue = CSSPropertyOperations.createMarkupForStyles(propValue, this);
9389
+ }
9390
+ var markup = null;
9391
+ if (this._tag != null && isCustomComponent(this._tag, props)) {
9392
+ if (!RESERVED_PROPS.hasOwnProperty(propKey)) {
9393
+ markup = DOMPropertyOperations.createMarkupForCustomAttribute(propKey, propValue);
9394
+ }
9395
+ } else {
9396
+ markup = DOMPropertyOperations.createMarkupForProperty(propKey, propValue);
9397
+ }
9398
+ if (markup) {
9399
+ ret += ' ' + markup;
9400
+ }
9401
+ }
9402
+ }
9403
+
9404
+ // For static pages, no need to put React ID and checksum. Saves lots of
9405
+ // bytes.
9406
+ if (transaction.renderToStaticMarkup) {
9407
+ return ret;
9408
+ }
9409
+
9410
+ if (!this._hostParent) {
9411
+ ret += ' ' + DOMPropertyOperations.createMarkupForRoot();
9412
+ }
9413
+ ret += ' ' + DOMPropertyOperations.createMarkupForID(this._domID);
9414
+ return ret;
9415
+ },
9416
+
9417
+ /**
9418
+ * Creates markup for the content between the tags.
9419
+ *
9420
+ * @private
9421
+ * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction
9422
+ * @param {object} props
9423
+ * @param {object} context
9424
+ * @return {string} Content markup.
9425
+ */
9426
+ _createContentMarkup: function (transaction, props, context) {
9427
+ var ret = '';
9428
+
9429
+ // Intentional use of != to avoid catching zero/false.
9430
+ var innerHTML = props.dangerouslySetInnerHTML;
9431
+ if (innerHTML != null) {
9432
+ if (innerHTML.__html != null) {
9433
+ ret = innerHTML.__html;
9434
+ }
9435
+ } else {
9436
+ var contentToUse = CONTENT_TYPES[typeof props.children] ? props.children : null;
9437
+ var childrenToUse = contentToUse != null ? null : props.children;
9438
+ if (contentToUse != null) {
9439
+ // TODO: Validate that text is allowed as a child of this node
9440
+ ret = escapeTextContentForBrowser(contentToUse);
9441
+ if (process.env.NODE_ENV !== 'production') {
9442
+ setAndValidateContentChildDev.call(this, contentToUse);
9443
+ }
9444
+ } else if (childrenToUse != null) {
9445
+ var mountImages = this.mountChildren(childrenToUse, transaction, context);
9446
+ ret = mountImages.join('');
9447
+ }
9448
+ }
9449
+ if (newlineEatingTags[this._tag] && ret.charAt(0) === '\n') {
9450
+ // text/html ignores the first character in these tags if it's a newline
9451
+ // Prefer to break application/xml over text/html (for now) by adding
9452
+ // a newline specifically to get eaten by the parser. (Alternately for
9453
+ // textareas, replacing "^\n" with "\r\n" doesn't get eaten, and the first
9454
+ // \r is normalized out by HTMLTextAreaElement#value.)
9455
+ // See: <http://www.w3.org/TR/html-polyglot/#newlines-in-textarea-and-pre>
9456
+ // See: <http://www.w3.org/TR/html5/syntax.html#element-restrictions>
9457
+ // See: <http://www.w3.org/TR/html5/syntax.html#newlines>
9458
+ // See: Parsing of "textarea" "listing" and "pre" elements
9459
+ // from <http://www.w3.org/TR/html5/syntax.html#parsing-main-inbody>
9460
+ return '\n' + ret;
9461
+ } else {
9462
+ return ret;
9463
+ }
9464
+ },
9465
+
9466
+ _createInitialChildren: function (transaction, props, context, lazyTree) {
9467
+ // Intentional use of != to avoid catching zero/false.
9468
+ var innerHTML = props.dangerouslySetInnerHTML;
9469
+ if (innerHTML != null) {
9470
+ if (innerHTML.__html != null) {
9471
+ DOMLazyTree.queueHTML(lazyTree, innerHTML.__html);
9472
+ }
9473
+ } else {
9474
+ var contentToUse = CONTENT_TYPES[typeof props.children] ? props.children : null;
9475
+ var childrenToUse = contentToUse != null ? null : props.children;
9476
+ // TODO: Validate that text is allowed as a child of this node
9477
+ if (contentToUse != null) {
9478
+ // Avoid setting textContent when the text is empty. In IE11 setting
9479
+ // textContent on a text area will cause the placeholder to not
9480
+ // show within the textarea until it has been focused and blurred again.
9481
+ // https://github.com/facebook/react/issues/6731#issuecomment-254874553
9482
+ if (contentToUse !== '') {
9483
+ if (process.env.NODE_ENV !== 'production') {
9484
+ setAndValidateContentChildDev.call(this, contentToUse);
9485
+ }
9486
+ DOMLazyTree.queueText(lazyTree, contentToUse);
9487
+ }
9488
+ } else if (childrenToUse != null) {
9489
+ var mountImages = this.mountChildren(childrenToUse, transaction, context);
9490
+ for (var i = 0; i < mountImages.length; i++) {
9491
+ DOMLazyTree.queueChild(lazyTree, mountImages[i]);
9492
+ }
9493
+ }
9494
+ }
9495
+ },
9496
+
9497
+ /**
9498
+ * Receives a next element and updates the component.
9499
+ *
9500
+ * @internal
9501
+ * @param {ReactElement} nextElement
9502
+ * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction
9503
+ * @param {object} context
9504
+ */
9505
+ receiveComponent: function (nextElement, transaction, context) {
9506
+ var prevElement = this._currentElement;
9507
+ this._currentElement = nextElement;
9508
+ this.updateComponent(transaction, prevElement, nextElement, context);
9509
+ },
9510
+
9511
+ /**
9512
+ * Updates a DOM component after it has already been allocated and
9513
+ * attached to the DOM. Reconciles the root DOM node, then recurses.
9514
+ *
9515
+ * @param {ReactReconcileTransaction} transaction
9516
+ * @param {ReactElement} prevElement
9517
+ * @param {ReactElement} nextElement
9518
+ * @internal
9519
+ * @overridable
9520
+ */
9521
+ updateComponent: function (transaction, prevElement, nextElement, context) {
9522
+ var lastProps = prevElement.props;
9523
+ var nextProps = this._currentElement.props;
9524
+
9525
+ switch (this._tag) {
9526
+ case 'input':
9527
+ lastProps = ReactDOMInput.getHostProps(this, lastProps);
9528
+ nextProps = ReactDOMInput.getHostProps(this, nextProps);
9529
+ break;
9530
+ case 'option':
9531
+ lastProps = ReactDOMOption.getHostProps(this, lastProps);
9532
+ nextProps = ReactDOMOption.getHostProps(this, nextProps);
9533
+ break;
9534
+ case 'select':
9535
+ lastProps = ReactDOMSelect.getHostProps(this, lastProps);
9536
+ nextProps = ReactDOMSelect.getHostProps(this, nextProps);
9537
+ break;
9538
+ case 'textarea':
9539
+ lastProps = ReactDOMTextarea.getHostProps(this, lastProps);
9540
+ nextProps = ReactDOMTextarea.getHostProps(this, nextProps);
9541
+ break;
9542
+ }
9543
+
9544
+ assertValidProps(this, nextProps);
9545
+ this._updateDOMProperties(lastProps, nextProps, transaction);
9546
+ this._updateDOMChildren(lastProps, nextProps, transaction, context);
9547
+
9548
+ switch (this._tag) {
9549
+ case 'input':
9550
+ // Update the wrapper around inputs *after* updating props. This has to
9551
+ // happen after `_updateDOMProperties`. Otherwise HTML5 input validations
9552
+ // raise warnings and prevent the new value from being assigned.
9553
+ ReactDOMInput.updateWrapper(this);
9554
+
9555
+ // We also check that we haven't missed a value update, such as a
9556
+ // Radio group shifting the checked value to another named radio input.
9557
+ inputValueTracking.updateValueIfChanged(this);
9558
+ break;
9559
+ case 'textarea':
9560
+ ReactDOMTextarea.updateWrapper(this);
9561
+ break;
9562
+ case 'select':
9563
+ // <select> value update needs to occur after <option> children
9564
+ // reconciliation
9565
+ transaction.getReactMountReady().enqueue(postUpdateSelectWrapper, this);
9566
+ break;
9567
+ }
9568
+ },
9569
+
9570
+ /**
9571
+ * Reconciles the properties by detecting differences in property values and
9572
+ * updating the DOM as necessary. This function is probably the single most
9573
+ * critical path for performance optimization.
9574
+ *
9575
+ * TODO: Benchmark whether checking for changed values in memory actually
9576
+ * improves performance (especially statically positioned elements).
9577
+ * TODO: Benchmark the effects of putting this at the top since 99% of props
9578
+ * do not change for a given reconciliation.
9579
+ * TODO: Benchmark areas that can be improved with caching.
9580
+ *
9581
+ * @private
9582
+ * @param {object} lastProps
9583
+ * @param {object} nextProps
9584
+ * @param {?DOMElement} node
9585
+ */
9586
+ _updateDOMProperties: function (lastProps, nextProps, transaction) {
9587
+ var propKey;
9588
+ var styleName;
9589
+ var styleUpdates;
9590
+ for (propKey in lastProps) {
9591
+ if (nextProps.hasOwnProperty(propKey) || !lastProps.hasOwnProperty(propKey) || lastProps[propKey] == null) {
9592
+ continue;
9593
+ }
9594
+ if (propKey === STYLE) {
9595
+ var lastStyle = this._previousStyleCopy;
9596
+ for (styleName in lastStyle) {
9597
+ if (lastStyle.hasOwnProperty(styleName)) {
9598
+ styleUpdates = styleUpdates || {};
9599
+ styleUpdates[styleName] = '';
9600
+ }
9601
+ }
9602
+ this._previousStyleCopy = null;
9603
+ } else if (registrationNameModules.hasOwnProperty(propKey)) {
9604
+ if (lastProps[propKey]) {
9605
+ // Only call deleteListener if there was a listener previously or
9606
+ // else willDeleteListener gets called when there wasn't actually a
9607
+ // listener (e.g., onClick={null})
9608
+ deleteListener(this, propKey);
9609
+ }
9610
+ } else if (isCustomComponent(this._tag, lastProps)) {
9611
+ if (!RESERVED_PROPS.hasOwnProperty(propKey)) {
9612
+ DOMPropertyOperations.deleteValueForAttribute(getNode(this), propKey);
9613
+ }
9614
+ } else if (DOMProperty.properties[propKey] || DOMProperty.isCustomAttribute(propKey)) {
9615
+ DOMPropertyOperations.deleteValueForProperty(getNode(this), propKey);
9616
+ }
9617
+ }
9618
+ for (propKey in nextProps) {
9619
+ var nextProp = nextProps[propKey];
9620
+ var lastProp = propKey === STYLE ? this._previousStyleCopy : lastProps != null ? lastProps[propKey] : undefined;
9621
+ if (!nextProps.hasOwnProperty(propKey) || nextProp === lastProp || nextProp == null && lastProp == null) {
9622
+ continue;
9623
+ }
9624
+ if (propKey === STYLE) {
9625
+ if (nextProp) {
9626
+ if (process.env.NODE_ENV !== 'production') {
9627
+ checkAndWarnForMutatedStyle(this._previousStyleCopy, this._previousStyle, this);
9628
+ this._previousStyle = nextProp;
9629
+ }
9630
+ nextProp = this._previousStyleCopy = _assign({}, nextProp);
9631
+ } else {
9632
+ this._previousStyleCopy = null;
9633
+ }
9634
+ if (lastProp) {
9635
+ // Unset styles on `lastProp` but not on `nextProp`.
9636
+ for (styleName in lastProp) {
9637
+ if (lastProp.hasOwnProperty(styleName) && (!nextProp || !nextProp.hasOwnProperty(styleName))) {
9638
+ styleUpdates = styleUpdates || {};
9639
+ styleUpdates[styleName] = '';
9640
+ }
9641
+ }
9642
+ // Update styles that changed since `lastProp`.
9643
+ for (styleName in nextProp) {
9644
+ if (nextProp.hasOwnProperty(styleName) && lastProp[styleName] !== nextProp[styleName]) {
9645
+ styleUpdates = styleUpdates || {};
9646
+ styleUpdates[styleName] = nextProp[styleName];
9647
+ }
9648
+ }
9649
+ } else {
9650
+ // Relies on `updateStylesByID` not mutating `styleUpdates`.
9651
+ styleUpdates = nextProp;
9652
+ }
9653
+ } else if (registrationNameModules.hasOwnProperty(propKey)) {
9654
+ if (nextProp) {
9655
+ enqueuePutListener(this, propKey, nextProp, transaction);
9656
+ } else if (lastProp) {
9657
+ deleteListener(this, propKey);
9658
+ }
9659
+ } else if (isCustomComponent(this._tag, nextProps)) {
9660
+ if (!RESERVED_PROPS.hasOwnProperty(propKey)) {
9661
+ DOMPropertyOperations.setValueForAttribute(getNode(this), propKey, nextProp);
9662
+ }
9663
+ } else if (DOMProperty.properties[propKey] || DOMProperty.isCustomAttribute(propKey)) {
9664
+ var node = getNode(this);
9665
+ // If we're updating to null or undefined, we should remove the property
9666
+ // from the DOM node instead of inadvertently setting to a string. This
9667
+ // brings us in line with the same behavior we have on initial render.
9668
+ if (nextProp != null) {
9669
+ DOMPropertyOperations.setValueForProperty(node, propKey, nextProp);
9670
+ } else {
9671
+ DOMPropertyOperations.deleteValueForProperty(node, propKey);
9672
+ }
9673
+ }
9674
+ }
9675
+ if (styleUpdates) {
9676
+ CSSPropertyOperations.setValueForStyles(getNode(this), styleUpdates, this);
9677
+ }
9678
+ },
9679
+
9680
+ /**
9681
+ * Reconciles the children with the various properties that affect the
9682
+ * children content.
9683
+ *
9684
+ * @param {object} lastProps
9685
+ * @param {object} nextProps
9686
+ * @param {ReactReconcileTransaction} transaction
9687
+ * @param {object} context
9688
+ */
9689
+ _updateDOMChildren: function (lastProps, nextProps, transaction, context) {
9690
+ var lastContent = CONTENT_TYPES[typeof lastProps.children] ? lastProps.children : null;
9691
+ var nextContent = CONTENT_TYPES[typeof nextProps.children] ? nextProps.children : null;
9692
+
9693
+ var lastHtml = lastProps.dangerouslySetInnerHTML && lastProps.dangerouslySetInnerHTML.__html;
9694
+ var nextHtml = nextProps.dangerouslySetInnerHTML && nextProps.dangerouslySetInnerHTML.__html;
9695
+
9696
+ // Note the use of `!=` which checks for null or undefined.
9697
+ var lastChildren = lastContent != null ? null : lastProps.children;
9698
+ var nextChildren = nextContent != null ? null : nextProps.children;
9699
+
9700
+ // If we're switching from children to content/html or vice versa, remove
9701
+ // the old content
9702
+ var lastHasContentOrHtml = lastContent != null || lastHtml != null;
9703
+ var nextHasContentOrHtml = nextContent != null || nextHtml != null;
9704
+ if (lastChildren != null && nextChildren == null) {
9705
+ this.updateChildren(null, transaction, context);
9706
+ } else if (lastHasContentOrHtml && !nextHasContentOrHtml) {
9707
+ this.updateTextContent('');
9708
+ if (process.env.NODE_ENV !== 'production') {
9709
+ ReactInstrumentation.debugTool.onSetChildren(this._debugID, []);
9710
+ }
9711
+ }
9712
+
9713
+ if (nextContent != null) {
9714
+ if (lastContent !== nextContent) {
9715
+ this.updateTextContent('' + nextContent);
9716
+ if (process.env.NODE_ENV !== 'production') {
9717
+ setAndValidateContentChildDev.call(this, nextContent);
9718
+ }
9719
+ }
9720
+ } else if (nextHtml != null) {
9721
+ if (lastHtml !== nextHtml) {
9722
+ this.updateMarkup('' + nextHtml);
9723
+ }
9724
+ if (process.env.NODE_ENV !== 'production') {
9725
+ ReactInstrumentation.debugTool.onSetChildren(this._debugID, []);
9726
+ }
9727
+ } else if (nextChildren != null) {
9728
+ if (process.env.NODE_ENV !== 'production') {
9729
+ setAndValidateContentChildDev.call(this, null);
9730
+ }
9731
+
9732
+ this.updateChildren(nextChildren, transaction, context);
9733
+ }
9734
+ },
9735
+
9736
+ getHostNode: function () {
9737
+ return getNode(this);
9738
+ },
9739
+
9740
+ /**
9741
+ * Destroys all event registrations for this instance. Does not remove from
9742
+ * the DOM. That must be done by the parent.
9743
+ *
9744
+ * @internal
9745
+ */
9746
+ unmountComponent: function (safely) {
9747
+ switch (this._tag) {
9748
+ case 'audio':
9749
+ case 'form':
9750
+ case 'iframe':
9751
+ case 'img':
9752
+ case 'link':
9753
+ case 'object':
9754
+ case 'source':
9755
+ case 'video':
9756
+ var listeners = this._wrapperState.listeners;
9757
+ if (listeners) {
9758
+ for (var i = 0; i < listeners.length; i++) {
9759
+ listeners[i].remove();
9760
+ }
9761
+ }
9762
+ break;
9763
+ case 'input':
9764
+ case 'textarea':
9765
+ inputValueTracking.stopTracking(this);
9766
+ break;
9767
+ case 'html':
9768
+ case 'head':
9769
+ case 'body':
9770
+ /**
9771
+ * Components like <html> <head> and <body> can't be removed or added
9772
+ * easily in a cross-browser way, however it's valuable to be able to
9773
+ * take advantage of React's reconciliation for styling and <title>
9774
+ * management. So we just document it and throw in dangerous cases.
9775
+ */
9776
+ !false ? process.env.NODE_ENV !== 'production' ? invariant(false, '<%s> tried to unmount. Because of cross-browser quirks it is impossible to unmount some top-level components (eg <html>, <head>, and <body>) reliably and efficiently. To fix this, have a single top-level component that never unmounts render these elements.', this._tag) : _prodInvariant('66', this._tag) : void 0;
9777
+ break;
9778
+ }
9779
+
9780
+ this.unmountChildren(safely);
9781
+ ReactDOMComponentTree.uncacheNode(this);
9782
+ EventPluginHub.deleteAllListeners(this);
9783
+ this._rootNodeID = 0;
9784
+ this._domID = 0;
9785
+ this._wrapperState = null;
9786
+
9787
+ if (process.env.NODE_ENV !== 'production') {
9788
+ setAndValidateContentChildDev.call(this, null);
9789
+ }
9790
+ },
9791
+
9792
+ getPublicInstance: function () {
9793
+ return getNode(this);
9794
+ }
9795
+ };
9796
+
9797
+ _assign(ReactDOMComponent.prototype, ReactDOMComponent.Mixin, ReactMultiChild.Mixin);
9798
+
9799
+ module.exports = ReactDOMComponent;
9800
+ }).call(this)}).call(this,require('_process'))
9801
+ },{"./AutoFocusUtils":36,"./CSSPropertyOperations":39,"./DOMLazyTree":43,"./DOMNamespaces":44,"./DOMProperty":45,"./DOMPropertyOperations":46,"./EventPluginHub":50,"./EventPluginRegistry":51,"./ReactBrowserEventEmitter":59,"./ReactDOMComponentFlags":66,"./ReactDOMComponentTree":67,"./ReactDOMInput":72,"./ReactDOMOption":75,"./ReactDOMSelect":76,"./ReactDOMTextarea":79,"./ReactInstrumentation":96,"./ReactMultiChild":100,"./ReactServerRenderingTransaction":108,"./escapeTextContentForBrowser":136,"./inputValueTracking":149,"./isEventSupported":151,"./reactProdInvariant":154,"./validateDOMNesting":160,"_process":29,"fbjs/lib/emptyFunction":12,"fbjs/lib/invariant":20,"fbjs/lib/shallowEqual":26,"fbjs/lib/warning":27,"object-assign":28}],66:[function(require,module,exports){
9802
+ /**
9803
+ * Copyright (c) 2015-present, Facebook, Inc.
9804
+ *
9805
+ * This source code is licensed under the MIT license found in the
9806
+ * LICENSE file in the root directory of this source tree.
9807
+ *
9808
+ */
9809
+
9810
+ 'use strict';
9811
+
9812
+ var ReactDOMComponentFlags = {
9813
+ hasCachedChildNodes: 1 << 0
9814
+ };
9815
+
9816
+ module.exports = ReactDOMComponentFlags;
9817
+ },{}],67:[function(require,module,exports){
9818
+ (function (process){(function (){
9819
+ /**
9820
+ * Copyright (c) 2013-present, Facebook, Inc.
9821
+ *
9822
+ * This source code is licensed under the MIT license found in the
9823
+ * LICENSE file in the root directory of this source tree.
9824
+ *
9825
+ */
9826
+
9827
+ 'use strict';
9828
+
9829
+ var _prodInvariant = require('./reactProdInvariant');
9830
+
9831
+ var DOMProperty = require('./DOMProperty');
9832
+ var ReactDOMComponentFlags = require('./ReactDOMComponentFlags');
9833
+
9834
+ var invariant = require('fbjs/lib/invariant');
9835
+
9836
+ var ATTR_NAME = DOMProperty.ID_ATTRIBUTE_NAME;
9837
+ var Flags = ReactDOMComponentFlags;
9838
+
9839
+ var internalInstanceKey = '__reactInternalInstance$' + Math.random().toString(36).slice(2);
9840
+
9841
+ /**
9842
+ * Check if a given node should be cached.
9843
+ */
9844
+ function shouldPrecacheNode(node, nodeID) {
9845
+ return node.nodeType === 1 && node.getAttribute(ATTR_NAME) === String(nodeID) || node.nodeType === 8 && node.nodeValue === ' react-text: ' + nodeID + ' ' || node.nodeType === 8 && node.nodeValue === ' react-empty: ' + nodeID + ' ';
9846
+ }
9847
+
9848
+ /**
9849
+ * Drill down (through composites and empty components) until we get a host or
9850
+ * host text component.
9851
+ *
9852
+ * This is pretty polymorphic but unavoidable with the current structure we have
9853
+ * for `_renderedChildren`.
9854
+ */
9855
+ function getRenderedHostOrTextFromComponent(component) {
9856
+ var rendered;
9857
+ while (rendered = component._renderedComponent) {
9858
+ component = rendered;
9859
+ }
9860
+ return component;
9861
+ }
9862
+
9863
+ /**
9864
+ * Populate `_hostNode` on the rendered host/text component with the given
9865
+ * DOM node. The passed `inst` can be a composite.
9866
+ */
9867
+ function precacheNode(inst, node) {
9868
+ var hostInst = getRenderedHostOrTextFromComponent(inst);
9869
+ hostInst._hostNode = node;
9870
+ node[internalInstanceKey] = hostInst;
9871
+ }
9872
+
9873
+ function uncacheNode(inst) {
9874
+ var node = inst._hostNode;
9875
+ if (node) {
9876
+ delete node[internalInstanceKey];
9877
+ inst._hostNode = null;
9878
+ }
9879
+ }
9880
+
9881
+ /**
9882
+ * Populate `_hostNode` on each child of `inst`, assuming that the children
9883
+ * match up with the DOM (element) children of `node`.
9884
+ *
9885
+ * We cache entire levels at once to avoid an n^2 problem where we access the
9886
+ * children of a node sequentially and have to walk from the start to our target
9887
+ * node every time.
9888
+ *
9889
+ * Since we update `_renderedChildren` and the actual DOM at (slightly)
9890
+ * different times, we could race here and see a newer `_renderedChildren` than
9891
+ * the DOM nodes we see. To avoid this, ReactMultiChild calls
9892
+ * `prepareToManageChildren` before we change `_renderedChildren`, at which
9893
+ * time the container's child nodes are always cached (until it unmounts).
9894
+ */
9895
+ function precacheChildNodes(inst, node) {
9896
+ if (inst._flags & Flags.hasCachedChildNodes) {
9897
+ return;
9898
+ }
9899
+ var children = inst._renderedChildren;
9900
+ var childNode = node.firstChild;
9901
+ outer: for (var name in children) {
9902
+ if (!children.hasOwnProperty(name)) {
9903
+ continue;
9904
+ }
9905
+ var childInst = children[name];
9906
+ var childID = getRenderedHostOrTextFromComponent(childInst)._domID;
9907
+ if (childID === 0) {
9908
+ // We're currently unmounting this child in ReactMultiChild; skip it.
9909
+ continue;
9910
+ }
9911
+ // We assume the child nodes are in the same order as the child instances.
9912
+ for (; childNode !== null; childNode = childNode.nextSibling) {
9913
+ if (shouldPrecacheNode(childNode, childID)) {
9914
+ precacheNode(childInst, childNode);
9915
+ continue outer;
9916
+ }
9917
+ }
9918
+ // We reached the end of the DOM children without finding an ID match.
9919
+ !false ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Unable to find element with ID %s.', childID) : _prodInvariant('32', childID) : void 0;
9920
+ }
9921
+ inst._flags |= Flags.hasCachedChildNodes;
9922
+ }
9923
+
9924
+ /**
9925
+ * Given a DOM node, return the closest ReactDOMComponent or
9926
+ * ReactDOMTextComponent instance ancestor.
9927
+ */
9928
+ function getClosestInstanceFromNode(node) {
9929
+ if (node[internalInstanceKey]) {
9930
+ return node[internalInstanceKey];
9931
+ }
9932
+
9933
+ // Walk up the tree until we find an ancestor whose instance we have cached.
9934
+ var parents = [];
9935
+ while (!node[internalInstanceKey]) {
9936
+ parents.push(node);
9937
+ if (node.parentNode) {
9938
+ node = node.parentNode;
9939
+ } else {
9940
+ // Top of the tree. This node must not be part of a React tree (or is
9941
+ // unmounted, potentially).
9942
+ return null;
9943
+ }
9944
+ }
9945
+
9946
+ var closest;
9947
+ var inst;
9948
+ for (; node && (inst = node[internalInstanceKey]); node = parents.pop()) {
9949
+ closest = inst;
9950
+ if (parents.length) {
9951
+ precacheChildNodes(inst, node);
9952
+ }
9953
+ }
9954
+
9955
+ return closest;
9956
+ }
9957
+
9958
+ /**
9959
+ * Given a DOM node, return the ReactDOMComponent or ReactDOMTextComponent
9960
+ * instance, or null if the node was not rendered by this React.
9961
+ */
9962
+ function getInstanceFromNode(node) {
9963
+ var inst = getClosestInstanceFromNode(node);
9964
+ if (inst != null && inst._hostNode === node) {
9965
+ return inst;
9966
+ } else {
9967
+ return null;
9968
+ }
9969
+ }
9970
+
9971
+ /**
9972
+ * Given a ReactDOMComponent or ReactDOMTextComponent, return the corresponding
9973
+ * DOM node.
9974
+ */
9975
+ function getNodeFromInstance(inst) {
9976
+ // Without this first invariant, passing a non-DOM-component triggers the next
9977
+ // invariant for a missing parent, which is super confusing.
9978
+ !(inst._hostNode !== undefined) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'getNodeFromInstance: Invalid argument.') : _prodInvariant('33') : void 0;
9979
+
9980
+ if (inst._hostNode) {
9981
+ return inst._hostNode;
9982
+ }
9983
+
9984
+ // Walk up the tree until we find an ancestor whose DOM node we have cached.
9985
+ var parents = [];
9986
+ while (!inst._hostNode) {
9987
+ parents.push(inst);
9988
+ !inst._hostParent ? process.env.NODE_ENV !== 'production' ? invariant(false, 'React DOM tree root should always have a node reference.') : _prodInvariant('34') : void 0;
9989
+ inst = inst._hostParent;
9990
+ }
9991
+
9992
+ // Now parents contains each ancestor that does *not* have a cached native
9993
+ // node, and `inst` is the deepest ancestor that does.
9994
+ for (; parents.length; inst = parents.pop()) {
9995
+ precacheChildNodes(inst, inst._hostNode);
9996
+ }
9997
+
9998
+ return inst._hostNode;
9999
+ }
10000
+
10001
+ var ReactDOMComponentTree = {
10002
+ getClosestInstanceFromNode: getClosestInstanceFromNode,
10003
+ getInstanceFromNode: getInstanceFromNode,
10004
+ getNodeFromInstance: getNodeFromInstance,
10005
+ precacheChildNodes: precacheChildNodes,
10006
+ precacheNode: precacheNode,
10007
+ uncacheNode: uncacheNode
10008
+ };
10009
+
10010
+ module.exports = ReactDOMComponentTree;
10011
+ }).call(this)}).call(this,require('_process'))
10012
+ },{"./DOMProperty":45,"./ReactDOMComponentFlags":66,"./reactProdInvariant":154,"_process":29,"fbjs/lib/invariant":20}],68:[function(require,module,exports){
10013
+ (function (process){(function (){
10014
+ /**
10015
+ * Copyright (c) 2013-present, Facebook, Inc.
10016
+ *
10017
+ * This source code is licensed under the MIT license found in the
10018
+ * LICENSE file in the root directory of this source tree.
10019
+ *
10020
+ */
10021
+
10022
+ 'use strict';
10023
+
10024
+ var validateDOMNesting = require('./validateDOMNesting');
10025
+
10026
+ var DOC_NODE_TYPE = 9;
10027
+
10028
+ function ReactDOMContainerInfo(topLevelWrapper, node) {
10029
+ var info = {
10030
+ _topLevelWrapper: topLevelWrapper,
10031
+ _idCounter: 1,
10032
+ _ownerDocument: node ? node.nodeType === DOC_NODE_TYPE ? node : node.ownerDocument : null,
10033
+ _node: node,
10034
+ _tag: node ? node.nodeName.toLowerCase() : null,
10035
+ _namespaceURI: node ? node.namespaceURI : null
10036
+ };
10037
+ if (process.env.NODE_ENV !== 'production') {
10038
+ info._ancestorInfo = node ? validateDOMNesting.updatedAncestorInfo(null, info._tag, null) : null;
10039
+ }
10040
+ return info;
10041
+ }
10042
+
10043
+ module.exports = ReactDOMContainerInfo;
10044
+ }).call(this)}).call(this,require('_process'))
10045
+ },{"./validateDOMNesting":160,"_process":29}],69:[function(require,module,exports){
10046
+ /**
10047
+ * Copyright (c) 2014-present, Facebook, Inc.
10048
+ *
10049
+ * This source code is licensed under the MIT license found in the
10050
+ * LICENSE file in the root directory of this source tree.
10051
+ *
10052
+ */
10053
+
10054
+ 'use strict';
10055
+
10056
+ var _assign = require('object-assign');
10057
+
10058
+ var DOMLazyTree = require('./DOMLazyTree');
10059
+ var ReactDOMComponentTree = require('./ReactDOMComponentTree');
10060
+
10061
+ var ReactDOMEmptyComponent = function (instantiate) {
10062
+ // ReactCompositeComponent uses this:
10063
+ this._currentElement = null;
10064
+ // ReactDOMComponentTree uses these:
10065
+ this._hostNode = null;
10066
+ this._hostParent = null;
10067
+ this._hostContainerInfo = null;
10068
+ this._domID = 0;
10069
+ };
10070
+ _assign(ReactDOMEmptyComponent.prototype, {
10071
+ mountComponent: function (transaction, hostParent, hostContainerInfo, context) {
10072
+ var domID = hostContainerInfo._idCounter++;
10073
+ this._domID = domID;
10074
+ this._hostParent = hostParent;
10075
+ this._hostContainerInfo = hostContainerInfo;
10076
+
10077
+ var nodeValue = ' react-empty: ' + this._domID + ' ';
10078
+ if (transaction.useCreateElement) {
10079
+ var ownerDocument = hostContainerInfo._ownerDocument;
10080
+ var node = ownerDocument.createComment(nodeValue);
10081
+ ReactDOMComponentTree.precacheNode(this, node);
10082
+ return DOMLazyTree(node);
10083
+ } else {
10084
+ if (transaction.renderToStaticMarkup) {
10085
+ // Normally we'd insert a comment node, but since this is a situation
10086
+ // where React won't take over (static pages), we can simply return
10087
+ // nothing.
10088
+ return '';
10089
+ }
10090
+ return '<!--' + nodeValue + '-->';
10091
+ }
10092
+ },
10093
+ receiveComponent: function () {},
10094
+ getHostNode: function () {
10095
+ return ReactDOMComponentTree.getNodeFromInstance(this);
10096
+ },
10097
+ unmountComponent: function () {
10098
+ ReactDOMComponentTree.uncacheNode(this);
10099
+ }
10100
+ });
10101
+
10102
+ module.exports = ReactDOMEmptyComponent;
10103
+ },{"./DOMLazyTree":43,"./ReactDOMComponentTree":67,"object-assign":28}],70:[function(require,module,exports){
10104
+ /**
10105
+ * Copyright (c) 2013-present, Facebook, Inc.
10106
+ *
10107
+ * This source code is licensed under the MIT license found in the
10108
+ * LICENSE file in the root directory of this source tree.
10109
+ *
10110
+ */
10111
+
10112
+ 'use strict';
10113
+
10114
+ var ReactDOMFeatureFlags = {
10115
+ useCreateElement: true,
10116
+ useFiber: false
10117
+ };
10118
+
10119
+ module.exports = ReactDOMFeatureFlags;
10120
+ },{}],71:[function(require,module,exports){
10121
+ /**
10122
+ * Copyright (c) 2013-present, Facebook, Inc.
10123
+ *
10124
+ * This source code is licensed under the MIT license found in the
10125
+ * LICENSE file in the root directory of this source tree.
10126
+ *
10127
+ */
10128
+
10129
+ 'use strict';
10130
+
10131
+ var DOMChildrenOperations = require('./DOMChildrenOperations');
10132
+ var ReactDOMComponentTree = require('./ReactDOMComponentTree');
10133
+
10134
+ /**
10135
+ * Operations used to process updates to DOM nodes.
10136
+ */
10137
+ var ReactDOMIDOperations = {
10138
+ /**
10139
+ * Updates a component's children by processing a series of updates.
10140
+ *
10141
+ * @param {array<object>} updates List of update configurations.
10142
+ * @internal
10143
+ */
10144
+ dangerouslyProcessChildrenUpdates: function (parentInst, updates) {
10145
+ var node = ReactDOMComponentTree.getNodeFromInstance(parentInst);
10146
+ DOMChildrenOperations.processUpdates(node, updates);
10147
+ }
10148
+ };
10149
+
10150
+ module.exports = ReactDOMIDOperations;
10151
+ },{"./DOMChildrenOperations":42,"./ReactDOMComponentTree":67}],72:[function(require,module,exports){
10152
+ (function (process){(function (){
10153
+ /**
10154
+ * Copyright (c) 2013-present, Facebook, Inc.
10155
+ *
10156
+ * This source code is licensed under the MIT license found in the
10157
+ * LICENSE file in the root directory of this source tree.
10158
+ *
10159
+ */
10160
+
10161
+ 'use strict';
10162
+
10163
+ var _prodInvariant = require('./reactProdInvariant'),
10164
+ _assign = require('object-assign');
10165
+
10166
+ var DOMPropertyOperations = require('./DOMPropertyOperations');
10167
+ var LinkedValueUtils = require('./LinkedValueUtils');
10168
+ var ReactDOMComponentTree = require('./ReactDOMComponentTree');
10169
+ var ReactUpdates = require('./ReactUpdates');
10170
+
10171
+ var invariant = require('fbjs/lib/invariant');
10172
+ var warning = require('fbjs/lib/warning');
10173
+
10174
+ var didWarnValueLink = false;
10175
+ var didWarnCheckedLink = false;
10176
+ var didWarnValueDefaultValue = false;
10177
+ var didWarnCheckedDefaultChecked = false;
10178
+ var didWarnControlledToUncontrolled = false;
10179
+ var didWarnUncontrolledToControlled = false;
10180
+
10181
+ function forceUpdateIfMounted() {
10182
+ if (this._rootNodeID) {
10183
+ // DOM component is still mounted; update
10184
+ ReactDOMInput.updateWrapper(this);
10185
+ }
10186
+ }
10187
+
10188
+ function isControlled(props) {
10189
+ var usesChecked = props.type === 'checkbox' || props.type === 'radio';
10190
+ return usesChecked ? props.checked != null : props.value != null;
10191
+ }
10192
+
10193
+ /**
10194
+ * Implements an <input> host component that allows setting these optional
10195
+ * props: `checked`, `value`, `defaultChecked`, and `defaultValue`.
10196
+ *
10197
+ * If `checked` or `value` are not supplied (or null/undefined), user actions
10198
+ * that affect the checked state or value will trigger updates to the element.
10199
+ *
10200
+ * If they are supplied (and not null/undefined), the rendered element will not
10201
+ * trigger updates to the element. Instead, the props must change in order for
10202
+ * the rendered element to be updated.
10203
+ *
10204
+ * The rendered element will be initialized as unchecked (or `defaultChecked`)
10205
+ * with an empty value (or `defaultValue`).
10206
+ *
10207
+ * @see http://www.w3.org/TR/2012/WD-html5-20121025/the-input-element.html
10208
+ */
10209
+ var ReactDOMInput = {
10210
+ getHostProps: function (inst, props) {
10211
+ var value = LinkedValueUtils.getValue(props);
10212
+ var checked = LinkedValueUtils.getChecked(props);
10213
+
10214
+ var hostProps = _assign({
10215
+ // Make sure we set .type before any other properties (setting .value
10216
+ // before .type means .value is lost in IE11 and below)
10217
+ type: undefined,
10218
+ // Make sure we set .step before .value (setting .value before .step
10219
+ // means .value is rounded on mount, based upon step precision)
10220
+ step: undefined,
10221
+ // Make sure we set .min & .max before .value (to ensure proper order
10222
+ // in corner cases such as min or max deriving from value, e.g. Issue #7170)
10223
+ min: undefined,
10224
+ max: undefined
10225
+ }, props, {
10226
+ defaultChecked: undefined,
10227
+ defaultValue: undefined,
10228
+ value: value != null ? value : inst._wrapperState.initialValue,
10229
+ checked: checked != null ? checked : inst._wrapperState.initialChecked,
10230
+ onChange: inst._wrapperState.onChange
10231
+ });
10232
+
10233
+ return hostProps;
10234
+ },
10235
+
10236
+ mountWrapper: function (inst, props) {
10237
+ if (process.env.NODE_ENV !== 'production') {
10238
+ LinkedValueUtils.checkPropTypes('input', props, inst._currentElement._owner);
10239
+
10240
+ var owner = inst._currentElement._owner;
10241
+
10242
+ if (props.valueLink !== undefined && !didWarnValueLink) {
10243
+ process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `input` is deprecated; set `value` and `onChange` instead.') : void 0;
10244
+ didWarnValueLink = true;
10245
+ }
10246
+ if (props.checkedLink !== undefined && !didWarnCheckedLink) {
10247
+ process.env.NODE_ENV !== 'production' ? warning(false, '`checkedLink` prop on `input` is deprecated; set `value` and `onChange` instead.') : void 0;
10248
+ didWarnCheckedLink = true;
10249
+ }
10250
+ if (props.checked !== undefined && props.defaultChecked !== undefined && !didWarnCheckedDefaultChecked) {
10251
+ process.env.NODE_ENV !== 'production' ? warning(false, '%s contains an input of type %s with both checked and defaultChecked props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the checked prop, or the defaultChecked prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components', owner && owner.getName() || 'A component', props.type) : void 0;
10252
+ didWarnCheckedDefaultChecked = true;
10253
+ }
10254
+ if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue) {
10255
+ process.env.NODE_ENV !== 'production' ? warning(false, '%s contains an input of type %s with both value and defaultValue props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components', owner && owner.getName() || 'A component', props.type) : void 0;
10256
+ didWarnValueDefaultValue = true;
10257
+ }
10258
+ }
10259
+
10260
+ var defaultValue = props.defaultValue;
10261
+ inst._wrapperState = {
10262
+ initialChecked: props.checked != null ? props.checked : props.defaultChecked,
10263
+ initialValue: props.value != null ? props.value : defaultValue,
10264
+ listeners: null,
10265
+ onChange: _handleChange.bind(inst),
10266
+ controlled: isControlled(props)
10267
+ };
10268
+ },
10269
+
10270
+ updateWrapper: function (inst) {
10271
+ var props = inst._currentElement.props;
10272
+
10273
+ if (process.env.NODE_ENV !== 'production') {
10274
+ var controlled = isControlled(props);
10275
+ var owner = inst._currentElement._owner;
10276
+
10277
+ if (!inst._wrapperState.controlled && controlled && !didWarnUncontrolledToControlled) {
10278
+ process.env.NODE_ENV !== 'production' ? warning(false, '%s is changing an uncontrolled input of type %s to be controlled. ' + 'Input elements should not switch from uncontrolled to controlled (or vice versa). ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components', owner && owner.getName() || 'A component', props.type) : void 0;
10279
+ didWarnUncontrolledToControlled = true;
10280
+ }
10281
+ if (inst._wrapperState.controlled && !controlled && !didWarnControlledToUncontrolled) {
10282
+ process.env.NODE_ENV !== 'production' ? warning(false, '%s is changing a controlled input of type %s to be uncontrolled. ' + 'Input elements should not switch from controlled to uncontrolled (or vice versa). ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components', owner && owner.getName() || 'A component', props.type) : void 0;
10283
+ didWarnControlledToUncontrolled = true;
10284
+ }
10285
+ }
10286
+
10287
+ // TODO: Shouldn't this be getChecked(props)?
10288
+ var checked = props.checked;
10289
+ if (checked != null) {
10290
+ DOMPropertyOperations.setValueForProperty(ReactDOMComponentTree.getNodeFromInstance(inst), 'checked', checked || false);
10291
+ }
10292
+
10293
+ var node = ReactDOMComponentTree.getNodeFromInstance(inst);
10294
+ var value = LinkedValueUtils.getValue(props);
10295
+ if (value != null) {
10296
+ if (value === 0 && node.value === '') {
10297
+ node.value = '0';
10298
+ // Note: IE9 reports a number inputs as 'text', so check props instead.
10299
+ } else if (props.type === 'number') {
10300
+ // Simulate `input.valueAsNumber`. IE9 does not support it
10301
+ var valueAsNumber = parseFloat(node.value, 10) || 0;
10302
+
10303
+ if (
10304
+ // eslint-disable-next-line
10305
+ value != valueAsNumber ||
10306
+ // eslint-disable-next-line
10307
+ value == valueAsNumber && node.value != value) {
10308
+ // Cast `value` to a string to ensure the value is set correctly. While
10309
+ // browsers typically do this as necessary, jsdom doesn't.
10310
+ node.value = '' + value;
10311
+ }
10312
+ } else if (node.value !== '' + value) {
10313
+ // Cast `value` to a string to ensure the value is set correctly. While
10314
+ // browsers typically do this as necessary, jsdom doesn't.
10315
+ node.value = '' + value;
10316
+ }
10317
+ } else {
10318
+ if (props.value == null && props.defaultValue != null) {
10319
+ // In Chrome, assigning defaultValue to certain input types triggers input validation.
10320
+ // For number inputs, the display value loses trailing decimal points. For email inputs,
10321
+ // Chrome raises "The specified value <x> is not a valid email address".
10322
+ //
10323
+ // Here we check to see if the defaultValue has actually changed, avoiding these problems
10324
+ // when the user is inputting text
10325
+ //
10326
+ // https://github.com/facebook/react/issues/7253
10327
+ if (node.defaultValue !== '' + props.defaultValue) {
10328
+ node.defaultValue = '' + props.defaultValue;
10329
+ }
10330
+ }
10331
+ if (props.checked == null && props.defaultChecked != null) {
10332
+ node.defaultChecked = !!props.defaultChecked;
10333
+ }
10334
+ }
10335
+ },
10336
+
10337
+ postMountWrapper: function (inst) {
10338
+ var props = inst._currentElement.props;
10339
+
10340
+ // This is in postMount because we need access to the DOM node, which is not
10341
+ // available until after the component has mounted.
10342
+ var node = ReactDOMComponentTree.getNodeFromInstance(inst);
10343
+
10344
+ // Detach value from defaultValue. We won't do anything if we're working on
10345
+ // submit or reset inputs as those values & defaultValues are linked. They
10346
+ // are not resetable nodes so this operation doesn't matter and actually
10347
+ // removes browser-default values (eg "Submit Query") when no value is
10348
+ // provided.
10349
+
10350
+ switch (props.type) {
10351
+ case 'submit':
10352
+ case 'reset':
10353
+ break;
10354
+ case 'color':
10355
+ case 'date':
10356
+ case 'datetime':
10357
+ case 'datetime-local':
10358
+ case 'month':
10359
+ case 'time':
10360
+ case 'week':
10361
+ // This fixes the no-show issue on iOS Safari and Android Chrome:
10362
+ // https://github.com/facebook/react/issues/7233
10363
+ node.value = '';
10364
+ node.value = node.defaultValue;
10365
+ break;
10366
+ default:
10367
+ node.value = node.value;
10368
+ break;
10369
+ }
10370
+
10371
+ // Normally, we'd just do `node.checked = node.checked` upon initial mount, less this bug
10372
+ // this is needed to work around a chrome bug where setting defaultChecked
10373
+ // will sometimes influence the value of checked (even after detachment).
10374
+ // Reference: https://bugs.chromium.org/p/chromium/issues/detail?id=608416
10375
+ // We need to temporarily unset name to avoid disrupting radio button groups.
10376
+ var name = node.name;
10377
+ if (name !== '') {
10378
+ node.name = '';
10379
+ }
10380
+ node.defaultChecked = !node.defaultChecked;
10381
+ node.defaultChecked = !node.defaultChecked;
10382
+ if (name !== '') {
10383
+ node.name = name;
10384
+ }
10385
+ }
10386
+ };
10387
+
10388
+ function _handleChange(event) {
10389
+ var props = this._currentElement.props;
10390
+
10391
+ var returnValue = LinkedValueUtils.executeOnChange(props, event);
10392
+
10393
+ // Here we use asap to wait until all updates have propagated, which
10394
+ // is important when using controlled components within layers:
10395
+ // https://github.com/facebook/react/issues/1698
10396
+ ReactUpdates.asap(forceUpdateIfMounted, this);
10397
+
10398
+ var name = props.name;
10399
+ if (props.type === 'radio' && name != null) {
10400
+ var rootNode = ReactDOMComponentTree.getNodeFromInstance(this);
10401
+ var queryRoot = rootNode;
10402
+
10403
+ while (queryRoot.parentNode) {
10404
+ queryRoot = queryRoot.parentNode;
10405
+ }
10406
+
10407
+ // If `rootNode.form` was non-null, then we could try `form.elements`,
10408
+ // but that sometimes behaves strangely in IE8. We could also try using
10409
+ // `form.getElementsByName`, but that will only return direct children
10410
+ // and won't include inputs that use the HTML5 `form=` attribute. Since
10411
+ // the input might not even be in a form, let's just use the global
10412
+ // `querySelectorAll` to ensure we don't miss anything.
10413
+ var group = queryRoot.querySelectorAll('input[name=' + JSON.stringify('' + name) + '][type="radio"]');
10414
+
10415
+ for (var i = 0; i < group.length; i++) {
10416
+ var otherNode = group[i];
10417
+ if (otherNode === rootNode || otherNode.form !== rootNode.form) {
10418
+ continue;
10419
+ }
10420
+ // This will throw if radio buttons rendered by different copies of React
10421
+ // and the same name are rendered into the same form (same as #1939).
10422
+ // That's probably okay; we don't support it just as we don't support
10423
+ // mixing React radio buttons with non-React ones.
10424
+ var otherInstance = ReactDOMComponentTree.getInstanceFromNode(otherNode);
10425
+ !otherInstance ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported.') : _prodInvariant('90') : void 0;
10426
+ // If this is a controlled radio button group, forcing the input that
10427
+ // was previously checked to update will cause it to be come re-checked
10428
+ // as appropriate.
10429
+ ReactUpdates.asap(forceUpdateIfMounted, otherInstance);
10430
+ }
10431
+ }
10432
+
10433
+ return returnValue;
10434
+ }
10435
+
10436
+ module.exports = ReactDOMInput;
10437
+ }).call(this)}).call(this,require('_process'))
10438
+ },{"./DOMPropertyOperations":46,"./LinkedValueUtils":57,"./ReactDOMComponentTree":67,"./ReactUpdates":111,"./reactProdInvariant":154,"_process":29,"fbjs/lib/invariant":20,"fbjs/lib/warning":27,"object-assign":28}],73:[function(require,module,exports){
10439
+ (function (process){(function (){
10440
+ /**
10441
+ * Copyright (c) 2013-present, Facebook, Inc.
10442
+ *
10443
+ * This source code is licensed under the MIT license found in the
10444
+ * LICENSE file in the root directory of this source tree.
10445
+ *
10446
+ */
10447
+
10448
+ 'use strict';
10449
+
10450
+ var DOMProperty = require('./DOMProperty');
10451
+ var ReactComponentTreeHook = require('react/lib/ReactComponentTreeHook');
10452
+
10453
+ var warning = require('fbjs/lib/warning');
10454
+
10455
+ var warnedProperties = {};
10456
+ var rARIA = new RegExp('^(aria)-[' + DOMProperty.ATTRIBUTE_NAME_CHAR + ']*$');
10457
+
10458
+ function validateProperty(tagName, name, debugID) {
10459
+ if (warnedProperties.hasOwnProperty(name) && warnedProperties[name]) {
10460
+ return true;
10461
+ }
10462
+
10463
+ if (rARIA.test(name)) {
10464
+ var lowerCasedName = name.toLowerCase();
10465
+ var standardName = DOMProperty.getPossibleStandardName.hasOwnProperty(lowerCasedName) ? DOMProperty.getPossibleStandardName[lowerCasedName] : null;
10466
+
10467
+ // If this is an aria-* attribute, but is not listed in the known DOM
10468
+ // DOM properties, then it is an invalid aria-* attribute.
10469
+ if (standardName == null) {
10470
+ warnedProperties[name] = true;
10471
+ return false;
10472
+ }
10473
+ // aria-* attributes should be lowercase; suggest the lowercase version.
10474
+ if (name !== standardName) {
10475
+ process.env.NODE_ENV !== 'production' ? warning(false, 'Unknown ARIA attribute %s. Did you mean %s?%s', name, standardName, ReactComponentTreeHook.getStackAddendumByID(debugID)) : void 0;
10476
+ warnedProperties[name] = true;
10477
+ return true;
10478
+ }
10479
+ }
10480
+
10481
+ return true;
10482
+ }
10483
+
10484
+ function warnInvalidARIAProps(debugID, element) {
10485
+ var invalidProps = [];
10486
+
10487
+ for (var key in element.props) {
10488
+ var isValid = validateProperty(element.type, key, debugID);
10489
+ if (!isValid) {
10490
+ invalidProps.push(key);
10491
+ }
10492
+ }
10493
+
10494
+ var unknownPropString = invalidProps.map(function (prop) {
10495
+ return '`' + prop + '`';
10496
+ }).join(', ');
10497
+
10498
+ if (invalidProps.length === 1) {
10499
+ process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid aria prop %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop%s', unknownPropString, element.type, ReactComponentTreeHook.getStackAddendumByID(debugID)) : void 0;
10500
+ } else if (invalidProps.length > 1) {
10501
+ process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid aria props %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop%s', unknownPropString, element.type, ReactComponentTreeHook.getStackAddendumByID(debugID)) : void 0;
10502
+ }
10503
+ }
10504
+
10505
+ function handleElement(debugID, element) {
10506
+ if (element == null || typeof element.type !== 'string') {
10507
+ return;
10508
+ }
10509
+ if (element.type.indexOf('-') >= 0 || element.props.is) {
10510
+ return;
10511
+ }
10512
+
10513
+ warnInvalidARIAProps(debugID, element);
10514
+ }
10515
+
10516
+ var ReactDOMInvalidARIAHook = {
10517
+ onBeforeMountComponent: function (debugID, element) {
10518
+ if (process.env.NODE_ENV !== 'production') {
10519
+ handleElement(debugID, element);
10520
+ }
10521
+ },
10522
+ onBeforeUpdateComponent: function (debugID, element) {
10523
+ if (process.env.NODE_ENV !== 'production') {
10524
+ handleElement(debugID, element);
10525
+ }
10526
+ }
10527
+ };
10528
+
10529
+ module.exports = ReactDOMInvalidARIAHook;
10530
+ }).call(this)}).call(this,require('_process'))
10531
+ },{"./DOMProperty":45,"_process":29,"fbjs/lib/warning":27,"react/lib/ReactComponentTreeHook":169}],74:[function(require,module,exports){
10532
+ (function (process){(function (){
10533
+ /**
10534
+ * Copyright (c) 2013-present, Facebook, Inc.
10535
+ *
10536
+ * This source code is licensed under the MIT license found in the
10537
+ * LICENSE file in the root directory of this source tree.
10538
+ *
10539
+ */
10540
+
10541
+ 'use strict';
10542
+
10543
+ var ReactComponentTreeHook = require('react/lib/ReactComponentTreeHook');
10544
+
10545
+ var warning = require('fbjs/lib/warning');
10546
+
10547
+ var didWarnValueNull = false;
10548
+
10549
+ function handleElement(debugID, element) {
10550
+ if (element == null) {
10551
+ return;
10552
+ }
10553
+ if (element.type !== 'input' && element.type !== 'textarea' && element.type !== 'select') {
10554
+ return;
10555
+ }
10556
+ if (element.props != null && element.props.value === null && !didWarnValueNull) {
10557
+ process.env.NODE_ENV !== 'production' ? warning(false, '`value` prop on `%s` should not be null. ' + 'Consider using the empty string to clear the component or `undefined` ' + 'for uncontrolled components.%s', element.type, ReactComponentTreeHook.getStackAddendumByID(debugID)) : void 0;
10558
+
10559
+ didWarnValueNull = true;
10560
+ }
10561
+ }
10562
+
10563
+ var ReactDOMNullInputValuePropHook = {
10564
+ onBeforeMountComponent: function (debugID, element) {
10565
+ handleElement(debugID, element);
10566
+ },
10567
+ onBeforeUpdateComponent: function (debugID, element) {
10568
+ handleElement(debugID, element);
10569
+ }
10570
+ };
10571
+
10572
+ module.exports = ReactDOMNullInputValuePropHook;
10573
+ }).call(this)}).call(this,require('_process'))
10574
+ },{"_process":29,"fbjs/lib/warning":27,"react/lib/ReactComponentTreeHook":169}],75:[function(require,module,exports){
10575
+ (function (process){(function (){
10576
+ /**
10577
+ * Copyright (c) 2013-present, Facebook, Inc.
10578
+ *
10579
+ * This source code is licensed under the MIT license found in the
10580
+ * LICENSE file in the root directory of this source tree.
10581
+ *
10582
+ */
10583
+
10584
+ 'use strict';
10585
+
10586
+ var _assign = require('object-assign');
10587
+
10588
+ var React = require('react/lib/React');
10589
+ var ReactDOMComponentTree = require('./ReactDOMComponentTree');
10590
+ var ReactDOMSelect = require('./ReactDOMSelect');
10591
+
10592
+ var warning = require('fbjs/lib/warning');
10593
+ var didWarnInvalidOptionChildren = false;
10594
+
10595
+ function flattenChildren(children) {
10596
+ var content = '';
10597
+
10598
+ // Flatten children and warn if they aren't strings or numbers;
10599
+ // invalid types are ignored.
10600
+ React.Children.forEach(children, function (child) {
10601
+ if (child == null) {
10602
+ return;
10603
+ }
10604
+ if (typeof child === 'string' || typeof child === 'number') {
10605
+ content += child;
10606
+ } else if (!didWarnInvalidOptionChildren) {
10607
+ didWarnInvalidOptionChildren = true;
10608
+ process.env.NODE_ENV !== 'production' ? warning(false, 'Only strings and numbers are supported as <option> children.') : void 0;
10609
+ }
10610
+ });
10611
+
10612
+ return content;
10613
+ }
10614
+
10615
+ /**
10616
+ * Implements an <option> host component that warns when `selected` is set.
10617
+ */
10618
+ var ReactDOMOption = {
10619
+ mountWrapper: function (inst, props, hostParent) {
10620
+ // TODO (yungsters): Remove support for `selected` in <option>.
10621
+ if (process.env.NODE_ENV !== 'production') {
10622
+ process.env.NODE_ENV !== 'production' ? warning(props.selected == null, 'Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.') : void 0;
10623
+ }
10624
+
10625
+ // Look up whether this option is 'selected'
10626
+ var selectValue = null;
10627
+ if (hostParent != null) {
10628
+ var selectParent = hostParent;
10629
+
10630
+ if (selectParent._tag === 'optgroup') {
10631
+ selectParent = selectParent._hostParent;
10632
+ }
10633
+
10634
+ if (selectParent != null && selectParent._tag === 'select') {
10635
+ selectValue = ReactDOMSelect.getSelectValueContext(selectParent);
10636
+ }
10637
+ }
10638
+
10639
+ // If the value is null (e.g., no specified value or after initial mount)
10640
+ // or missing (e.g., for <datalist>), we don't change props.selected
10641
+ var selected = null;
10642
+ if (selectValue != null) {
10643
+ var value;
10644
+ if (props.value != null) {
10645
+ value = props.value + '';
10646
+ } else {
10647
+ value = flattenChildren(props.children);
10648
+ }
10649
+ selected = false;
10650
+ if (Array.isArray(selectValue)) {
10651
+ // multiple
10652
+ for (var i = 0; i < selectValue.length; i++) {
10653
+ if ('' + selectValue[i] === value) {
10654
+ selected = true;
10655
+ break;
10656
+ }
10657
+ }
10658
+ } else {
10659
+ selected = '' + selectValue === value;
10660
+ }
10661
+ }
10662
+
10663
+ inst._wrapperState = { selected: selected };
10664
+ },
10665
+
10666
+ postMountWrapper: function (inst) {
10667
+ // value="" should make a value attribute (#6219)
10668
+ var props = inst._currentElement.props;
10669
+ if (props.value != null) {
10670
+ var node = ReactDOMComponentTree.getNodeFromInstance(inst);
10671
+ node.setAttribute('value', props.value);
10672
+ }
10673
+ },
10674
+
10675
+ getHostProps: function (inst, props) {
10676
+ var hostProps = _assign({ selected: undefined, children: undefined }, props);
10677
+
10678
+ // Read state only from initial mount because <select> updates value
10679
+ // manually; we need the initial state only for server rendering
10680
+ if (inst._wrapperState.selected != null) {
10681
+ hostProps.selected = inst._wrapperState.selected;
10682
+ }
10683
+
10684
+ var content = flattenChildren(props.children);
10685
+
10686
+ if (content) {
10687
+ hostProps.children = content;
10688
+ }
10689
+
10690
+ return hostProps;
10691
+ }
10692
+ };
10693
+
10694
+ module.exports = ReactDOMOption;
10695
+ }).call(this)}).call(this,require('_process'))
10696
+ },{"./ReactDOMComponentTree":67,"./ReactDOMSelect":76,"_process":29,"fbjs/lib/warning":27,"object-assign":28,"react/lib/React":166}],76:[function(require,module,exports){
10697
+ (function (process){(function (){
10698
+ /**
10699
+ * Copyright (c) 2013-present, Facebook, Inc.
10700
+ *
10701
+ * This source code is licensed under the MIT license found in the
10702
+ * LICENSE file in the root directory of this source tree.
10703
+ *
10704
+ */
10705
+
10706
+ 'use strict';
10707
+
10708
+ var _assign = require('object-assign');
10709
+
10710
+ var LinkedValueUtils = require('./LinkedValueUtils');
10711
+ var ReactDOMComponentTree = require('./ReactDOMComponentTree');
10712
+ var ReactUpdates = require('./ReactUpdates');
10713
+
10714
+ var warning = require('fbjs/lib/warning');
10715
+
10716
+ var didWarnValueLink = false;
10717
+ var didWarnValueDefaultValue = false;
10718
+
10719
+ function updateOptionsIfPendingUpdateAndMounted() {
10720
+ if (this._rootNodeID && this._wrapperState.pendingUpdate) {
10721
+ this._wrapperState.pendingUpdate = false;
10722
+
10723
+ var props = this._currentElement.props;
10724
+ var value = LinkedValueUtils.getValue(props);
10725
+
10726
+ if (value != null) {
10727
+ updateOptions(this, Boolean(props.multiple), value);
10728
+ }
10729
+ }
10730
+ }
10731
+
10732
+ function getDeclarationErrorAddendum(owner) {
10733
+ if (owner) {
10734
+ var name = owner.getName();
10735
+ if (name) {
10736
+ return ' Check the render method of `' + name + '`.';
10737
+ }
10738
+ }
10739
+ return '';
10740
+ }
10741
+
10742
+ var valuePropNames = ['value', 'defaultValue'];
10743
+
10744
+ /**
10745
+ * Validation function for `value` and `defaultValue`.
10746
+ * @private
10747
+ */
10748
+ function checkSelectPropTypes(inst, props) {
10749
+ var owner = inst._currentElement._owner;
10750
+ LinkedValueUtils.checkPropTypes('select', props, owner);
10751
+
10752
+ if (props.valueLink !== undefined && !didWarnValueLink) {
10753
+ process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `select` is deprecated; set `value` and `onChange` instead.') : void 0;
10754
+ didWarnValueLink = true;
10755
+ }
10756
+
10757
+ for (var i = 0; i < valuePropNames.length; i++) {
10758
+ var propName = valuePropNames[i];
10759
+ if (props[propName] == null) {
10760
+ continue;
10761
+ }
10762
+ var isArray = Array.isArray(props[propName]);
10763
+ if (props.multiple && !isArray) {
10764
+ process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;
10765
+ } else if (!props.multiple && isArray) {
10766
+ process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;
10767
+ }
10768
+ }
10769
+ }
10770
+
10771
+ /**
10772
+ * @param {ReactDOMComponent} inst
10773
+ * @param {boolean} multiple
10774
+ * @param {*} propValue A stringable (with `multiple`, a list of stringables).
10775
+ * @private
10776
+ */
10777
+ function updateOptions(inst, multiple, propValue) {
10778
+ var selectedValue, i;
10779
+ var options = ReactDOMComponentTree.getNodeFromInstance(inst).options;
10780
+
10781
+ if (multiple) {
10782
+ selectedValue = {};
10783
+ for (i = 0; i < propValue.length; i++) {
10784
+ selectedValue['' + propValue[i]] = true;
10785
+ }
10786
+ for (i = 0; i < options.length; i++) {
10787
+ var selected = selectedValue.hasOwnProperty(options[i].value);
10788
+ if (options[i].selected !== selected) {
10789
+ options[i].selected = selected;
10790
+ }
10791
+ }
10792
+ } else {
10793
+ // Do not set `select.value` as exact behavior isn't consistent across all
10794
+ // browsers for all cases.
10795
+ selectedValue = '' + propValue;
10796
+ for (i = 0; i < options.length; i++) {
10797
+ if (options[i].value === selectedValue) {
10798
+ options[i].selected = true;
10799
+ return;
10800
+ }
10801
+ }
10802
+ if (options.length) {
10803
+ options[0].selected = true;
10804
+ }
10805
+ }
10806
+ }
10807
+
10808
+ /**
10809
+ * Implements a <select> host component that allows optionally setting the
10810
+ * props `value` and `defaultValue`. If `multiple` is false, the prop must be a
10811
+ * stringable. If `multiple` is true, the prop must be an array of stringables.
10812
+ *
10813
+ * If `value` is not supplied (or null/undefined), user actions that change the
10814
+ * selected option will trigger updates to the rendered options.
10815
+ *
10816
+ * If it is supplied (and not null/undefined), the rendered options will not
10817
+ * update in response to user actions. Instead, the `value` prop must change in
10818
+ * order for the rendered options to update.
10819
+ *
10820
+ * If `defaultValue` is provided, any options with the supplied values will be
10821
+ * selected.
10822
+ */
10823
+ var ReactDOMSelect = {
10824
+ getHostProps: function (inst, props) {
10825
+ return _assign({}, props, {
10826
+ onChange: inst._wrapperState.onChange,
10827
+ value: undefined
10828
+ });
10829
+ },
10830
+
10831
+ mountWrapper: function (inst, props) {
10832
+ if (process.env.NODE_ENV !== 'production') {
10833
+ checkSelectPropTypes(inst, props);
10834
+ }
10835
+
10836
+ var value = LinkedValueUtils.getValue(props);
10837
+ inst._wrapperState = {
10838
+ pendingUpdate: false,
10839
+ initialValue: value != null ? value : props.defaultValue,
10840
+ listeners: null,
10841
+ onChange: _handleChange.bind(inst),
10842
+ wasMultiple: Boolean(props.multiple)
10843
+ };
10844
+
10845
+ if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue) {
10846
+ process.env.NODE_ENV !== 'production' ? warning(false, 'Select elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled select ' + 'element and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components') : void 0;
10847
+ didWarnValueDefaultValue = true;
10848
+ }
10849
+ },
10850
+
10851
+ getSelectValueContext: function (inst) {
10852
+ // ReactDOMOption looks at this initial value so the initial generated
10853
+ // markup has correct `selected` attributes
10854
+ return inst._wrapperState.initialValue;
10855
+ },
10856
+
10857
+ postUpdateWrapper: function (inst) {
10858
+ var props = inst._currentElement.props;
10859
+
10860
+ // After the initial mount, we control selected-ness manually so don't pass
10861
+ // this value down
10862
+ inst._wrapperState.initialValue = undefined;
10863
+
10864
+ var wasMultiple = inst._wrapperState.wasMultiple;
10865
+ inst._wrapperState.wasMultiple = Boolean(props.multiple);
10866
+
10867
+ var value = LinkedValueUtils.getValue(props);
10868
+ if (value != null) {
10869
+ inst._wrapperState.pendingUpdate = false;
10870
+ updateOptions(inst, Boolean(props.multiple), value);
10871
+ } else if (wasMultiple !== Boolean(props.multiple)) {
10872
+ // For simplicity, reapply `defaultValue` if `multiple` is toggled.
10873
+ if (props.defaultValue != null) {
10874
+ updateOptions(inst, Boolean(props.multiple), props.defaultValue);
10875
+ } else {
10876
+ // Revert the select back to its default unselected state.
10877
+ updateOptions(inst, Boolean(props.multiple), props.multiple ? [] : '');
10878
+ }
10879
+ }
10880
+ }
10881
+ };
10882
+
10883
+ function _handleChange(event) {
10884
+ var props = this._currentElement.props;
10885
+ var returnValue = LinkedValueUtils.executeOnChange(props, event);
10886
+
10887
+ if (this._rootNodeID) {
10888
+ this._wrapperState.pendingUpdate = true;
10889
+ }
10890
+ ReactUpdates.asap(updateOptionsIfPendingUpdateAndMounted, this);
10891
+ return returnValue;
10892
+ }
10893
+
10894
+ module.exports = ReactDOMSelect;
10895
+ }).call(this)}).call(this,require('_process'))
10896
+ },{"./LinkedValueUtils":57,"./ReactDOMComponentTree":67,"./ReactUpdates":111,"_process":29,"fbjs/lib/warning":27,"object-assign":28}],77:[function(require,module,exports){
10897
+ /**
10898
+ * Copyright (c) 2013-present, Facebook, Inc.
10899
+ *
10900
+ * This source code is licensed under the MIT license found in the
10901
+ * LICENSE file in the root directory of this source tree.
10902
+ *
10903
+ */
10904
+
10905
+ 'use strict';
10906
+
10907
+ var ExecutionEnvironment = require('fbjs/lib/ExecutionEnvironment');
10908
+
10909
+ var getNodeForCharacterOffset = require('./getNodeForCharacterOffset');
10910
+ var getTextContentAccessor = require('./getTextContentAccessor');
10911
+
10912
+ /**
10913
+ * While `isCollapsed` is available on the Selection object and `collapsed`
10914
+ * is available on the Range object, IE11 sometimes gets them wrong.
10915
+ * If the anchor/focus nodes and offsets are the same, the range is collapsed.
10916
+ */
10917
+ function isCollapsed(anchorNode, anchorOffset, focusNode, focusOffset) {
10918
+ return anchorNode === focusNode && anchorOffset === focusOffset;
10919
+ }
10920
+
10921
+ /**
10922
+ * Get the appropriate anchor and focus node/offset pairs for IE.
10923
+ *
10924
+ * The catch here is that IE's selection API doesn't provide information
10925
+ * about whether the selection is forward or backward, so we have to
10926
+ * behave as though it's always forward.
10927
+ *
10928
+ * IE text differs from modern selection in that it behaves as though
10929
+ * block elements end with a new line. This means character offsets will
10930
+ * differ between the two APIs.
10931
+ *
10932
+ * @param {DOMElement} node
10933
+ * @return {object}
10934
+ */
10935
+ function getIEOffsets(node) {
10936
+ var selection = document.selection;
10937
+ var selectedRange = selection.createRange();
10938
+ var selectedLength = selectedRange.text.length;
10939
+
10940
+ // Duplicate selection so we can move range without breaking user selection.
10941
+ var fromStart = selectedRange.duplicate();
10942
+ fromStart.moveToElementText(node);
10943
+ fromStart.setEndPoint('EndToStart', selectedRange);
10944
+
10945
+ var startOffset = fromStart.text.length;
10946
+ var endOffset = startOffset + selectedLength;
10947
+
10948
+ return {
10949
+ start: startOffset,
10950
+ end: endOffset
10951
+ };
10952
+ }
10953
+
10954
+ /**
10955
+ * @param {DOMElement} node
10956
+ * @return {?object}
10957
+ */
10958
+ function getModernOffsets(node) {
10959
+ var selection = window.getSelection && window.getSelection();
10960
+
10961
+ if (!selection || selection.rangeCount === 0) {
10962
+ return null;
10963
+ }
10964
+
10965
+ var anchorNode = selection.anchorNode;
10966
+ var anchorOffset = selection.anchorOffset;
10967
+ var focusNode = selection.focusNode;
10968
+ var focusOffset = selection.focusOffset;
10969
+
10970
+ var currentRange = selection.getRangeAt(0);
10971
+
10972
+ // In Firefox, range.startContainer and range.endContainer can be "anonymous
10973
+ // divs", e.g. the up/down buttons on an <input type="number">. Anonymous
10974
+ // divs do not seem to expose properties, triggering a "Permission denied
10975
+ // error" if any of its properties are accessed. The only seemingly possible
10976
+ // way to avoid erroring is to access a property that typically works for
10977
+ // non-anonymous divs and catch any error that may otherwise arise. See
10978
+ // https://bugzilla.mozilla.org/show_bug.cgi?id=208427
10979
+ try {
10980
+ /* eslint-disable no-unused-expressions */
10981
+ currentRange.startContainer.nodeType;
10982
+ currentRange.endContainer.nodeType;
10983
+ /* eslint-enable no-unused-expressions */
10984
+ } catch (e) {
10985
+ return null;
10986
+ }
10987
+
10988
+ // If the node and offset values are the same, the selection is collapsed.
10989
+ // `Selection.isCollapsed` is available natively, but IE sometimes gets
10990
+ // this value wrong.
10991
+ var isSelectionCollapsed = isCollapsed(selection.anchorNode, selection.anchorOffset, selection.focusNode, selection.focusOffset);
10992
+
10993
+ var rangeLength = isSelectionCollapsed ? 0 : currentRange.toString().length;
10994
+
10995
+ var tempRange = currentRange.cloneRange();
10996
+ tempRange.selectNodeContents(node);
10997
+ tempRange.setEnd(currentRange.startContainer, currentRange.startOffset);
10998
+
10999
+ var isTempRangeCollapsed = isCollapsed(tempRange.startContainer, tempRange.startOffset, tempRange.endContainer, tempRange.endOffset);
11000
+
11001
+ var start = isTempRangeCollapsed ? 0 : tempRange.toString().length;
11002
+ var end = start + rangeLength;
11003
+
11004
+ // Detect whether the selection is backward.
11005
+ var detectionRange = document.createRange();
11006
+ detectionRange.setStart(anchorNode, anchorOffset);
11007
+ detectionRange.setEnd(focusNode, focusOffset);
11008
+ var isBackward = detectionRange.collapsed;
11009
+
11010
+ return {
11011
+ start: isBackward ? end : start,
11012
+ end: isBackward ? start : end
11013
+ };
11014
+ }
11015
+
11016
+ /**
11017
+ * @param {DOMElement|DOMTextNode} node
11018
+ * @param {object} offsets
11019
+ */
11020
+ function setIEOffsets(node, offsets) {
11021
+ var range = document.selection.createRange().duplicate();
11022
+ var start, end;
11023
+
11024
+ if (offsets.end === undefined) {
11025
+ start = offsets.start;
11026
+ end = start;
11027
+ } else if (offsets.start > offsets.end) {
11028
+ start = offsets.end;
11029
+ end = offsets.start;
11030
+ } else {
11031
+ start = offsets.start;
11032
+ end = offsets.end;
11033
+ }
11034
+
11035
+ range.moveToElementText(node);
11036
+ range.moveStart('character', start);
11037
+ range.setEndPoint('EndToStart', range);
11038
+ range.moveEnd('character', end - start);
11039
+ range.select();
11040
+ }
11041
+
11042
+ /**
11043
+ * In modern non-IE browsers, we can support both forward and backward
11044
+ * selections.
11045
+ *
11046
+ * Note: IE10+ supports the Selection object, but it does not support
11047
+ * the `extend` method, which means that even in modern IE, it's not possible
11048
+ * to programmatically create a backward selection. Thus, for all IE
11049
+ * versions, we use the old IE API to create our selections.
11050
+ *
11051
+ * @param {DOMElement|DOMTextNode} node
11052
+ * @param {object} offsets
11053
+ */
11054
+ function setModernOffsets(node, offsets) {
11055
+ if (!window.getSelection) {
11056
+ return;
11057
+ }
11058
+
11059
+ var selection = window.getSelection();
11060
+ var length = node[getTextContentAccessor()].length;
11061
+ var start = Math.min(offsets.start, length);
11062
+ var end = offsets.end === undefined ? start : Math.min(offsets.end, length);
11063
+
11064
+ // IE 11 uses modern selection, but doesn't support the extend method.
11065
+ // Flip backward selections, so we can set with a single range.
11066
+ if (!selection.extend && start > end) {
11067
+ var temp = end;
11068
+ end = start;
11069
+ start = temp;
11070
+ }
11071
+
11072
+ var startMarker = getNodeForCharacterOffset(node, start);
11073
+ var endMarker = getNodeForCharacterOffset(node, end);
11074
+
11075
+ if (startMarker && endMarker) {
11076
+ var range = document.createRange();
11077
+ range.setStart(startMarker.node, startMarker.offset);
11078
+ selection.removeAllRanges();
11079
+
11080
+ if (start > end) {
11081
+ selection.addRange(range);
11082
+ selection.extend(endMarker.node, endMarker.offset);
11083
+ } else {
11084
+ range.setEnd(endMarker.node, endMarker.offset);
11085
+ selection.addRange(range);
11086
+ }
11087
+ }
11088
+ }
11089
+
11090
+ var useIEOffsets = ExecutionEnvironment.canUseDOM && 'selection' in document && !('getSelection' in window);
11091
+
11092
+ var ReactDOMSelection = {
11093
+ /**
11094
+ * @param {DOMElement} node
11095
+ */
11096
+ getOffsets: useIEOffsets ? getIEOffsets : getModernOffsets,
11097
+
11098
+ /**
11099
+ * @param {DOMElement|DOMTextNode} node
11100
+ * @param {object} offsets
11101
+ */
11102
+ setOffsets: useIEOffsets ? setIEOffsets : setModernOffsets
11103
+ };
11104
+
11105
+ module.exports = ReactDOMSelection;
11106
+ },{"./getNodeForCharacterOffset":146,"./getTextContentAccessor":147,"fbjs/lib/ExecutionEnvironment":6}],78:[function(require,module,exports){
11107
+ (function (process){(function (){
11108
+ /**
11109
+ * Copyright (c) 2013-present, Facebook, Inc.
11110
+ *
11111
+ * This source code is licensed under the MIT license found in the
11112
+ * LICENSE file in the root directory of this source tree.
11113
+ *
11114
+ */
11115
+
11116
+ 'use strict';
11117
+
11118
+ var _prodInvariant = require('./reactProdInvariant'),
11119
+ _assign = require('object-assign');
11120
+
11121
+ var DOMChildrenOperations = require('./DOMChildrenOperations');
11122
+ var DOMLazyTree = require('./DOMLazyTree');
11123
+ var ReactDOMComponentTree = require('./ReactDOMComponentTree');
11124
+
11125
+ var escapeTextContentForBrowser = require('./escapeTextContentForBrowser');
11126
+ var invariant = require('fbjs/lib/invariant');
11127
+ var validateDOMNesting = require('./validateDOMNesting');
11128
+
11129
+ /**
11130
+ * Text nodes violate a couple assumptions that React makes about components:
11131
+ *
11132
+ * - When mounting text into the DOM, adjacent text nodes are merged.
11133
+ * - Text nodes cannot be assigned a React root ID.
11134
+ *
11135
+ * This component is used to wrap strings between comment nodes so that they
11136
+ * can undergo the same reconciliation that is applied to elements.
11137
+ *
11138
+ * TODO: Investigate representing React components in the DOM with text nodes.
11139
+ *
11140
+ * @class ReactDOMTextComponent
11141
+ * @extends ReactComponent
11142
+ * @internal
11143
+ */
11144
+ var ReactDOMTextComponent = function (text) {
11145
+ // TODO: This is really a ReactText (ReactNode), not a ReactElement
11146
+ this._currentElement = text;
11147
+ this._stringText = '' + text;
11148
+ // ReactDOMComponentTree uses these:
11149
+ this._hostNode = null;
11150
+ this._hostParent = null;
11151
+
11152
+ // Properties
11153
+ this._domID = 0;
11154
+ this._mountIndex = 0;
11155
+ this._closingComment = null;
11156
+ this._commentNodes = null;
11157
+ };
11158
+
11159
+ _assign(ReactDOMTextComponent.prototype, {
11160
+ /**
11161
+ * Creates the markup for this text node. This node is not intended to have
11162
+ * any features besides containing text content.
11163
+ *
11164
+ * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction
11165
+ * @return {string} Markup for this text node.
11166
+ * @internal
11167
+ */
11168
+ mountComponent: function (transaction, hostParent, hostContainerInfo, context) {
11169
+ if (process.env.NODE_ENV !== 'production') {
11170
+ var parentInfo;
11171
+ if (hostParent != null) {
11172
+ parentInfo = hostParent._ancestorInfo;
11173
+ } else if (hostContainerInfo != null) {
11174
+ parentInfo = hostContainerInfo._ancestorInfo;
11175
+ }
11176
+ if (parentInfo) {
11177
+ // parentInfo should always be present except for the top-level
11178
+ // component when server rendering
11179
+ validateDOMNesting(null, this._stringText, this, parentInfo);
11180
+ }
11181
+ }
11182
+
11183
+ var domID = hostContainerInfo._idCounter++;
11184
+ var openingValue = ' react-text: ' + domID + ' ';
11185
+ var closingValue = ' /react-text ';
11186
+ this._domID = domID;
11187
+ this._hostParent = hostParent;
11188
+ if (transaction.useCreateElement) {
11189
+ var ownerDocument = hostContainerInfo._ownerDocument;
11190
+ var openingComment = ownerDocument.createComment(openingValue);
11191
+ var closingComment = ownerDocument.createComment(closingValue);
11192
+ var lazyTree = DOMLazyTree(ownerDocument.createDocumentFragment());
11193
+ DOMLazyTree.queueChild(lazyTree, DOMLazyTree(openingComment));
11194
+ if (this._stringText) {
11195
+ DOMLazyTree.queueChild(lazyTree, DOMLazyTree(ownerDocument.createTextNode(this._stringText)));
11196
+ }
11197
+ DOMLazyTree.queueChild(lazyTree, DOMLazyTree(closingComment));
11198
+ ReactDOMComponentTree.precacheNode(this, openingComment);
11199
+ this._closingComment = closingComment;
11200
+ return lazyTree;
11201
+ } else {
11202
+ var escapedText = escapeTextContentForBrowser(this._stringText);
11203
+
11204
+ if (transaction.renderToStaticMarkup) {
11205
+ // Normally we'd wrap this between comment nodes for the reasons stated
11206
+ // above, but since this is a situation where React won't take over
11207
+ // (static pages), we can simply return the text as it is.
11208
+ return escapedText;
11209
+ }
11210
+
11211
+ return '<!--' + openingValue + '-->' + escapedText + '<!--' + closingValue + '-->';
11212
+ }
11213
+ },
11214
+
11215
+ /**
11216
+ * Updates this component by updating the text content.
11217
+ *
11218
+ * @param {ReactText} nextText The next text content
11219
+ * @param {ReactReconcileTransaction} transaction
11220
+ * @internal
11221
+ */
11222
+ receiveComponent: function (nextText, transaction) {
11223
+ if (nextText !== this._currentElement) {
11224
+ this._currentElement = nextText;
11225
+ var nextStringText = '' + nextText;
11226
+ if (nextStringText !== this._stringText) {
11227
+ // TODO: Save this as pending props and use performUpdateIfNecessary
11228
+ // and/or updateComponent to do the actual update for consistency with
11229
+ // other component types?
11230
+ this._stringText = nextStringText;
11231
+ var commentNodes = this.getHostNode();
11232
+ DOMChildrenOperations.replaceDelimitedText(commentNodes[0], commentNodes[1], nextStringText);
11233
+ }
11234
+ }
11235
+ },
11236
+
11237
+ getHostNode: function () {
11238
+ var hostNode = this._commentNodes;
11239
+ if (hostNode) {
11240
+ return hostNode;
11241
+ }
11242
+ if (!this._closingComment) {
11243
+ var openingComment = ReactDOMComponentTree.getNodeFromInstance(this);
11244
+ var node = openingComment.nextSibling;
11245
+ while (true) {
11246
+ !(node != null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Missing closing comment for text component %s', this._domID) : _prodInvariant('67', this._domID) : void 0;
11247
+ if (node.nodeType === 8 && node.nodeValue === ' /react-text ') {
11248
+ this._closingComment = node;
11249
+ break;
11250
+ }
11251
+ node = node.nextSibling;
11252
+ }
11253
+ }
11254
+ hostNode = [this._hostNode, this._closingComment];
11255
+ this._commentNodes = hostNode;
11256
+ return hostNode;
11257
+ },
11258
+
11259
+ unmountComponent: function () {
11260
+ this._closingComment = null;
11261
+ this._commentNodes = null;
11262
+ ReactDOMComponentTree.uncacheNode(this);
11263
+ }
11264
+ });
11265
+
11266
+ module.exports = ReactDOMTextComponent;
11267
+ }).call(this)}).call(this,require('_process'))
11268
+ },{"./DOMChildrenOperations":42,"./DOMLazyTree":43,"./ReactDOMComponentTree":67,"./escapeTextContentForBrowser":136,"./reactProdInvariant":154,"./validateDOMNesting":160,"_process":29,"fbjs/lib/invariant":20,"object-assign":28}],79:[function(require,module,exports){
11269
+ (function (process){(function (){
11270
+ /**
11271
+ * Copyright (c) 2013-present, Facebook, Inc.
11272
+ *
11273
+ * This source code is licensed under the MIT license found in the
11274
+ * LICENSE file in the root directory of this source tree.
11275
+ *
11276
+ */
11277
+
11278
+ 'use strict';
11279
+
11280
+ var _prodInvariant = require('./reactProdInvariant'),
11281
+ _assign = require('object-assign');
11282
+
11283
+ var LinkedValueUtils = require('./LinkedValueUtils');
11284
+ var ReactDOMComponentTree = require('./ReactDOMComponentTree');
11285
+ var ReactUpdates = require('./ReactUpdates');
11286
+
11287
+ var invariant = require('fbjs/lib/invariant');
11288
+ var warning = require('fbjs/lib/warning');
11289
+
11290
+ var didWarnValueLink = false;
11291
+ var didWarnValDefaultVal = false;
11292
+
11293
+ function forceUpdateIfMounted() {
11294
+ if (this._rootNodeID) {
11295
+ // DOM component is still mounted; update
11296
+ ReactDOMTextarea.updateWrapper(this);
11297
+ }
11298
+ }
11299
+
11300
+ /**
11301
+ * Implements a <textarea> host component that allows setting `value`, and
11302
+ * `defaultValue`. This differs from the traditional DOM API because value is
11303
+ * usually set as PCDATA children.
11304
+ *
11305
+ * If `value` is not supplied (or null/undefined), user actions that affect the
11306
+ * value will trigger updates to the element.
11307
+ *
11308
+ * If `value` is supplied (and not null/undefined), the rendered element will
11309
+ * not trigger updates to the element. Instead, the `value` prop must change in
11310
+ * order for the rendered element to be updated.
11311
+ *
11312
+ * The rendered element will be initialized with an empty value, the prop
11313
+ * `defaultValue` if specified, or the children content (deprecated).
11314
+ */
11315
+ var ReactDOMTextarea = {
11316
+ getHostProps: function (inst, props) {
11317
+ !(props.dangerouslySetInnerHTML == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, '`dangerouslySetInnerHTML` does not make sense on <textarea>.') : _prodInvariant('91') : void 0;
11318
+
11319
+ // Always set children to the same thing. In IE9, the selection range will
11320
+ // get reset if `textContent` is mutated. We could add a check in setTextContent
11321
+ // to only set the value if/when the value differs from the node value (which would
11322
+ // completely solve this IE9 bug), but Sebastian+Ben seemed to like this solution.
11323
+ // The value can be a boolean or object so that's why it's forced to be a string.
11324
+ var hostProps = _assign({}, props, {
11325
+ value: undefined,
11326
+ defaultValue: undefined,
11327
+ children: '' + inst._wrapperState.initialValue,
11328
+ onChange: inst._wrapperState.onChange
11329
+ });
11330
+
11331
+ return hostProps;
11332
+ },
11333
+
11334
+ mountWrapper: function (inst, props) {
11335
+ if (process.env.NODE_ENV !== 'production') {
11336
+ LinkedValueUtils.checkPropTypes('textarea', props, inst._currentElement._owner);
11337
+ if (props.valueLink !== undefined && !didWarnValueLink) {
11338
+ process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `textarea` is deprecated; set `value` and `onChange` instead.') : void 0;
11339
+ didWarnValueLink = true;
11340
+ }
11341
+ if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValDefaultVal) {
11342
+ process.env.NODE_ENV !== 'production' ? warning(false, 'Textarea elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled textarea ' + 'and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components') : void 0;
11343
+ didWarnValDefaultVal = true;
11344
+ }
11345
+ }
11346
+
11347
+ var value = LinkedValueUtils.getValue(props);
11348
+ var initialValue = value;
11349
+
11350
+ // Only bother fetching default value if we're going to use it
11351
+ if (value == null) {
11352
+ var defaultValue = props.defaultValue;
11353
+ // TODO (yungsters): Remove support for children content in <textarea>.
11354
+ var children = props.children;
11355
+ if (children != null) {
11356
+ if (process.env.NODE_ENV !== 'production') {
11357
+ process.env.NODE_ENV !== 'production' ? warning(false, 'Use the `defaultValue` or `value` props instead of setting ' + 'children on <textarea>.') : void 0;
11358
+ }
11359
+ !(defaultValue == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'If you supply `defaultValue` on a <textarea>, do not pass children.') : _prodInvariant('92') : void 0;
11360
+ if (Array.isArray(children)) {
11361
+ !(children.length <= 1) ? process.env.NODE_ENV !== 'production' ? invariant(false, '<textarea> can only have at most one child.') : _prodInvariant('93') : void 0;
11362
+ children = children[0];
11363
+ }
11364
+
11365
+ defaultValue = '' + children;
11366
+ }
11367
+ if (defaultValue == null) {
11368
+ defaultValue = '';
11369
+ }
11370
+ initialValue = defaultValue;
11371
+ }
11372
+
11373
+ inst._wrapperState = {
11374
+ initialValue: '' + initialValue,
11375
+ listeners: null,
11376
+ onChange: _handleChange.bind(inst)
11377
+ };
11378
+ },
11379
+
11380
+ updateWrapper: function (inst) {
11381
+ var props = inst._currentElement.props;
11382
+
11383
+ var node = ReactDOMComponentTree.getNodeFromInstance(inst);
11384
+ var value = LinkedValueUtils.getValue(props);
11385
+ if (value != null) {
11386
+ // Cast `value` to a string to ensure the value is set correctly. While
11387
+ // browsers typically do this as necessary, jsdom doesn't.
11388
+ var newValue = '' + value;
11389
+
11390
+ // To avoid side effects (such as losing text selection), only set value if changed
11391
+ if (newValue !== node.value) {
11392
+ node.value = newValue;
11393
+ }
11394
+ if (props.defaultValue == null) {
11395
+ node.defaultValue = newValue;
11396
+ }
11397
+ }
11398
+ if (props.defaultValue != null) {
11399
+ node.defaultValue = props.defaultValue;
11400
+ }
11401
+ },
11402
+
11403
+ postMountWrapper: function (inst) {
11404
+ // This is in postMount because we need access to the DOM node, which is not
11405
+ // available until after the component has mounted.
11406
+ var node = ReactDOMComponentTree.getNodeFromInstance(inst);
11407
+ var textContent = node.textContent;
11408
+
11409
+ // Only set node.value if textContent is equal to the expected
11410
+ // initial value. In IE10/IE11 there is a bug where the placeholder attribute
11411
+ // will populate textContent as well.
11412
+ // https://developer.microsoft.com/microsoft-edge/platform/issues/101525/
11413
+ if (textContent === inst._wrapperState.initialValue) {
11414
+ node.value = textContent;
11415
+ }
11416
+ }
11417
+ };
11418
+
11419
+ function _handleChange(event) {
11420
+ var props = this._currentElement.props;
11421
+ var returnValue = LinkedValueUtils.executeOnChange(props, event);
11422
+ ReactUpdates.asap(forceUpdateIfMounted, this);
11423
+ return returnValue;
11424
+ }
11425
+
11426
+ module.exports = ReactDOMTextarea;
11427
+ }).call(this)}).call(this,require('_process'))
11428
+ },{"./LinkedValueUtils":57,"./ReactDOMComponentTree":67,"./ReactUpdates":111,"./reactProdInvariant":154,"_process":29,"fbjs/lib/invariant":20,"fbjs/lib/warning":27,"object-assign":28}],80:[function(require,module,exports){
11429
+ (function (process){(function (){
11430
+ /**
11431
+ * Copyright (c) 2015-present, Facebook, Inc.
11432
+ *
11433
+ * This source code is licensed under the MIT license found in the
11434
+ * LICENSE file in the root directory of this source tree.
11435
+ *
11436
+ */
11437
+
11438
+ 'use strict';
11439
+
11440
+ var _prodInvariant = require('./reactProdInvariant');
11441
+
11442
+ var invariant = require('fbjs/lib/invariant');
11443
+
11444
+ /**
11445
+ * Return the lowest common ancestor of A and B, or null if they are in
11446
+ * different trees.
11447
+ */
11448
+ function getLowestCommonAncestor(instA, instB) {
11449
+ !('_hostNode' in instA) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'getNodeFromInstance: Invalid argument.') : _prodInvariant('33') : void 0;
11450
+ !('_hostNode' in instB) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'getNodeFromInstance: Invalid argument.') : _prodInvariant('33') : void 0;
11451
+
11452
+ var depthA = 0;
11453
+ for (var tempA = instA; tempA; tempA = tempA._hostParent) {
11454
+ depthA++;
11455
+ }
11456
+ var depthB = 0;
11457
+ for (var tempB = instB; tempB; tempB = tempB._hostParent) {
11458
+ depthB++;
11459
+ }
11460
+
11461
+ // If A is deeper, crawl up.
11462
+ while (depthA - depthB > 0) {
11463
+ instA = instA._hostParent;
11464
+ depthA--;
11465
+ }
11466
+
11467
+ // If B is deeper, crawl up.
11468
+ while (depthB - depthA > 0) {
11469
+ instB = instB._hostParent;
11470
+ depthB--;
11471
+ }
11472
+
11473
+ // Walk in lockstep until we find a match.
11474
+ var depth = depthA;
11475
+ while (depth--) {
11476
+ if (instA === instB) {
11477
+ return instA;
11478
+ }
11479
+ instA = instA._hostParent;
11480
+ instB = instB._hostParent;
11481
+ }
11482
+ return null;
11483
+ }
11484
+
11485
+ /**
11486
+ * Return if A is an ancestor of B.
11487
+ */
11488
+ function isAncestor(instA, instB) {
11489
+ !('_hostNode' in instA) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;
11490
+ !('_hostNode' in instB) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;
11491
+
11492
+ while (instB) {
11493
+ if (instB === instA) {
11494
+ return true;
11495
+ }
11496
+ instB = instB._hostParent;
11497
+ }
11498
+ return false;
11499
+ }
11500
+
11501
+ /**
11502
+ * Return the parent instance of the passed-in instance.
11503
+ */
11504
+ function getParentInstance(inst) {
11505
+ !('_hostNode' in inst) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'getParentInstance: Invalid argument.') : _prodInvariant('36') : void 0;
11506
+
11507
+ return inst._hostParent;
11508
+ }
11509
+
11510
+ /**
11511
+ * Simulates the traversal of a two-phase, capture/bubble event dispatch.
11512
+ */
11513
+ function traverseTwoPhase(inst, fn, arg) {
11514
+ var path = [];
11515
+ while (inst) {
11516
+ path.push(inst);
11517
+ inst = inst._hostParent;
11518
+ }
11519
+ var i;
11520
+ for (i = path.length; i-- > 0;) {
11521
+ fn(path[i], 'captured', arg);
11522
+ }
11523
+ for (i = 0; i < path.length; i++) {
11524
+ fn(path[i], 'bubbled', arg);
11525
+ }
11526
+ }
11527
+
11528
+ /**
11529
+ * Traverses the ID hierarchy and invokes the supplied `cb` on any IDs that
11530
+ * should would receive a `mouseEnter` or `mouseLeave` event.
11531
+ *
11532
+ * Does not invoke the callback on the nearest common ancestor because nothing
11533
+ * "entered" or "left" that element.
11534
+ */
11535
+ function traverseEnterLeave(from, to, fn, argFrom, argTo) {
11536
+ var common = from && to ? getLowestCommonAncestor(from, to) : null;
11537
+ var pathFrom = [];
11538
+ while (from && from !== common) {
11539
+ pathFrom.push(from);
11540
+ from = from._hostParent;
11541
+ }
11542
+ var pathTo = [];
11543
+ while (to && to !== common) {
11544
+ pathTo.push(to);
11545
+ to = to._hostParent;
11546
+ }
11547
+ var i;
11548
+ for (i = 0; i < pathFrom.length; i++) {
11549
+ fn(pathFrom[i], 'bubbled', argFrom);
11550
+ }
11551
+ for (i = pathTo.length; i-- > 0;) {
11552
+ fn(pathTo[i], 'captured', argTo);
11553
+ }
11554
+ }
11555
+
11556
+ module.exports = {
11557
+ isAncestor: isAncestor,
11558
+ getLowestCommonAncestor: getLowestCommonAncestor,
11559
+ getParentInstance: getParentInstance,
11560
+ traverseTwoPhase: traverseTwoPhase,
11561
+ traverseEnterLeave: traverseEnterLeave
11562
+ };
11563
+ }).call(this)}).call(this,require('_process'))
11564
+ },{"./reactProdInvariant":154,"_process":29,"fbjs/lib/invariant":20}],81:[function(require,module,exports){
11565
+ (function (process){(function (){
11566
+ /**
11567
+ * Copyright (c) 2013-present, Facebook, Inc.
11568
+ *
11569
+ * This source code is licensed under the MIT license found in the
11570
+ * LICENSE file in the root directory of this source tree.
11571
+ *
11572
+ */
11573
+
11574
+ 'use strict';
11575
+
11576
+ var DOMProperty = require('./DOMProperty');
11577
+ var EventPluginRegistry = require('./EventPluginRegistry');
11578
+ var ReactComponentTreeHook = require('react/lib/ReactComponentTreeHook');
11579
+
11580
+ var warning = require('fbjs/lib/warning');
11581
+
11582
+ if (process.env.NODE_ENV !== 'production') {
11583
+ var reactProps = {
11584
+ children: true,
11585
+ dangerouslySetInnerHTML: true,
11586
+ key: true,
11587
+ ref: true,
11588
+
11589
+ autoFocus: true,
11590
+ defaultValue: true,
11591
+ valueLink: true,
11592
+ defaultChecked: true,
11593
+ checkedLink: true,
11594
+ innerHTML: true,
11595
+ suppressContentEditableWarning: true,
11596
+ onFocusIn: true,
11597
+ onFocusOut: true
11598
+ };
11599
+ var warnedProperties = {};
11600
+
11601
+ var validateProperty = function (tagName, name, debugID) {
11602
+ if (DOMProperty.properties.hasOwnProperty(name) || DOMProperty.isCustomAttribute(name)) {
11603
+ return true;
11604
+ }
11605
+ if (reactProps.hasOwnProperty(name) && reactProps[name] || warnedProperties.hasOwnProperty(name) && warnedProperties[name]) {
11606
+ return true;
11607
+ }
11608
+ if (EventPluginRegistry.registrationNameModules.hasOwnProperty(name)) {
11609
+ return true;
11610
+ }
11611
+ warnedProperties[name] = true;
11612
+ var lowerCasedName = name.toLowerCase();
11613
+
11614
+ // data-* attributes should be lowercase; suggest the lowercase version
11615
+ var standardName = DOMProperty.isCustomAttribute(lowerCasedName) ? lowerCasedName : DOMProperty.getPossibleStandardName.hasOwnProperty(lowerCasedName) ? DOMProperty.getPossibleStandardName[lowerCasedName] : null;
11616
+
11617
+ var registrationName = EventPluginRegistry.possibleRegistrationNames.hasOwnProperty(lowerCasedName) ? EventPluginRegistry.possibleRegistrationNames[lowerCasedName] : null;
11618
+
11619
+ if (standardName != null) {
11620
+ process.env.NODE_ENV !== 'production' ? warning(false, 'Unknown DOM property %s. Did you mean %s?%s', name, standardName, ReactComponentTreeHook.getStackAddendumByID(debugID)) : void 0;
11621
+ return true;
11622
+ } else if (registrationName != null) {
11623
+ process.env.NODE_ENV !== 'production' ? warning(false, 'Unknown event handler property %s. Did you mean `%s`?%s', name, registrationName, ReactComponentTreeHook.getStackAddendumByID(debugID)) : void 0;
11624
+ return true;
11625
+ } else {
11626
+ // We were unable to guess which prop the user intended.
11627
+ // It is likely that the user was just blindly spreading/forwarding props
11628
+ // Components should be careful to only render valid props/attributes.
11629
+ // Warning will be invoked in warnUnknownProperties to allow grouping.
11630
+ return false;
11631
+ }
11632
+ };
11633
+ }
11634
+
11635
+ var warnUnknownProperties = function (debugID, element) {
11636
+ var unknownProps = [];
11637
+ for (var key in element.props) {
11638
+ var isValid = validateProperty(element.type, key, debugID);
11639
+ if (!isValid) {
11640
+ unknownProps.push(key);
11641
+ }
11642
+ }
11643
+
11644
+ var unknownPropString = unknownProps.map(function (prop) {
11645
+ return '`' + prop + '`';
11646
+ }).join(', ');
11647
+
11648
+ if (unknownProps.length === 1) {
11649
+ process.env.NODE_ENV !== 'production' ? warning(false, 'Unknown prop %s on <%s> tag. Remove this prop from the element. ' + 'For details, see https://fb.me/react-unknown-prop%s', unknownPropString, element.type, ReactComponentTreeHook.getStackAddendumByID(debugID)) : void 0;
11650
+ } else if (unknownProps.length > 1) {
11651
+ process.env.NODE_ENV !== 'production' ? warning(false, 'Unknown props %s on <%s> tag. Remove these props from the element. ' + 'For details, see https://fb.me/react-unknown-prop%s', unknownPropString, element.type, ReactComponentTreeHook.getStackAddendumByID(debugID)) : void 0;
11652
+ }
11653
+ };
11654
+
11655
+ function handleElement(debugID, element) {
11656
+ if (element == null || typeof element.type !== 'string') {
11657
+ return;
11658
+ }
11659
+ if (element.type.indexOf('-') >= 0 || element.props.is) {
11660
+ return;
11661
+ }
11662
+ warnUnknownProperties(debugID, element);
11663
+ }
11664
+
11665
+ var ReactDOMUnknownPropertyHook = {
11666
+ onBeforeMountComponent: function (debugID, element) {
11667
+ handleElement(debugID, element);
11668
+ },
11669
+ onBeforeUpdateComponent: function (debugID, element) {
11670
+ handleElement(debugID, element);
11671
+ }
11672
+ };
11673
+
11674
+ module.exports = ReactDOMUnknownPropertyHook;
11675
+ }).call(this)}).call(this,require('_process'))
11676
+ },{"./DOMProperty":45,"./EventPluginRegistry":51,"_process":29,"fbjs/lib/warning":27,"react/lib/ReactComponentTreeHook":169}],82:[function(require,module,exports){
11677
+ (function (process){(function (){
11678
+ /**
11679
+ * Copyright (c) 2016-present, Facebook, Inc.
11680
+ *
11681
+ * This source code is licensed under the MIT license found in the
11682
+ * LICENSE file in the root directory of this source tree.
11683
+ *
11684
+ *
11685
+ */
11686
+
11687
+ 'use strict';
11688
+
11689
+ var ReactInvalidSetStateWarningHook = require('./ReactInvalidSetStateWarningHook');
11690
+ var ReactHostOperationHistoryHook = require('./ReactHostOperationHistoryHook');
11691
+ var ReactComponentTreeHook = require('react/lib/ReactComponentTreeHook');
11692
+ var ExecutionEnvironment = require('fbjs/lib/ExecutionEnvironment');
11693
+
11694
+ var performanceNow = require('fbjs/lib/performanceNow');
11695
+ var warning = require('fbjs/lib/warning');
11696
+
11697
+ var hooks = [];
11698
+ var didHookThrowForEvent = {};
11699
+
11700
+ function callHook(event, fn, context, arg1, arg2, arg3, arg4, arg5) {
11701
+ try {
11702
+ fn.call(context, arg1, arg2, arg3, arg4, arg5);
11703
+ } catch (e) {
11704
+ process.env.NODE_ENV !== 'production' ? warning(didHookThrowForEvent[event], 'Exception thrown by hook while handling %s: %s', event, e + '\n' + e.stack) : void 0;
11705
+ didHookThrowForEvent[event] = true;
11706
+ }
11707
+ }
11708
+
11709
+ function emitEvent(event, arg1, arg2, arg3, arg4, arg5) {
11710
+ for (var i = 0; i < hooks.length; i++) {
11711
+ var hook = hooks[i];
11712
+ var fn = hook[event];
11713
+ if (fn) {
11714
+ callHook(event, fn, hook, arg1, arg2, arg3, arg4, arg5);
11715
+ }
11716
+ }
11717
+ }
11718
+
11719
+ var isProfiling = false;
11720
+ var flushHistory = [];
11721
+ var lifeCycleTimerStack = [];
11722
+ var currentFlushNesting = 0;
11723
+ var currentFlushMeasurements = [];
11724
+ var currentFlushStartTime = 0;
11725
+ var currentTimerDebugID = null;
11726
+ var currentTimerStartTime = 0;
11727
+ var currentTimerNestedFlushDuration = 0;
11728
+ var currentTimerType = null;
11729
+
11730
+ var lifeCycleTimerHasWarned = false;
11731
+
11732
+ function clearHistory() {
11733
+ ReactComponentTreeHook.purgeUnmountedComponents();
11734
+ ReactHostOperationHistoryHook.clearHistory();
11735
+ }
11736
+
11737
+ function getTreeSnapshot(registeredIDs) {
11738
+ return registeredIDs.reduce(function (tree, id) {
11739
+ var ownerID = ReactComponentTreeHook.getOwnerID(id);
11740
+ var parentID = ReactComponentTreeHook.getParentID(id);
11741
+ tree[id] = {
11742
+ displayName: ReactComponentTreeHook.getDisplayName(id),
11743
+ text: ReactComponentTreeHook.getText(id),
11744
+ updateCount: ReactComponentTreeHook.getUpdateCount(id),
11745
+ childIDs: ReactComponentTreeHook.getChildIDs(id),
11746
+ // Text nodes don't have owners but this is close enough.
11747
+ ownerID: ownerID || parentID && ReactComponentTreeHook.getOwnerID(parentID) || 0,
11748
+ parentID: parentID
11749
+ };
11750
+ return tree;
11751
+ }, {});
11752
+ }
11753
+
11754
+ function resetMeasurements() {
11755
+ var previousStartTime = currentFlushStartTime;
11756
+ var previousMeasurements = currentFlushMeasurements;
11757
+ var previousOperations = ReactHostOperationHistoryHook.getHistory();
11758
+
11759
+ if (currentFlushNesting === 0) {
11760
+ currentFlushStartTime = 0;
11761
+ currentFlushMeasurements = [];
11762
+ clearHistory();
11763
+ return;
11764
+ }
11765
+
11766
+ if (previousMeasurements.length || previousOperations.length) {
11767
+ var registeredIDs = ReactComponentTreeHook.getRegisteredIDs();
11768
+ flushHistory.push({
11769
+ duration: performanceNow() - previousStartTime,
11770
+ measurements: previousMeasurements || [],
11771
+ operations: previousOperations || [],
11772
+ treeSnapshot: getTreeSnapshot(registeredIDs)
11773
+ });
11774
+ }
11775
+
11776
+ clearHistory();
11777
+ currentFlushStartTime = performanceNow();
11778
+ currentFlushMeasurements = [];
11779
+ }
11780
+
11781
+ function checkDebugID(debugID) {
11782
+ var allowRoot = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
11783
+
11784
+ if (allowRoot && debugID === 0) {
11785
+ return;
11786
+ }
11787
+ if (!debugID) {
11788
+ process.env.NODE_ENV !== 'production' ? warning(false, 'ReactDebugTool: debugID may not be empty.') : void 0;
11789
+ }
11790
+ }
11791
+
11792
+ function beginLifeCycleTimer(debugID, timerType) {
11793
+ if (currentFlushNesting === 0) {
11794
+ return;
11795
+ }
11796
+ if (currentTimerType && !lifeCycleTimerHasWarned) {
11797
+ process.env.NODE_ENV !== 'production' ? warning(false, 'There is an internal error in the React performance measurement code. ' + 'Did not expect %s timer to start while %s timer is still in ' + 'progress for %s instance.', timerType, currentTimerType || 'no', debugID === currentTimerDebugID ? 'the same' : 'another') : void 0;
11798
+ lifeCycleTimerHasWarned = true;
11799
+ }
11800
+ currentTimerStartTime = performanceNow();
11801
+ currentTimerNestedFlushDuration = 0;
11802
+ currentTimerDebugID = debugID;
11803
+ currentTimerType = timerType;
11804
+ }
11805
+
11806
+ function endLifeCycleTimer(debugID, timerType) {
11807
+ if (currentFlushNesting === 0) {
11808
+ return;
11809
+ }
11810
+ if (currentTimerType !== timerType && !lifeCycleTimerHasWarned) {
11811
+ process.env.NODE_ENV !== 'production' ? warning(false, 'There is an internal error in the React performance measurement code. ' + 'We did not expect %s timer to stop while %s timer is still in ' + 'progress for %s instance. Please report this as a bug in React.', timerType, currentTimerType || 'no', debugID === currentTimerDebugID ? 'the same' : 'another') : void 0;
11812
+ lifeCycleTimerHasWarned = true;
11813
+ }
11814
+ if (isProfiling) {
11815
+ currentFlushMeasurements.push({
11816
+ timerType: timerType,
11817
+ instanceID: debugID,
11818
+ duration: performanceNow() - currentTimerStartTime - currentTimerNestedFlushDuration
11819
+ });
11820
+ }
11821
+ currentTimerStartTime = 0;
11822
+ currentTimerNestedFlushDuration = 0;
11823
+ currentTimerDebugID = null;
11824
+ currentTimerType = null;
11825
+ }
11826
+
11827
+ function pauseCurrentLifeCycleTimer() {
11828
+ var currentTimer = {
11829
+ startTime: currentTimerStartTime,
11830
+ nestedFlushStartTime: performanceNow(),
11831
+ debugID: currentTimerDebugID,
11832
+ timerType: currentTimerType
11833
+ };
11834
+ lifeCycleTimerStack.push(currentTimer);
11835
+ currentTimerStartTime = 0;
11836
+ currentTimerNestedFlushDuration = 0;
11837
+ currentTimerDebugID = null;
11838
+ currentTimerType = null;
11839
+ }
11840
+
11841
+ function resumeCurrentLifeCycleTimer() {
11842
+ var _lifeCycleTimerStack$ = lifeCycleTimerStack.pop(),
11843
+ startTime = _lifeCycleTimerStack$.startTime,
11844
+ nestedFlushStartTime = _lifeCycleTimerStack$.nestedFlushStartTime,
11845
+ debugID = _lifeCycleTimerStack$.debugID,
11846
+ timerType = _lifeCycleTimerStack$.timerType;
11847
+
11848
+ var nestedFlushDuration = performanceNow() - nestedFlushStartTime;
11849
+ currentTimerStartTime = startTime;
11850
+ currentTimerNestedFlushDuration += nestedFlushDuration;
11851
+ currentTimerDebugID = debugID;
11852
+ currentTimerType = timerType;
11853
+ }
11854
+
11855
+ var lastMarkTimeStamp = 0;
11856
+ var canUsePerformanceMeasure = typeof performance !== 'undefined' && typeof performance.mark === 'function' && typeof performance.clearMarks === 'function' && typeof performance.measure === 'function' && typeof performance.clearMeasures === 'function';
11857
+
11858
+ function shouldMark(debugID) {
11859
+ if (!isProfiling || !canUsePerformanceMeasure) {
11860
+ return false;
11861
+ }
11862
+ var element = ReactComponentTreeHook.getElement(debugID);
11863
+ if (element == null || typeof element !== 'object') {
11864
+ return false;
11865
+ }
11866
+ var isHostElement = typeof element.type === 'string';
11867
+ if (isHostElement) {
11868
+ return false;
11869
+ }
11870
+ return true;
11871
+ }
11872
+
11873
+ function markBegin(debugID, markType) {
11874
+ if (!shouldMark(debugID)) {
11875
+ return;
11876
+ }
11877
+
11878
+ var markName = debugID + '::' + markType;
11879
+ lastMarkTimeStamp = performanceNow();
11880
+ performance.mark(markName);
11881
+ }
11882
+
11883
+ function markEnd(debugID, markType) {
11884
+ if (!shouldMark(debugID)) {
11885
+ return;
11886
+ }
11887
+
11888
+ var markName = debugID + '::' + markType;
11889
+ var displayName = ReactComponentTreeHook.getDisplayName(debugID) || 'Unknown';
11890
+
11891
+ // Chrome has an issue of dropping markers recorded too fast:
11892
+ // https://bugs.chromium.org/p/chromium/issues/detail?id=640652
11893
+ // To work around this, we will not report very small measurements.
11894
+ // I determined the magic number by tweaking it back and forth.
11895
+ // 0.05ms was enough to prevent the issue, but I set it to 0.1ms to be safe.
11896
+ // When the bug is fixed, we can `measure()` unconditionally if we want to.
11897
+ var timeStamp = performanceNow();
11898
+ if (timeStamp - lastMarkTimeStamp > 0.1) {
11899
+ var measurementName = displayName + ' [' + markType + ']';
11900
+ performance.measure(measurementName, markName);
11901
+ }
11902
+
11903
+ performance.clearMarks(markName);
11904
+ if (measurementName) {
11905
+ performance.clearMeasures(measurementName);
11906
+ }
11907
+ }
11908
+
11909
+ var ReactDebugTool = {
11910
+ addHook: function (hook) {
11911
+ hooks.push(hook);
11912
+ },
11913
+ removeHook: function (hook) {
11914
+ for (var i = 0; i < hooks.length; i++) {
11915
+ if (hooks[i] === hook) {
11916
+ hooks.splice(i, 1);
11917
+ i--;
11918
+ }
11919
+ }
11920
+ },
11921
+ isProfiling: function () {
11922
+ return isProfiling;
11923
+ },
11924
+ beginProfiling: function () {
11925
+ if (isProfiling) {
11926
+ return;
11927
+ }
11928
+
11929
+ isProfiling = true;
11930
+ flushHistory.length = 0;
11931
+ resetMeasurements();
11932
+ ReactDebugTool.addHook(ReactHostOperationHistoryHook);
11933
+ },
11934
+ endProfiling: function () {
11935
+ if (!isProfiling) {
11936
+ return;
11937
+ }
11938
+
11939
+ isProfiling = false;
11940
+ resetMeasurements();
11941
+ ReactDebugTool.removeHook(ReactHostOperationHistoryHook);
11942
+ },
11943
+ getFlushHistory: function () {
11944
+ return flushHistory;
11945
+ },
11946
+ onBeginFlush: function () {
11947
+ currentFlushNesting++;
11948
+ resetMeasurements();
11949
+ pauseCurrentLifeCycleTimer();
11950
+ emitEvent('onBeginFlush');
11951
+ },
11952
+ onEndFlush: function () {
11953
+ resetMeasurements();
11954
+ currentFlushNesting--;
11955
+ resumeCurrentLifeCycleTimer();
11956
+ emitEvent('onEndFlush');
11957
+ },
11958
+ onBeginLifeCycleTimer: function (debugID, timerType) {
11959
+ checkDebugID(debugID);
11960
+ emitEvent('onBeginLifeCycleTimer', debugID, timerType);
11961
+ markBegin(debugID, timerType);
11962
+ beginLifeCycleTimer(debugID, timerType);
11963
+ },
11964
+ onEndLifeCycleTimer: function (debugID, timerType) {
11965
+ checkDebugID(debugID);
11966
+ endLifeCycleTimer(debugID, timerType);
11967
+ markEnd(debugID, timerType);
11968
+ emitEvent('onEndLifeCycleTimer', debugID, timerType);
11969
+ },
11970
+ onBeginProcessingChildContext: function () {
11971
+ emitEvent('onBeginProcessingChildContext');
11972
+ },
11973
+ onEndProcessingChildContext: function () {
11974
+ emitEvent('onEndProcessingChildContext');
11975
+ },
11976
+ onHostOperation: function (operation) {
11977
+ checkDebugID(operation.instanceID);
11978
+ emitEvent('onHostOperation', operation);
11979
+ },
11980
+ onSetState: function () {
11981
+ emitEvent('onSetState');
11982
+ },
11983
+ onSetChildren: function (debugID, childDebugIDs) {
11984
+ checkDebugID(debugID);
11985
+ childDebugIDs.forEach(checkDebugID);
11986
+ emitEvent('onSetChildren', debugID, childDebugIDs);
11987
+ },
11988
+ onBeforeMountComponent: function (debugID, element, parentDebugID) {
11989
+ checkDebugID(debugID);
11990
+ checkDebugID(parentDebugID, true);
11991
+ emitEvent('onBeforeMountComponent', debugID, element, parentDebugID);
11992
+ markBegin(debugID, 'mount');
11993
+ },
11994
+ onMountComponent: function (debugID) {
11995
+ checkDebugID(debugID);
11996
+ markEnd(debugID, 'mount');
11997
+ emitEvent('onMountComponent', debugID);
11998
+ },
11999
+ onBeforeUpdateComponent: function (debugID, element) {
12000
+ checkDebugID(debugID);
12001
+ emitEvent('onBeforeUpdateComponent', debugID, element);
12002
+ markBegin(debugID, 'update');
12003
+ },
12004
+ onUpdateComponent: function (debugID) {
12005
+ checkDebugID(debugID);
12006
+ markEnd(debugID, 'update');
12007
+ emitEvent('onUpdateComponent', debugID);
12008
+ },
12009
+ onBeforeUnmountComponent: function (debugID) {
12010
+ checkDebugID(debugID);
12011
+ emitEvent('onBeforeUnmountComponent', debugID);
12012
+ markBegin(debugID, 'unmount');
12013
+ },
12014
+ onUnmountComponent: function (debugID) {
12015
+ checkDebugID(debugID);
12016
+ markEnd(debugID, 'unmount');
12017
+ emitEvent('onUnmountComponent', debugID);
12018
+ },
12019
+ onTestEvent: function () {
12020
+ emitEvent('onTestEvent');
12021
+ }
12022
+ };
12023
+
12024
+ // TODO remove these when RN/www gets updated
12025
+ ReactDebugTool.addDevtool = ReactDebugTool.addHook;
12026
+ ReactDebugTool.removeDevtool = ReactDebugTool.removeHook;
12027
+
12028
+ ReactDebugTool.addHook(ReactInvalidSetStateWarningHook);
12029
+ ReactDebugTool.addHook(ReactComponentTreeHook);
12030
+ var url = ExecutionEnvironment.canUseDOM && window.location.href || '';
12031
+ if (/[?&]react_perf\b/.test(url)) {
12032
+ ReactDebugTool.beginProfiling();
12033
+ }
12034
+
12035
+ module.exports = ReactDebugTool;
12036
+ }).call(this)}).call(this,require('_process'))
12037
+ },{"./ReactHostOperationHistoryHook":92,"./ReactInvalidSetStateWarningHook":97,"_process":29,"fbjs/lib/ExecutionEnvironment":6,"fbjs/lib/performanceNow":25,"fbjs/lib/warning":27,"react/lib/ReactComponentTreeHook":169}],83:[function(require,module,exports){
12038
+ /**
12039
+ * Copyright (c) 2013-present, Facebook, Inc.
12040
+ *
12041
+ * This source code is licensed under the MIT license found in the
12042
+ * LICENSE file in the root directory of this source tree.
12043
+ *
12044
+ */
12045
+
12046
+ 'use strict';
12047
+
12048
+ var _assign = require('object-assign');
12049
+
12050
+ var ReactUpdates = require('./ReactUpdates');
12051
+ var Transaction = require('./Transaction');
12052
+
12053
+ var emptyFunction = require('fbjs/lib/emptyFunction');
12054
+
12055
+ var RESET_BATCHED_UPDATES = {
12056
+ initialize: emptyFunction,
12057
+ close: function () {
12058
+ ReactDefaultBatchingStrategy.isBatchingUpdates = false;
12059
+ }
12060
+ };
12061
+
12062
+ var FLUSH_BATCHED_UPDATES = {
12063
+ initialize: emptyFunction,
12064
+ close: ReactUpdates.flushBatchedUpdates.bind(ReactUpdates)
12065
+ };
12066
+
12067
+ var TRANSACTION_WRAPPERS = [FLUSH_BATCHED_UPDATES, RESET_BATCHED_UPDATES];
12068
+
12069
+ function ReactDefaultBatchingStrategyTransaction() {
12070
+ this.reinitializeTransaction();
12071
+ }
12072
+
12073
+ _assign(ReactDefaultBatchingStrategyTransaction.prototype, Transaction, {
12074
+ getTransactionWrappers: function () {
12075
+ return TRANSACTION_WRAPPERS;
12076
+ }
12077
+ });
12078
+
12079
+ var transaction = new ReactDefaultBatchingStrategyTransaction();
12080
+
12081
+ var ReactDefaultBatchingStrategy = {
12082
+ isBatchingUpdates: false,
12083
+
12084
+ /**
12085
+ * Call the provided function in a context within which calls to `setState`
12086
+ * and friends are batched such that components aren't updated unnecessarily.
12087
+ */
12088
+ batchedUpdates: function (callback, a, b, c, d, e) {
12089
+ var alreadyBatchingUpdates = ReactDefaultBatchingStrategy.isBatchingUpdates;
12090
+
12091
+ ReactDefaultBatchingStrategy.isBatchingUpdates = true;
12092
+
12093
+ // The code is written this way to avoid extra allocations
12094
+ if (alreadyBatchingUpdates) {
12095
+ return callback(a, b, c, d, e);
12096
+ } else {
12097
+ return transaction.perform(callback, null, a, b, c, d, e);
12098
+ }
12099
+ }
12100
+ };
12101
+
12102
+ module.exports = ReactDefaultBatchingStrategy;
12103
+ },{"./ReactUpdates":111,"./Transaction":129,"fbjs/lib/emptyFunction":12,"object-assign":28}],84:[function(require,module,exports){
12104
+ /**
12105
+ * Copyright (c) 2013-present, Facebook, Inc.
12106
+ *
12107
+ * This source code is licensed under the MIT license found in the
12108
+ * LICENSE file in the root directory of this source tree.
12109
+ *
12110
+ */
12111
+
12112
+ 'use strict';
12113
+
12114
+ var ARIADOMPropertyConfig = require('./ARIADOMPropertyConfig');
12115
+ var BeforeInputEventPlugin = require('./BeforeInputEventPlugin');
12116
+ var ChangeEventPlugin = require('./ChangeEventPlugin');
12117
+ var DefaultEventPluginOrder = require('./DefaultEventPluginOrder');
12118
+ var EnterLeaveEventPlugin = require('./EnterLeaveEventPlugin');
12119
+ var HTMLDOMPropertyConfig = require('./HTMLDOMPropertyConfig');
12120
+ var ReactComponentBrowserEnvironment = require('./ReactComponentBrowserEnvironment');
12121
+ var ReactDOMComponent = require('./ReactDOMComponent');
12122
+ var ReactDOMComponentTree = require('./ReactDOMComponentTree');
12123
+ var ReactDOMEmptyComponent = require('./ReactDOMEmptyComponent');
12124
+ var ReactDOMTreeTraversal = require('./ReactDOMTreeTraversal');
12125
+ var ReactDOMTextComponent = require('./ReactDOMTextComponent');
12126
+ var ReactDefaultBatchingStrategy = require('./ReactDefaultBatchingStrategy');
12127
+ var ReactEventListener = require('./ReactEventListener');
12128
+ var ReactInjection = require('./ReactInjection');
12129
+ var ReactReconcileTransaction = require('./ReactReconcileTransaction');
12130
+ var SVGDOMPropertyConfig = require('./SVGDOMPropertyConfig');
12131
+ var SelectEventPlugin = require('./SelectEventPlugin');
12132
+ var SimpleEventPlugin = require('./SimpleEventPlugin');
12133
+
12134
+ var alreadyInjected = false;
12135
+
12136
+ function inject() {
12137
+ if (alreadyInjected) {
12138
+ // TODO: This is currently true because these injections are shared between
12139
+ // the client and the server package. They should be built independently
12140
+ // and not share any injection state. Then this problem will be solved.
12141
+ return;
12142
+ }
12143
+ alreadyInjected = true;
12144
+
12145
+ ReactInjection.EventEmitter.injectReactEventListener(ReactEventListener);
12146
+
12147
+ /**
12148
+ * Inject modules for resolving DOM hierarchy and plugin ordering.
12149
+ */
12150
+ ReactInjection.EventPluginHub.injectEventPluginOrder(DefaultEventPluginOrder);
12151
+ ReactInjection.EventPluginUtils.injectComponentTree(ReactDOMComponentTree);
12152
+ ReactInjection.EventPluginUtils.injectTreeTraversal(ReactDOMTreeTraversal);
12153
+
12154
+ /**
12155
+ * Some important event plugins included by default (without having to require
12156
+ * them).
12157
+ */
12158
+ ReactInjection.EventPluginHub.injectEventPluginsByName({
12159
+ SimpleEventPlugin: SimpleEventPlugin,
12160
+ EnterLeaveEventPlugin: EnterLeaveEventPlugin,
12161
+ ChangeEventPlugin: ChangeEventPlugin,
12162
+ SelectEventPlugin: SelectEventPlugin,
12163
+ BeforeInputEventPlugin: BeforeInputEventPlugin
12164
+ });
12165
+
12166
+ ReactInjection.HostComponent.injectGenericComponentClass(ReactDOMComponent);
12167
+
12168
+ ReactInjection.HostComponent.injectTextComponentClass(ReactDOMTextComponent);
12169
+
12170
+ ReactInjection.DOMProperty.injectDOMPropertyConfig(ARIADOMPropertyConfig);
12171
+ ReactInjection.DOMProperty.injectDOMPropertyConfig(HTMLDOMPropertyConfig);
12172
+ ReactInjection.DOMProperty.injectDOMPropertyConfig(SVGDOMPropertyConfig);
12173
+
12174
+ ReactInjection.EmptyComponent.injectEmptyComponentFactory(function (instantiate) {
12175
+ return new ReactDOMEmptyComponent(instantiate);
12176
+ });
12177
+
12178
+ ReactInjection.Updates.injectReconcileTransaction(ReactReconcileTransaction);
12179
+ ReactInjection.Updates.injectBatchingStrategy(ReactDefaultBatchingStrategy);
12180
+
12181
+ ReactInjection.Component.injectEnvironment(ReactComponentBrowserEnvironment);
12182
+ }
12183
+
12184
+ module.exports = {
12185
+ inject: inject
12186
+ };
12187
+ },{"./ARIADOMPropertyConfig":35,"./BeforeInputEventPlugin":37,"./ChangeEventPlugin":41,"./DefaultEventPluginOrder":48,"./EnterLeaveEventPlugin":49,"./HTMLDOMPropertyConfig":55,"./ReactComponentBrowserEnvironment":61,"./ReactDOMComponent":65,"./ReactDOMComponentTree":67,"./ReactDOMEmptyComponent":69,"./ReactDOMTextComponent":78,"./ReactDOMTreeTraversal":80,"./ReactDefaultBatchingStrategy":83,"./ReactEventListener":89,"./ReactInjection":93,"./ReactReconcileTransaction":105,"./SVGDOMPropertyConfig":113,"./SelectEventPlugin":114,"./SimpleEventPlugin":115}],85:[function(require,module,exports){
12188
+ /**
12189
+ * Copyright (c) 2014-present, Facebook, Inc.
12190
+ *
12191
+ * This source code is licensed under the MIT license found in the
12192
+ * LICENSE file in the root directory of this source tree.
12193
+ *
12194
+ *
12195
+ */
12196
+
12197
+ 'use strict';
12198
+
12199
+ // The Symbol used to tag the ReactElement type. If there is no native Symbol
12200
+ // nor polyfill, then a plain number is used for performance.
12201
+
12202
+ var REACT_ELEMENT_TYPE = typeof Symbol === 'function' && Symbol['for'] && Symbol['for']('react.element') || 0xeac7;
12203
+
12204
+ module.exports = REACT_ELEMENT_TYPE;
12205
+ },{}],86:[function(require,module,exports){
12206
+ /**
12207
+ * Copyright (c) 2014-present, Facebook, Inc.
12208
+ *
12209
+ * This source code is licensed under the MIT license found in the
12210
+ * LICENSE file in the root directory of this source tree.
12211
+ *
12212
+ */
12213
+
12214
+ 'use strict';
12215
+
12216
+ var emptyComponentFactory;
12217
+
12218
+ var ReactEmptyComponentInjection = {
12219
+ injectEmptyComponentFactory: function (factory) {
12220
+ emptyComponentFactory = factory;
12221
+ }
12222
+ };
12223
+
12224
+ var ReactEmptyComponent = {
12225
+ create: function (instantiate) {
12226
+ return emptyComponentFactory(instantiate);
12227
+ }
12228
+ };
12229
+
12230
+ ReactEmptyComponent.injection = ReactEmptyComponentInjection;
12231
+
12232
+ module.exports = ReactEmptyComponent;
12233
+ },{}],87:[function(require,module,exports){
12234
+ (function (process){(function (){
12235
+ /**
12236
+ * Copyright (c) 2013-present, Facebook, Inc.
12237
+ *
12238
+ * This source code is licensed under the MIT license found in the
12239
+ * LICENSE file in the root directory of this source tree.
12240
+ *
12241
+ *
12242
+ */
12243
+
12244
+ 'use strict';
12245
+
12246
+ var caughtError = null;
12247
+
12248
+ /**
12249
+ * Call a function while guarding against errors that happens within it.
12250
+ *
12251
+ * @param {String} name of the guard to use for logging or debugging
12252
+ * @param {Function} func The function to invoke
12253
+ * @param {*} a First argument
12254
+ * @param {*} b Second argument
12255
+ */
12256
+ function invokeGuardedCallback(name, func, a) {
12257
+ try {
12258
+ func(a);
12259
+ } catch (x) {
12260
+ if (caughtError === null) {
12261
+ caughtError = x;
12262
+ }
12263
+ }
12264
+ }
12265
+
12266
+ var ReactErrorUtils = {
12267
+ invokeGuardedCallback: invokeGuardedCallback,
12268
+
12269
+ /**
12270
+ * Invoked by ReactTestUtils.Simulate so that any errors thrown by the event
12271
+ * handler are sure to be rethrown by rethrowCaughtError.
12272
+ */
12273
+ invokeGuardedCallbackWithCatch: invokeGuardedCallback,
12274
+
12275
+ /**
12276
+ * During execution of guarded functions we will capture the first error which
12277
+ * we will rethrow to be handled by the top level error handler.
12278
+ */
12279
+ rethrowCaughtError: function () {
12280
+ if (caughtError) {
12281
+ var error = caughtError;
12282
+ caughtError = null;
12283
+ throw error;
12284
+ }
12285
+ }
12286
+ };
12287
+
12288
+ if (process.env.NODE_ENV !== 'production') {
12289
+ /**
12290
+ * To help development we can get better devtools integration by simulating a
12291
+ * real browser event.
12292
+ */
12293
+ if (typeof window !== 'undefined' && typeof window.dispatchEvent === 'function' && typeof document !== 'undefined' && typeof document.createEvent === 'function') {
12294
+ var fakeNode = document.createElement('react');
12295
+ ReactErrorUtils.invokeGuardedCallback = function (name, func, a) {
12296
+ var boundFunc = function () {
12297
+ func(a);
12298
+ };
12299
+ var evtType = 'react-' + name;
12300
+ fakeNode.addEventListener(evtType, boundFunc, false);
12301
+ var evt = document.createEvent('Event');
12302
+ evt.initEvent(evtType, false, false);
12303
+ fakeNode.dispatchEvent(evt);
12304
+ fakeNode.removeEventListener(evtType, boundFunc, false);
12305
+ };
12306
+ }
12307
+ }
12308
+
12309
+ module.exports = ReactErrorUtils;
12310
+ }).call(this)}).call(this,require('_process'))
12311
+ },{"_process":29}],88:[function(require,module,exports){
12312
+ /**
12313
+ * Copyright (c) 2013-present, Facebook, Inc.
12314
+ *
12315
+ * This source code is licensed under the MIT license found in the
12316
+ * LICENSE file in the root directory of this source tree.
12317
+ *
12318
+ */
12319
+
12320
+ 'use strict';
12321
+
12322
+ var EventPluginHub = require('./EventPluginHub');
12323
+
12324
+ function runEventQueueInBatch(events) {
12325
+ EventPluginHub.enqueueEvents(events);
12326
+ EventPluginHub.processEventQueue(false);
12327
+ }
12328
+
12329
+ var ReactEventEmitterMixin = {
12330
+ /**
12331
+ * Streams a fired top-level event to `EventPluginHub` where plugins have the
12332
+ * opportunity to create `ReactEvent`s to be dispatched.
12333
+ */
12334
+ handleTopLevel: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
12335
+ var events = EventPluginHub.extractEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget);
12336
+ runEventQueueInBatch(events);
12337
+ }
12338
+ };
12339
+
12340
+ module.exports = ReactEventEmitterMixin;
12341
+ },{"./EventPluginHub":50}],89:[function(require,module,exports){
12342
+ /**
12343
+ * Copyright (c) 2013-present, Facebook, Inc.
12344
+ *
12345
+ * This source code is licensed under the MIT license found in the
12346
+ * LICENSE file in the root directory of this source tree.
12347
+ *
12348
+ */
12349
+
12350
+ 'use strict';
12351
+
12352
+ var _assign = require('object-assign');
12353
+
12354
+ var EventListener = require('fbjs/lib/EventListener');
12355
+ var ExecutionEnvironment = require('fbjs/lib/ExecutionEnvironment');
12356
+ var PooledClass = require('./PooledClass');
12357
+ var ReactDOMComponentTree = require('./ReactDOMComponentTree');
12358
+ var ReactUpdates = require('./ReactUpdates');
12359
+
12360
+ var getEventTarget = require('./getEventTarget');
12361
+ var getUnboundedScrollPosition = require('fbjs/lib/getUnboundedScrollPosition');
12362
+
12363
+ /**
12364
+ * Find the deepest React component completely containing the root of the
12365
+ * passed-in instance (for use when entire React trees are nested within each
12366
+ * other). If React trees are not nested, returns null.
12367
+ */
12368
+ function findParent(inst) {
12369
+ // TODO: It may be a good idea to cache this to prevent unnecessary DOM
12370
+ // traversal, but caching is difficult to do correctly without using a
12371
+ // mutation observer to listen for all DOM changes.
12372
+ while (inst._hostParent) {
12373
+ inst = inst._hostParent;
12374
+ }
12375
+ var rootNode = ReactDOMComponentTree.getNodeFromInstance(inst);
12376
+ var container = rootNode.parentNode;
12377
+ return ReactDOMComponentTree.getClosestInstanceFromNode(container);
12378
+ }
12379
+
12380
+ // Used to store ancestor hierarchy in top level callback
12381
+ function TopLevelCallbackBookKeeping(topLevelType, nativeEvent) {
12382
+ this.topLevelType = topLevelType;
12383
+ this.nativeEvent = nativeEvent;
12384
+ this.ancestors = [];
12385
+ }
12386
+ _assign(TopLevelCallbackBookKeeping.prototype, {
12387
+ destructor: function () {
12388
+ this.topLevelType = null;
12389
+ this.nativeEvent = null;
12390
+ this.ancestors.length = 0;
12391
+ }
12392
+ });
12393
+ PooledClass.addPoolingTo(TopLevelCallbackBookKeeping, PooledClass.twoArgumentPooler);
12394
+
12395
+ function handleTopLevelImpl(bookKeeping) {
12396
+ var nativeEventTarget = getEventTarget(bookKeeping.nativeEvent);
12397
+ var targetInst = ReactDOMComponentTree.getClosestInstanceFromNode(nativeEventTarget);
12398
+
12399
+ // Loop through the hierarchy, in case there's any nested components.
12400
+ // It's important that we build the array of ancestors before calling any
12401
+ // event handlers, because event handlers can modify the DOM, leading to
12402
+ // inconsistencies with ReactMount's node cache. See #1105.
12403
+ var ancestor = targetInst;
12404
+ do {
12405
+ bookKeeping.ancestors.push(ancestor);
12406
+ ancestor = ancestor && findParent(ancestor);
12407
+ } while (ancestor);
12408
+
12409
+ for (var i = 0; i < bookKeeping.ancestors.length; i++) {
12410
+ targetInst = bookKeeping.ancestors[i];
12411
+ ReactEventListener._handleTopLevel(bookKeeping.topLevelType, targetInst, bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent));
12412
+ }
12413
+ }
12414
+
12415
+ function scrollValueMonitor(cb) {
12416
+ var scrollPosition = getUnboundedScrollPosition(window);
12417
+ cb(scrollPosition);
12418
+ }
12419
+
12420
+ var ReactEventListener = {
12421
+ _enabled: true,
12422
+ _handleTopLevel: null,
12423
+
12424
+ WINDOW_HANDLE: ExecutionEnvironment.canUseDOM ? window : null,
12425
+
12426
+ setHandleTopLevel: function (handleTopLevel) {
12427
+ ReactEventListener._handleTopLevel = handleTopLevel;
12428
+ },
12429
+
12430
+ setEnabled: function (enabled) {
12431
+ ReactEventListener._enabled = !!enabled;
12432
+ },
12433
+
12434
+ isEnabled: function () {
12435
+ return ReactEventListener._enabled;
12436
+ },
12437
+
12438
+ /**
12439
+ * Traps top-level events by using event bubbling.
12440
+ *
12441
+ * @param {string} topLevelType Record from `EventConstants`.
12442
+ * @param {string} handlerBaseName Event name (e.g. "click").
12443
+ * @param {object} element Element on which to attach listener.
12444
+ * @return {?object} An object with a remove function which will forcefully
12445
+ * remove the listener.
12446
+ * @internal
12447
+ */
12448
+ trapBubbledEvent: function (topLevelType, handlerBaseName, element) {
12449
+ if (!element) {
12450
+ return null;
12451
+ }
12452
+ return EventListener.listen(element, handlerBaseName, ReactEventListener.dispatchEvent.bind(null, topLevelType));
12453
+ },
12454
+
12455
+ /**
12456
+ * Traps a top-level event by using event capturing.
12457
+ *
12458
+ * @param {string} topLevelType Record from `EventConstants`.
12459
+ * @param {string} handlerBaseName Event name (e.g. "click").
12460
+ * @param {object} element Element on which to attach listener.
12461
+ * @return {?object} An object with a remove function which will forcefully
12462
+ * remove the listener.
12463
+ * @internal
12464
+ */
12465
+ trapCapturedEvent: function (topLevelType, handlerBaseName, element) {
12466
+ if (!element) {
12467
+ return null;
12468
+ }
12469
+ return EventListener.capture(element, handlerBaseName, ReactEventListener.dispatchEvent.bind(null, topLevelType));
12470
+ },
12471
+
12472
+ monitorScrollValue: function (refresh) {
12473
+ var callback = scrollValueMonitor.bind(null, refresh);
12474
+ EventListener.listen(window, 'scroll', callback);
12475
+ },
12476
+
12477
+ dispatchEvent: function (topLevelType, nativeEvent) {
12478
+ if (!ReactEventListener._enabled) {
12479
+ return;
12480
+ }
12481
+
12482
+ var bookKeeping = TopLevelCallbackBookKeeping.getPooled(topLevelType, nativeEvent);
12483
+ try {
12484
+ // Event queue being processed in the same cycle allows
12485
+ // `preventDefault`.
12486
+ ReactUpdates.batchedUpdates(handleTopLevelImpl, bookKeeping);
12487
+ } finally {
12488
+ TopLevelCallbackBookKeeping.release(bookKeeping);
12489
+ }
12490
+ }
12491
+ };
12492
+
12493
+ module.exports = ReactEventListener;
12494
+ },{"./PooledClass":58,"./ReactDOMComponentTree":67,"./ReactUpdates":111,"./getEventTarget":143,"fbjs/lib/EventListener":5,"fbjs/lib/ExecutionEnvironment":6,"fbjs/lib/getUnboundedScrollPosition":17,"object-assign":28}],90:[function(require,module,exports){
12495
+ /**
12496
+ * Copyright (c) 2013-present, Facebook, Inc.
12497
+ *
12498
+ * This source code is licensed under the MIT license found in the
12499
+ * LICENSE file in the root directory of this source tree.
12500
+ *
12501
+ *
12502
+ */
12503
+
12504
+ 'use strict';
12505
+
12506
+ var ReactFeatureFlags = {
12507
+ // When true, call console.time() before and .timeEnd() after each top-level
12508
+ // render (both initial renders and updates). Useful when looking at prod-mode
12509
+ // timeline profiles in Chrome, for example.
12510
+ logTopLevelRenders: false
12511
+ };
12512
+
12513
+ module.exports = ReactFeatureFlags;
12514
+ },{}],91:[function(require,module,exports){
12515
+ (function (process){(function (){
12516
+ /**
12517
+ * Copyright (c) 2014-present, Facebook, Inc.
12518
+ *
12519
+ * This source code is licensed under the MIT license found in the
12520
+ * LICENSE file in the root directory of this source tree.
12521
+ *
12522
+ */
12523
+
12524
+ 'use strict';
12525
+
12526
+ var _prodInvariant = require('./reactProdInvariant');
12527
+
12528
+ var invariant = require('fbjs/lib/invariant');
12529
+
12530
+ var genericComponentClass = null;
12531
+ var textComponentClass = null;
12532
+
12533
+ var ReactHostComponentInjection = {
12534
+ // This accepts a class that receives the tag string. This is a catch all
12535
+ // that can render any kind of tag.
12536
+ injectGenericComponentClass: function (componentClass) {
12537
+ genericComponentClass = componentClass;
12538
+ },
12539
+ // This accepts a text component class that takes the text string to be
12540
+ // rendered as props.
12541
+ injectTextComponentClass: function (componentClass) {
12542
+ textComponentClass = componentClass;
12543
+ }
12544
+ };
12545
+
12546
+ /**
12547
+ * Get a host internal component class for a specific tag.
12548
+ *
12549
+ * @param {ReactElement} element The element to create.
12550
+ * @return {function} The internal class constructor function.
12551
+ */
12552
+ function createInternalComponent(element) {
12553
+ !genericComponentClass ? process.env.NODE_ENV !== 'production' ? invariant(false, 'There is no registered component for the tag %s', element.type) : _prodInvariant('111', element.type) : void 0;
12554
+ return new genericComponentClass(element);
12555
+ }
12556
+
12557
+ /**
12558
+ * @param {ReactText} text
12559
+ * @return {ReactComponent}
12560
+ */
12561
+ function createInstanceForText(text) {
12562
+ return new textComponentClass(text);
12563
+ }
12564
+
12565
+ /**
12566
+ * @param {ReactComponent} component
12567
+ * @return {boolean}
12568
+ */
12569
+ function isTextComponent(component) {
12570
+ return component instanceof textComponentClass;
12571
+ }
12572
+
12573
+ var ReactHostComponent = {
12574
+ createInternalComponent: createInternalComponent,
12575
+ createInstanceForText: createInstanceForText,
12576
+ isTextComponent: isTextComponent,
12577
+ injection: ReactHostComponentInjection
12578
+ };
12579
+
12580
+ module.exports = ReactHostComponent;
12581
+ }).call(this)}).call(this,require('_process'))
12582
+ },{"./reactProdInvariant":154,"_process":29,"fbjs/lib/invariant":20}],92:[function(require,module,exports){
12583
+ /**
12584
+ * Copyright (c) 2016-present, Facebook, Inc.
12585
+ *
12586
+ * This source code is licensed under the MIT license found in the
12587
+ * LICENSE file in the root directory of this source tree.
12588
+ *
12589
+ *
12590
+ */
12591
+
12592
+ 'use strict';
12593
+
12594
+ var history = [];
12595
+
12596
+ var ReactHostOperationHistoryHook = {
12597
+ onHostOperation: function (operation) {
12598
+ history.push(operation);
12599
+ },
12600
+ clearHistory: function () {
12601
+ if (ReactHostOperationHistoryHook._preventClearing) {
12602
+ // Should only be used for tests.
12603
+ return;
12604
+ }
12605
+
12606
+ history = [];
12607
+ },
12608
+ getHistory: function () {
12609
+ return history;
12610
+ }
12611
+ };
12612
+
12613
+ module.exports = ReactHostOperationHistoryHook;
12614
+ },{}],93:[function(require,module,exports){
12615
+ /**
12616
+ * Copyright (c) 2013-present, Facebook, Inc.
12617
+ *
12618
+ * This source code is licensed under the MIT license found in the
12619
+ * LICENSE file in the root directory of this source tree.
12620
+ *
12621
+ */
12622
+
12623
+ 'use strict';
12624
+
12625
+ var DOMProperty = require('./DOMProperty');
12626
+ var EventPluginHub = require('./EventPluginHub');
12627
+ var EventPluginUtils = require('./EventPluginUtils');
12628
+ var ReactComponentEnvironment = require('./ReactComponentEnvironment');
12629
+ var ReactEmptyComponent = require('./ReactEmptyComponent');
12630
+ var ReactBrowserEventEmitter = require('./ReactBrowserEventEmitter');
12631
+ var ReactHostComponent = require('./ReactHostComponent');
12632
+ var ReactUpdates = require('./ReactUpdates');
12633
+
12634
+ var ReactInjection = {
12635
+ Component: ReactComponentEnvironment.injection,
12636
+ DOMProperty: DOMProperty.injection,
12637
+ EmptyComponent: ReactEmptyComponent.injection,
12638
+ EventPluginHub: EventPluginHub.injection,
12639
+ EventPluginUtils: EventPluginUtils.injection,
12640
+ EventEmitter: ReactBrowserEventEmitter.injection,
12641
+ HostComponent: ReactHostComponent.injection,
12642
+ Updates: ReactUpdates.injection
12643
+ };
12644
+
12645
+ module.exports = ReactInjection;
12646
+ },{"./DOMProperty":45,"./EventPluginHub":50,"./EventPluginUtils":52,"./ReactBrowserEventEmitter":59,"./ReactComponentEnvironment":62,"./ReactEmptyComponent":86,"./ReactHostComponent":91,"./ReactUpdates":111}],94:[function(require,module,exports){
12647
+ /**
12648
+ * Copyright (c) 2013-present, Facebook, Inc.
12649
+ *
12650
+ * This source code is licensed under the MIT license found in the
12651
+ * LICENSE file in the root directory of this source tree.
12652
+ *
12653
+ */
12654
+
12655
+ 'use strict';
12656
+
12657
+ var ReactDOMSelection = require('./ReactDOMSelection');
12658
+
12659
+ var containsNode = require('fbjs/lib/containsNode');
12660
+ var focusNode = require('fbjs/lib/focusNode');
12661
+ var getActiveElement = require('fbjs/lib/getActiveElement');
12662
+
12663
+ function isInDocument(node) {
12664
+ return containsNode(document.documentElement, node);
12665
+ }
12666
+
12667
+ /**
12668
+ * @ReactInputSelection: React input selection module. Based on Selection.js,
12669
+ * but modified to be suitable for react and has a couple of bug fixes (doesn't
12670
+ * assume buttons have range selections allowed).
12671
+ * Input selection module for React.
12672
+ */
12673
+ var ReactInputSelection = {
12674
+ hasSelectionCapabilities: function (elem) {
12675
+ var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();
12676
+ return nodeName && (nodeName === 'input' && elem.type === 'text' || nodeName === 'textarea' || elem.contentEditable === 'true');
12677
+ },
12678
+
12679
+ getSelectionInformation: function () {
12680
+ var focusedElem = getActiveElement();
12681
+ return {
12682
+ focusedElem: focusedElem,
12683
+ selectionRange: ReactInputSelection.hasSelectionCapabilities(focusedElem) ? ReactInputSelection.getSelection(focusedElem) : null
12684
+ };
12685
+ },
12686
+
12687
+ /**
12688
+ * @restoreSelection: If any selection information was potentially lost,
12689
+ * restore it. This is useful when performing operations that could remove dom
12690
+ * nodes and place them back in, resulting in focus being lost.
12691
+ */
12692
+ restoreSelection: function (priorSelectionInformation) {
12693
+ var curFocusedElem = getActiveElement();
12694
+ var priorFocusedElem = priorSelectionInformation.focusedElem;
12695
+ var priorSelectionRange = priorSelectionInformation.selectionRange;
12696
+ if (curFocusedElem !== priorFocusedElem && isInDocument(priorFocusedElem)) {
12697
+ if (ReactInputSelection.hasSelectionCapabilities(priorFocusedElem)) {
12698
+ ReactInputSelection.setSelection(priorFocusedElem, priorSelectionRange);
12699
+ }
12700
+ focusNode(priorFocusedElem);
12701
+ }
12702
+ },
12703
+
12704
+ /**
12705
+ * @getSelection: Gets the selection bounds of a focused textarea, input or
12706
+ * contentEditable node.
12707
+ * -@input: Look up selection bounds of this input
12708
+ * -@return {start: selectionStart, end: selectionEnd}
12709
+ */
12710
+ getSelection: function (input) {
12711
+ var selection;
12712
+
12713
+ if ('selectionStart' in input) {
12714
+ // Modern browser with input or textarea.
12715
+ selection = {
12716
+ start: input.selectionStart,
12717
+ end: input.selectionEnd
12718
+ };
12719
+ } else if (document.selection && input.nodeName && input.nodeName.toLowerCase() === 'input') {
12720
+ // IE8 input.
12721
+ var range = document.selection.createRange();
12722
+ // There can only be one selection per document in IE, so it must
12723
+ // be in our element.
12724
+ if (range.parentElement() === input) {
12725
+ selection = {
12726
+ start: -range.moveStart('character', -input.value.length),
12727
+ end: -range.moveEnd('character', -input.value.length)
12728
+ };
12729
+ }
12730
+ } else {
12731
+ // Content editable or old IE textarea.
12732
+ selection = ReactDOMSelection.getOffsets(input);
12733
+ }
12734
+
12735
+ return selection || { start: 0, end: 0 };
12736
+ },
12737
+
12738
+ /**
12739
+ * @setSelection: Sets the selection bounds of a textarea or input and focuses
12740
+ * the input.
12741
+ * -@input Set selection bounds of this input or textarea
12742
+ * -@offsets Object of same form that is returned from get*
12743
+ */
12744
+ setSelection: function (input, offsets) {
12745
+ var start = offsets.start;
12746
+ var end = offsets.end;
12747
+ if (end === undefined) {
12748
+ end = start;
12749
+ }
12750
+
12751
+ if ('selectionStart' in input) {
12752
+ input.selectionStart = start;
12753
+ input.selectionEnd = Math.min(end, input.value.length);
12754
+ } else if (document.selection && input.nodeName && input.nodeName.toLowerCase() === 'input') {
12755
+ var range = input.createTextRange();
12756
+ range.collapse(true);
12757
+ range.moveStart('character', start);
12758
+ range.moveEnd('character', end - start);
12759
+ range.select();
12760
+ } else {
12761
+ ReactDOMSelection.setOffsets(input, offsets);
12762
+ }
12763
+ }
12764
+ };
12765
+
12766
+ module.exports = ReactInputSelection;
12767
+ },{"./ReactDOMSelection":77,"fbjs/lib/containsNode":9,"fbjs/lib/focusNode":14,"fbjs/lib/getActiveElement":15}],95:[function(require,module,exports){
12768
+ /**
12769
+ * Copyright (c) 2013-present, Facebook, Inc.
12770
+ *
12771
+ * This source code is licensed under the MIT license found in the
12772
+ * LICENSE file in the root directory of this source tree.
12773
+ *
12774
+ */
12775
+
12776
+ 'use strict';
12777
+
12778
+ /**
12779
+ * `ReactInstanceMap` maintains a mapping from a public facing stateful
12780
+ * instance (key) and the internal representation (value). This allows public
12781
+ * methods to accept the user facing instance as an argument and map them back
12782
+ * to internal methods.
12783
+ */
12784
+
12785
+ // TODO: Replace this with ES6: var ReactInstanceMap = new Map();
12786
+
12787
+ var ReactInstanceMap = {
12788
+ /**
12789
+ * This API should be called `delete` but we'd have to make sure to always
12790
+ * transform these to strings for IE support. When this transform is fully
12791
+ * supported we can rename it.
12792
+ */
12793
+ remove: function (key) {
12794
+ key._reactInternalInstance = undefined;
12795
+ },
12796
+
12797
+ get: function (key) {
12798
+ return key._reactInternalInstance;
12799
+ },
12800
+
12801
+ has: function (key) {
12802
+ return key._reactInternalInstance !== undefined;
12803
+ },
12804
+
12805
+ set: function (key, value) {
12806
+ key._reactInternalInstance = value;
12807
+ }
12808
+ };
12809
+
12810
+ module.exports = ReactInstanceMap;
12811
+ },{}],96:[function(require,module,exports){
12812
+ (function (process){(function (){
12813
+ /**
12814
+ * Copyright (c) 2016-present, Facebook, Inc.
12815
+ *
12816
+ * This source code is licensed under the MIT license found in the
12817
+ * LICENSE file in the root directory of this source tree.
12818
+ *
12819
+ *
12820
+ */
12821
+
12822
+ 'use strict';
12823
+
12824
+ // Trust the developer to only use ReactInstrumentation with a __DEV__ check
12825
+
12826
+ var debugTool = null;
12827
+
12828
+ if (process.env.NODE_ENV !== 'production') {
12829
+ var ReactDebugTool = require('./ReactDebugTool');
12830
+ debugTool = ReactDebugTool;
12831
+ }
12832
+
12833
+ module.exports = { debugTool: debugTool };
12834
+ }).call(this)}).call(this,require('_process'))
12835
+ },{"./ReactDebugTool":82,"_process":29}],97:[function(require,module,exports){
12836
+ (function (process){(function (){
12837
+ /**
12838
+ * Copyright (c) 2016-present, Facebook, Inc.
12839
+ *
12840
+ * This source code is licensed under the MIT license found in the
12841
+ * LICENSE file in the root directory of this source tree.
12842
+ *
12843
+ *
12844
+ */
12845
+
12846
+ 'use strict';
12847
+
12848
+ var warning = require('fbjs/lib/warning');
12849
+
12850
+ if (process.env.NODE_ENV !== 'production') {
12851
+ var processingChildContext = false;
12852
+
12853
+ var warnInvalidSetState = function () {
12854
+ process.env.NODE_ENV !== 'production' ? warning(!processingChildContext, 'setState(...): Cannot call setState() inside getChildContext()') : void 0;
12855
+ };
12856
+ }
12857
+
12858
+ var ReactInvalidSetStateWarningHook = {
12859
+ onBeginProcessingChildContext: function () {
12860
+ processingChildContext = true;
12861
+ },
12862
+ onEndProcessingChildContext: function () {
12863
+ processingChildContext = false;
12864
+ },
12865
+ onSetState: function () {
12866
+ warnInvalidSetState();
12867
+ }
12868
+ };
12869
+
12870
+ module.exports = ReactInvalidSetStateWarningHook;
12871
+ }).call(this)}).call(this,require('_process'))
12872
+ },{"_process":29,"fbjs/lib/warning":27}],98:[function(require,module,exports){
12873
+ /**
12874
+ * Copyright (c) 2013-present, Facebook, Inc.
12875
+ *
12876
+ * This source code is licensed under the MIT license found in the
12877
+ * LICENSE file in the root directory of this source tree.
12878
+ *
12879
+ */
12880
+
12881
+ 'use strict';
12882
+
12883
+ var adler32 = require('./adler32');
12884
+
12885
+ var TAG_END = /\/?>/;
12886
+ var COMMENT_START = /^<\!\-\-/;
12887
+
12888
+ var ReactMarkupChecksum = {
12889
+ CHECKSUM_ATTR_NAME: 'data-react-checksum',
12890
+
12891
+ /**
12892
+ * @param {string} markup Markup string
12893
+ * @return {string} Markup string with checksum attribute attached
12894
+ */
12895
+ addChecksumToMarkup: function (markup) {
12896
+ var checksum = adler32(markup);
12897
+
12898
+ // Add checksum (handle both parent tags, comments and self-closing tags)
12899
+ if (COMMENT_START.test(markup)) {
12900
+ return markup;
12901
+ } else {
12902
+ return markup.replace(TAG_END, ' ' + ReactMarkupChecksum.CHECKSUM_ATTR_NAME + '="' + checksum + '"$&');
12903
+ }
12904
+ },
12905
+
12906
+ /**
12907
+ * @param {string} markup to use
12908
+ * @param {DOMElement} element root React element
12909
+ * @returns {boolean} whether or not the markup is the same
12910
+ */
12911
+ canReuseMarkup: function (markup, element) {
12912
+ var existingChecksum = element.getAttribute(ReactMarkupChecksum.CHECKSUM_ATTR_NAME);
12913
+ existingChecksum = existingChecksum && parseInt(existingChecksum, 10);
12914
+ var markupChecksum = adler32(markup);
12915
+ return markupChecksum === existingChecksum;
12916
+ }
12917
+ };
12918
+
12919
+ module.exports = ReactMarkupChecksum;
12920
+ },{"./adler32":132}],99:[function(require,module,exports){
12921
+ (function (process){(function (){
12922
+ /**
12923
+ * Copyright (c) 2013-present, Facebook, Inc.
12924
+ *
12925
+ * This source code is licensed under the MIT license found in the
12926
+ * LICENSE file in the root directory of this source tree.
12927
+ *
12928
+ */
12929
+
12930
+ 'use strict';
12931
+
12932
+ var _prodInvariant = require('./reactProdInvariant');
12933
+
12934
+ var DOMLazyTree = require('./DOMLazyTree');
12935
+ var DOMProperty = require('./DOMProperty');
12936
+ var React = require('react/lib/React');
12937
+ var ReactBrowserEventEmitter = require('./ReactBrowserEventEmitter');
12938
+ var ReactCurrentOwner = require('react/lib/ReactCurrentOwner');
12939
+ var ReactDOMComponentTree = require('./ReactDOMComponentTree');
12940
+ var ReactDOMContainerInfo = require('./ReactDOMContainerInfo');
12941
+ var ReactDOMFeatureFlags = require('./ReactDOMFeatureFlags');
12942
+ var ReactFeatureFlags = require('./ReactFeatureFlags');
12943
+ var ReactInstanceMap = require('./ReactInstanceMap');
12944
+ var ReactInstrumentation = require('./ReactInstrumentation');
12945
+ var ReactMarkupChecksum = require('./ReactMarkupChecksum');
12946
+ var ReactReconciler = require('./ReactReconciler');
12947
+ var ReactUpdateQueue = require('./ReactUpdateQueue');
12948
+ var ReactUpdates = require('./ReactUpdates');
12949
+
12950
+ var emptyObject = require('fbjs/lib/emptyObject');
12951
+ var instantiateReactComponent = require('./instantiateReactComponent');
12952
+ var invariant = require('fbjs/lib/invariant');
12953
+ var setInnerHTML = require('./setInnerHTML');
12954
+ var shouldUpdateReactComponent = require('./shouldUpdateReactComponent');
12955
+ var warning = require('fbjs/lib/warning');
12956
+
12957
+ var ATTR_NAME = DOMProperty.ID_ATTRIBUTE_NAME;
12958
+ var ROOT_ATTR_NAME = DOMProperty.ROOT_ATTRIBUTE_NAME;
12959
+
12960
+ var ELEMENT_NODE_TYPE = 1;
12961
+ var DOC_NODE_TYPE = 9;
12962
+ var DOCUMENT_FRAGMENT_NODE_TYPE = 11;
12963
+
12964
+ var instancesByReactRootID = {};
12965
+
12966
+ /**
12967
+ * Finds the index of the first character
12968
+ * that's not common between the two given strings.
12969
+ *
12970
+ * @return {number} the index of the character where the strings diverge
12971
+ */
12972
+ function firstDifferenceIndex(string1, string2) {
12973
+ var minLen = Math.min(string1.length, string2.length);
12974
+ for (var i = 0; i < minLen; i++) {
12975
+ if (string1.charAt(i) !== string2.charAt(i)) {
12976
+ return i;
12977
+ }
12978
+ }
12979
+ return string1.length === string2.length ? -1 : minLen;
12980
+ }
12981
+
12982
+ /**
12983
+ * @param {DOMElement|DOMDocument} container DOM element that may contain
12984
+ * a React component
12985
+ * @return {?*} DOM element that may have the reactRoot ID, or null.
12986
+ */
12987
+ function getReactRootElementInContainer(container) {
12988
+ if (!container) {
12989
+ return null;
12990
+ }
12991
+
12992
+ if (container.nodeType === DOC_NODE_TYPE) {
12993
+ return container.documentElement;
12994
+ } else {
12995
+ return container.firstChild;
12996
+ }
12997
+ }
12998
+
12999
+ function internalGetID(node) {
13000
+ // If node is something like a window, document, or text node, none of
13001
+ // which support attributes or a .getAttribute method, gracefully return
13002
+ // the empty string, as if the attribute were missing.
13003
+ return node.getAttribute && node.getAttribute(ATTR_NAME) || '';
13004
+ }
13005
+
13006
+ /**
13007
+ * Mounts this component and inserts it into the DOM.
13008
+ *
13009
+ * @param {ReactComponent} componentInstance The instance to mount.
13010
+ * @param {DOMElement} container DOM element to mount into.
13011
+ * @param {ReactReconcileTransaction} transaction
13012
+ * @param {boolean} shouldReuseMarkup If true, do not insert markup
13013
+ */
13014
+ function mountComponentIntoNode(wrapperInstance, container, transaction, shouldReuseMarkup, context) {
13015
+ var markerName;
13016
+ if (ReactFeatureFlags.logTopLevelRenders) {
13017
+ var wrappedElement = wrapperInstance._currentElement.props.child;
13018
+ var type = wrappedElement.type;
13019
+ markerName = 'React mount: ' + (typeof type === 'string' ? type : type.displayName || type.name);
13020
+ console.time(markerName);
13021
+ }
13022
+
13023
+ var markup = ReactReconciler.mountComponent(wrapperInstance, transaction, null, ReactDOMContainerInfo(wrapperInstance, container), context, 0 /* parentDebugID */
13024
+ );
13025
+
13026
+ if (markerName) {
13027
+ console.timeEnd(markerName);
13028
+ }
13029
+
13030
+ wrapperInstance._renderedComponent._topLevelWrapper = wrapperInstance;
13031
+ ReactMount._mountImageIntoNode(markup, container, wrapperInstance, shouldReuseMarkup, transaction);
13032
+ }
13033
+
13034
+ /**
13035
+ * Batched mount.
13036
+ *
13037
+ * @param {ReactComponent} componentInstance The instance to mount.
13038
+ * @param {DOMElement} container DOM element to mount into.
13039
+ * @param {boolean} shouldReuseMarkup If true, do not insert markup
13040
+ */
13041
+ function batchedMountComponentIntoNode(componentInstance, container, shouldReuseMarkup, context) {
13042
+ var transaction = ReactUpdates.ReactReconcileTransaction.getPooled(
13043
+ /* useCreateElement */
13044
+ !shouldReuseMarkup && ReactDOMFeatureFlags.useCreateElement);
13045
+ transaction.perform(mountComponentIntoNode, null, componentInstance, container, transaction, shouldReuseMarkup, context);
13046
+ ReactUpdates.ReactReconcileTransaction.release(transaction);
13047
+ }
13048
+
13049
+ /**
13050
+ * Unmounts a component and removes it from the DOM.
13051
+ *
13052
+ * @param {ReactComponent} instance React component instance.
13053
+ * @param {DOMElement} container DOM element to unmount from.
13054
+ * @final
13055
+ * @internal
13056
+ * @see {ReactMount.unmountComponentAtNode}
13057
+ */
13058
+ function unmountComponentFromNode(instance, container, safely) {
13059
+ if (process.env.NODE_ENV !== 'production') {
13060
+ ReactInstrumentation.debugTool.onBeginFlush();
13061
+ }
13062
+ ReactReconciler.unmountComponent(instance, safely);
13063
+ if (process.env.NODE_ENV !== 'production') {
13064
+ ReactInstrumentation.debugTool.onEndFlush();
13065
+ }
13066
+
13067
+ if (container.nodeType === DOC_NODE_TYPE) {
13068
+ container = container.documentElement;
13069
+ }
13070
+
13071
+ // http://jsperf.com/emptying-a-node
13072
+ while (container.lastChild) {
13073
+ container.removeChild(container.lastChild);
13074
+ }
13075
+ }
13076
+
13077
+ /**
13078
+ * True if the supplied DOM node has a direct React-rendered child that is
13079
+ * not a React root element. Useful for warning in `render`,
13080
+ * `unmountComponentAtNode`, etc.
13081
+ *
13082
+ * @param {?DOMElement} node The candidate DOM node.
13083
+ * @return {boolean} True if the DOM element contains a direct child that was
13084
+ * rendered by React but is not a root element.
13085
+ * @internal
13086
+ */
13087
+ function hasNonRootReactChild(container) {
13088
+ var rootEl = getReactRootElementInContainer(container);
13089
+ if (rootEl) {
13090
+ var inst = ReactDOMComponentTree.getInstanceFromNode(rootEl);
13091
+ return !!(inst && inst._hostParent);
13092
+ }
13093
+ }
13094
+
13095
+ /**
13096
+ * True if the supplied DOM node is a React DOM element and
13097
+ * it has been rendered by another copy of React.
13098
+ *
13099
+ * @param {?DOMElement} node The candidate DOM node.
13100
+ * @return {boolean} True if the DOM has been rendered by another copy of React
13101
+ * @internal
13102
+ */
13103
+ function nodeIsRenderedByOtherInstance(container) {
13104
+ var rootEl = getReactRootElementInContainer(container);
13105
+ return !!(rootEl && isReactNode(rootEl) && !ReactDOMComponentTree.getInstanceFromNode(rootEl));
13106
+ }
13107
+
13108
+ /**
13109
+ * True if the supplied DOM node is a valid node element.
13110
+ *
13111
+ * @param {?DOMElement} node The candidate DOM node.
13112
+ * @return {boolean} True if the DOM is a valid DOM node.
13113
+ * @internal
13114
+ */
13115
+ function isValidContainer(node) {
13116
+ return !!(node && (node.nodeType === ELEMENT_NODE_TYPE || node.nodeType === DOC_NODE_TYPE || node.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE));
13117
+ }
13118
+
13119
+ /**
13120
+ * True if the supplied DOM node is a valid React node element.
13121
+ *
13122
+ * @param {?DOMElement} node The candidate DOM node.
13123
+ * @return {boolean} True if the DOM is a valid React DOM node.
13124
+ * @internal
13125
+ */
13126
+ function isReactNode(node) {
13127
+ return isValidContainer(node) && (node.hasAttribute(ROOT_ATTR_NAME) || node.hasAttribute(ATTR_NAME));
13128
+ }
13129
+
13130
+ function getHostRootInstanceInContainer(container) {
13131
+ var rootEl = getReactRootElementInContainer(container);
13132
+ var prevHostInstance = rootEl && ReactDOMComponentTree.getInstanceFromNode(rootEl);
13133
+ return prevHostInstance && !prevHostInstance._hostParent ? prevHostInstance : null;
13134
+ }
13135
+
13136
+ function getTopLevelWrapperInContainer(container) {
13137
+ var root = getHostRootInstanceInContainer(container);
13138
+ return root ? root._hostContainerInfo._topLevelWrapper : null;
13139
+ }
13140
+
13141
+ /**
13142
+ * Temporary (?) hack so that we can store all top-level pending updates on
13143
+ * composites instead of having to worry about different types of components
13144
+ * here.
13145
+ */
13146
+ var topLevelRootCounter = 1;
13147
+ var TopLevelWrapper = function () {
13148
+ this.rootID = topLevelRootCounter++;
13149
+ };
13150
+ TopLevelWrapper.prototype.isReactComponent = {};
13151
+ if (process.env.NODE_ENV !== 'production') {
13152
+ TopLevelWrapper.displayName = 'TopLevelWrapper';
13153
+ }
13154
+ TopLevelWrapper.prototype.render = function () {
13155
+ return this.props.child;
13156
+ };
13157
+ TopLevelWrapper.isReactTopLevelWrapper = true;
13158
+
13159
+ /**
13160
+ * Mounting is the process of initializing a React component by creating its
13161
+ * representative DOM elements and inserting them into a supplied `container`.
13162
+ * Any prior content inside `container` is destroyed in the process.
13163
+ *
13164
+ * ReactMount.render(
13165
+ * component,
13166
+ * document.getElementById('container')
13167
+ * );
13168
+ *
13169
+ * <div id="container"> <-- Supplied `container`.
13170
+ * <div data-reactid=".3"> <-- Rendered reactRoot of React
13171
+ * // ... component.
13172
+ * </div>
13173
+ * </div>
13174
+ *
13175
+ * Inside of `container`, the first element rendered is the "reactRoot".
13176
+ */
13177
+ var ReactMount = {
13178
+ TopLevelWrapper: TopLevelWrapper,
13179
+
13180
+ /**
13181
+ * Used by devtools. The keys are not important.
13182
+ */
13183
+ _instancesByReactRootID: instancesByReactRootID,
13184
+
13185
+ /**
13186
+ * This is a hook provided to support rendering React components while
13187
+ * ensuring that the apparent scroll position of its `container` does not
13188
+ * change.
13189
+ *
13190
+ * @param {DOMElement} container The `container` being rendered into.
13191
+ * @param {function} renderCallback This must be called once to do the render.
13192
+ */
13193
+ scrollMonitor: function (container, renderCallback) {
13194
+ renderCallback();
13195
+ },
13196
+
13197
+ /**
13198
+ * Take a component that's already mounted into the DOM and replace its props
13199
+ * @param {ReactComponent} prevComponent component instance already in the DOM
13200
+ * @param {ReactElement} nextElement component instance to render
13201
+ * @param {DOMElement} container container to render into
13202
+ * @param {?function} callback function triggered on completion
13203
+ */
13204
+ _updateRootComponent: function (prevComponent, nextElement, nextContext, container, callback) {
13205
+ ReactMount.scrollMonitor(container, function () {
13206
+ ReactUpdateQueue.enqueueElementInternal(prevComponent, nextElement, nextContext);
13207
+ if (callback) {
13208
+ ReactUpdateQueue.enqueueCallbackInternal(prevComponent, callback);
13209
+ }
13210
+ });
13211
+
13212
+ return prevComponent;
13213
+ },
13214
+
13215
+ /**
13216
+ * Render a new component into the DOM. Hooked by hooks!
13217
+ *
13218
+ * @param {ReactElement} nextElement element to render
13219
+ * @param {DOMElement} container container to render into
13220
+ * @param {boolean} shouldReuseMarkup if we should skip the markup insertion
13221
+ * @return {ReactComponent} nextComponent
13222
+ */
13223
+ _renderNewRootComponent: function (nextElement, container, shouldReuseMarkup, context) {
13224
+ // Various parts of our code (such as ReactCompositeComponent's
13225
+ // _renderValidatedComponent) assume that calls to render aren't nested;
13226
+ // verify that that's the case.
13227
+ process.env.NODE_ENV !== 'production' ? warning(ReactCurrentOwner.current == null, '_renderNewRootComponent(): Render methods should be a pure function ' + 'of props and state; triggering nested component updates from ' + 'render is not allowed. If necessary, trigger nested updates in ' + 'componentDidUpdate. Check the render method of %s.', ReactCurrentOwner.current && ReactCurrentOwner.current.getName() || 'ReactCompositeComponent') : void 0;
13228
+
13229
+ !isValidContainer(container) ? process.env.NODE_ENV !== 'production' ? invariant(false, '_registerComponent(...): Target container is not a DOM element.') : _prodInvariant('37') : void 0;
13230
+
13231
+ ReactBrowserEventEmitter.ensureScrollValueMonitoring();
13232
+ var componentInstance = instantiateReactComponent(nextElement, false);
13233
+
13234
+ // The initial render is synchronous but any updates that happen during
13235
+ // rendering, in componentWillMount or componentDidMount, will be batched
13236
+ // according to the current batching strategy.
13237
+
13238
+ ReactUpdates.batchedUpdates(batchedMountComponentIntoNode, componentInstance, container, shouldReuseMarkup, context);
13239
+
13240
+ var wrapperID = componentInstance._instance.rootID;
13241
+ instancesByReactRootID[wrapperID] = componentInstance;
13242
+
13243
+ return componentInstance;
13244
+ },
13245
+
13246
+ /**
13247
+ * Renders a React component into the DOM in the supplied `container`.
13248
+ *
13249
+ * If the React component was previously rendered into `container`, this will
13250
+ * perform an update on it and only mutate the DOM as necessary to reflect the
13251
+ * latest React component.
13252
+ *
13253
+ * @param {ReactComponent} parentComponent The conceptual parent of this render tree.
13254
+ * @param {ReactElement} nextElement Component element to render.
13255
+ * @param {DOMElement} container DOM element to render into.
13256
+ * @param {?function} callback function triggered on completion
13257
+ * @return {ReactComponent} Component instance rendered in `container`.
13258
+ */
13259
+ renderSubtreeIntoContainer: function (parentComponent, nextElement, container, callback) {
13260
+ !(parentComponent != null && ReactInstanceMap.has(parentComponent)) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'parentComponent must be a valid React Component') : _prodInvariant('38') : void 0;
13261
+ return ReactMount._renderSubtreeIntoContainer(parentComponent, nextElement, container, callback);
13262
+ },
13263
+
13264
+ _renderSubtreeIntoContainer: function (parentComponent, nextElement, container, callback) {
13265
+ ReactUpdateQueue.validateCallback(callback, 'ReactDOM.render');
13266
+ !React.isValidElement(nextElement) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactDOM.render(): Invalid component element.%s', typeof nextElement === 'string' ? " Instead of passing a string like 'div', pass " + "React.createElement('div') or <div />." : typeof nextElement === 'function' ? ' Instead of passing a class like Foo, pass ' + 'React.createElement(Foo) or <Foo />.' : // Check if it quacks like an element
13267
+ nextElement != null && nextElement.props !== undefined ? ' This may be caused by unintentionally loading two independent ' + 'copies of React.' : '') : _prodInvariant('39', typeof nextElement === 'string' ? " Instead of passing a string like 'div', pass " + "React.createElement('div') or <div />." : typeof nextElement === 'function' ? ' Instead of passing a class like Foo, pass ' + 'React.createElement(Foo) or <Foo />.' : nextElement != null && nextElement.props !== undefined ? ' This may be caused by unintentionally loading two independent ' + 'copies of React.' : '') : void 0;
13268
+
13269
+ process.env.NODE_ENV !== 'production' ? warning(!container || !container.tagName || container.tagName.toUpperCase() !== 'BODY', 'render(): Rendering components directly into document.body is ' + 'discouraged, since its children are often manipulated by third-party ' + 'scripts and browser extensions. This may lead to subtle ' + 'reconciliation issues. Try rendering into a container element created ' + 'for your app.') : void 0;
13270
+
13271
+ var nextWrappedElement = React.createElement(TopLevelWrapper, {
13272
+ child: nextElement
13273
+ });
13274
+
13275
+ var nextContext;
13276
+ if (parentComponent) {
13277
+ var parentInst = ReactInstanceMap.get(parentComponent);
13278
+ nextContext = parentInst._processChildContext(parentInst._context);
13279
+ } else {
13280
+ nextContext = emptyObject;
13281
+ }
13282
+
13283
+ var prevComponent = getTopLevelWrapperInContainer(container);
13284
+
13285
+ if (prevComponent) {
13286
+ var prevWrappedElement = prevComponent._currentElement;
13287
+ var prevElement = prevWrappedElement.props.child;
13288
+ if (shouldUpdateReactComponent(prevElement, nextElement)) {
13289
+ var publicInst = prevComponent._renderedComponent.getPublicInstance();
13290
+ var updatedCallback = callback && function () {
13291
+ callback.call(publicInst);
13292
+ };
13293
+ ReactMount._updateRootComponent(prevComponent, nextWrappedElement, nextContext, container, updatedCallback);
13294
+ return publicInst;
13295
+ } else {
13296
+ ReactMount.unmountComponentAtNode(container);
13297
+ }
13298
+ }
13299
+
13300
+ var reactRootElement = getReactRootElementInContainer(container);
13301
+ var containerHasReactMarkup = reactRootElement && !!internalGetID(reactRootElement);
13302
+ var containerHasNonRootReactChild = hasNonRootReactChild(container);
13303
+
13304
+ if (process.env.NODE_ENV !== 'production') {
13305
+ process.env.NODE_ENV !== 'production' ? warning(!containerHasNonRootReactChild, 'render(...): Replacing React-rendered children with a new root ' + 'component. If you intended to update the children of this node, ' + 'you should instead have the existing children update their state ' + 'and render the new components instead of calling ReactDOM.render.') : void 0;
13306
+
13307
+ if (!containerHasReactMarkup || reactRootElement.nextSibling) {
13308
+ var rootElementSibling = reactRootElement;
13309
+ while (rootElementSibling) {
13310
+ if (internalGetID(rootElementSibling)) {
13311
+ process.env.NODE_ENV !== 'production' ? warning(false, 'render(): Target node has markup rendered by React, but there ' + 'are unrelated nodes as well. This is most commonly caused by ' + 'white-space inserted around server-rendered markup.') : void 0;
13312
+ break;
13313
+ }
13314
+ rootElementSibling = rootElementSibling.nextSibling;
13315
+ }
13316
+ }
13317
+ }
13318
+
13319
+ var shouldReuseMarkup = containerHasReactMarkup && !prevComponent && !containerHasNonRootReactChild;
13320
+ var component = ReactMount._renderNewRootComponent(nextWrappedElement, container, shouldReuseMarkup, nextContext)._renderedComponent.getPublicInstance();
13321
+ if (callback) {
13322
+ callback.call(component);
13323
+ }
13324
+ return component;
13325
+ },
13326
+
13327
+ /**
13328
+ * Renders a React component into the DOM in the supplied `container`.
13329
+ * See https://facebook.github.io/react/docs/top-level-api.html#reactdom.render
13330
+ *
13331
+ * If the React component was previously rendered into `container`, this will
13332
+ * perform an update on it and only mutate the DOM as necessary to reflect the
13333
+ * latest React component.
13334
+ *
13335
+ * @param {ReactElement} nextElement Component element to render.
13336
+ * @param {DOMElement} container DOM element to render into.
13337
+ * @param {?function} callback function triggered on completion
13338
+ * @return {ReactComponent} Component instance rendered in `container`.
13339
+ */
13340
+ render: function (nextElement, container, callback) {
13341
+ return ReactMount._renderSubtreeIntoContainer(null, nextElement, container, callback);
13342
+ },
13343
+
13344
+ /**
13345
+ * Unmounts and destroys the React component rendered in the `container`.
13346
+ * See https://facebook.github.io/react/docs/top-level-api.html#reactdom.unmountcomponentatnode
13347
+ *
13348
+ * @param {DOMElement} container DOM element containing a React component.
13349
+ * @return {boolean} True if a component was found in and unmounted from
13350
+ * `container`
13351
+ */
13352
+ unmountComponentAtNode: function (container) {
13353
+ // Various parts of our code (such as ReactCompositeComponent's
13354
+ // _renderValidatedComponent) assume that calls to render aren't nested;
13355
+ // verify that that's the case. (Strictly speaking, unmounting won't cause a
13356
+ // render but we still don't expect to be in a render call here.)
13357
+ process.env.NODE_ENV !== 'production' ? warning(ReactCurrentOwner.current == null, 'unmountComponentAtNode(): Render methods should be a pure function ' + 'of props and state; triggering nested component updates from render ' + 'is not allowed. If necessary, trigger nested updates in ' + 'componentDidUpdate. Check the render method of %s.', ReactCurrentOwner.current && ReactCurrentOwner.current.getName() || 'ReactCompositeComponent') : void 0;
13358
+
13359
+ !isValidContainer(container) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'unmountComponentAtNode(...): Target container is not a DOM element.') : _prodInvariant('40') : void 0;
13360
+
13361
+ if (process.env.NODE_ENV !== 'production') {
13362
+ process.env.NODE_ENV !== 'production' ? warning(!nodeIsRenderedByOtherInstance(container), "unmountComponentAtNode(): The node you're attempting to unmount " + 'was rendered by another copy of React.') : void 0;
13363
+ }
13364
+
13365
+ var prevComponent = getTopLevelWrapperInContainer(container);
13366
+ if (!prevComponent) {
13367
+ // Check if the node being unmounted was rendered by React, but isn't a
13368
+ // root node.
13369
+ var containerHasNonRootReactChild = hasNonRootReactChild(container);
13370
+
13371
+ // Check if the container itself is a React root node.
13372
+ var isContainerReactRoot = container.nodeType === 1 && container.hasAttribute(ROOT_ATTR_NAME);
13373
+
13374
+ if (process.env.NODE_ENV !== 'production') {
13375
+ process.env.NODE_ENV !== 'production' ? warning(!containerHasNonRootReactChild, "unmountComponentAtNode(): The node you're attempting to unmount " + 'was rendered by React and is not a top-level container. %s', isContainerReactRoot ? 'You may have accidentally passed in a React root node instead ' + 'of its container.' : 'Instead, have the parent component update its state and ' + 'rerender in order to remove this component.') : void 0;
13376
+ }
13377
+
13378
+ return false;
13379
+ }
13380
+ delete instancesByReactRootID[prevComponent._instance.rootID];
13381
+ ReactUpdates.batchedUpdates(unmountComponentFromNode, prevComponent, container, false);
13382
+ return true;
13383
+ },
13384
+
13385
+ _mountImageIntoNode: function (markup, container, instance, shouldReuseMarkup, transaction) {
13386
+ !isValidContainer(container) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'mountComponentIntoNode(...): Target container is not valid.') : _prodInvariant('41') : void 0;
13387
+
13388
+ if (shouldReuseMarkup) {
13389
+ var rootElement = getReactRootElementInContainer(container);
13390
+ if (ReactMarkupChecksum.canReuseMarkup(markup, rootElement)) {
13391
+ ReactDOMComponentTree.precacheNode(instance, rootElement);
13392
+ return;
13393
+ } else {
13394
+ var checksum = rootElement.getAttribute(ReactMarkupChecksum.CHECKSUM_ATTR_NAME);
13395
+ rootElement.removeAttribute(ReactMarkupChecksum.CHECKSUM_ATTR_NAME);
13396
+
13397
+ var rootMarkup = rootElement.outerHTML;
13398
+ rootElement.setAttribute(ReactMarkupChecksum.CHECKSUM_ATTR_NAME, checksum);
13399
+
13400
+ var normalizedMarkup = markup;
13401
+ if (process.env.NODE_ENV !== 'production') {
13402
+ // because rootMarkup is retrieved from the DOM, various normalizations
13403
+ // will have occurred which will not be present in `markup`. Here,
13404
+ // insert markup into a <div> or <iframe> depending on the container
13405
+ // type to perform the same normalizations before comparing.
13406
+ var normalizer;
13407
+ if (container.nodeType === ELEMENT_NODE_TYPE) {
13408
+ normalizer = document.createElement('div');
13409
+ normalizer.innerHTML = markup;
13410
+ normalizedMarkup = normalizer.innerHTML;
13411
+ } else {
13412
+ normalizer = document.createElement('iframe');
13413
+ document.body.appendChild(normalizer);
13414
+ normalizer.contentDocument.write(markup);
13415
+ normalizedMarkup = normalizer.contentDocument.documentElement.outerHTML;
13416
+ document.body.removeChild(normalizer);
13417
+ }
13418
+ }
13419
+
13420
+ var diffIndex = firstDifferenceIndex(normalizedMarkup, rootMarkup);
13421
+ var difference = ' (client) ' + normalizedMarkup.substring(diffIndex - 20, diffIndex + 20) + '\n (server) ' + rootMarkup.substring(diffIndex - 20, diffIndex + 20);
13422
+
13423
+ !(container.nodeType !== DOC_NODE_TYPE) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'You\'re trying to render a component to the document using server rendering but the checksum was invalid. This usually means you rendered a different component type or props on the client from the one on the server, or your render() methods are impure. React cannot handle this case due to cross-browser quirks by rendering at the document root. You should look for environment dependent code in your components and ensure the props are the same client and server side:\n%s', difference) : _prodInvariant('42', difference) : void 0;
13424
+
13425
+ if (process.env.NODE_ENV !== 'production') {
13426
+ process.env.NODE_ENV !== 'production' ? warning(false, 'React attempted to reuse markup in a container but the ' + 'checksum was invalid. This generally means that you are ' + 'using server rendering and the markup generated on the ' + 'server was not what the client was expecting. React injected ' + 'new markup to compensate which works but you have lost many ' + 'of the benefits of server rendering. Instead, figure out ' + 'why the markup being generated is different on the client ' + 'or server:\n%s', difference) : void 0;
13427
+ }
13428
+ }
13429
+ }
13430
+
13431
+ !(container.nodeType !== DOC_NODE_TYPE) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'You\'re trying to render a component to the document but you didn\'t use server rendering. We can\'t do this without using server rendering due to cross-browser quirks. See ReactDOMServer.renderToString() for server rendering.') : _prodInvariant('43') : void 0;
13432
+
13433
+ if (transaction.useCreateElement) {
13434
+ while (container.lastChild) {
13435
+ container.removeChild(container.lastChild);
13436
+ }
13437
+ DOMLazyTree.insertTreeBefore(container, markup, null);
13438
+ } else {
13439
+ setInnerHTML(container, markup);
13440
+ ReactDOMComponentTree.precacheNode(instance, container.firstChild);
13441
+ }
13442
+
13443
+ if (process.env.NODE_ENV !== 'production') {
13444
+ var hostNode = ReactDOMComponentTree.getInstanceFromNode(container.firstChild);
13445
+ if (hostNode._debugID !== 0) {
13446
+ ReactInstrumentation.debugTool.onHostOperation({
13447
+ instanceID: hostNode._debugID,
13448
+ type: 'mount',
13449
+ payload: markup.toString()
13450
+ });
13451
+ }
13452
+ }
13453
+ }
13454
+ };
13455
+
13456
+ module.exports = ReactMount;
13457
+ }).call(this)}).call(this,require('_process'))
13458
+ },{"./DOMLazyTree":43,"./DOMProperty":45,"./ReactBrowserEventEmitter":59,"./ReactDOMComponentTree":67,"./ReactDOMContainerInfo":68,"./ReactDOMFeatureFlags":70,"./ReactFeatureFlags":90,"./ReactInstanceMap":95,"./ReactInstrumentation":96,"./ReactMarkupChecksum":98,"./ReactReconciler":106,"./ReactUpdateQueue":110,"./ReactUpdates":111,"./instantiateReactComponent":150,"./reactProdInvariant":154,"./setInnerHTML":156,"./shouldUpdateReactComponent":158,"_process":29,"fbjs/lib/emptyObject":13,"fbjs/lib/invariant":20,"fbjs/lib/warning":27,"react/lib/React":166,"react/lib/ReactCurrentOwner":170}],100:[function(require,module,exports){
13459
+ (function (process){(function (){
13460
+ /**
13461
+ * Copyright (c) 2013-present, Facebook, Inc.
13462
+ *
13463
+ * This source code is licensed under the MIT license found in the
13464
+ * LICENSE file in the root directory of this source tree.
13465
+ *
13466
+ */
13467
+
13468
+ 'use strict';
13469
+
13470
+ var _prodInvariant = require('./reactProdInvariant');
13471
+
13472
+ var ReactComponentEnvironment = require('./ReactComponentEnvironment');
13473
+ var ReactInstanceMap = require('./ReactInstanceMap');
13474
+ var ReactInstrumentation = require('./ReactInstrumentation');
13475
+
13476
+ var ReactCurrentOwner = require('react/lib/ReactCurrentOwner');
13477
+ var ReactReconciler = require('./ReactReconciler');
13478
+ var ReactChildReconciler = require('./ReactChildReconciler');
13479
+
13480
+ var emptyFunction = require('fbjs/lib/emptyFunction');
13481
+ var flattenChildren = require('./flattenChildren');
13482
+ var invariant = require('fbjs/lib/invariant');
13483
+
13484
+ /**
13485
+ * Make an update for markup to be rendered and inserted at a supplied index.
13486
+ *
13487
+ * @param {string} markup Markup that renders into an element.
13488
+ * @param {number} toIndex Destination index.
13489
+ * @private
13490
+ */
13491
+ function makeInsertMarkup(markup, afterNode, toIndex) {
13492
+ // NOTE: Null values reduce hidden classes.
13493
+ return {
13494
+ type: 'INSERT_MARKUP',
13495
+ content: markup,
13496
+ fromIndex: null,
13497
+ fromNode: null,
13498
+ toIndex: toIndex,
13499
+ afterNode: afterNode
13500
+ };
13501
+ }
13502
+
13503
+ /**
13504
+ * Make an update for moving an existing element to another index.
13505
+ *
13506
+ * @param {number} fromIndex Source index of the existing element.
13507
+ * @param {number} toIndex Destination index of the element.
13508
+ * @private
13509
+ */
13510
+ function makeMove(child, afterNode, toIndex) {
13511
+ // NOTE: Null values reduce hidden classes.
13512
+ return {
13513
+ type: 'MOVE_EXISTING',
13514
+ content: null,
13515
+ fromIndex: child._mountIndex,
13516
+ fromNode: ReactReconciler.getHostNode(child),
13517
+ toIndex: toIndex,
13518
+ afterNode: afterNode
13519
+ };
13520
+ }
13521
+
13522
+ /**
13523
+ * Make an update for removing an element at an index.
13524
+ *
13525
+ * @param {number} fromIndex Index of the element to remove.
13526
+ * @private
13527
+ */
13528
+ function makeRemove(child, node) {
13529
+ // NOTE: Null values reduce hidden classes.
13530
+ return {
13531
+ type: 'REMOVE_NODE',
13532
+ content: null,
13533
+ fromIndex: child._mountIndex,
13534
+ fromNode: node,
13535
+ toIndex: null,
13536
+ afterNode: null
13537
+ };
13538
+ }
13539
+
13540
+ /**
13541
+ * Make an update for setting the markup of a node.
13542
+ *
13543
+ * @param {string} markup Markup that renders into an element.
13544
+ * @private
13545
+ */
13546
+ function makeSetMarkup(markup) {
13547
+ // NOTE: Null values reduce hidden classes.
13548
+ return {
13549
+ type: 'SET_MARKUP',
13550
+ content: markup,
13551
+ fromIndex: null,
13552
+ fromNode: null,
13553
+ toIndex: null,
13554
+ afterNode: null
13555
+ };
13556
+ }
13557
+
13558
+ /**
13559
+ * Make an update for setting the text content.
13560
+ *
13561
+ * @param {string} textContent Text content to set.
13562
+ * @private
13563
+ */
13564
+ function makeTextContent(textContent) {
13565
+ // NOTE: Null values reduce hidden classes.
13566
+ return {
13567
+ type: 'TEXT_CONTENT',
13568
+ content: textContent,
13569
+ fromIndex: null,
13570
+ fromNode: null,
13571
+ toIndex: null,
13572
+ afterNode: null
13573
+ };
13574
+ }
13575
+
13576
+ /**
13577
+ * Push an update, if any, onto the queue. Creates a new queue if none is
13578
+ * passed and always returns the queue. Mutative.
13579
+ */
13580
+ function enqueue(queue, update) {
13581
+ if (update) {
13582
+ queue = queue || [];
13583
+ queue.push(update);
13584
+ }
13585
+ return queue;
13586
+ }
13587
+
13588
+ /**
13589
+ * Processes any enqueued updates.
13590
+ *
13591
+ * @private
13592
+ */
13593
+ function processQueue(inst, updateQueue) {
13594
+ ReactComponentEnvironment.processChildrenUpdates(inst, updateQueue);
13595
+ }
13596
+
13597
+ var setChildrenForInstrumentation = emptyFunction;
13598
+ if (process.env.NODE_ENV !== 'production') {
13599
+ var getDebugID = function (inst) {
13600
+ if (!inst._debugID) {
13601
+ // Check for ART-like instances. TODO: This is silly/gross.
13602
+ var internal;
13603
+ if (internal = ReactInstanceMap.get(inst)) {
13604
+ inst = internal;
13605
+ }
13606
+ }
13607
+ return inst._debugID;
13608
+ };
13609
+ setChildrenForInstrumentation = function (children) {
13610
+ var debugID = getDebugID(this);
13611
+ // TODO: React Native empty components are also multichild.
13612
+ // This means they still get into this method but don't have _debugID.
13613
+ if (debugID !== 0) {
13614
+ ReactInstrumentation.debugTool.onSetChildren(debugID, children ? Object.keys(children).map(function (key) {
13615
+ return children[key]._debugID;
13616
+ }) : []);
13617
+ }
13618
+ };
13619
+ }
13620
+
13621
+ /**
13622
+ * ReactMultiChild are capable of reconciling multiple children.
13623
+ *
13624
+ * @class ReactMultiChild
13625
+ * @internal
13626
+ */
13627
+ var ReactMultiChild = {
13628
+ /**
13629
+ * Provides common functionality for components that must reconcile multiple
13630
+ * children. This is used by `ReactDOMComponent` to mount, update, and
13631
+ * unmount child components.
13632
+ *
13633
+ * @lends {ReactMultiChild.prototype}
13634
+ */
13635
+ Mixin: {
13636
+ _reconcilerInstantiateChildren: function (nestedChildren, transaction, context) {
13637
+ if (process.env.NODE_ENV !== 'production') {
13638
+ var selfDebugID = getDebugID(this);
13639
+ if (this._currentElement) {
13640
+ try {
13641
+ ReactCurrentOwner.current = this._currentElement._owner;
13642
+ return ReactChildReconciler.instantiateChildren(nestedChildren, transaction, context, selfDebugID);
13643
+ } finally {
13644
+ ReactCurrentOwner.current = null;
13645
+ }
13646
+ }
13647
+ }
13648
+ return ReactChildReconciler.instantiateChildren(nestedChildren, transaction, context);
13649
+ },
13650
+
13651
+ _reconcilerUpdateChildren: function (prevChildren, nextNestedChildrenElements, mountImages, removedNodes, transaction, context) {
13652
+ var nextChildren;
13653
+ var selfDebugID = 0;
13654
+ if (process.env.NODE_ENV !== 'production') {
13655
+ selfDebugID = getDebugID(this);
13656
+ if (this._currentElement) {
13657
+ try {
13658
+ ReactCurrentOwner.current = this._currentElement._owner;
13659
+ nextChildren = flattenChildren(nextNestedChildrenElements, selfDebugID);
13660
+ } finally {
13661
+ ReactCurrentOwner.current = null;
13662
+ }
13663
+ ReactChildReconciler.updateChildren(prevChildren, nextChildren, mountImages, removedNodes, transaction, this, this._hostContainerInfo, context, selfDebugID);
13664
+ return nextChildren;
13665
+ }
13666
+ }
13667
+ nextChildren = flattenChildren(nextNestedChildrenElements, selfDebugID);
13668
+ ReactChildReconciler.updateChildren(prevChildren, nextChildren, mountImages, removedNodes, transaction, this, this._hostContainerInfo, context, selfDebugID);
13669
+ return nextChildren;
13670
+ },
13671
+
13672
+ /**
13673
+ * Generates a "mount image" for each of the supplied children. In the case
13674
+ * of `ReactDOMComponent`, a mount image is a string of markup.
13675
+ *
13676
+ * @param {?object} nestedChildren Nested child maps.
13677
+ * @return {array} An array of mounted representations.
13678
+ * @internal
13679
+ */
13680
+ mountChildren: function (nestedChildren, transaction, context) {
13681
+ var children = this._reconcilerInstantiateChildren(nestedChildren, transaction, context);
13682
+ this._renderedChildren = children;
13683
+
13684
+ var mountImages = [];
13685
+ var index = 0;
13686
+ for (var name in children) {
13687
+ if (children.hasOwnProperty(name)) {
13688
+ var child = children[name];
13689
+ var selfDebugID = 0;
13690
+ if (process.env.NODE_ENV !== 'production') {
13691
+ selfDebugID = getDebugID(this);
13692
+ }
13693
+ var mountImage = ReactReconciler.mountComponent(child, transaction, this, this._hostContainerInfo, context, selfDebugID);
13694
+ child._mountIndex = index++;
13695
+ mountImages.push(mountImage);
13696
+ }
13697
+ }
13698
+
13699
+ if (process.env.NODE_ENV !== 'production') {
13700
+ setChildrenForInstrumentation.call(this, children);
13701
+ }
13702
+
13703
+ return mountImages;
13704
+ },
13705
+
13706
+ /**
13707
+ * Replaces any rendered children with a text content string.
13708
+ *
13709
+ * @param {string} nextContent String of content.
13710
+ * @internal
13711
+ */
13712
+ updateTextContent: function (nextContent) {
13713
+ var prevChildren = this._renderedChildren;
13714
+ // Remove any rendered children.
13715
+ ReactChildReconciler.unmountChildren(prevChildren, false);
13716
+ for (var name in prevChildren) {
13717
+ if (prevChildren.hasOwnProperty(name)) {
13718
+ !false ? process.env.NODE_ENV !== 'production' ? invariant(false, 'updateTextContent called on non-empty component.') : _prodInvariant('118') : void 0;
13719
+ }
13720
+ }
13721
+ // Set new text content.
13722
+ var updates = [makeTextContent(nextContent)];
13723
+ processQueue(this, updates);
13724
+ },
13725
+
13726
+ /**
13727
+ * Replaces any rendered children with a markup string.
13728
+ *
13729
+ * @param {string} nextMarkup String of markup.
13730
+ * @internal
13731
+ */
13732
+ updateMarkup: function (nextMarkup) {
13733
+ var prevChildren = this._renderedChildren;
13734
+ // Remove any rendered children.
13735
+ ReactChildReconciler.unmountChildren(prevChildren, false);
13736
+ for (var name in prevChildren) {
13737
+ if (prevChildren.hasOwnProperty(name)) {
13738
+ !false ? process.env.NODE_ENV !== 'production' ? invariant(false, 'updateTextContent called on non-empty component.') : _prodInvariant('118') : void 0;
13739
+ }
13740
+ }
13741
+ var updates = [makeSetMarkup(nextMarkup)];
13742
+ processQueue(this, updates);
13743
+ },
13744
+
13745
+ /**
13746
+ * Updates the rendered children with new children.
13747
+ *
13748
+ * @param {?object} nextNestedChildrenElements Nested child element maps.
13749
+ * @param {ReactReconcileTransaction} transaction
13750
+ * @internal
13751
+ */
13752
+ updateChildren: function (nextNestedChildrenElements, transaction, context) {
13753
+ // Hook used by React ART
13754
+ this._updateChildren(nextNestedChildrenElements, transaction, context);
13755
+ },
13756
+
13757
+ /**
13758
+ * @param {?object} nextNestedChildrenElements Nested child element maps.
13759
+ * @param {ReactReconcileTransaction} transaction
13760
+ * @final
13761
+ * @protected
13762
+ */
13763
+ _updateChildren: function (nextNestedChildrenElements, transaction, context) {
13764
+ var prevChildren = this._renderedChildren;
13765
+ var removedNodes = {};
13766
+ var mountImages = [];
13767
+ var nextChildren = this._reconcilerUpdateChildren(prevChildren, nextNestedChildrenElements, mountImages, removedNodes, transaction, context);
13768
+ if (!nextChildren && !prevChildren) {
13769
+ return;
13770
+ }
13771
+ var updates = null;
13772
+ var name;
13773
+ // `nextIndex` will increment for each child in `nextChildren`, but
13774
+ // `lastIndex` will be the last index visited in `prevChildren`.
13775
+ var nextIndex = 0;
13776
+ var lastIndex = 0;
13777
+ // `nextMountIndex` will increment for each newly mounted child.
13778
+ var nextMountIndex = 0;
13779
+ var lastPlacedNode = null;
13780
+ for (name in nextChildren) {
13781
+ if (!nextChildren.hasOwnProperty(name)) {
13782
+ continue;
13783
+ }
13784
+ var prevChild = prevChildren && prevChildren[name];
13785
+ var nextChild = nextChildren[name];
13786
+ if (prevChild === nextChild) {
13787
+ updates = enqueue(updates, this.moveChild(prevChild, lastPlacedNode, nextIndex, lastIndex));
13788
+ lastIndex = Math.max(prevChild._mountIndex, lastIndex);
13789
+ prevChild._mountIndex = nextIndex;
13790
+ } else {
13791
+ if (prevChild) {
13792
+ // Update `lastIndex` before `_mountIndex` gets unset by unmounting.
13793
+ lastIndex = Math.max(prevChild._mountIndex, lastIndex);
13794
+ // The `removedNodes` loop below will actually remove the child.
13795
+ }
13796
+ // The child must be instantiated before it's mounted.
13797
+ updates = enqueue(updates, this._mountChildAtIndex(nextChild, mountImages[nextMountIndex], lastPlacedNode, nextIndex, transaction, context));
13798
+ nextMountIndex++;
13799
+ }
13800
+ nextIndex++;
13801
+ lastPlacedNode = ReactReconciler.getHostNode(nextChild);
13802
+ }
13803
+ // Remove children that are no longer present.
13804
+ for (name in removedNodes) {
13805
+ if (removedNodes.hasOwnProperty(name)) {
13806
+ updates = enqueue(updates, this._unmountChild(prevChildren[name], removedNodes[name]));
13807
+ }
13808
+ }
13809
+ if (updates) {
13810
+ processQueue(this, updates);
13811
+ }
13812
+ this._renderedChildren = nextChildren;
13813
+
13814
+ if (process.env.NODE_ENV !== 'production') {
13815
+ setChildrenForInstrumentation.call(this, nextChildren);
13816
+ }
13817
+ },
13818
+
13819
+ /**
13820
+ * Unmounts all rendered children. This should be used to clean up children
13821
+ * when this component is unmounted. It does not actually perform any
13822
+ * backend operations.
13823
+ *
13824
+ * @internal
13825
+ */
13826
+ unmountChildren: function (safely) {
13827
+ var renderedChildren = this._renderedChildren;
13828
+ ReactChildReconciler.unmountChildren(renderedChildren, safely);
13829
+ this._renderedChildren = null;
13830
+ },
13831
+
13832
+ /**
13833
+ * Moves a child component to the supplied index.
13834
+ *
13835
+ * @param {ReactComponent} child Component to move.
13836
+ * @param {number} toIndex Destination index of the element.
13837
+ * @param {number} lastIndex Last index visited of the siblings of `child`.
13838
+ * @protected
13839
+ */
13840
+ moveChild: function (child, afterNode, toIndex, lastIndex) {
13841
+ // If the index of `child` is less than `lastIndex`, then it needs to
13842
+ // be moved. Otherwise, we do not need to move it because a child will be
13843
+ // inserted or moved before `child`.
13844
+ if (child._mountIndex < lastIndex) {
13845
+ return makeMove(child, afterNode, toIndex);
13846
+ }
13847
+ },
13848
+
13849
+ /**
13850
+ * Creates a child component.
13851
+ *
13852
+ * @param {ReactComponent} child Component to create.
13853
+ * @param {string} mountImage Markup to insert.
13854
+ * @protected
13855
+ */
13856
+ createChild: function (child, afterNode, mountImage) {
13857
+ return makeInsertMarkup(mountImage, afterNode, child._mountIndex);
13858
+ },
13859
+
13860
+ /**
13861
+ * Removes a child component.
13862
+ *
13863
+ * @param {ReactComponent} child Child to remove.
13864
+ * @protected
13865
+ */
13866
+ removeChild: function (child, node) {
13867
+ return makeRemove(child, node);
13868
+ },
13869
+
13870
+ /**
13871
+ * Mounts a child with the supplied name.
13872
+ *
13873
+ * NOTE: This is part of `updateChildren` and is here for readability.
13874
+ *
13875
+ * @param {ReactComponent} child Component to mount.
13876
+ * @param {string} name Name of the child.
13877
+ * @param {number} index Index at which to insert the child.
13878
+ * @param {ReactReconcileTransaction} transaction
13879
+ * @private
13880
+ */
13881
+ _mountChildAtIndex: function (child, mountImage, afterNode, index, transaction, context) {
13882
+ child._mountIndex = index;
13883
+ return this.createChild(child, afterNode, mountImage);
13884
+ },
13885
+
13886
+ /**
13887
+ * Unmounts a rendered child.
13888
+ *
13889
+ * NOTE: This is part of `updateChildren` and is here for readability.
13890
+ *
13891
+ * @param {ReactComponent} child Component to unmount.
13892
+ * @private
13893
+ */
13894
+ _unmountChild: function (child, node) {
13895
+ var update = this.removeChild(child, node);
13896
+ child._mountIndex = null;
13897
+ return update;
13898
+ }
13899
+ }
13900
+ };
13901
+
13902
+ module.exports = ReactMultiChild;
13903
+ }).call(this)}).call(this,require('_process'))
13904
+ },{"./ReactChildReconciler":60,"./ReactComponentEnvironment":62,"./ReactInstanceMap":95,"./ReactInstrumentation":96,"./ReactReconciler":106,"./flattenChildren":138,"./reactProdInvariant":154,"_process":29,"fbjs/lib/emptyFunction":12,"fbjs/lib/invariant":20,"react/lib/ReactCurrentOwner":170}],101:[function(require,module,exports){
13905
+ (function (process){(function (){
13906
+ /**
13907
+ * Copyright (c) 2013-present, Facebook, Inc.
13908
+ *
13909
+ * This source code is licensed under the MIT license found in the
13910
+ * LICENSE file in the root directory of this source tree.
13911
+ *
13912
+ *
13913
+ */
13914
+
13915
+ 'use strict';
13916
+
13917
+ var _prodInvariant = require('./reactProdInvariant');
13918
+
13919
+ var React = require('react/lib/React');
13920
+
13921
+ var invariant = require('fbjs/lib/invariant');
13922
+
13923
+ var ReactNodeTypes = {
13924
+ HOST: 0,
13925
+ COMPOSITE: 1,
13926
+ EMPTY: 2,
13927
+
13928
+ getType: function (node) {
13929
+ if (node === null || node === false) {
13930
+ return ReactNodeTypes.EMPTY;
13931
+ } else if (React.isValidElement(node)) {
13932
+ if (typeof node.type === 'function') {
13933
+ return ReactNodeTypes.COMPOSITE;
13934
+ } else {
13935
+ return ReactNodeTypes.HOST;
13936
+ }
13937
+ }
13938
+ !false ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Unexpected node: %s', node) : _prodInvariant('26', node) : void 0;
13939
+ }
13940
+ };
13941
+
13942
+ module.exports = ReactNodeTypes;
13943
+ }).call(this)}).call(this,require('_process'))
13944
+ },{"./reactProdInvariant":154,"_process":29,"fbjs/lib/invariant":20,"react/lib/React":166}],102:[function(require,module,exports){
13945
+ (function (process){(function (){
13946
+ /**
13947
+ * Copyright (c) 2013-present, Facebook, Inc.
13948
+ *
13949
+ * This source code is licensed under the MIT license found in the
13950
+ * LICENSE file in the root directory of this source tree.
13951
+ *
13952
+ *
13953
+ */
13954
+
13955
+ 'use strict';
13956
+
13957
+ var _prodInvariant = require('./reactProdInvariant');
13958
+
13959
+ var invariant = require('fbjs/lib/invariant');
13960
+
13961
+ /**
13962
+ * @param {?object} object
13963
+ * @return {boolean} True if `object` is a valid owner.
13964
+ * @final
13965
+ */
13966
+ function isValidOwner(object) {
13967
+ return !!(object && typeof object.attachRef === 'function' && typeof object.detachRef === 'function');
13968
+ }
13969
+
13970
+ /**
13971
+ * ReactOwners are capable of storing references to owned components.
13972
+ *
13973
+ * All components are capable of //being// referenced by owner components, but
13974
+ * only ReactOwner components are capable of //referencing// owned components.
13975
+ * The named reference is known as a "ref".
13976
+ *
13977
+ * Refs are available when mounted and updated during reconciliation.
13978
+ *
13979
+ * var MyComponent = React.createClass({
13980
+ * render: function() {
13981
+ * return (
13982
+ * <div onClick={this.handleClick}>
13983
+ * <CustomComponent ref="custom" />
13984
+ * </div>
13985
+ * );
13986
+ * },
13987
+ * handleClick: function() {
13988
+ * this.refs.custom.handleClick();
13989
+ * },
13990
+ * componentDidMount: function() {
13991
+ * this.refs.custom.initialize();
13992
+ * }
13993
+ * });
13994
+ *
13995
+ * Refs should rarely be used. When refs are used, they should only be done to
13996
+ * control data that is not handled by React's data flow.
13997
+ *
13998
+ * @class ReactOwner
13999
+ */
14000
+ var ReactOwner = {
14001
+ /**
14002
+ * Adds a component by ref to an owner component.
14003
+ *
14004
+ * @param {ReactComponent} component Component to reference.
14005
+ * @param {string} ref Name by which to refer to the component.
14006
+ * @param {ReactOwner} owner Component on which to record the ref.
14007
+ * @final
14008
+ * @internal
14009
+ */
14010
+ addComponentAsRefTo: function (component, ref, owner) {
14011
+ !isValidOwner(owner) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'addComponentAsRefTo(...): Only a ReactOwner can have refs. You might be adding a ref to a component that was not created inside a component\'s `render` method, or you have multiple copies of React loaded (details: https://fb.me/react-refs-must-have-owner).') : _prodInvariant('119') : void 0;
14012
+ owner.attachRef(ref, component);
14013
+ },
14014
+
14015
+ /**
14016
+ * Removes a component by ref from an owner component.
14017
+ *
14018
+ * @param {ReactComponent} component Component to dereference.
14019
+ * @param {string} ref Name of the ref to remove.
14020
+ * @param {ReactOwner} owner Component on which the ref is recorded.
14021
+ * @final
14022
+ * @internal
14023
+ */
14024
+ removeComponentAsRefFrom: function (component, ref, owner) {
14025
+ !isValidOwner(owner) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'removeComponentAsRefFrom(...): Only a ReactOwner can have refs. You might be removing a ref to a component that was not created inside a component\'s `render` method, or you have multiple copies of React loaded (details: https://fb.me/react-refs-must-have-owner).') : _prodInvariant('120') : void 0;
14026
+ var ownerPublicInstance = owner.getPublicInstance();
14027
+ // Check that `component`'s owner is still alive and that `component` is still the current ref
14028
+ // because we do not want to detach the ref if another component stole it.
14029
+ if (ownerPublicInstance && ownerPublicInstance.refs[ref] === component.getPublicInstance()) {
14030
+ owner.detachRef(ref);
14031
+ }
14032
+ }
14033
+ };
14034
+
14035
+ module.exports = ReactOwner;
14036
+ }).call(this)}).call(this,require('_process'))
14037
+ },{"./reactProdInvariant":154,"_process":29,"fbjs/lib/invariant":20}],103:[function(require,module,exports){
14038
+ (function (process){(function (){
14039
+ /**
14040
+ * Copyright (c) 2013-present, Facebook, Inc.
14041
+ *
14042
+ * This source code is licensed under the MIT license found in the
14043
+ * LICENSE file in the root directory of this source tree.
14044
+ *
14045
+ *
14046
+ */
14047
+
14048
+ 'use strict';
14049
+
14050
+ var ReactPropTypeLocationNames = {};
14051
+
14052
+ if (process.env.NODE_ENV !== 'production') {
14053
+ ReactPropTypeLocationNames = {
14054
+ prop: 'prop',
14055
+ context: 'context',
14056
+ childContext: 'child context'
14057
+ };
14058
+ }
14059
+
14060
+ module.exports = ReactPropTypeLocationNames;
14061
+ }).call(this)}).call(this,require('_process'))
14062
+ },{"_process":29}],104:[function(require,module,exports){
14063
+ /**
14064
+ * Copyright (c) 2013-present, Facebook, Inc.
14065
+ *
14066
+ * This source code is licensed under the MIT license found in the
14067
+ * LICENSE file in the root directory of this source tree.
14068
+ *
14069
+ *
14070
+ */
14071
+
14072
+ 'use strict';
14073
+
14074
+ var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
14075
+
14076
+ module.exports = ReactPropTypesSecret;
14077
+ },{}],105:[function(require,module,exports){
14078
+ (function (process){(function (){
14079
+ /**
14080
+ * Copyright (c) 2013-present, Facebook, Inc.
14081
+ *
14082
+ * This source code is licensed under the MIT license found in the
14083
+ * LICENSE file in the root directory of this source tree.
14084
+ *
14085
+ */
14086
+
14087
+ 'use strict';
14088
+
14089
+ var _assign = require('object-assign');
14090
+
14091
+ var CallbackQueue = require('./CallbackQueue');
14092
+ var PooledClass = require('./PooledClass');
14093
+ var ReactBrowserEventEmitter = require('./ReactBrowserEventEmitter');
14094
+ var ReactInputSelection = require('./ReactInputSelection');
14095
+ var ReactInstrumentation = require('./ReactInstrumentation');
14096
+ var Transaction = require('./Transaction');
14097
+ var ReactUpdateQueue = require('./ReactUpdateQueue');
14098
+
14099
+ /**
14100
+ * Ensures that, when possible, the selection range (currently selected text
14101
+ * input) is not disturbed by performing the transaction.
14102
+ */
14103
+ var SELECTION_RESTORATION = {
14104
+ /**
14105
+ * @return {Selection} Selection information.
14106
+ */
14107
+ initialize: ReactInputSelection.getSelectionInformation,
14108
+ /**
14109
+ * @param {Selection} sel Selection information returned from `initialize`.
14110
+ */
14111
+ close: ReactInputSelection.restoreSelection
14112
+ };
14113
+
14114
+ /**
14115
+ * Suppresses events (blur/focus) that could be inadvertently dispatched due to
14116
+ * high level DOM manipulations (like temporarily removing a text input from the
14117
+ * DOM).
14118
+ */
14119
+ var EVENT_SUPPRESSION = {
14120
+ /**
14121
+ * @return {boolean} The enabled status of `ReactBrowserEventEmitter` before
14122
+ * the reconciliation.
14123
+ */
14124
+ initialize: function () {
14125
+ var currentlyEnabled = ReactBrowserEventEmitter.isEnabled();
14126
+ ReactBrowserEventEmitter.setEnabled(false);
14127
+ return currentlyEnabled;
14128
+ },
14129
+
14130
+ /**
14131
+ * @param {boolean} previouslyEnabled Enabled status of
14132
+ * `ReactBrowserEventEmitter` before the reconciliation occurred. `close`
14133
+ * restores the previous value.
14134
+ */
14135
+ close: function (previouslyEnabled) {
14136
+ ReactBrowserEventEmitter.setEnabled(previouslyEnabled);
14137
+ }
14138
+ };
14139
+
14140
+ /**
14141
+ * Provides a queue for collecting `componentDidMount` and
14142
+ * `componentDidUpdate` callbacks during the transaction.
14143
+ */
14144
+ var ON_DOM_READY_QUEUEING = {
14145
+ /**
14146
+ * Initializes the internal `onDOMReady` queue.
14147
+ */
14148
+ initialize: function () {
14149
+ this.reactMountReady.reset();
14150
+ },
14151
+
14152
+ /**
14153
+ * After DOM is flushed, invoke all registered `onDOMReady` callbacks.
14154
+ */
14155
+ close: function () {
14156
+ this.reactMountReady.notifyAll();
14157
+ }
14158
+ };
14159
+
14160
+ /**
14161
+ * Executed within the scope of the `Transaction` instance. Consider these as
14162
+ * being member methods, but with an implied ordering while being isolated from
14163
+ * each other.
14164
+ */
14165
+ var TRANSACTION_WRAPPERS = [SELECTION_RESTORATION, EVENT_SUPPRESSION, ON_DOM_READY_QUEUEING];
14166
+
14167
+ if (process.env.NODE_ENV !== 'production') {
14168
+ TRANSACTION_WRAPPERS.push({
14169
+ initialize: ReactInstrumentation.debugTool.onBeginFlush,
14170
+ close: ReactInstrumentation.debugTool.onEndFlush
14171
+ });
14172
+ }
14173
+
14174
+ /**
14175
+ * Currently:
14176
+ * - The order that these are listed in the transaction is critical:
14177
+ * - Suppresses events.
14178
+ * - Restores selection range.
14179
+ *
14180
+ * Future:
14181
+ * - Restore document/overflow scroll positions that were unintentionally
14182
+ * modified via DOM insertions above the top viewport boundary.
14183
+ * - Implement/integrate with customized constraint based layout system and keep
14184
+ * track of which dimensions must be remeasured.
14185
+ *
14186
+ * @class ReactReconcileTransaction
14187
+ */
14188
+ function ReactReconcileTransaction(useCreateElement) {
14189
+ this.reinitializeTransaction();
14190
+ // Only server-side rendering really needs this option (see
14191
+ // `ReactServerRendering`), but server-side uses
14192
+ // `ReactServerRenderingTransaction` instead. This option is here so that it's
14193
+ // accessible and defaults to false when `ReactDOMComponent` and
14194
+ // `ReactDOMTextComponent` checks it in `mountComponent`.`
14195
+ this.renderToStaticMarkup = false;
14196
+ this.reactMountReady = CallbackQueue.getPooled(null);
14197
+ this.useCreateElement = useCreateElement;
14198
+ }
14199
+
14200
+ var Mixin = {
14201
+ /**
14202
+ * @see Transaction
14203
+ * @abstract
14204
+ * @final
14205
+ * @return {array<object>} List of operation wrap procedures.
14206
+ * TODO: convert to array<TransactionWrapper>
14207
+ */
14208
+ getTransactionWrappers: function () {
14209
+ return TRANSACTION_WRAPPERS;
14210
+ },
14211
+
14212
+ /**
14213
+ * @return {object} The queue to collect `onDOMReady` callbacks with.
14214
+ */
14215
+ getReactMountReady: function () {
14216
+ return this.reactMountReady;
14217
+ },
14218
+
14219
+ /**
14220
+ * @return {object} The queue to collect React async events.
14221
+ */
14222
+ getUpdateQueue: function () {
14223
+ return ReactUpdateQueue;
14224
+ },
14225
+
14226
+ /**
14227
+ * Save current transaction state -- if the return value from this method is
14228
+ * passed to `rollback`, the transaction will be reset to that state.
14229
+ */
14230
+ checkpoint: function () {
14231
+ // reactMountReady is the our only stateful wrapper
14232
+ return this.reactMountReady.checkpoint();
14233
+ },
14234
+
14235
+ rollback: function (checkpoint) {
14236
+ this.reactMountReady.rollback(checkpoint);
14237
+ },
14238
+
14239
+ /**
14240
+ * `PooledClass` looks for this, and will invoke this before allowing this
14241
+ * instance to be reused.
14242
+ */
14243
+ destructor: function () {
14244
+ CallbackQueue.release(this.reactMountReady);
14245
+ this.reactMountReady = null;
14246
+ }
14247
+ };
14248
+
14249
+ _assign(ReactReconcileTransaction.prototype, Transaction, Mixin);
14250
+
14251
+ PooledClass.addPoolingTo(ReactReconcileTransaction);
14252
+
14253
+ module.exports = ReactReconcileTransaction;
14254
+ }).call(this)}).call(this,require('_process'))
14255
+ },{"./CallbackQueue":40,"./PooledClass":58,"./ReactBrowserEventEmitter":59,"./ReactInputSelection":94,"./ReactInstrumentation":96,"./ReactUpdateQueue":110,"./Transaction":129,"_process":29,"object-assign":28}],106:[function(require,module,exports){
14256
+ (function (process){(function (){
14257
+ /**
14258
+ * Copyright (c) 2013-present, Facebook, Inc.
14259
+ *
14260
+ * This source code is licensed under the MIT license found in the
14261
+ * LICENSE file in the root directory of this source tree.
14262
+ *
14263
+ */
14264
+
14265
+ 'use strict';
14266
+
14267
+ var ReactRef = require('./ReactRef');
14268
+ var ReactInstrumentation = require('./ReactInstrumentation');
14269
+
14270
+ var warning = require('fbjs/lib/warning');
14271
+
14272
+ /**
14273
+ * Helper to call ReactRef.attachRefs with this composite component, split out
14274
+ * to avoid allocations in the transaction mount-ready queue.
14275
+ */
14276
+ function attachRefs() {
14277
+ ReactRef.attachRefs(this, this._currentElement);
14278
+ }
14279
+
14280
+ var ReactReconciler = {
14281
+ /**
14282
+ * Initializes the component, renders markup, and registers event listeners.
14283
+ *
14284
+ * @param {ReactComponent} internalInstance
14285
+ * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction
14286
+ * @param {?object} the containing host component instance
14287
+ * @param {?object} info about the host container
14288
+ * @return {?string} Rendered markup to be inserted into the DOM.
14289
+ * @final
14290
+ * @internal
14291
+ */
14292
+ mountComponent: function (internalInstance, transaction, hostParent, hostContainerInfo, context, parentDebugID) // 0 in production and for roots
14293
+ {
14294
+ if (process.env.NODE_ENV !== 'production') {
14295
+ if (internalInstance._debugID !== 0) {
14296
+ ReactInstrumentation.debugTool.onBeforeMountComponent(internalInstance._debugID, internalInstance._currentElement, parentDebugID);
14297
+ }
14298
+ }
14299
+ var markup = internalInstance.mountComponent(transaction, hostParent, hostContainerInfo, context, parentDebugID);
14300
+ if (internalInstance._currentElement && internalInstance._currentElement.ref != null) {
14301
+ transaction.getReactMountReady().enqueue(attachRefs, internalInstance);
14302
+ }
14303
+ if (process.env.NODE_ENV !== 'production') {
14304
+ if (internalInstance._debugID !== 0) {
14305
+ ReactInstrumentation.debugTool.onMountComponent(internalInstance._debugID);
14306
+ }
14307
+ }
14308
+ return markup;
14309
+ },
14310
+
14311
+ /**
14312
+ * Returns a value that can be passed to
14313
+ * ReactComponentEnvironment.replaceNodeWithMarkup.
14314
+ */
14315
+ getHostNode: function (internalInstance) {
14316
+ return internalInstance.getHostNode();
14317
+ },
14318
+
14319
+ /**
14320
+ * Releases any resources allocated by `mountComponent`.
14321
+ *
14322
+ * @final
14323
+ * @internal
14324
+ */
14325
+ unmountComponent: function (internalInstance, safely) {
14326
+ if (process.env.NODE_ENV !== 'production') {
14327
+ if (internalInstance._debugID !== 0) {
14328
+ ReactInstrumentation.debugTool.onBeforeUnmountComponent(internalInstance._debugID);
14329
+ }
14330
+ }
14331
+ ReactRef.detachRefs(internalInstance, internalInstance._currentElement);
14332
+ internalInstance.unmountComponent(safely);
14333
+ if (process.env.NODE_ENV !== 'production') {
14334
+ if (internalInstance._debugID !== 0) {
14335
+ ReactInstrumentation.debugTool.onUnmountComponent(internalInstance._debugID);
14336
+ }
14337
+ }
14338
+ },
14339
+
14340
+ /**
14341
+ * Update a component using a new element.
14342
+ *
14343
+ * @param {ReactComponent} internalInstance
14344
+ * @param {ReactElement} nextElement
14345
+ * @param {ReactReconcileTransaction} transaction
14346
+ * @param {object} context
14347
+ * @internal
14348
+ */
14349
+ receiveComponent: function (internalInstance, nextElement, transaction, context) {
14350
+ var prevElement = internalInstance._currentElement;
14351
+
14352
+ if (nextElement === prevElement && context === internalInstance._context) {
14353
+ // Since elements are immutable after the owner is rendered,
14354
+ // we can do a cheap identity compare here to determine if this is a
14355
+ // superfluous reconcile. It's possible for state to be mutable but such
14356
+ // change should trigger an update of the owner which would recreate
14357
+ // the element. We explicitly check for the existence of an owner since
14358
+ // it's possible for an element created outside a composite to be
14359
+ // deeply mutated and reused.
14360
+
14361
+ // TODO: Bailing out early is just a perf optimization right?
14362
+ // TODO: Removing the return statement should affect correctness?
14363
+ return;
14364
+ }
14365
+
14366
+ if (process.env.NODE_ENV !== 'production') {
14367
+ if (internalInstance._debugID !== 0) {
14368
+ ReactInstrumentation.debugTool.onBeforeUpdateComponent(internalInstance._debugID, nextElement);
14369
+ }
14370
+ }
14371
+
14372
+ var refsChanged = ReactRef.shouldUpdateRefs(prevElement, nextElement);
14373
+
14374
+ if (refsChanged) {
14375
+ ReactRef.detachRefs(internalInstance, prevElement);
14376
+ }
14377
+
14378
+ internalInstance.receiveComponent(nextElement, transaction, context);
14379
+
14380
+ if (refsChanged && internalInstance._currentElement && internalInstance._currentElement.ref != null) {
14381
+ transaction.getReactMountReady().enqueue(attachRefs, internalInstance);
14382
+ }
14383
+
14384
+ if (process.env.NODE_ENV !== 'production') {
14385
+ if (internalInstance._debugID !== 0) {
14386
+ ReactInstrumentation.debugTool.onUpdateComponent(internalInstance._debugID);
14387
+ }
14388
+ }
14389
+ },
14390
+
14391
+ /**
14392
+ * Flush any dirty changes in a component.
14393
+ *
14394
+ * @param {ReactComponent} internalInstance
14395
+ * @param {ReactReconcileTransaction} transaction
14396
+ * @internal
14397
+ */
14398
+ performUpdateIfNecessary: function (internalInstance, transaction, updateBatchNumber) {
14399
+ if (internalInstance._updateBatchNumber !== updateBatchNumber) {
14400
+ // The component's enqueued batch number should always be the current
14401
+ // batch or the following one.
14402
+ process.env.NODE_ENV !== 'production' ? warning(internalInstance._updateBatchNumber == null || internalInstance._updateBatchNumber === updateBatchNumber + 1, 'performUpdateIfNecessary: Unexpected batch number (current %s, ' + 'pending %s)', updateBatchNumber, internalInstance._updateBatchNumber) : void 0;
14403
+ return;
14404
+ }
14405
+ if (process.env.NODE_ENV !== 'production') {
14406
+ if (internalInstance._debugID !== 0) {
14407
+ ReactInstrumentation.debugTool.onBeforeUpdateComponent(internalInstance._debugID, internalInstance._currentElement);
14408
+ }
14409
+ }
14410
+ internalInstance.performUpdateIfNecessary(transaction);
14411
+ if (process.env.NODE_ENV !== 'production') {
14412
+ if (internalInstance._debugID !== 0) {
14413
+ ReactInstrumentation.debugTool.onUpdateComponent(internalInstance._debugID);
14414
+ }
14415
+ }
14416
+ }
14417
+ };
14418
+
14419
+ module.exports = ReactReconciler;
14420
+ }).call(this)}).call(this,require('_process'))
14421
+ },{"./ReactInstrumentation":96,"./ReactRef":107,"_process":29,"fbjs/lib/warning":27}],107:[function(require,module,exports){
14422
+ /**
14423
+ * Copyright (c) 2013-present, Facebook, Inc.
14424
+ *
14425
+ * This source code is licensed under the MIT license found in the
14426
+ * LICENSE file in the root directory of this source tree.
14427
+ *
14428
+ *
14429
+ */
14430
+
14431
+ 'use strict';
14432
+
14433
+ var ReactOwner = require('./ReactOwner');
14434
+
14435
+ var ReactRef = {};
14436
+
14437
+ function attachRef(ref, component, owner) {
14438
+ if (typeof ref === 'function') {
14439
+ ref(component.getPublicInstance());
14440
+ } else {
14441
+ // Legacy ref
14442
+ ReactOwner.addComponentAsRefTo(component, ref, owner);
14443
+ }
14444
+ }
14445
+
14446
+ function detachRef(ref, component, owner) {
14447
+ if (typeof ref === 'function') {
14448
+ ref(null);
14449
+ } else {
14450
+ // Legacy ref
14451
+ ReactOwner.removeComponentAsRefFrom(component, ref, owner);
14452
+ }
14453
+ }
14454
+
14455
+ ReactRef.attachRefs = function (instance, element) {
14456
+ if (element === null || typeof element !== 'object') {
14457
+ return;
14458
+ }
14459
+ var ref = element.ref;
14460
+ if (ref != null) {
14461
+ attachRef(ref, instance, element._owner);
14462
+ }
14463
+ };
14464
+
14465
+ ReactRef.shouldUpdateRefs = function (prevElement, nextElement) {
14466
+ // If either the owner or a `ref` has changed, make sure the newest owner
14467
+ // has stored a reference to `this`, and the previous owner (if different)
14468
+ // has forgotten the reference to `this`. We use the element instead
14469
+ // of the public this.props because the post processing cannot determine
14470
+ // a ref. The ref conceptually lives on the element.
14471
+
14472
+ // TODO: Should this even be possible? The owner cannot change because
14473
+ // it's forbidden by shouldUpdateReactComponent. The ref can change
14474
+ // if you swap the keys of but not the refs. Reconsider where this check
14475
+ // is made. It probably belongs where the key checking and
14476
+ // instantiateReactComponent is done.
14477
+
14478
+ var prevRef = null;
14479
+ var prevOwner = null;
14480
+ if (prevElement !== null && typeof prevElement === 'object') {
14481
+ prevRef = prevElement.ref;
14482
+ prevOwner = prevElement._owner;
14483
+ }
14484
+
14485
+ var nextRef = null;
14486
+ var nextOwner = null;
14487
+ if (nextElement !== null && typeof nextElement === 'object') {
14488
+ nextRef = nextElement.ref;
14489
+ nextOwner = nextElement._owner;
14490
+ }
14491
+
14492
+ return prevRef !== nextRef ||
14493
+ // If owner changes but we have an unchanged function ref, don't update refs
14494
+ typeof nextRef === 'string' && nextOwner !== prevOwner;
14495
+ };
14496
+
14497
+ ReactRef.detachRefs = function (instance, element) {
14498
+ if (element === null || typeof element !== 'object') {
14499
+ return;
14500
+ }
14501
+ var ref = element.ref;
14502
+ if (ref != null) {
14503
+ detachRef(ref, instance, element._owner);
14504
+ }
14505
+ };
14506
+
14507
+ module.exports = ReactRef;
14508
+ },{"./ReactOwner":102}],108:[function(require,module,exports){
14509
+ (function (process){(function (){
14510
+ /**
14511
+ * Copyright (c) 2014-present, Facebook, Inc.
14512
+ *
14513
+ * This source code is licensed under the MIT license found in the
14514
+ * LICENSE file in the root directory of this source tree.
14515
+ *
14516
+ */
14517
+
14518
+ 'use strict';
14519
+
14520
+ var _assign = require('object-assign');
14521
+
14522
+ var PooledClass = require('./PooledClass');
14523
+ var Transaction = require('./Transaction');
14524
+ var ReactInstrumentation = require('./ReactInstrumentation');
14525
+ var ReactServerUpdateQueue = require('./ReactServerUpdateQueue');
14526
+
14527
+ /**
14528
+ * Executed within the scope of the `Transaction` instance. Consider these as
14529
+ * being member methods, but with an implied ordering while being isolated from
14530
+ * each other.
14531
+ */
14532
+ var TRANSACTION_WRAPPERS = [];
14533
+
14534
+ if (process.env.NODE_ENV !== 'production') {
14535
+ TRANSACTION_WRAPPERS.push({
14536
+ initialize: ReactInstrumentation.debugTool.onBeginFlush,
14537
+ close: ReactInstrumentation.debugTool.onEndFlush
14538
+ });
14539
+ }
14540
+
14541
+ var noopCallbackQueue = {
14542
+ enqueue: function () {}
14543
+ };
14544
+
14545
+ /**
14546
+ * @class ReactServerRenderingTransaction
14547
+ * @param {boolean} renderToStaticMarkup
14548
+ */
14549
+ function ReactServerRenderingTransaction(renderToStaticMarkup) {
14550
+ this.reinitializeTransaction();
14551
+ this.renderToStaticMarkup = renderToStaticMarkup;
14552
+ this.useCreateElement = false;
14553
+ this.updateQueue = new ReactServerUpdateQueue(this);
14554
+ }
14555
+
14556
+ var Mixin = {
14557
+ /**
14558
+ * @see Transaction
14559
+ * @abstract
14560
+ * @final
14561
+ * @return {array} Empty list of operation wrap procedures.
14562
+ */
14563
+ getTransactionWrappers: function () {
14564
+ return TRANSACTION_WRAPPERS;
14565
+ },
14566
+
14567
+ /**
14568
+ * @return {object} The queue to collect `onDOMReady` callbacks with.
14569
+ */
14570
+ getReactMountReady: function () {
14571
+ return noopCallbackQueue;
14572
+ },
14573
+
14574
+ /**
14575
+ * @return {object} The queue to collect React async events.
14576
+ */
14577
+ getUpdateQueue: function () {
14578
+ return this.updateQueue;
14579
+ },
14580
+
14581
+ /**
14582
+ * `PooledClass` looks for this, and will invoke this before allowing this
14583
+ * instance to be reused.
14584
+ */
14585
+ destructor: function () {},
14586
+
14587
+ checkpoint: function () {},
14588
+
14589
+ rollback: function () {}
14590
+ };
14591
+
14592
+ _assign(ReactServerRenderingTransaction.prototype, Transaction, Mixin);
14593
+
14594
+ PooledClass.addPoolingTo(ReactServerRenderingTransaction);
14595
+
14596
+ module.exports = ReactServerRenderingTransaction;
14597
+ }).call(this)}).call(this,require('_process'))
14598
+ },{"./PooledClass":58,"./ReactInstrumentation":96,"./ReactServerUpdateQueue":109,"./Transaction":129,"_process":29,"object-assign":28}],109:[function(require,module,exports){
14599
+ (function (process){(function (){
14600
+ /**
14601
+ * Copyright (c) 2015-present, Facebook, Inc.
14602
+ *
14603
+ * This source code is licensed under the MIT license found in the
14604
+ * LICENSE file in the root directory of this source tree.
14605
+ *
14606
+ *
14607
+ */
14608
+
14609
+ 'use strict';
14610
+
14611
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
14612
+
14613
+ var ReactUpdateQueue = require('./ReactUpdateQueue');
14614
+
14615
+ var warning = require('fbjs/lib/warning');
14616
+
14617
+ function warnNoop(publicInstance, callerName) {
14618
+ if (process.env.NODE_ENV !== 'production') {
14619
+ var constructor = publicInstance.constructor;
14620
+ process.env.NODE_ENV !== 'production' ? warning(false, '%s(...): Can only update a mounting component. ' + 'This usually means you called %s() outside componentWillMount() on the server. ' + 'This is a no-op. Please check the code for the %s component.', callerName, callerName, constructor && (constructor.displayName || constructor.name) || 'ReactClass') : void 0;
14621
+ }
14622
+ }
14623
+
14624
+ /**
14625
+ * This is the update queue used for server rendering.
14626
+ * It delegates to ReactUpdateQueue while server rendering is in progress and
14627
+ * switches to ReactNoopUpdateQueue after the transaction has completed.
14628
+ * @class ReactServerUpdateQueue
14629
+ * @param {Transaction} transaction
14630
+ */
14631
+
14632
+ var ReactServerUpdateQueue = function () {
14633
+ function ReactServerUpdateQueue(transaction) {
14634
+ _classCallCheck(this, ReactServerUpdateQueue);
14635
+
14636
+ this.transaction = transaction;
14637
+ }
14638
+
14639
+ /**
14640
+ * Checks whether or not this composite component is mounted.
14641
+ * @param {ReactClass} publicInstance The instance we want to test.
14642
+ * @return {boolean} True if mounted, false otherwise.
14643
+ * @protected
14644
+ * @final
14645
+ */
14646
+
14647
+
14648
+ ReactServerUpdateQueue.prototype.isMounted = function isMounted(publicInstance) {
14649
+ return false;
14650
+ };
14651
+
14652
+ /**
14653
+ * Enqueue a callback that will be executed after all the pending updates
14654
+ * have processed.
14655
+ *
14656
+ * @param {ReactClass} publicInstance The instance to use as `this` context.
14657
+ * @param {?function} callback Called after state is updated.
14658
+ * @internal
14659
+ */
14660
+
14661
+
14662
+ ReactServerUpdateQueue.prototype.enqueueCallback = function enqueueCallback(publicInstance, callback, callerName) {
14663
+ if (this.transaction.isInTransaction()) {
14664
+ ReactUpdateQueue.enqueueCallback(publicInstance, callback, callerName);
14665
+ }
14666
+ };
14667
+
14668
+ /**
14669
+ * Forces an update. This should only be invoked when it is known with
14670
+ * certainty that we are **not** in a DOM transaction.
14671
+ *
14672
+ * You may want to call this when you know that some deeper aspect of the
14673
+ * component's state has changed but `setState` was not called.
14674
+ *
14675
+ * This will not invoke `shouldComponentUpdate`, but it will invoke
14676
+ * `componentWillUpdate` and `componentDidUpdate`.
14677
+ *
14678
+ * @param {ReactClass} publicInstance The instance that should rerender.
14679
+ * @internal
14680
+ */
14681
+
14682
+
14683
+ ReactServerUpdateQueue.prototype.enqueueForceUpdate = function enqueueForceUpdate(publicInstance) {
14684
+ if (this.transaction.isInTransaction()) {
14685
+ ReactUpdateQueue.enqueueForceUpdate(publicInstance);
14686
+ } else {
14687
+ warnNoop(publicInstance, 'forceUpdate');
14688
+ }
14689
+ };
14690
+
14691
+ /**
14692
+ * Replaces all of the state. Always use this or `setState` to mutate state.
14693
+ * You should treat `this.state` as immutable.
14694
+ *
14695
+ * There is no guarantee that `this.state` will be immediately updated, so
14696
+ * accessing `this.state` after calling this method may return the old value.
14697
+ *
14698
+ * @param {ReactClass} publicInstance The instance that should rerender.
14699
+ * @param {object|function} completeState Next state.
14700
+ * @internal
14701
+ */
14702
+
14703
+
14704
+ ReactServerUpdateQueue.prototype.enqueueReplaceState = function enqueueReplaceState(publicInstance, completeState) {
14705
+ if (this.transaction.isInTransaction()) {
14706
+ ReactUpdateQueue.enqueueReplaceState(publicInstance, completeState);
14707
+ } else {
14708
+ warnNoop(publicInstance, 'replaceState');
14709
+ }
14710
+ };
14711
+
14712
+ /**
14713
+ * Sets a subset of the state. This only exists because _pendingState is
14714
+ * internal. This provides a merging strategy that is not available to deep
14715
+ * properties which is confusing. TODO: Expose pendingState or don't use it
14716
+ * during the merge.
14717
+ *
14718
+ * @param {ReactClass} publicInstance The instance that should rerender.
14719
+ * @param {object|function} partialState Next partial state to be merged with state.
14720
+ * @internal
14721
+ */
14722
+
14723
+
14724
+ ReactServerUpdateQueue.prototype.enqueueSetState = function enqueueSetState(publicInstance, partialState) {
14725
+ if (this.transaction.isInTransaction()) {
14726
+ ReactUpdateQueue.enqueueSetState(publicInstance, partialState);
14727
+ } else {
14728
+ warnNoop(publicInstance, 'setState');
14729
+ }
14730
+ };
14731
+
14732
+ return ReactServerUpdateQueue;
14733
+ }();
14734
+
14735
+ module.exports = ReactServerUpdateQueue;
14736
+ }).call(this)}).call(this,require('_process'))
14737
+ },{"./ReactUpdateQueue":110,"_process":29,"fbjs/lib/warning":27}],110:[function(require,module,exports){
14738
+ (function (process){(function (){
14739
+ /**
14740
+ * Copyright (c) 2015-present, Facebook, Inc.
14741
+ *
14742
+ * This source code is licensed under the MIT license found in the
14743
+ * LICENSE file in the root directory of this source tree.
14744
+ *
14745
+ */
14746
+
14747
+ 'use strict';
14748
+
14749
+ var _prodInvariant = require('./reactProdInvariant');
14750
+
14751
+ var ReactCurrentOwner = require('react/lib/ReactCurrentOwner');
14752
+ var ReactInstanceMap = require('./ReactInstanceMap');
14753
+ var ReactInstrumentation = require('./ReactInstrumentation');
14754
+ var ReactUpdates = require('./ReactUpdates');
14755
+
14756
+ var invariant = require('fbjs/lib/invariant');
14757
+ var warning = require('fbjs/lib/warning');
14758
+
14759
+ function enqueueUpdate(internalInstance) {
14760
+ ReactUpdates.enqueueUpdate(internalInstance);
14761
+ }
14762
+
14763
+ function formatUnexpectedArgument(arg) {
14764
+ var type = typeof arg;
14765
+ if (type !== 'object') {
14766
+ return type;
14767
+ }
14768
+ var displayName = arg.constructor && arg.constructor.name || type;
14769
+ var keys = Object.keys(arg);
14770
+ if (keys.length > 0 && keys.length < 20) {
14771
+ return displayName + ' (keys: ' + keys.join(', ') + ')';
14772
+ }
14773
+ return displayName;
14774
+ }
14775
+
14776
+ function getInternalInstanceReadyForUpdate(publicInstance, callerName) {
14777
+ var internalInstance = ReactInstanceMap.get(publicInstance);
14778
+ if (!internalInstance) {
14779
+ if (process.env.NODE_ENV !== 'production') {
14780
+ var ctor = publicInstance.constructor;
14781
+ // Only warn when we have a callerName. Otherwise we should be silent.
14782
+ // We're probably calling from enqueueCallback. We don't want to warn
14783
+ // there because we already warned for the corresponding lifecycle method.
14784
+ process.env.NODE_ENV !== 'production' ? warning(!callerName, '%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, ctor && (ctor.displayName || ctor.name) || 'ReactClass') : void 0;
14785
+ }
14786
+ return null;
14787
+ }
14788
+
14789
+ if (process.env.NODE_ENV !== 'production') {
14790
+ process.env.NODE_ENV !== 'production' ? warning(ReactCurrentOwner.current == null, '%s(...): Cannot update during an existing state transition (such as ' + "within `render` or another component's constructor). Render methods " + 'should be a pure function of props and state; constructor ' + 'side-effects are an anti-pattern, but can be moved to ' + '`componentWillMount`.', callerName) : void 0;
14791
+ }
14792
+
14793
+ return internalInstance;
14794
+ }
14795
+
14796
+ /**
14797
+ * ReactUpdateQueue allows for state updates to be scheduled into a later
14798
+ * reconciliation step.
14799
+ */
14800
+ var ReactUpdateQueue = {
14801
+ /**
14802
+ * Checks whether or not this composite component is mounted.
14803
+ * @param {ReactClass} publicInstance The instance we want to test.
14804
+ * @return {boolean} True if mounted, false otherwise.
14805
+ * @protected
14806
+ * @final
14807
+ */
14808
+ isMounted: function (publicInstance) {
14809
+ if (process.env.NODE_ENV !== 'production') {
14810
+ var owner = ReactCurrentOwner.current;
14811
+ if (owner !== null) {
14812
+ process.env.NODE_ENV !== 'production' ? warning(owner._warnedAboutRefsInRender, '%s is accessing isMounted inside its render() function. ' + 'render() should be a pure function of props and state. It should ' + 'never access something that requires stale data from the previous ' + 'render, such as refs. Move this logic to componentDidMount and ' + 'componentDidUpdate instead.', owner.getName() || 'A component') : void 0;
14813
+ owner._warnedAboutRefsInRender = true;
14814
+ }
14815
+ }
14816
+ var internalInstance = ReactInstanceMap.get(publicInstance);
14817
+ if (internalInstance) {
14818
+ // During componentWillMount and render this will still be null but after
14819
+ // that will always render to something. At least for now. So we can use
14820
+ // this hack.
14821
+ return !!internalInstance._renderedComponent;
14822
+ } else {
14823
+ return false;
14824
+ }
14825
+ },
14826
+
14827
+ /**
14828
+ * Enqueue a callback that will be executed after all the pending updates
14829
+ * have processed.
14830
+ *
14831
+ * @param {ReactClass} publicInstance The instance to use as `this` context.
14832
+ * @param {?function} callback Called after state is updated.
14833
+ * @param {string} callerName Name of the calling function in the public API.
14834
+ * @internal
14835
+ */
14836
+ enqueueCallback: function (publicInstance, callback, callerName) {
14837
+ ReactUpdateQueue.validateCallback(callback, callerName);
14838
+ var internalInstance = getInternalInstanceReadyForUpdate(publicInstance);
14839
+
14840
+ // Previously we would throw an error if we didn't have an internal
14841
+ // instance. Since we want to make it a no-op instead, we mirror the same
14842
+ // behavior we have in other enqueue* methods.
14843
+ // We also need to ignore callbacks in componentWillMount. See
14844
+ // enqueueUpdates.
14845
+ if (!internalInstance) {
14846
+ return null;
14847
+ }
14848
+
14849
+ if (internalInstance._pendingCallbacks) {
14850
+ internalInstance._pendingCallbacks.push(callback);
14851
+ } else {
14852
+ internalInstance._pendingCallbacks = [callback];
14853
+ }
14854
+ // TODO: The callback here is ignored when setState is called from
14855
+ // componentWillMount. Either fix it or disallow doing so completely in
14856
+ // favor of getInitialState. Alternatively, we can disallow
14857
+ // componentWillMount during server-side rendering.
14858
+ enqueueUpdate(internalInstance);
14859
+ },
14860
+
14861
+ enqueueCallbackInternal: function (internalInstance, callback) {
14862
+ if (internalInstance._pendingCallbacks) {
14863
+ internalInstance._pendingCallbacks.push(callback);
14864
+ } else {
14865
+ internalInstance._pendingCallbacks = [callback];
14866
+ }
14867
+ enqueueUpdate(internalInstance);
14868
+ },
14869
+
14870
+ /**
14871
+ * Forces an update. This should only be invoked when it is known with
14872
+ * certainty that we are **not** in a DOM transaction.
14873
+ *
14874
+ * You may want to call this when you know that some deeper aspect of the
14875
+ * component's state has changed but `setState` was not called.
14876
+ *
14877
+ * This will not invoke `shouldComponentUpdate`, but it will invoke
14878
+ * `componentWillUpdate` and `componentDidUpdate`.
14879
+ *
14880
+ * @param {ReactClass} publicInstance The instance that should rerender.
14881
+ * @internal
14882
+ */
14883
+ enqueueForceUpdate: function (publicInstance) {
14884
+ var internalInstance = getInternalInstanceReadyForUpdate(publicInstance, 'forceUpdate');
14885
+
14886
+ if (!internalInstance) {
14887
+ return;
14888
+ }
14889
+
14890
+ internalInstance._pendingForceUpdate = true;
14891
+
14892
+ enqueueUpdate(internalInstance);
14893
+ },
14894
+
14895
+ /**
14896
+ * Replaces all of the state. Always use this or `setState` to mutate state.
14897
+ * You should treat `this.state` as immutable.
14898
+ *
14899
+ * There is no guarantee that `this.state` will be immediately updated, so
14900
+ * accessing `this.state` after calling this method may return the old value.
14901
+ *
14902
+ * @param {ReactClass} publicInstance The instance that should rerender.
14903
+ * @param {object} completeState Next state.
14904
+ * @internal
14905
+ */
14906
+ enqueueReplaceState: function (publicInstance, completeState, callback) {
14907
+ var internalInstance = getInternalInstanceReadyForUpdate(publicInstance, 'replaceState');
14908
+
14909
+ if (!internalInstance) {
14910
+ return;
14911
+ }
14912
+
14913
+ internalInstance._pendingStateQueue = [completeState];
14914
+ internalInstance._pendingReplaceState = true;
14915
+
14916
+ // Future-proof 15.5
14917
+ if (callback !== undefined && callback !== null) {
14918
+ ReactUpdateQueue.validateCallback(callback, 'replaceState');
14919
+ if (internalInstance._pendingCallbacks) {
14920
+ internalInstance._pendingCallbacks.push(callback);
14921
+ } else {
14922
+ internalInstance._pendingCallbacks = [callback];
14923
+ }
14924
+ }
14925
+
14926
+ enqueueUpdate(internalInstance);
14927
+ },
14928
+
14929
+ /**
14930
+ * Sets a subset of the state. This only exists because _pendingState is
14931
+ * internal. This provides a merging strategy that is not available to deep
14932
+ * properties which is confusing. TODO: Expose pendingState or don't use it
14933
+ * during the merge.
14934
+ *
14935
+ * @param {ReactClass} publicInstance The instance that should rerender.
14936
+ * @param {object} partialState Next partial state to be merged with state.
14937
+ * @internal
14938
+ */
14939
+ enqueueSetState: function (publicInstance, partialState) {
14940
+ if (process.env.NODE_ENV !== 'production') {
14941
+ ReactInstrumentation.debugTool.onSetState();
14942
+ process.env.NODE_ENV !== 'production' ? warning(partialState != null, 'setState(...): You passed an undefined or null state object; ' + 'instead, use forceUpdate().') : void 0;
14943
+ }
14944
+
14945
+ var internalInstance = getInternalInstanceReadyForUpdate(publicInstance, 'setState');
14946
+
14947
+ if (!internalInstance) {
14948
+ return;
14949
+ }
14950
+
14951
+ var queue = internalInstance._pendingStateQueue || (internalInstance._pendingStateQueue = []);
14952
+ queue.push(partialState);
14953
+
14954
+ enqueueUpdate(internalInstance);
14955
+ },
14956
+
14957
+ enqueueElementInternal: function (internalInstance, nextElement, nextContext) {
14958
+ internalInstance._pendingElement = nextElement;
14959
+ // TODO: introduce _pendingContext instead of setting it directly.
14960
+ internalInstance._context = nextContext;
14961
+ enqueueUpdate(internalInstance);
14962
+ },
14963
+
14964
+ validateCallback: function (callback, callerName) {
14965
+ !(!callback || typeof callback === 'function') ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.', callerName, formatUnexpectedArgument(callback)) : _prodInvariant('122', callerName, formatUnexpectedArgument(callback)) : void 0;
14966
+ }
14967
+ };
14968
+
14969
+ module.exports = ReactUpdateQueue;
14970
+ }).call(this)}).call(this,require('_process'))
14971
+ },{"./ReactInstanceMap":95,"./ReactInstrumentation":96,"./ReactUpdates":111,"./reactProdInvariant":154,"_process":29,"fbjs/lib/invariant":20,"fbjs/lib/warning":27,"react/lib/ReactCurrentOwner":170}],111:[function(require,module,exports){
14972
+ (function (process){(function (){
14973
+ /**
14974
+ * Copyright (c) 2013-present, Facebook, Inc.
14975
+ *
14976
+ * This source code is licensed under the MIT license found in the
14977
+ * LICENSE file in the root directory of this source tree.
14978
+ *
14979
+ */
14980
+
14981
+ 'use strict';
14982
+
14983
+ var _prodInvariant = require('./reactProdInvariant'),
14984
+ _assign = require('object-assign');
14985
+
14986
+ var CallbackQueue = require('./CallbackQueue');
14987
+ var PooledClass = require('./PooledClass');
14988
+ var ReactFeatureFlags = require('./ReactFeatureFlags');
14989
+ var ReactReconciler = require('./ReactReconciler');
14990
+ var Transaction = require('./Transaction');
14991
+
14992
+ var invariant = require('fbjs/lib/invariant');
14993
+
14994
+ var dirtyComponents = [];
14995
+ var updateBatchNumber = 0;
14996
+ var asapCallbackQueue = CallbackQueue.getPooled();
14997
+ var asapEnqueued = false;
14998
+
14999
+ var batchingStrategy = null;
15000
+
15001
+ function ensureInjected() {
15002
+ !(ReactUpdates.ReactReconcileTransaction && batchingStrategy) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates: must inject a reconcile transaction class and batching strategy') : _prodInvariant('123') : void 0;
15003
+ }
15004
+
15005
+ var NESTED_UPDATES = {
15006
+ initialize: function () {
15007
+ this.dirtyComponentsLength = dirtyComponents.length;
15008
+ },
15009
+ close: function () {
15010
+ if (this.dirtyComponentsLength !== dirtyComponents.length) {
15011
+ // Additional updates were enqueued by componentDidUpdate handlers or
15012
+ // similar; before our own UPDATE_QUEUEING wrapper closes, we want to run
15013
+ // these new updates so that if A's componentDidUpdate calls setState on
15014
+ // B, B will update before the callback A's updater provided when calling
15015
+ // setState.
15016
+ dirtyComponents.splice(0, this.dirtyComponentsLength);
15017
+ flushBatchedUpdates();
15018
+ } else {
15019
+ dirtyComponents.length = 0;
15020
+ }
15021
+ }
15022
+ };
15023
+
15024
+ var UPDATE_QUEUEING = {
15025
+ initialize: function () {
15026
+ this.callbackQueue.reset();
15027
+ },
15028
+ close: function () {
15029
+ this.callbackQueue.notifyAll();
15030
+ }
15031
+ };
15032
+
15033
+ var TRANSACTION_WRAPPERS = [NESTED_UPDATES, UPDATE_QUEUEING];
15034
+
15035
+ function ReactUpdatesFlushTransaction() {
15036
+ this.reinitializeTransaction();
15037
+ this.dirtyComponentsLength = null;
15038
+ this.callbackQueue = CallbackQueue.getPooled();
15039
+ this.reconcileTransaction = ReactUpdates.ReactReconcileTransaction.getPooled(
15040
+ /* useCreateElement */true);
15041
+ }
15042
+
15043
+ _assign(ReactUpdatesFlushTransaction.prototype, Transaction, {
15044
+ getTransactionWrappers: function () {
15045
+ return TRANSACTION_WRAPPERS;
15046
+ },
15047
+
15048
+ destructor: function () {
15049
+ this.dirtyComponentsLength = null;
15050
+ CallbackQueue.release(this.callbackQueue);
15051
+ this.callbackQueue = null;
15052
+ ReactUpdates.ReactReconcileTransaction.release(this.reconcileTransaction);
15053
+ this.reconcileTransaction = null;
15054
+ },
15055
+
15056
+ perform: function (method, scope, a) {
15057
+ // Essentially calls `this.reconcileTransaction.perform(method, scope, a)`
15058
+ // with this transaction's wrappers around it.
15059
+ return Transaction.perform.call(this, this.reconcileTransaction.perform, this.reconcileTransaction, method, scope, a);
15060
+ }
15061
+ });
15062
+
15063
+ PooledClass.addPoolingTo(ReactUpdatesFlushTransaction);
15064
+
15065
+ function batchedUpdates(callback, a, b, c, d, e) {
15066
+ ensureInjected();
15067
+ return batchingStrategy.batchedUpdates(callback, a, b, c, d, e);
15068
+ }
15069
+
15070
+ /**
15071
+ * Array comparator for ReactComponents by mount ordering.
15072
+ *
15073
+ * @param {ReactComponent} c1 first component you're comparing
15074
+ * @param {ReactComponent} c2 second component you're comparing
15075
+ * @return {number} Return value usable by Array.prototype.sort().
15076
+ */
15077
+ function mountOrderComparator(c1, c2) {
15078
+ return c1._mountOrder - c2._mountOrder;
15079
+ }
15080
+
15081
+ function runBatchedUpdates(transaction) {
15082
+ var len = transaction.dirtyComponentsLength;
15083
+ !(len === dirtyComponents.length) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected flush transaction\'s stored dirty-components length (%s) to match dirty-components array length (%s).', len, dirtyComponents.length) : _prodInvariant('124', len, dirtyComponents.length) : void 0;
15084
+
15085
+ // Since reconciling a component higher in the owner hierarchy usually (not
15086
+ // always -- see shouldComponentUpdate()) will reconcile children, reconcile
15087
+ // them before their children by sorting the array.
15088
+ dirtyComponents.sort(mountOrderComparator);
15089
+
15090
+ // Any updates enqueued while reconciling must be performed after this entire
15091
+ // batch. Otherwise, if dirtyComponents is [A, B] where A has children B and
15092
+ // C, B could update twice in a single batch if C's render enqueues an update
15093
+ // to B (since B would have already updated, we should skip it, and the only
15094
+ // way we can know to do so is by checking the batch counter).
15095
+ updateBatchNumber++;
15096
+
15097
+ for (var i = 0; i < len; i++) {
15098
+ // If a component is unmounted before pending changes apply, it will still
15099
+ // be here, but we assume that it has cleared its _pendingCallbacks and
15100
+ // that performUpdateIfNecessary is a noop.
15101
+ var component = dirtyComponents[i];
15102
+
15103
+ // If performUpdateIfNecessary happens to enqueue any new updates, we
15104
+ // shouldn't execute the callbacks until the next render happens, so
15105
+ // stash the callbacks first
15106
+ var callbacks = component._pendingCallbacks;
15107
+ component._pendingCallbacks = null;
15108
+
15109
+ var markerName;
15110
+ if (ReactFeatureFlags.logTopLevelRenders) {
15111
+ var namedComponent = component;
15112
+ // Duck type TopLevelWrapper. This is probably always true.
15113
+ if (component._currentElement.type.isReactTopLevelWrapper) {
15114
+ namedComponent = component._renderedComponent;
15115
+ }
15116
+ markerName = 'React update: ' + namedComponent.getName();
15117
+ console.time(markerName);
15118
+ }
15119
+
15120
+ ReactReconciler.performUpdateIfNecessary(component, transaction.reconcileTransaction, updateBatchNumber);
15121
+
15122
+ if (markerName) {
15123
+ console.timeEnd(markerName);
15124
+ }
15125
+
15126
+ if (callbacks) {
15127
+ for (var j = 0; j < callbacks.length; j++) {
15128
+ transaction.callbackQueue.enqueue(callbacks[j], component.getPublicInstance());
15129
+ }
15130
+ }
15131
+ }
15132
+ }
15133
+
15134
+ var flushBatchedUpdates = function () {
15135
+ // ReactUpdatesFlushTransaction's wrappers will clear the dirtyComponents
15136
+ // array and perform any updates enqueued by mount-ready handlers (i.e.,
15137
+ // componentDidUpdate) but we need to check here too in order to catch
15138
+ // updates enqueued by setState callbacks and asap calls.
15139
+ while (dirtyComponents.length || asapEnqueued) {
15140
+ if (dirtyComponents.length) {
15141
+ var transaction = ReactUpdatesFlushTransaction.getPooled();
15142
+ transaction.perform(runBatchedUpdates, null, transaction);
15143
+ ReactUpdatesFlushTransaction.release(transaction);
15144
+ }
15145
+
15146
+ if (asapEnqueued) {
15147
+ asapEnqueued = false;
15148
+ var queue = asapCallbackQueue;
15149
+ asapCallbackQueue = CallbackQueue.getPooled();
15150
+ queue.notifyAll();
15151
+ CallbackQueue.release(queue);
15152
+ }
15153
+ }
15154
+ };
15155
+
15156
+ /**
15157
+ * Mark a component as needing a rerender, adding an optional callback to a
15158
+ * list of functions which will be executed once the rerender occurs.
15159
+ */
15160
+ function enqueueUpdate(component) {
15161
+ ensureInjected();
15162
+
15163
+ // Various parts of our code (such as ReactCompositeComponent's
15164
+ // _renderValidatedComponent) assume that calls to render aren't nested;
15165
+ // verify that that's the case. (This is called by each top-level update
15166
+ // function, like setState, forceUpdate, etc.; creation and
15167
+ // destruction of top-level components is guarded in ReactMount.)
15168
+
15169
+ if (!batchingStrategy.isBatchingUpdates) {
15170
+ batchingStrategy.batchedUpdates(enqueueUpdate, component);
15171
+ return;
15172
+ }
15173
+
15174
+ dirtyComponents.push(component);
15175
+ if (component._updateBatchNumber == null) {
15176
+ component._updateBatchNumber = updateBatchNumber + 1;
15177
+ }
15178
+ }
15179
+
15180
+ /**
15181
+ * Enqueue a callback to be run at the end of the current batching cycle. Throws
15182
+ * if no updates are currently being performed.
15183
+ */
15184
+ function asap(callback, context) {
15185
+ invariant(batchingStrategy.isBatchingUpdates, "ReactUpdates.asap: Can't enqueue an asap callback in a context where" + 'updates are not being batched.');
15186
+ asapCallbackQueue.enqueue(callback, context);
15187
+ asapEnqueued = true;
15188
+ }
15189
+
15190
+ var ReactUpdatesInjection = {
15191
+ injectReconcileTransaction: function (ReconcileTransaction) {
15192
+ !ReconcileTransaction ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates: must provide a reconcile transaction class') : _prodInvariant('126') : void 0;
15193
+ ReactUpdates.ReactReconcileTransaction = ReconcileTransaction;
15194
+ },
15195
+
15196
+ injectBatchingStrategy: function (_batchingStrategy) {
15197
+ !_batchingStrategy ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates: must provide a batching strategy') : _prodInvariant('127') : void 0;
15198
+ !(typeof _batchingStrategy.batchedUpdates === 'function') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates: must provide a batchedUpdates() function') : _prodInvariant('128') : void 0;
15199
+ !(typeof _batchingStrategy.isBatchingUpdates === 'boolean') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates: must provide an isBatchingUpdates boolean attribute') : _prodInvariant('129') : void 0;
15200
+ batchingStrategy = _batchingStrategy;
15201
+ }
15202
+ };
15203
+
15204
+ var ReactUpdates = {
15205
+ /**
15206
+ * React references `ReactReconcileTransaction` using this property in order
15207
+ * to allow dependency injection.
15208
+ *
15209
+ * @internal
15210
+ */
15211
+ ReactReconcileTransaction: null,
15212
+
15213
+ batchedUpdates: batchedUpdates,
15214
+ enqueueUpdate: enqueueUpdate,
15215
+ flushBatchedUpdates: flushBatchedUpdates,
15216
+ injection: ReactUpdatesInjection,
15217
+ asap: asap
15218
+ };
15219
+
15220
+ module.exports = ReactUpdates;
15221
+ }).call(this)}).call(this,require('_process'))
15222
+ },{"./CallbackQueue":40,"./PooledClass":58,"./ReactFeatureFlags":90,"./ReactReconciler":106,"./Transaction":129,"./reactProdInvariant":154,"_process":29,"fbjs/lib/invariant":20,"object-assign":28}],112:[function(require,module,exports){
15223
+ /**
15224
+ * Copyright (c) 2013-present, Facebook, Inc.
15225
+ *
15226
+ * This source code is licensed under the MIT license found in the
15227
+ * LICENSE file in the root directory of this source tree.
15228
+ *
15229
+ */
15230
+
15231
+ 'use strict';
15232
+
15233
+ module.exports = '15.6.2';
15234
+ },{}],113:[function(require,module,exports){
15235
+ /**
15236
+ * Copyright (c) 2013-present, Facebook, Inc.
15237
+ *
15238
+ * This source code is licensed under the MIT license found in the
15239
+ * LICENSE file in the root directory of this source tree.
15240
+ *
15241
+ */
15242
+
15243
+ 'use strict';
15244
+
15245
+ var NS = {
15246
+ xlink: 'http://www.w3.org/1999/xlink',
15247
+ xml: 'http://www.w3.org/XML/1998/namespace'
15248
+ };
15249
+
15250
+ // We use attributes for everything SVG so let's avoid some duplication and run
15251
+ // code instead.
15252
+ // The following are all specified in the HTML config already so we exclude here.
15253
+ // - class (as className)
15254
+ // - color
15255
+ // - height
15256
+ // - id
15257
+ // - lang
15258
+ // - max
15259
+ // - media
15260
+ // - method
15261
+ // - min
15262
+ // - name
15263
+ // - style
15264
+ // - target
15265
+ // - type
15266
+ // - width
15267
+ var ATTRS = {
15268
+ accentHeight: 'accent-height',
15269
+ accumulate: 0,
15270
+ additive: 0,
15271
+ alignmentBaseline: 'alignment-baseline',
15272
+ allowReorder: 'allowReorder',
15273
+ alphabetic: 0,
15274
+ amplitude: 0,
15275
+ arabicForm: 'arabic-form',
15276
+ ascent: 0,
15277
+ attributeName: 'attributeName',
15278
+ attributeType: 'attributeType',
15279
+ autoReverse: 'autoReverse',
15280
+ azimuth: 0,
15281
+ baseFrequency: 'baseFrequency',
15282
+ baseProfile: 'baseProfile',
15283
+ baselineShift: 'baseline-shift',
15284
+ bbox: 0,
15285
+ begin: 0,
15286
+ bias: 0,
15287
+ by: 0,
15288
+ calcMode: 'calcMode',
15289
+ capHeight: 'cap-height',
15290
+ clip: 0,
15291
+ clipPath: 'clip-path',
15292
+ clipRule: 'clip-rule',
15293
+ clipPathUnits: 'clipPathUnits',
15294
+ colorInterpolation: 'color-interpolation',
15295
+ colorInterpolationFilters: 'color-interpolation-filters',
15296
+ colorProfile: 'color-profile',
15297
+ colorRendering: 'color-rendering',
15298
+ contentScriptType: 'contentScriptType',
15299
+ contentStyleType: 'contentStyleType',
15300
+ cursor: 0,
15301
+ cx: 0,
15302
+ cy: 0,
15303
+ d: 0,
15304
+ decelerate: 0,
15305
+ descent: 0,
15306
+ diffuseConstant: 'diffuseConstant',
15307
+ direction: 0,
15308
+ display: 0,
15309
+ divisor: 0,
15310
+ dominantBaseline: 'dominant-baseline',
15311
+ dur: 0,
15312
+ dx: 0,
15313
+ dy: 0,
15314
+ edgeMode: 'edgeMode',
15315
+ elevation: 0,
15316
+ enableBackground: 'enable-background',
15317
+ end: 0,
15318
+ exponent: 0,
15319
+ externalResourcesRequired: 'externalResourcesRequired',
15320
+ fill: 0,
15321
+ fillOpacity: 'fill-opacity',
15322
+ fillRule: 'fill-rule',
15323
+ filter: 0,
15324
+ filterRes: 'filterRes',
15325
+ filterUnits: 'filterUnits',
15326
+ floodColor: 'flood-color',
15327
+ floodOpacity: 'flood-opacity',
15328
+ focusable: 0,
15329
+ fontFamily: 'font-family',
15330
+ fontSize: 'font-size',
15331
+ fontSizeAdjust: 'font-size-adjust',
15332
+ fontStretch: 'font-stretch',
15333
+ fontStyle: 'font-style',
15334
+ fontVariant: 'font-variant',
15335
+ fontWeight: 'font-weight',
15336
+ format: 0,
15337
+ from: 0,
15338
+ fx: 0,
15339
+ fy: 0,
15340
+ g1: 0,
15341
+ g2: 0,
15342
+ glyphName: 'glyph-name',
15343
+ glyphOrientationHorizontal: 'glyph-orientation-horizontal',
15344
+ glyphOrientationVertical: 'glyph-orientation-vertical',
15345
+ glyphRef: 'glyphRef',
15346
+ gradientTransform: 'gradientTransform',
15347
+ gradientUnits: 'gradientUnits',
15348
+ hanging: 0,
15349
+ horizAdvX: 'horiz-adv-x',
15350
+ horizOriginX: 'horiz-origin-x',
15351
+ ideographic: 0,
15352
+ imageRendering: 'image-rendering',
15353
+ 'in': 0,
15354
+ in2: 0,
15355
+ intercept: 0,
15356
+ k: 0,
15357
+ k1: 0,
15358
+ k2: 0,
15359
+ k3: 0,
15360
+ k4: 0,
15361
+ kernelMatrix: 'kernelMatrix',
15362
+ kernelUnitLength: 'kernelUnitLength',
15363
+ kerning: 0,
15364
+ keyPoints: 'keyPoints',
15365
+ keySplines: 'keySplines',
15366
+ keyTimes: 'keyTimes',
15367
+ lengthAdjust: 'lengthAdjust',
15368
+ letterSpacing: 'letter-spacing',
15369
+ lightingColor: 'lighting-color',
15370
+ limitingConeAngle: 'limitingConeAngle',
15371
+ local: 0,
15372
+ markerEnd: 'marker-end',
15373
+ markerMid: 'marker-mid',
15374
+ markerStart: 'marker-start',
15375
+ markerHeight: 'markerHeight',
15376
+ markerUnits: 'markerUnits',
15377
+ markerWidth: 'markerWidth',
15378
+ mask: 0,
15379
+ maskContentUnits: 'maskContentUnits',
15380
+ maskUnits: 'maskUnits',
15381
+ mathematical: 0,
15382
+ mode: 0,
15383
+ numOctaves: 'numOctaves',
15384
+ offset: 0,
15385
+ opacity: 0,
15386
+ operator: 0,
15387
+ order: 0,
15388
+ orient: 0,
15389
+ orientation: 0,
15390
+ origin: 0,
15391
+ overflow: 0,
15392
+ overlinePosition: 'overline-position',
15393
+ overlineThickness: 'overline-thickness',
15394
+ paintOrder: 'paint-order',
15395
+ panose1: 'panose-1',
15396
+ pathLength: 'pathLength',
15397
+ patternContentUnits: 'patternContentUnits',
15398
+ patternTransform: 'patternTransform',
15399
+ patternUnits: 'patternUnits',
15400
+ pointerEvents: 'pointer-events',
15401
+ points: 0,
15402
+ pointsAtX: 'pointsAtX',
15403
+ pointsAtY: 'pointsAtY',
15404
+ pointsAtZ: 'pointsAtZ',
15405
+ preserveAlpha: 'preserveAlpha',
15406
+ preserveAspectRatio: 'preserveAspectRatio',
15407
+ primitiveUnits: 'primitiveUnits',
15408
+ r: 0,
15409
+ radius: 0,
15410
+ refX: 'refX',
15411
+ refY: 'refY',
15412
+ renderingIntent: 'rendering-intent',
15413
+ repeatCount: 'repeatCount',
15414
+ repeatDur: 'repeatDur',
15415
+ requiredExtensions: 'requiredExtensions',
15416
+ requiredFeatures: 'requiredFeatures',
15417
+ restart: 0,
15418
+ result: 0,
15419
+ rotate: 0,
15420
+ rx: 0,
15421
+ ry: 0,
15422
+ scale: 0,
15423
+ seed: 0,
15424
+ shapeRendering: 'shape-rendering',
15425
+ slope: 0,
15426
+ spacing: 0,
15427
+ specularConstant: 'specularConstant',
15428
+ specularExponent: 'specularExponent',
15429
+ speed: 0,
15430
+ spreadMethod: 'spreadMethod',
15431
+ startOffset: 'startOffset',
15432
+ stdDeviation: 'stdDeviation',
15433
+ stemh: 0,
15434
+ stemv: 0,
15435
+ stitchTiles: 'stitchTiles',
15436
+ stopColor: 'stop-color',
15437
+ stopOpacity: 'stop-opacity',
15438
+ strikethroughPosition: 'strikethrough-position',
15439
+ strikethroughThickness: 'strikethrough-thickness',
15440
+ string: 0,
15441
+ stroke: 0,
15442
+ strokeDasharray: 'stroke-dasharray',
15443
+ strokeDashoffset: 'stroke-dashoffset',
15444
+ strokeLinecap: 'stroke-linecap',
15445
+ strokeLinejoin: 'stroke-linejoin',
15446
+ strokeMiterlimit: 'stroke-miterlimit',
15447
+ strokeOpacity: 'stroke-opacity',
15448
+ strokeWidth: 'stroke-width',
15449
+ surfaceScale: 'surfaceScale',
15450
+ systemLanguage: 'systemLanguage',
15451
+ tableValues: 'tableValues',
15452
+ targetX: 'targetX',
15453
+ targetY: 'targetY',
15454
+ textAnchor: 'text-anchor',
15455
+ textDecoration: 'text-decoration',
15456
+ textRendering: 'text-rendering',
15457
+ textLength: 'textLength',
15458
+ to: 0,
15459
+ transform: 0,
15460
+ u1: 0,
15461
+ u2: 0,
15462
+ underlinePosition: 'underline-position',
15463
+ underlineThickness: 'underline-thickness',
15464
+ unicode: 0,
15465
+ unicodeBidi: 'unicode-bidi',
15466
+ unicodeRange: 'unicode-range',
15467
+ unitsPerEm: 'units-per-em',
15468
+ vAlphabetic: 'v-alphabetic',
15469
+ vHanging: 'v-hanging',
15470
+ vIdeographic: 'v-ideographic',
15471
+ vMathematical: 'v-mathematical',
15472
+ values: 0,
15473
+ vectorEffect: 'vector-effect',
15474
+ version: 0,
15475
+ vertAdvY: 'vert-adv-y',
15476
+ vertOriginX: 'vert-origin-x',
15477
+ vertOriginY: 'vert-origin-y',
15478
+ viewBox: 'viewBox',
15479
+ viewTarget: 'viewTarget',
15480
+ visibility: 0,
15481
+ widths: 0,
15482
+ wordSpacing: 'word-spacing',
15483
+ writingMode: 'writing-mode',
15484
+ x: 0,
15485
+ xHeight: 'x-height',
15486
+ x1: 0,
15487
+ x2: 0,
15488
+ xChannelSelector: 'xChannelSelector',
15489
+ xlinkActuate: 'xlink:actuate',
15490
+ xlinkArcrole: 'xlink:arcrole',
15491
+ xlinkHref: 'xlink:href',
15492
+ xlinkRole: 'xlink:role',
15493
+ xlinkShow: 'xlink:show',
15494
+ xlinkTitle: 'xlink:title',
15495
+ xlinkType: 'xlink:type',
15496
+ xmlBase: 'xml:base',
15497
+ xmlns: 0,
15498
+ xmlnsXlink: 'xmlns:xlink',
15499
+ xmlLang: 'xml:lang',
15500
+ xmlSpace: 'xml:space',
15501
+ y: 0,
15502
+ y1: 0,
15503
+ y2: 0,
15504
+ yChannelSelector: 'yChannelSelector',
15505
+ z: 0,
15506
+ zoomAndPan: 'zoomAndPan'
15507
+ };
15508
+
15509
+ var SVGDOMPropertyConfig = {
15510
+ Properties: {},
15511
+ DOMAttributeNamespaces: {
15512
+ xlinkActuate: NS.xlink,
15513
+ xlinkArcrole: NS.xlink,
15514
+ xlinkHref: NS.xlink,
15515
+ xlinkRole: NS.xlink,
15516
+ xlinkShow: NS.xlink,
15517
+ xlinkTitle: NS.xlink,
15518
+ xlinkType: NS.xlink,
15519
+ xmlBase: NS.xml,
15520
+ xmlLang: NS.xml,
15521
+ xmlSpace: NS.xml
15522
+ },
15523
+ DOMAttributeNames: {}
15524
+ };
15525
+
15526
+ Object.keys(ATTRS).forEach(function (key) {
15527
+ SVGDOMPropertyConfig.Properties[key] = 0;
15528
+ if (ATTRS[key]) {
15529
+ SVGDOMPropertyConfig.DOMAttributeNames[key] = ATTRS[key];
15530
+ }
15531
+ });
15532
+
15533
+ module.exports = SVGDOMPropertyConfig;
15534
+ },{}],114:[function(require,module,exports){
15535
+ /**
15536
+ * Copyright (c) 2013-present, Facebook, Inc.
15537
+ *
15538
+ * This source code is licensed under the MIT license found in the
15539
+ * LICENSE file in the root directory of this source tree.
15540
+ *
15541
+ */
15542
+
15543
+ 'use strict';
15544
+
15545
+ var EventPropagators = require('./EventPropagators');
15546
+ var ExecutionEnvironment = require('fbjs/lib/ExecutionEnvironment');
15547
+ var ReactDOMComponentTree = require('./ReactDOMComponentTree');
15548
+ var ReactInputSelection = require('./ReactInputSelection');
15549
+ var SyntheticEvent = require('./SyntheticEvent');
15550
+
15551
+ var getActiveElement = require('fbjs/lib/getActiveElement');
15552
+ var isTextInputElement = require('./isTextInputElement');
15553
+ var shallowEqual = require('fbjs/lib/shallowEqual');
15554
+
15555
+ var skipSelectionChangeEvent = ExecutionEnvironment.canUseDOM && 'documentMode' in document && document.documentMode <= 11;
15556
+
15557
+ var eventTypes = {
15558
+ select: {
15559
+ phasedRegistrationNames: {
15560
+ bubbled: 'onSelect',
15561
+ captured: 'onSelectCapture'
15562
+ },
15563
+ dependencies: ['topBlur', 'topContextMenu', 'topFocus', 'topKeyDown', 'topKeyUp', 'topMouseDown', 'topMouseUp', 'topSelectionChange']
15564
+ }
15565
+ };
15566
+
15567
+ var activeElement = null;
15568
+ var activeElementInst = null;
15569
+ var lastSelection = null;
15570
+ var mouseDown = false;
15571
+
15572
+ // Track whether a listener exists for this plugin. If none exist, we do
15573
+ // not extract events. See #3639.
15574
+ var hasListener = false;
15575
+
15576
+ /**
15577
+ * Get an object which is a unique representation of the current selection.
15578
+ *
15579
+ * The return value will not be consistent across nodes or browsers, but
15580
+ * two identical selections on the same node will return identical objects.
15581
+ *
15582
+ * @param {DOMElement} node
15583
+ * @return {object}
15584
+ */
15585
+ function getSelection(node) {
15586
+ if ('selectionStart' in node && ReactInputSelection.hasSelectionCapabilities(node)) {
15587
+ return {
15588
+ start: node.selectionStart,
15589
+ end: node.selectionEnd
15590
+ };
15591
+ } else if (window.getSelection) {
15592
+ var selection = window.getSelection();
15593
+ return {
15594
+ anchorNode: selection.anchorNode,
15595
+ anchorOffset: selection.anchorOffset,
15596
+ focusNode: selection.focusNode,
15597
+ focusOffset: selection.focusOffset
15598
+ };
15599
+ } else if (document.selection) {
15600
+ var range = document.selection.createRange();
15601
+ return {
15602
+ parentElement: range.parentElement(),
15603
+ text: range.text,
15604
+ top: range.boundingTop,
15605
+ left: range.boundingLeft
15606
+ };
15607
+ }
15608
+ }
15609
+
15610
+ /**
15611
+ * Poll selection to see whether it's changed.
15612
+ *
15613
+ * @param {object} nativeEvent
15614
+ * @return {?SyntheticEvent}
15615
+ */
15616
+ function constructSelectEvent(nativeEvent, nativeEventTarget) {
15617
+ // Ensure we have the right element, and that the user is not dragging a
15618
+ // selection (this matches native `select` event behavior). In HTML5, select
15619
+ // fires only on input and textarea thus if there's no focused element we
15620
+ // won't dispatch.
15621
+ if (mouseDown || activeElement == null || activeElement !== getActiveElement()) {
15622
+ return null;
15623
+ }
15624
+
15625
+ // Only fire when selection has actually changed.
15626
+ var currentSelection = getSelection(activeElement);
15627
+ if (!lastSelection || !shallowEqual(lastSelection, currentSelection)) {
15628
+ lastSelection = currentSelection;
15629
+
15630
+ var syntheticEvent = SyntheticEvent.getPooled(eventTypes.select, activeElementInst, nativeEvent, nativeEventTarget);
15631
+
15632
+ syntheticEvent.type = 'select';
15633
+ syntheticEvent.target = activeElement;
15634
+
15635
+ EventPropagators.accumulateTwoPhaseDispatches(syntheticEvent);
15636
+
15637
+ return syntheticEvent;
15638
+ }
15639
+
15640
+ return null;
15641
+ }
15642
+
15643
+ /**
15644
+ * This plugin creates an `onSelect` event that normalizes select events
15645
+ * across form elements.
15646
+ *
15647
+ * Supported elements are:
15648
+ * - input (see `isTextInputElement`)
15649
+ * - textarea
15650
+ * - contentEditable
15651
+ *
15652
+ * This differs from native browser implementations in the following ways:
15653
+ * - Fires on contentEditable fields as well as inputs.
15654
+ * - Fires for collapsed selection.
15655
+ * - Fires after user input.
15656
+ */
15657
+ var SelectEventPlugin = {
15658
+ eventTypes: eventTypes,
15659
+
15660
+ extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
15661
+ if (!hasListener) {
15662
+ return null;
15663
+ }
15664
+
15665
+ var targetNode = targetInst ? ReactDOMComponentTree.getNodeFromInstance(targetInst) : window;
15666
+
15667
+ switch (topLevelType) {
15668
+ // Track the input node that has focus.
15669
+ case 'topFocus':
15670
+ if (isTextInputElement(targetNode) || targetNode.contentEditable === 'true') {
15671
+ activeElement = targetNode;
15672
+ activeElementInst = targetInst;
15673
+ lastSelection = null;
15674
+ }
15675
+ break;
15676
+ case 'topBlur':
15677
+ activeElement = null;
15678
+ activeElementInst = null;
15679
+ lastSelection = null;
15680
+ break;
15681
+ // Don't fire the event while the user is dragging. This matches the
15682
+ // semantics of the native select event.
15683
+ case 'topMouseDown':
15684
+ mouseDown = true;
15685
+ break;
15686
+ case 'topContextMenu':
15687
+ case 'topMouseUp':
15688
+ mouseDown = false;
15689
+ return constructSelectEvent(nativeEvent, nativeEventTarget);
15690
+ // Chrome and IE fire non-standard event when selection is changed (and
15691
+ // sometimes when it hasn't). IE's event fires out of order with respect
15692
+ // to key and input events on deletion, so we discard it.
15693
+ //
15694
+ // Firefox doesn't support selectionchange, so check selection status
15695
+ // after each key entry. The selection changes after keydown and before
15696
+ // keyup, but we check on keydown as well in the case of holding down a
15697
+ // key, when multiple keydown events are fired but only one keyup is.
15698
+ // This is also our approach for IE handling, for the reason above.
15699
+ case 'topSelectionChange':
15700
+ if (skipSelectionChangeEvent) {
15701
+ break;
15702
+ }
15703
+ // falls through
15704
+ case 'topKeyDown':
15705
+ case 'topKeyUp':
15706
+ return constructSelectEvent(nativeEvent, nativeEventTarget);
15707
+ }
15708
+
15709
+ return null;
15710
+ },
15711
+
15712
+ didPutListener: function (inst, registrationName, listener) {
15713
+ if (registrationName === 'onSelect') {
15714
+ hasListener = true;
15715
+ }
15716
+ }
15717
+ };
15718
+
15719
+ module.exports = SelectEventPlugin;
15720
+ },{"./EventPropagators":53,"./ReactDOMComponentTree":67,"./ReactInputSelection":94,"./SyntheticEvent":120,"./isTextInputElement":152,"fbjs/lib/ExecutionEnvironment":6,"fbjs/lib/getActiveElement":15,"fbjs/lib/shallowEqual":26}],115:[function(require,module,exports){
15721
+ (function (process){(function (){
15722
+ /**
15723
+ * Copyright (c) 2013-present, Facebook, Inc.
15724
+ *
15725
+ * This source code is licensed under the MIT license found in the
15726
+ * LICENSE file in the root directory of this source tree.
15727
+ *
15728
+ *
15729
+ */
15730
+
15731
+ 'use strict';
15732
+
15733
+ var _prodInvariant = require('./reactProdInvariant');
15734
+
15735
+ var EventListener = require('fbjs/lib/EventListener');
15736
+ var EventPropagators = require('./EventPropagators');
15737
+ var ReactDOMComponentTree = require('./ReactDOMComponentTree');
15738
+ var SyntheticAnimationEvent = require('./SyntheticAnimationEvent');
15739
+ var SyntheticClipboardEvent = require('./SyntheticClipboardEvent');
15740
+ var SyntheticEvent = require('./SyntheticEvent');
15741
+ var SyntheticFocusEvent = require('./SyntheticFocusEvent');
15742
+ var SyntheticKeyboardEvent = require('./SyntheticKeyboardEvent');
15743
+ var SyntheticMouseEvent = require('./SyntheticMouseEvent');
15744
+ var SyntheticDragEvent = require('./SyntheticDragEvent');
15745
+ var SyntheticTouchEvent = require('./SyntheticTouchEvent');
15746
+ var SyntheticTransitionEvent = require('./SyntheticTransitionEvent');
15747
+ var SyntheticUIEvent = require('./SyntheticUIEvent');
15748
+ var SyntheticWheelEvent = require('./SyntheticWheelEvent');
15749
+
15750
+ var emptyFunction = require('fbjs/lib/emptyFunction');
15751
+ var getEventCharCode = require('./getEventCharCode');
15752
+ var invariant = require('fbjs/lib/invariant');
15753
+
15754
+ /**
15755
+ * Turns
15756
+ * ['abort', ...]
15757
+ * into
15758
+ * eventTypes = {
15759
+ * 'abort': {
15760
+ * phasedRegistrationNames: {
15761
+ * bubbled: 'onAbort',
15762
+ * captured: 'onAbortCapture',
15763
+ * },
15764
+ * dependencies: ['topAbort'],
15765
+ * },
15766
+ * ...
15767
+ * };
15768
+ * topLevelEventsToDispatchConfig = {
15769
+ * 'topAbort': { sameConfig }
15770
+ * };
15771
+ */
15772
+ var eventTypes = {};
15773
+ var topLevelEventsToDispatchConfig = {};
15774
+ ['abort', 'animationEnd', 'animationIteration', 'animationStart', 'blur', 'canPlay', 'canPlayThrough', 'click', 'contextMenu', 'copy', 'cut', 'doubleClick', 'drag', 'dragEnd', 'dragEnter', 'dragExit', 'dragLeave', 'dragOver', 'dragStart', 'drop', 'durationChange', 'emptied', 'encrypted', 'ended', 'error', 'focus', 'input', 'invalid', 'keyDown', 'keyPress', 'keyUp', 'load', 'loadedData', 'loadedMetadata', 'loadStart', 'mouseDown', 'mouseMove', 'mouseOut', 'mouseOver', 'mouseUp', 'paste', 'pause', 'play', 'playing', 'progress', 'rateChange', 'reset', 'scroll', 'seeked', 'seeking', 'stalled', 'submit', 'suspend', 'timeUpdate', 'touchCancel', 'touchEnd', 'touchMove', 'touchStart', 'transitionEnd', 'volumeChange', 'waiting', 'wheel'].forEach(function (event) {
15775
+ var capitalizedEvent = event[0].toUpperCase() + event.slice(1);
15776
+ var onEvent = 'on' + capitalizedEvent;
15777
+ var topEvent = 'top' + capitalizedEvent;
15778
+
15779
+ var type = {
15780
+ phasedRegistrationNames: {
15781
+ bubbled: onEvent,
15782
+ captured: onEvent + 'Capture'
15783
+ },
15784
+ dependencies: [topEvent]
15785
+ };
15786
+ eventTypes[event] = type;
15787
+ topLevelEventsToDispatchConfig[topEvent] = type;
15788
+ });
15789
+
15790
+ var onClickListeners = {};
15791
+
15792
+ function getDictionaryKey(inst) {
15793
+ // Prevents V8 performance issue:
15794
+ // https://github.com/facebook/react/pull/7232
15795
+ return '.' + inst._rootNodeID;
15796
+ }
15797
+
15798
+ function isInteractive(tag) {
15799
+ return tag === 'button' || tag === 'input' || tag === 'select' || tag === 'textarea';
15800
+ }
15801
+
15802
+ var SimpleEventPlugin = {
15803
+ eventTypes: eventTypes,
15804
+
15805
+ extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
15806
+ var dispatchConfig = topLevelEventsToDispatchConfig[topLevelType];
15807
+ if (!dispatchConfig) {
15808
+ return null;
15809
+ }
15810
+ var EventConstructor;
15811
+ switch (topLevelType) {
15812
+ case 'topAbort':
15813
+ case 'topCanPlay':
15814
+ case 'topCanPlayThrough':
15815
+ case 'topDurationChange':
15816
+ case 'topEmptied':
15817
+ case 'topEncrypted':
15818
+ case 'topEnded':
15819
+ case 'topError':
15820
+ case 'topInput':
15821
+ case 'topInvalid':
15822
+ case 'topLoad':
15823
+ case 'topLoadedData':
15824
+ case 'topLoadedMetadata':
15825
+ case 'topLoadStart':
15826
+ case 'topPause':
15827
+ case 'topPlay':
15828
+ case 'topPlaying':
15829
+ case 'topProgress':
15830
+ case 'topRateChange':
15831
+ case 'topReset':
15832
+ case 'topSeeked':
15833
+ case 'topSeeking':
15834
+ case 'topStalled':
15835
+ case 'topSubmit':
15836
+ case 'topSuspend':
15837
+ case 'topTimeUpdate':
15838
+ case 'topVolumeChange':
15839
+ case 'topWaiting':
15840
+ // HTML Events
15841
+ // @see http://www.w3.org/TR/html5/index.html#events-0
15842
+ EventConstructor = SyntheticEvent;
15843
+ break;
15844
+ case 'topKeyPress':
15845
+ // Firefox creates a keypress event for function keys too. This removes
15846
+ // the unwanted keypress events. Enter is however both printable and
15847
+ // non-printable. One would expect Tab to be as well (but it isn't).
15848
+ if (getEventCharCode(nativeEvent) === 0) {
15849
+ return null;
15850
+ }
15851
+ /* falls through */
15852
+ case 'topKeyDown':
15853
+ case 'topKeyUp':
15854
+ EventConstructor = SyntheticKeyboardEvent;
15855
+ break;
15856
+ case 'topBlur':
15857
+ case 'topFocus':
15858
+ EventConstructor = SyntheticFocusEvent;
15859
+ break;
15860
+ case 'topClick':
15861
+ // Firefox creates a click event on right mouse clicks. This removes the
15862
+ // unwanted click events.
15863
+ if (nativeEvent.button === 2) {
15864
+ return null;
15865
+ }
15866
+ /* falls through */
15867
+ case 'topDoubleClick':
15868
+ case 'topMouseDown':
15869
+ case 'topMouseMove':
15870
+ case 'topMouseUp':
15871
+ // TODO: Disabled elements should not respond to mouse events
15872
+ /* falls through */
15873
+ case 'topMouseOut':
15874
+ case 'topMouseOver':
15875
+ case 'topContextMenu':
15876
+ EventConstructor = SyntheticMouseEvent;
15877
+ break;
15878
+ case 'topDrag':
15879
+ case 'topDragEnd':
15880
+ case 'topDragEnter':
15881
+ case 'topDragExit':
15882
+ case 'topDragLeave':
15883
+ case 'topDragOver':
15884
+ case 'topDragStart':
15885
+ case 'topDrop':
15886
+ EventConstructor = SyntheticDragEvent;
15887
+ break;
15888
+ case 'topTouchCancel':
15889
+ case 'topTouchEnd':
15890
+ case 'topTouchMove':
15891
+ case 'topTouchStart':
15892
+ EventConstructor = SyntheticTouchEvent;
15893
+ break;
15894
+ case 'topAnimationEnd':
15895
+ case 'topAnimationIteration':
15896
+ case 'topAnimationStart':
15897
+ EventConstructor = SyntheticAnimationEvent;
15898
+ break;
15899
+ case 'topTransitionEnd':
15900
+ EventConstructor = SyntheticTransitionEvent;
15901
+ break;
15902
+ case 'topScroll':
15903
+ EventConstructor = SyntheticUIEvent;
15904
+ break;
15905
+ case 'topWheel':
15906
+ EventConstructor = SyntheticWheelEvent;
15907
+ break;
15908
+ case 'topCopy':
15909
+ case 'topCut':
15910
+ case 'topPaste':
15911
+ EventConstructor = SyntheticClipboardEvent;
15912
+ break;
15913
+ }
15914
+ !EventConstructor ? process.env.NODE_ENV !== 'production' ? invariant(false, 'SimpleEventPlugin: Unhandled event type, `%s`.', topLevelType) : _prodInvariant('86', topLevelType) : void 0;
15915
+ var event = EventConstructor.getPooled(dispatchConfig, targetInst, nativeEvent, nativeEventTarget);
15916
+ EventPropagators.accumulateTwoPhaseDispatches(event);
15917
+ return event;
15918
+ },
15919
+
15920
+ didPutListener: function (inst, registrationName, listener) {
15921
+ // Mobile Safari does not fire properly bubble click events on
15922
+ // non-interactive elements, which means delegated click listeners do not
15923
+ // fire. The workaround for this bug involves attaching an empty click
15924
+ // listener on the target node.
15925
+ // http://www.quirksmode.org/blog/archives/2010/09/click_event_del.html
15926
+ if (registrationName === 'onClick' && !isInteractive(inst._tag)) {
15927
+ var key = getDictionaryKey(inst);
15928
+ var node = ReactDOMComponentTree.getNodeFromInstance(inst);
15929
+ if (!onClickListeners[key]) {
15930
+ onClickListeners[key] = EventListener.listen(node, 'click', emptyFunction);
15931
+ }
15932
+ }
15933
+ },
15934
+
15935
+ willDeleteListener: function (inst, registrationName) {
15936
+ if (registrationName === 'onClick' && !isInteractive(inst._tag)) {
15937
+ var key = getDictionaryKey(inst);
15938
+ onClickListeners[key].remove();
15939
+ delete onClickListeners[key];
15940
+ }
15941
+ }
15942
+ };
15943
+
15944
+ module.exports = SimpleEventPlugin;
15945
+ }).call(this)}).call(this,require('_process'))
15946
+ },{"./EventPropagators":53,"./ReactDOMComponentTree":67,"./SyntheticAnimationEvent":116,"./SyntheticClipboardEvent":117,"./SyntheticDragEvent":119,"./SyntheticEvent":120,"./SyntheticFocusEvent":121,"./SyntheticKeyboardEvent":123,"./SyntheticMouseEvent":124,"./SyntheticTouchEvent":125,"./SyntheticTransitionEvent":126,"./SyntheticUIEvent":127,"./SyntheticWheelEvent":128,"./getEventCharCode":140,"./reactProdInvariant":154,"_process":29,"fbjs/lib/EventListener":5,"fbjs/lib/emptyFunction":12,"fbjs/lib/invariant":20}],116:[function(require,module,exports){
15947
+ /**
15948
+ * Copyright (c) 2013-present, Facebook, Inc.
15949
+ *
15950
+ * This source code is licensed under the MIT license found in the
15951
+ * LICENSE file in the root directory of this source tree.
15952
+ *
15953
+ */
15954
+
15955
+ 'use strict';
15956
+
15957
+ var SyntheticEvent = require('./SyntheticEvent');
15958
+
15959
+ /**
15960
+ * @interface Event
15961
+ * @see http://www.w3.org/TR/css3-animations/#AnimationEvent-interface
15962
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/AnimationEvent
15963
+ */
15964
+ var AnimationEventInterface = {
15965
+ animationName: null,
15966
+ elapsedTime: null,
15967
+ pseudoElement: null
15968
+ };
15969
+
15970
+ /**
15971
+ * @param {object} dispatchConfig Configuration used to dispatch this event.
15972
+ * @param {string} dispatchMarker Marker identifying the event target.
15973
+ * @param {object} nativeEvent Native browser event.
15974
+ * @extends {SyntheticEvent}
15975
+ */
15976
+ function SyntheticAnimationEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
15977
+ return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
15978
+ }
15979
+
15980
+ SyntheticEvent.augmentClass(SyntheticAnimationEvent, AnimationEventInterface);
15981
+
15982
+ module.exports = SyntheticAnimationEvent;
15983
+ },{"./SyntheticEvent":120}],117:[function(require,module,exports){
15984
+ /**
15985
+ * Copyright (c) 2013-present, Facebook, Inc.
15986
+ *
15987
+ * This source code is licensed under the MIT license found in the
15988
+ * LICENSE file in the root directory of this source tree.
15989
+ *
15990
+ */
15991
+
15992
+ 'use strict';
15993
+
15994
+ var SyntheticEvent = require('./SyntheticEvent');
15995
+
15996
+ /**
15997
+ * @interface Event
15998
+ * @see http://www.w3.org/TR/clipboard-apis/
15999
+ */
16000
+ var ClipboardEventInterface = {
16001
+ clipboardData: function (event) {
16002
+ return 'clipboardData' in event ? event.clipboardData : window.clipboardData;
16003
+ }
16004
+ };
16005
+
16006
+ /**
16007
+ * @param {object} dispatchConfig Configuration used to dispatch this event.
16008
+ * @param {string} dispatchMarker Marker identifying the event target.
16009
+ * @param {object} nativeEvent Native browser event.
16010
+ * @extends {SyntheticUIEvent}
16011
+ */
16012
+ function SyntheticClipboardEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
16013
+ return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
16014
+ }
16015
+
16016
+ SyntheticEvent.augmentClass(SyntheticClipboardEvent, ClipboardEventInterface);
16017
+
16018
+ module.exports = SyntheticClipboardEvent;
16019
+ },{"./SyntheticEvent":120}],118:[function(require,module,exports){
16020
+ /**
16021
+ * Copyright (c) 2013-present, Facebook, Inc.
16022
+ *
16023
+ * This source code is licensed under the MIT license found in the
16024
+ * LICENSE file in the root directory of this source tree.
16025
+ *
16026
+ */
16027
+
16028
+ 'use strict';
16029
+
16030
+ var SyntheticEvent = require('./SyntheticEvent');
16031
+
16032
+ /**
16033
+ * @interface Event
16034
+ * @see http://www.w3.org/TR/DOM-Level-3-Events/#events-compositionevents
16035
+ */
16036
+ var CompositionEventInterface = {
16037
+ data: null
16038
+ };
16039
+
16040
+ /**
16041
+ * @param {object} dispatchConfig Configuration used to dispatch this event.
16042
+ * @param {string} dispatchMarker Marker identifying the event target.
16043
+ * @param {object} nativeEvent Native browser event.
16044
+ * @extends {SyntheticUIEvent}
16045
+ */
16046
+ function SyntheticCompositionEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
16047
+ return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
16048
+ }
16049
+
16050
+ SyntheticEvent.augmentClass(SyntheticCompositionEvent, CompositionEventInterface);
16051
+
16052
+ module.exports = SyntheticCompositionEvent;
16053
+ },{"./SyntheticEvent":120}],119:[function(require,module,exports){
16054
+ /**
16055
+ * Copyright (c) 2013-present, Facebook, Inc.
16056
+ *
16057
+ * This source code is licensed under the MIT license found in the
16058
+ * LICENSE file in the root directory of this source tree.
16059
+ *
16060
+ */
16061
+
16062
+ 'use strict';
16063
+
16064
+ var SyntheticMouseEvent = require('./SyntheticMouseEvent');
16065
+
16066
+ /**
16067
+ * @interface DragEvent
16068
+ * @see http://www.w3.org/TR/DOM-Level-3-Events/
16069
+ */
16070
+ var DragEventInterface = {
16071
+ dataTransfer: null
16072
+ };
16073
+
16074
+ /**
16075
+ * @param {object} dispatchConfig Configuration used to dispatch this event.
16076
+ * @param {string} dispatchMarker Marker identifying the event target.
16077
+ * @param {object} nativeEvent Native browser event.
16078
+ * @extends {SyntheticUIEvent}
16079
+ */
16080
+ function SyntheticDragEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
16081
+ return SyntheticMouseEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
16082
+ }
16083
+
16084
+ SyntheticMouseEvent.augmentClass(SyntheticDragEvent, DragEventInterface);
16085
+
16086
+ module.exports = SyntheticDragEvent;
16087
+ },{"./SyntheticMouseEvent":124}],120:[function(require,module,exports){
16088
+ (function (process){(function (){
16089
+ /**
16090
+ * Copyright (c) 2013-present, Facebook, Inc.
16091
+ *
16092
+ * This source code is licensed under the MIT license found in the
16093
+ * LICENSE file in the root directory of this source tree.
16094
+ *
16095
+ */
16096
+
16097
+ 'use strict';
16098
+
16099
+ var _assign = require('object-assign');
16100
+
16101
+ var PooledClass = require('./PooledClass');
16102
+
16103
+ var emptyFunction = require('fbjs/lib/emptyFunction');
16104
+ var warning = require('fbjs/lib/warning');
16105
+
16106
+ var didWarnForAddedNewProperty = false;
16107
+ var isProxySupported = typeof Proxy === 'function';
16108
+
16109
+ var shouldBeReleasedProperties = ['dispatchConfig', '_targetInst', 'nativeEvent', 'isDefaultPrevented', 'isPropagationStopped', '_dispatchListeners', '_dispatchInstances'];
16110
+
16111
+ /**
16112
+ * @interface Event
16113
+ * @see http://www.w3.org/TR/DOM-Level-3-Events/
16114
+ */
16115
+ var EventInterface = {
16116
+ type: null,
16117
+ target: null,
16118
+ // currentTarget is set when dispatching; no use in copying it here
16119
+ currentTarget: emptyFunction.thatReturnsNull,
16120
+ eventPhase: null,
16121
+ bubbles: null,
16122
+ cancelable: null,
16123
+ timeStamp: function (event) {
16124
+ return event.timeStamp || Date.now();
16125
+ },
16126
+ defaultPrevented: null,
16127
+ isTrusted: null
16128
+ };
16129
+
16130
+ /**
16131
+ * Synthetic events are dispatched by event plugins, typically in response to a
16132
+ * top-level event delegation handler.
16133
+ *
16134
+ * These systems should generally use pooling to reduce the frequency of garbage
16135
+ * collection. The system should check `isPersistent` to determine whether the
16136
+ * event should be released into the pool after being dispatched. Users that
16137
+ * need a persisted event should invoke `persist`.
16138
+ *
16139
+ * Synthetic events (and subclasses) implement the DOM Level 3 Events API by
16140
+ * normalizing browser quirks. Subclasses do not necessarily have to implement a
16141
+ * DOM interface; custom application-specific events can also subclass this.
16142
+ *
16143
+ * @param {object} dispatchConfig Configuration used to dispatch this event.
16144
+ * @param {*} targetInst Marker identifying the event target.
16145
+ * @param {object} nativeEvent Native browser event.
16146
+ * @param {DOMEventTarget} nativeEventTarget Target node.
16147
+ */
16148
+ function SyntheticEvent(dispatchConfig, targetInst, nativeEvent, nativeEventTarget) {
16149
+ if (process.env.NODE_ENV !== 'production') {
16150
+ // these have a getter/setter for warnings
16151
+ delete this.nativeEvent;
16152
+ delete this.preventDefault;
16153
+ delete this.stopPropagation;
16154
+ }
16155
+
16156
+ this.dispatchConfig = dispatchConfig;
16157
+ this._targetInst = targetInst;
16158
+ this.nativeEvent = nativeEvent;
16159
+
16160
+ var Interface = this.constructor.Interface;
16161
+ for (var propName in Interface) {
16162
+ if (!Interface.hasOwnProperty(propName)) {
16163
+ continue;
16164
+ }
16165
+ if (process.env.NODE_ENV !== 'production') {
16166
+ delete this[propName]; // this has a getter/setter for warnings
16167
+ }
16168
+ var normalize = Interface[propName];
16169
+ if (normalize) {
16170
+ this[propName] = normalize(nativeEvent);
16171
+ } else {
16172
+ if (propName === 'target') {
16173
+ this.target = nativeEventTarget;
16174
+ } else {
16175
+ this[propName] = nativeEvent[propName];
16176
+ }
16177
+ }
16178
+ }
16179
+
16180
+ var defaultPrevented = nativeEvent.defaultPrevented != null ? nativeEvent.defaultPrevented : nativeEvent.returnValue === false;
16181
+ if (defaultPrevented) {
16182
+ this.isDefaultPrevented = emptyFunction.thatReturnsTrue;
16183
+ } else {
16184
+ this.isDefaultPrevented = emptyFunction.thatReturnsFalse;
16185
+ }
16186
+ this.isPropagationStopped = emptyFunction.thatReturnsFalse;
16187
+ return this;
16188
+ }
16189
+
16190
+ _assign(SyntheticEvent.prototype, {
16191
+ preventDefault: function () {
16192
+ this.defaultPrevented = true;
16193
+ var event = this.nativeEvent;
16194
+ if (!event) {
16195
+ return;
16196
+ }
16197
+
16198
+ if (event.preventDefault) {
16199
+ event.preventDefault();
16200
+ // eslint-disable-next-line valid-typeof
16201
+ } else if (typeof event.returnValue !== 'unknown') {
16202
+ event.returnValue = false;
16203
+ }
16204
+ this.isDefaultPrevented = emptyFunction.thatReturnsTrue;
16205
+ },
16206
+
16207
+ stopPropagation: function () {
16208
+ var event = this.nativeEvent;
16209
+ if (!event) {
16210
+ return;
16211
+ }
16212
+
16213
+ if (event.stopPropagation) {
16214
+ event.stopPropagation();
16215
+ // eslint-disable-next-line valid-typeof
16216
+ } else if (typeof event.cancelBubble !== 'unknown') {
16217
+ // The ChangeEventPlugin registers a "propertychange" event for
16218
+ // IE. This event does not support bubbling or cancelling, and
16219
+ // any references to cancelBubble throw "Member not found". A
16220
+ // typeof check of "unknown" circumvents this issue (and is also
16221
+ // IE specific).
16222
+ event.cancelBubble = true;
16223
+ }
16224
+
16225
+ this.isPropagationStopped = emptyFunction.thatReturnsTrue;
16226
+ },
16227
+
16228
+ /**
16229
+ * We release all dispatched `SyntheticEvent`s after each event loop, adding
16230
+ * them back into the pool. This allows a way to hold onto a reference that
16231
+ * won't be added back into the pool.
16232
+ */
16233
+ persist: function () {
16234
+ this.isPersistent = emptyFunction.thatReturnsTrue;
16235
+ },
16236
+
16237
+ /**
16238
+ * Checks if this event should be released back into the pool.
16239
+ *
16240
+ * @return {boolean} True if this should not be released, false otherwise.
16241
+ */
16242
+ isPersistent: emptyFunction.thatReturnsFalse,
16243
+
16244
+ /**
16245
+ * `PooledClass` looks for `destructor` on each instance it releases.
16246
+ */
16247
+ destructor: function () {
16248
+ var Interface = this.constructor.Interface;
16249
+ for (var propName in Interface) {
16250
+ if (process.env.NODE_ENV !== 'production') {
16251
+ Object.defineProperty(this, propName, getPooledWarningPropertyDefinition(propName, Interface[propName]));
16252
+ } else {
16253
+ this[propName] = null;
16254
+ }
16255
+ }
16256
+ for (var i = 0; i < shouldBeReleasedProperties.length; i++) {
16257
+ this[shouldBeReleasedProperties[i]] = null;
16258
+ }
16259
+ if (process.env.NODE_ENV !== 'production') {
16260
+ Object.defineProperty(this, 'nativeEvent', getPooledWarningPropertyDefinition('nativeEvent', null));
16261
+ Object.defineProperty(this, 'preventDefault', getPooledWarningPropertyDefinition('preventDefault', emptyFunction));
16262
+ Object.defineProperty(this, 'stopPropagation', getPooledWarningPropertyDefinition('stopPropagation', emptyFunction));
16263
+ }
16264
+ }
16265
+ });
16266
+
16267
+ SyntheticEvent.Interface = EventInterface;
16268
+
16269
+ /**
16270
+ * Helper to reduce boilerplate when creating subclasses.
16271
+ *
16272
+ * @param {function} Class
16273
+ * @param {?object} Interface
16274
+ */
16275
+ SyntheticEvent.augmentClass = function (Class, Interface) {
16276
+ var Super = this;
16277
+
16278
+ var E = function () {};
16279
+ E.prototype = Super.prototype;
16280
+ var prototype = new E();
16281
+
16282
+ _assign(prototype, Class.prototype);
16283
+ Class.prototype = prototype;
16284
+ Class.prototype.constructor = Class;
16285
+
16286
+ Class.Interface = _assign({}, Super.Interface, Interface);
16287
+ Class.augmentClass = Super.augmentClass;
16288
+
16289
+ PooledClass.addPoolingTo(Class, PooledClass.fourArgumentPooler);
16290
+ };
16291
+
16292
+ /** Proxying after everything set on SyntheticEvent
16293
+ * to resolve Proxy issue on some WebKit browsers
16294
+ * in which some Event properties are set to undefined (GH#10010)
16295
+ */
16296
+ if (process.env.NODE_ENV !== 'production') {
16297
+ if (isProxySupported) {
16298
+ /*eslint-disable no-func-assign */
16299
+ SyntheticEvent = new Proxy(SyntheticEvent, {
16300
+ construct: function (target, args) {
16301
+ return this.apply(target, Object.create(target.prototype), args);
16302
+ },
16303
+ apply: function (constructor, that, args) {
16304
+ return new Proxy(constructor.apply(that, args), {
16305
+ set: function (target, prop, value) {
16306
+ if (prop !== 'isPersistent' && !target.constructor.Interface.hasOwnProperty(prop) && shouldBeReleasedProperties.indexOf(prop) === -1) {
16307
+ process.env.NODE_ENV !== 'production' ? warning(didWarnForAddedNewProperty || target.isPersistent(), "This synthetic event is reused for performance reasons. If you're " + "seeing this, you're adding a new property in the synthetic event object. " + 'The property is never released. See ' + 'https://fb.me/react-event-pooling for more information.') : void 0;
16308
+ didWarnForAddedNewProperty = true;
16309
+ }
16310
+ target[prop] = value;
16311
+ return true;
16312
+ }
16313
+ });
16314
+ }
16315
+ });
16316
+ /*eslint-enable no-func-assign */
16317
+ }
16318
+ }
16319
+
16320
+ PooledClass.addPoolingTo(SyntheticEvent, PooledClass.fourArgumentPooler);
16321
+
16322
+ module.exports = SyntheticEvent;
16323
+
16324
+ /**
16325
+ * Helper to nullify syntheticEvent instance properties when destructing
16326
+ *
16327
+ * @param {object} SyntheticEvent
16328
+ * @param {String} propName
16329
+ * @return {object} defineProperty object
16330
+ */
16331
+ function getPooledWarningPropertyDefinition(propName, getVal) {
16332
+ var isFunction = typeof getVal === 'function';
16333
+ return {
16334
+ configurable: true,
16335
+ set: set,
16336
+ get: get
16337
+ };
16338
+
16339
+ function set(val) {
16340
+ var action = isFunction ? 'setting the method' : 'setting the property';
16341
+ warn(action, 'This is effectively a no-op');
16342
+ return val;
16343
+ }
16344
+
16345
+ function get() {
16346
+ var action = isFunction ? 'accessing the method' : 'accessing the property';
16347
+ var result = isFunction ? 'This is a no-op function' : 'This is set to null';
16348
+ warn(action, result);
16349
+ return getVal;
16350
+ }
16351
+
16352
+ function warn(action, result) {
16353
+ var warningCondition = false;
16354
+ process.env.NODE_ENV !== 'production' ? warning(warningCondition, "This synthetic event is reused for performance reasons. If you're seeing this, " + "you're %s `%s` on a released/nullified synthetic event. %s. " + 'If you must keep the original synthetic event around, use event.persist(). ' + 'See https://fb.me/react-event-pooling for more information.', action, propName, result) : void 0;
16355
+ }
16356
+ }
16357
+ }).call(this)}).call(this,require('_process'))
16358
+ },{"./PooledClass":58,"_process":29,"fbjs/lib/emptyFunction":12,"fbjs/lib/warning":27,"object-assign":28}],121:[function(require,module,exports){
16359
+ /**
16360
+ * Copyright (c) 2013-present, Facebook, Inc.
16361
+ *
16362
+ * This source code is licensed under the MIT license found in the
16363
+ * LICENSE file in the root directory of this source tree.
16364
+ *
16365
+ */
16366
+
16367
+ 'use strict';
16368
+
16369
+ var SyntheticUIEvent = require('./SyntheticUIEvent');
16370
+
16371
+ /**
16372
+ * @interface FocusEvent
16373
+ * @see http://www.w3.org/TR/DOM-Level-3-Events/
16374
+ */
16375
+ var FocusEventInterface = {
16376
+ relatedTarget: null
16377
+ };
16378
+
16379
+ /**
16380
+ * @param {object} dispatchConfig Configuration used to dispatch this event.
16381
+ * @param {string} dispatchMarker Marker identifying the event target.
16382
+ * @param {object} nativeEvent Native browser event.
16383
+ * @extends {SyntheticUIEvent}
16384
+ */
16385
+ function SyntheticFocusEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
16386
+ return SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
16387
+ }
16388
+
16389
+ SyntheticUIEvent.augmentClass(SyntheticFocusEvent, FocusEventInterface);
16390
+
16391
+ module.exports = SyntheticFocusEvent;
16392
+ },{"./SyntheticUIEvent":127}],122:[function(require,module,exports){
16393
+ /**
16394
+ * Copyright (c) 2013-present, Facebook, Inc.
16395
+ *
16396
+ * This source code is licensed under the MIT license found in the
16397
+ * LICENSE file in the root directory of this source tree.
16398
+ *
16399
+ */
16400
+
16401
+ 'use strict';
16402
+
16403
+ var SyntheticEvent = require('./SyntheticEvent');
16404
+
16405
+ /**
16406
+ * @interface Event
16407
+ * @see http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105
16408
+ * /#events-inputevents
16409
+ */
16410
+ var InputEventInterface = {
16411
+ data: null
16412
+ };
16413
+
16414
+ /**
16415
+ * @param {object} dispatchConfig Configuration used to dispatch this event.
16416
+ * @param {string} dispatchMarker Marker identifying the event target.
16417
+ * @param {object} nativeEvent Native browser event.
16418
+ * @extends {SyntheticUIEvent}
16419
+ */
16420
+ function SyntheticInputEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
16421
+ return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
16422
+ }
16423
+
16424
+ SyntheticEvent.augmentClass(SyntheticInputEvent, InputEventInterface);
16425
+
16426
+ module.exports = SyntheticInputEvent;
16427
+ },{"./SyntheticEvent":120}],123:[function(require,module,exports){
16428
+ /**
16429
+ * Copyright (c) 2013-present, Facebook, Inc.
16430
+ *
16431
+ * This source code is licensed under the MIT license found in the
16432
+ * LICENSE file in the root directory of this source tree.
16433
+ *
16434
+ */
16435
+
16436
+ 'use strict';
16437
+
16438
+ var SyntheticUIEvent = require('./SyntheticUIEvent');
16439
+
16440
+ var getEventCharCode = require('./getEventCharCode');
16441
+ var getEventKey = require('./getEventKey');
16442
+ var getEventModifierState = require('./getEventModifierState');
16443
+
16444
+ /**
16445
+ * @interface KeyboardEvent
16446
+ * @see http://www.w3.org/TR/DOM-Level-3-Events/
16447
+ */
16448
+ var KeyboardEventInterface = {
16449
+ key: getEventKey,
16450
+ location: null,
16451
+ ctrlKey: null,
16452
+ shiftKey: null,
16453
+ altKey: null,
16454
+ metaKey: null,
16455
+ repeat: null,
16456
+ locale: null,
16457
+ getModifierState: getEventModifierState,
16458
+ // Legacy Interface
16459
+ charCode: function (event) {
16460
+ // `charCode` is the result of a KeyPress event and represents the value of
16461
+ // the actual printable character.
16462
+
16463
+ // KeyPress is deprecated, but its replacement is not yet final and not
16464
+ // implemented in any major browser. Only KeyPress has charCode.
16465
+ if (event.type === 'keypress') {
16466
+ return getEventCharCode(event);
16467
+ }
16468
+ return 0;
16469
+ },
16470
+ keyCode: function (event) {
16471
+ // `keyCode` is the result of a KeyDown/Up event and represents the value of
16472
+ // physical keyboard key.
16473
+
16474
+ // The actual meaning of the value depends on the users' keyboard layout
16475
+ // which cannot be detected. Assuming that it is a US keyboard layout
16476
+ // provides a surprisingly accurate mapping for US and European users.
16477
+ // Due to this, it is left to the user to implement at this time.
16478
+ if (event.type === 'keydown' || event.type === 'keyup') {
16479
+ return event.keyCode;
16480
+ }
16481
+ return 0;
16482
+ },
16483
+ which: function (event) {
16484
+ // `which` is an alias for either `keyCode` or `charCode` depending on the
16485
+ // type of the event.
16486
+ if (event.type === 'keypress') {
16487
+ return getEventCharCode(event);
16488
+ }
16489
+ if (event.type === 'keydown' || event.type === 'keyup') {
16490
+ return event.keyCode;
16491
+ }
16492
+ return 0;
16493
+ }
16494
+ };
16495
+
16496
+ /**
16497
+ * @param {object} dispatchConfig Configuration used to dispatch this event.
16498
+ * @param {string} dispatchMarker Marker identifying the event target.
16499
+ * @param {object} nativeEvent Native browser event.
16500
+ * @extends {SyntheticUIEvent}
16501
+ */
16502
+ function SyntheticKeyboardEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
16503
+ return SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
16504
+ }
16505
+
16506
+ SyntheticUIEvent.augmentClass(SyntheticKeyboardEvent, KeyboardEventInterface);
16507
+
16508
+ module.exports = SyntheticKeyboardEvent;
16509
+ },{"./SyntheticUIEvent":127,"./getEventCharCode":140,"./getEventKey":141,"./getEventModifierState":142}],124:[function(require,module,exports){
16510
+ /**
16511
+ * Copyright (c) 2013-present, Facebook, Inc.
16512
+ *
16513
+ * This source code is licensed under the MIT license found in the
16514
+ * LICENSE file in the root directory of this source tree.
16515
+ *
16516
+ */
16517
+
16518
+ 'use strict';
16519
+
16520
+ var SyntheticUIEvent = require('./SyntheticUIEvent');
16521
+ var ViewportMetrics = require('./ViewportMetrics');
16522
+
16523
+ var getEventModifierState = require('./getEventModifierState');
16524
+
16525
+ /**
16526
+ * @interface MouseEvent
16527
+ * @see http://www.w3.org/TR/DOM-Level-3-Events/
16528
+ */
16529
+ var MouseEventInterface = {
16530
+ screenX: null,
16531
+ screenY: null,
16532
+ clientX: null,
16533
+ clientY: null,
16534
+ ctrlKey: null,
16535
+ shiftKey: null,
16536
+ altKey: null,
16537
+ metaKey: null,
16538
+ getModifierState: getEventModifierState,
16539
+ button: function (event) {
16540
+ // Webkit, Firefox, IE9+
16541
+ // which: 1 2 3
16542
+ // button: 0 1 2 (standard)
16543
+ var button = event.button;
16544
+ if ('which' in event) {
16545
+ return button;
16546
+ }
16547
+ // IE<9
16548
+ // which: undefined
16549
+ // button: 0 0 0
16550
+ // button: 1 4 2 (onmouseup)
16551
+ return button === 2 ? 2 : button === 4 ? 1 : 0;
16552
+ },
16553
+ buttons: null,
16554
+ relatedTarget: function (event) {
16555
+ return event.relatedTarget || (event.fromElement === event.srcElement ? event.toElement : event.fromElement);
16556
+ },
16557
+ // "Proprietary" Interface.
16558
+ pageX: function (event) {
16559
+ return 'pageX' in event ? event.pageX : event.clientX + ViewportMetrics.currentScrollLeft;
16560
+ },
16561
+ pageY: function (event) {
16562
+ return 'pageY' in event ? event.pageY : event.clientY + ViewportMetrics.currentScrollTop;
16563
+ }
16564
+ };
16565
+
16566
+ /**
16567
+ * @param {object} dispatchConfig Configuration used to dispatch this event.
16568
+ * @param {string} dispatchMarker Marker identifying the event target.
16569
+ * @param {object} nativeEvent Native browser event.
16570
+ * @extends {SyntheticUIEvent}
16571
+ */
16572
+ function SyntheticMouseEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
16573
+ return SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
16574
+ }
16575
+
16576
+ SyntheticUIEvent.augmentClass(SyntheticMouseEvent, MouseEventInterface);
16577
+
16578
+ module.exports = SyntheticMouseEvent;
16579
+ },{"./SyntheticUIEvent":127,"./ViewportMetrics":130,"./getEventModifierState":142}],125:[function(require,module,exports){
16580
+ /**
16581
+ * Copyright (c) 2013-present, Facebook, Inc.
16582
+ *
16583
+ * This source code is licensed under the MIT license found in the
16584
+ * LICENSE file in the root directory of this source tree.
16585
+ *
16586
+ */
16587
+
16588
+ 'use strict';
16589
+
16590
+ var SyntheticUIEvent = require('./SyntheticUIEvent');
16591
+
16592
+ var getEventModifierState = require('./getEventModifierState');
16593
+
16594
+ /**
16595
+ * @interface TouchEvent
16596
+ * @see http://www.w3.org/TR/touch-events/
16597
+ */
16598
+ var TouchEventInterface = {
16599
+ touches: null,
16600
+ targetTouches: null,
16601
+ changedTouches: null,
16602
+ altKey: null,
16603
+ metaKey: null,
16604
+ ctrlKey: null,
16605
+ shiftKey: null,
16606
+ getModifierState: getEventModifierState
16607
+ };
16608
+
16609
+ /**
16610
+ * @param {object} dispatchConfig Configuration used to dispatch this event.
16611
+ * @param {string} dispatchMarker Marker identifying the event target.
16612
+ * @param {object} nativeEvent Native browser event.
16613
+ * @extends {SyntheticUIEvent}
16614
+ */
16615
+ function SyntheticTouchEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
16616
+ return SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
16617
+ }
16618
+
16619
+ SyntheticUIEvent.augmentClass(SyntheticTouchEvent, TouchEventInterface);
16620
+
16621
+ module.exports = SyntheticTouchEvent;
16622
+ },{"./SyntheticUIEvent":127,"./getEventModifierState":142}],126:[function(require,module,exports){
16623
+ /**
16624
+ * Copyright (c) 2013-present, Facebook, Inc.
16625
+ *
16626
+ * This source code is licensed under the MIT license found in the
16627
+ * LICENSE file in the root directory of this source tree.
16628
+ *
16629
+ */
16630
+
16631
+ 'use strict';
16632
+
16633
+ var SyntheticEvent = require('./SyntheticEvent');
16634
+
16635
+ /**
16636
+ * @interface Event
16637
+ * @see http://www.w3.org/TR/2009/WD-css3-transitions-20090320/#transition-events-
16638
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/TransitionEvent
16639
+ */
16640
+ var TransitionEventInterface = {
16641
+ propertyName: null,
16642
+ elapsedTime: null,
16643
+ pseudoElement: null
16644
+ };
16645
+
16646
+ /**
16647
+ * @param {object} dispatchConfig Configuration used to dispatch this event.
16648
+ * @param {string} dispatchMarker Marker identifying the event target.
16649
+ * @param {object} nativeEvent Native browser event.
16650
+ * @extends {SyntheticEvent}
16651
+ */
16652
+ function SyntheticTransitionEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
16653
+ return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
16654
+ }
16655
+
16656
+ SyntheticEvent.augmentClass(SyntheticTransitionEvent, TransitionEventInterface);
16657
+
16658
+ module.exports = SyntheticTransitionEvent;
16659
+ },{"./SyntheticEvent":120}],127:[function(require,module,exports){
16660
+ /**
16661
+ * Copyright (c) 2013-present, Facebook, Inc.
16662
+ *
16663
+ * This source code is licensed under the MIT license found in the
16664
+ * LICENSE file in the root directory of this source tree.
16665
+ *
16666
+ */
16667
+
16668
+ 'use strict';
16669
+
16670
+ var SyntheticEvent = require('./SyntheticEvent');
16671
+
16672
+ var getEventTarget = require('./getEventTarget');
16673
+
16674
+ /**
16675
+ * @interface UIEvent
16676
+ * @see http://www.w3.org/TR/DOM-Level-3-Events/
16677
+ */
16678
+ var UIEventInterface = {
16679
+ view: function (event) {
16680
+ if (event.view) {
16681
+ return event.view;
16682
+ }
16683
+
16684
+ var target = getEventTarget(event);
16685
+ if (target.window === target) {
16686
+ // target is a window object
16687
+ return target;
16688
+ }
16689
+
16690
+ var doc = target.ownerDocument;
16691
+ // TODO: Figure out why `ownerDocument` is sometimes undefined in IE8.
16692
+ if (doc) {
16693
+ return doc.defaultView || doc.parentWindow;
16694
+ } else {
16695
+ return window;
16696
+ }
16697
+ },
16698
+ detail: function (event) {
16699
+ return event.detail || 0;
16700
+ }
16701
+ };
16702
+
16703
+ /**
16704
+ * @param {object} dispatchConfig Configuration used to dispatch this event.
16705
+ * @param {string} dispatchMarker Marker identifying the event target.
16706
+ * @param {object} nativeEvent Native browser event.
16707
+ * @extends {SyntheticEvent}
16708
+ */
16709
+ function SyntheticUIEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
16710
+ return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
16711
+ }
16712
+
16713
+ SyntheticEvent.augmentClass(SyntheticUIEvent, UIEventInterface);
16714
+
16715
+ module.exports = SyntheticUIEvent;
16716
+ },{"./SyntheticEvent":120,"./getEventTarget":143}],128:[function(require,module,exports){
16717
+ /**
16718
+ * Copyright (c) 2013-present, Facebook, Inc.
16719
+ *
16720
+ * This source code is licensed under the MIT license found in the
16721
+ * LICENSE file in the root directory of this source tree.
16722
+ *
16723
+ */
16724
+
16725
+ 'use strict';
16726
+
16727
+ var SyntheticMouseEvent = require('./SyntheticMouseEvent');
16728
+
16729
+ /**
16730
+ * @interface WheelEvent
16731
+ * @see http://www.w3.org/TR/DOM-Level-3-Events/
16732
+ */
16733
+ var WheelEventInterface = {
16734
+ deltaX: function (event) {
16735
+ return 'deltaX' in event ? event.deltaX : // Fallback to `wheelDeltaX` for Webkit and normalize (right is positive).
16736
+ 'wheelDeltaX' in event ? -event.wheelDeltaX : 0;
16737
+ },
16738
+ deltaY: function (event) {
16739
+ return 'deltaY' in event ? event.deltaY : // Fallback to `wheelDeltaY` for Webkit and normalize (down is positive).
16740
+ 'wheelDeltaY' in event ? -event.wheelDeltaY : // Fallback to `wheelDelta` for IE<9 and normalize (down is positive).
16741
+ 'wheelDelta' in event ? -event.wheelDelta : 0;
16742
+ },
16743
+ deltaZ: null,
16744
+
16745
+ // Browsers without "deltaMode" is reporting in raw wheel delta where one
16746
+ // notch on the scroll is always +/- 120, roughly equivalent to pixels.
16747
+ // A good approximation of DOM_DELTA_LINE (1) is 5% of viewport size or
16748
+ // ~40 pixels, for DOM_DELTA_SCREEN (2) it is 87.5% of viewport size.
16749
+ deltaMode: null
16750
+ };
16751
+
16752
+ /**
16753
+ * @param {object} dispatchConfig Configuration used to dispatch this event.
16754
+ * @param {string} dispatchMarker Marker identifying the event target.
16755
+ * @param {object} nativeEvent Native browser event.
16756
+ * @extends {SyntheticMouseEvent}
16757
+ */
16758
+ function SyntheticWheelEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
16759
+ return SyntheticMouseEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
16760
+ }
16761
+
16762
+ SyntheticMouseEvent.augmentClass(SyntheticWheelEvent, WheelEventInterface);
16763
+
16764
+ module.exports = SyntheticWheelEvent;
16765
+ },{"./SyntheticMouseEvent":124}],129:[function(require,module,exports){
16766
+ (function (process){(function (){
16767
+ /**
16768
+ * Copyright (c) 2013-present, Facebook, Inc.
16769
+ *
16770
+ * This source code is licensed under the MIT license found in the
16771
+ * LICENSE file in the root directory of this source tree.
16772
+ *
16773
+ *
16774
+ */
16775
+
16776
+ 'use strict';
16777
+
16778
+ var _prodInvariant = require('./reactProdInvariant');
16779
+
16780
+ var invariant = require('fbjs/lib/invariant');
16781
+
16782
+ var OBSERVED_ERROR = {};
16783
+
16784
+ /**
16785
+ * `Transaction` creates a black box that is able to wrap any method such that
16786
+ * certain invariants are maintained before and after the method is invoked
16787
+ * (Even if an exception is thrown while invoking the wrapped method). Whoever
16788
+ * instantiates a transaction can provide enforcers of the invariants at
16789
+ * creation time. The `Transaction` class itself will supply one additional
16790
+ * automatic invariant for you - the invariant that any transaction instance
16791
+ * should not be run while it is already being run. You would typically create a
16792
+ * single instance of a `Transaction` for reuse multiple times, that potentially
16793
+ * is used to wrap several different methods. Wrappers are extremely simple -
16794
+ * they only require implementing two methods.
16795
+ *
16796
+ * <pre>
16797
+ * wrappers (injected at creation time)
16798
+ * + +
16799
+ * | |
16800
+ * +-----------------|--------|--------------+
16801
+ * | v | |
16802
+ * | +---------------+ | |
16803
+ * | +--| wrapper1 |---|----+ |
16804
+ * | | +---------------+ v | |
16805
+ * | | +-------------+ | |
16806
+ * | | +----| wrapper2 |--------+ |
16807
+ * | | | +-------------+ | | |
16808
+ * | | | | | |
16809
+ * | v v v v | wrapper
16810
+ * | +---+ +---+ +---------+ +---+ +---+ | invariants
16811
+ * perform(anyMethod) | | | | | | | | | | | | maintained
16812
+ * +----------------->|-|---|-|---|-->|anyMethod|---|---|-|---|-|-------->
16813
+ * | | | | | | | | | | | |
16814
+ * | | | | | | | | | | | |
16815
+ * | | | | | | | | | | | |
16816
+ * | +---+ +---+ +---------+ +---+ +---+ |
16817
+ * | initialize close |
16818
+ * +-----------------------------------------+
16819
+ * </pre>
16820
+ *
16821
+ * Use cases:
16822
+ * - Preserving the input selection ranges before/after reconciliation.
16823
+ * Restoring selection even in the event of an unexpected error.
16824
+ * - Deactivating events while rearranging the DOM, preventing blurs/focuses,
16825
+ * while guaranteeing that afterwards, the event system is reactivated.
16826
+ * - Flushing a queue of collected DOM mutations to the main UI thread after a
16827
+ * reconciliation takes place in a worker thread.
16828
+ * - Invoking any collected `componentDidUpdate` callbacks after rendering new
16829
+ * content.
16830
+ * - (Future use case): Wrapping particular flushes of the `ReactWorker` queue
16831
+ * to preserve the `scrollTop` (an automatic scroll aware DOM).
16832
+ * - (Future use case): Layout calculations before and after DOM updates.
16833
+ *
16834
+ * Transactional plugin API:
16835
+ * - A module that has an `initialize` method that returns any precomputation.
16836
+ * - and a `close` method that accepts the precomputation. `close` is invoked
16837
+ * when the wrapped process is completed, or has failed.
16838
+ *
16839
+ * @param {Array<TransactionalWrapper>} transactionWrapper Wrapper modules
16840
+ * that implement `initialize` and `close`.
16841
+ * @return {Transaction} Single transaction for reuse in thread.
16842
+ *
16843
+ * @class Transaction
16844
+ */
16845
+ var TransactionImpl = {
16846
+ /**
16847
+ * Sets up this instance so that it is prepared for collecting metrics. Does
16848
+ * so such that this setup method may be used on an instance that is already
16849
+ * initialized, in a way that does not consume additional memory upon reuse.
16850
+ * That can be useful if you decide to make your subclass of this mixin a
16851
+ * "PooledClass".
16852
+ */
16853
+ reinitializeTransaction: function () {
16854
+ this.transactionWrappers = this.getTransactionWrappers();
16855
+ if (this.wrapperInitData) {
16856
+ this.wrapperInitData.length = 0;
16857
+ } else {
16858
+ this.wrapperInitData = [];
16859
+ }
16860
+ this._isInTransaction = false;
16861
+ },
16862
+
16863
+ _isInTransaction: false,
16864
+
16865
+ /**
16866
+ * @abstract
16867
+ * @return {Array<TransactionWrapper>} Array of transaction wrappers.
16868
+ */
16869
+ getTransactionWrappers: null,
16870
+
16871
+ isInTransaction: function () {
16872
+ return !!this._isInTransaction;
16873
+ },
16874
+
16875
+ /* eslint-disable space-before-function-paren */
16876
+
16877
+ /**
16878
+ * Executes the function within a safety window. Use this for the top level
16879
+ * methods that result in large amounts of computation/mutations that would
16880
+ * need to be safety checked. The optional arguments helps prevent the need
16881
+ * to bind in many cases.
16882
+ *
16883
+ * @param {function} method Member of scope to call.
16884
+ * @param {Object} scope Scope to invoke from.
16885
+ * @param {Object?=} a Argument to pass to the method.
16886
+ * @param {Object?=} b Argument to pass to the method.
16887
+ * @param {Object?=} c Argument to pass to the method.
16888
+ * @param {Object?=} d Argument to pass to the method.
16889
+ * @param {Object?=} e Argument to pass to the method.
16890
+ * @param {Object?=} f Argument to pass to the method.
16891
+ *
16892
+ * @return {*} Return value from `method`.
16893
+ */
16894
+ perform: function (method, scope, a, b, c, d, e, f) {
16895
+ /* eslint-enable space-before-function-paren */
16896
+ !!this.isInTransaction() ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Transaction.perform(...): Cannot initialize a transaction when there is already an outstanding transaction.') : _prodInvariant('27') : void 0;
16897
+ var errorThrown;
16898
+ var ret;
16899
+ try {
16900
+ this._isInTransaction = true;
16901
+ // Catching errors makes debugging more difficult, so we start with
16902
+ // errorThrown set to true before setting it to false after calling
16903
+ // close -- if it's still set to true in the finally block, it means
16904
+ // one of these calls threw.
16905
+ errorThrown = true;
16906
+ this.initializeAll(0);
16907
+ ret = method.call(scope, a, b, c, d, e, f);
16908
+ errorThrown = false;
16909
+ } finally {
16910
+ try {
16911
+ if (errorThrown) {
16912
+ // If `method` throws, prefer to show that stack trace over any thrown
16913
+ // by invoking `closeAll`.
16914
+ try {
16915
+ this.closeAll(0);
16916
+ } catch (err) {}
16917
+ } else {
16918
+ // Since `method` didn't throw, we don't want to silence the exception
16919
+ // here.
16920
+ this.closeAll(0);
16921
+ }
16922
+ } finally {
16923
+ this._isInTransaction = false;
16924
+ }
16925
+ }
16926
+ return ret;
16927
+ },
16928
+
16929
+ initializeAll: function (startIndex) {
16930
+ var transactionWrappers = this.transactionWrappers;
16931
+ for (var i = startIndex; i < transactionWrappers.length; i++) {
16932
+ var wrapper = transactionWrappers[i];
16933
+ try {
16934
+ // Catching errors makes debugging more difficult, so we start with the
16935
+ // OBSERVED_ERROR state before overwriting it with the real return value
16936
+ // of initialize -- if it's still set to OBSERVED_ERROR in the finally
16937
+ // block, it means wrapper.initialize threw.
16938
+ this.wrapperInitData[i] = OBSERVED_ERROR;
16939
+ this.wrapperInitData[i] = wrapper.initialize ? wrapper.initialize.call(this) : null;
16940
+ } finally {
16941
+ if (this.wrapperInitData[i] === OBSERVED_ERROR) {
16942
+ // The initializer for wrapper i threw an error; initialize the
16943
+ // remaining wrappers but silence any exceptions from them to ensure
16944
+ // that the first error is the one to bubble up.
16945
+ try {
16946
+ this.initializeAll(i + 1);
16947
+ } catch (err) {}
16948
+ }
16949
+ }
16950
+ }
16951
+ },
16952
+
16953
+ /**
16954
+ * Invokes each of `this.transactionWrappers.close[i]` functions, passing into
16955
+ * them the respective return values of `this.transactionWrappers.init[i]`
16956
+ * (`close`rs that correspond to initializers that failed will not be
16957
+ * invoked).
16958
+ */
16959
+ closeAll: function (startIndex) {
16960
+ !this.isInTransaction() ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Transaction.closeAll(): Cannot close transaction when none are open.') : _prodInvariant('28') : void 0;
16961
+ var transactionWrappers = this.transactionWrappers;
16962
+ for (var i = startIndex; i < transactionWrappers.length; i++) {
16963
+ var wrapper = transactionWrappers[i];
16964
+ var initData = this.wrapperInitData[i];
16965
+ var errorThrown;
16966
+ try {
16967
+ // Catching errors makes debugging more difficult, so we start with
16968
+ // errorThrown set to true before setting it to false after calling
16969
+ // close -- if it's still set to true in the finally block, it means
16970
+ // wrapper.close threw.
16971
+ errorThrown = true;
16972
+ if (initData !== OBSERVED_ERROR && wrapper.close) {
16973
+ wrapper.close.call(this, initData);
16974
+ }
16975
+ errorThrown = false;
16976
+ } finally {
16977
+ if (errorThrown) {
16978
+ // The closer for wrapper i threw an error; close the remaining
16979
+ // wrappers but silence any exceptions from them to ensure that the
16980
+ // first error is the one to bubble up.
16981
+ try {
16982
+ this.closeAll(i + 1);
16983
+ } catch (e) {}
16984
+ }
16985
+ }
16986
+ }
16987
+ this.wrapperInitData.length = 0;
16988
+ }
16989
+ };
16990
+
16991
+ module.exports = TransactionImpl;
16992
+ }).call(this)}).call(this,require('_process'))
16993
+ },{"./reactProdInvariant":154,"_process":29,"fbjs/lib/invariant":20}],130:[function(require,module,exports){
16994
+ /**
16995
+ * Copyright (c) 2013-present, Facebook, Inc.
16996
+ *
16997
+ * This source code is licensed under the MIT license found in the
16998
+ * LICENSE file in the root directory of this source tree.
16999
+ *
17000
+ */
17001
+
17002
+ 'use strict';
17003
+
17004
+ var ViewportMetrics = {
17005
+ currentScrollLeft: 0,
17006
+
17007
+ currentScrollTop: 0,
17008
+
17009
+ refreshScrollValues: function (scrollPosition) {
17010
+ ViewportMetrics.currentScrollLeft = scrollPosition.x;
17011
+ ViewportMetrics.currentScrollTop = scrollPosition.y;
17012
+ }
17013
+ };
17014
+
17015
+ module.exports = ViewportMetrics;
17016
+ },{}],131:[function(require,module,exports){
17017
+ (function (process){(function (){
17018
+ /**
17019
+ * Copyright (c) 2014-present, Facebook, Inc.
17020
+ *
17021
+ * This source code is licensed under the MIT license found in the
17022
+ * LICENSE file in the root directory of this source tree.
17023
+ *
17024
+ *
17025
+ */
17026
+
17027
+ 'use strict';
17028
+
17029
+ var _prodInvariant = require('./reactProdInvariant');
17030
+
17031
+ var invariant = require('fbjs/lib/invariant');
17032
+
17033
+ /**
17034
+ * Accumulates items that must not be null or undefined into the first one. This
17035
+ * is used to conserve memory by avoiding array allocations, and thus sacrifices
17036
+ * API cleanness. Since `current` can be null before being passed in and not
17037
+ * null after this function, make sure to assign it back to `current`:
17038
+ *
17039
+ * `a = accumulateInto(a, b);`
17040
+ *
17041
+ * This API should be sparingly used. Try `accumulate` for something cleaner.
17042
+ *
17043
+ * @return {*|array<*>} An accumulation of items.
17044
+ */
17045
+
17046
+ function accumulateInto(current, next) {
17047
+ !(next != null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'accumulateInto(...): Accumulated items must not be null or undefined.') : _prodInvariant('30') : void 0;
17048
+
17049
+ if (current == null) {
17050
+ return next;
17051
+ }
17052
+
17053
+ // Both are not empty. Warning: Never call x.concat(y) when you are not
17054
+ // certain that x is an Array (x could be a string with concat method).
17055
+ if (Array.isArray(current)) {
17056
+ if (Array.isArray(next)) {
17057
+ current.push.apply(current, next);
17058
+ return current;
17059
+ }
17060
+ current.push(next);
17061
+ return current;
17062
+ }
17063
+
17064
+ if (Array.isArray(next)) {
17065
+ // A bit too dangerous to mutate `next`.
17066
+ return [current].concat(next);
17067
+ }
17068
+
17069
+ return [current, next];
17070
+ }
17071
+
17072
+ module.exports = accumulateInto;
17073
+ }).call(this)}).call(this,require('_process'))
17074
+ },{"./reactProdInvariant":154,"_process":29,"fbjs/lib/invariant":20}],132:[function(require,module,exports){
17075
+ /**
17076
+ * Copyright (c) 2013-present, Facebook, Inc.
17077
+ *
17078
+ * This source code is licensed under the MIT license found in the
17079
+ * LICENSE file in the root directory of this source tree.
17080
+ *
17081
+ *
17082
+ */
17083
+
17084
+ 'use strict';
17085
+
17086
+ var MOD = 65521;
17087
+
17088
+ // adler32 is not cryptographically strong, and is only used to sanity check that
17089
+ // markup generated on the server matches the markup generated on the client.
17090
+ // This implementation (a modified version of the SheetJS version) has been optimized
17091
+ // for our use case, at the expense of conforming to the adler32 specification
17092
+ // for non-ascii inputs.
17093
+ function adler32(data) {
17094
+ var a = 1;
17095
+ var b = 0;
17096
+ var i = 0;
17097
+ var l = data.length;
17098
+ var m = l & ~0x3;
17099
+ while (i < m) {
17100
+ var n = Math.min(i + 4096, m);
17101
+ for (; i < n; i += 4) {
17102
+ b += (a += data.charCodeAt(i)) + (a += data.charCodeAt(i + 1)) + (a += data.charCodeAt(i + 2)) + (a += data.charCodeAt(i + 3));
17103
+ }
17104
+ a %= MOD;
17105
+ b %= MOD;
17106
+ }
17107
+ for (; i < l; i++) {
17108
+ b += a += data.charCodeAt(i);
17109
+ }
17110
+ a %= MOD;
17111
+ b %= MOD;
17112
+ return a | b << 16;
17113
+ }
17114
+
17115
+ module.exports = adler32;
17116
+ },{}],133:[function(require,module,exports){
17117
+ (function (process){(function (){
17118
+ /**
17119
+ * Copyright (c) 2013-present, Facebook, Inc.
17120
+ *
17121
+ * This source code is licensed under the MIT license found in the
17122
+ * LICENSE file in the root directory of this source tree.
17123
+ *
17124
+ */
17125
+
17126
+ 'use strict';
17127
+
17128
+ var _prodInvariant = require('./reactProdInvariant');
17129
+
17130
+ var ReactPropTypeLocationNames = require('./ReactPropTypeLocationNames');
17131
+ var ReactPropTypesSecret = require('./ReactPropTypesSecret');
17132
+
17133
+ var invariant = require('fbjs/lib/invariant');
17134
+ var warning = require('fbjs/lib/warning');
17135
+
17136
+ var ReactComponentTreeHook;
17137
+
17138
+ if (typeof process !== 'undefined' && process.env && process.env.NODE_ENV === 'test') {
17139
+ // Temporary hack.
17140
+ // Inline requires don't work well with Jest:
17141
+ // https://github.com/facebook/react/issues/7240
17142
+ // Remove the inline requires when we don't need them anymore:
17143
+ // https://github.com/facebook/react/pull/7178
17144
+ ReactComponentTreeHook = require('react/lib/ReactComponentTreeHook');
17145
+ }
17146
+
17147
+ var loggedTypeFailures = {};
17148
+
17149
+ /**
17150
+ * Assert that the values match with the type specs.
17151
+ * Error messages are memorized and will only be shown once.
17152
+ *
17153
+ * @param {object} typeSpecs Map of name to a ReactPropType
17154
+ * @param {object} values Runtime values that need to be type-checked
17155
+ * @param {string} location e.g. "prop", "context", "child context"
17156
+ * @param {string} componentName Name of the component for error messages.
17157
+ * @param {?object} element The React element that is being type-checked
17158
+ * @param {?number} debugID The React component instance that is being type-checked
17159
+ * @private
17160
+ */
17161
+ function checkReactTypeSpec(typeSpecs, values, location, componentName, element, debugID) {
17162
+ for (var typeSpecName in typeSpecs) {
17163
+ if (typeSpecs.hasOwnProperty(typeSpecName)) {
17164
+ var error;
17165
+ // Prop type validation may throw. In case they do, we don't want to
17166
+ // fail the render phase where it didn't fail before. So we log it.
17167
+ // After these have been cleaned up, we'll let them throw.
17168
+ try {
17169
+ // This is intentionally an invariant that gets caught. It's the same
17170
+ // behavior as without this statement except with a better message.
17171
+ !(typeof typeSpecs[typeSpecName] === 'function') ? process.env.NODE_ENV !== '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;
17172
+ error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
17173
+ } catch (ex) {
17174
+ error = ex;
17175
+ }
17176
+ process.env.NODE_ENV !== '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;
17177
+ if (error instanceof Error && !(error.message in loggedTypeFailures)) {
17178
+ // Only monitor this failure once because there tends to be a lot of the
17179
+ // same error.
17180
+ loggedTypeFailures[error.message] = true;
17181
+
17182
+ var componentStackInfo = '';
17183
+
17184
+ if (process.env.NODE_ENV !== 'production') {
17185
+ if (!ReactComponentTreeHook) {
17186
+ ReactComponentTreeHook = require('react/lib/ReactComponentTreeHook');
17187
+ }
17188
+ if (debugID !== null) {
17189
+ componentStackInfo = ReactComponentTreeHook.getStackAddendumByID(debugID);
17190
+ } else if (element !== null) {
17191
+ componentStackInfo = ReactComponentTreeHook.getCurrentStackAddendum(element);
17192
+ }
17193
+ }
17194
+
17195
+ process.env.NODE_ENV !== 'production' ? warning(false, 'Failed %s type: %s%s', location, error.message, componentStackInfo) : void 0;
17196
+ }
17197
+ }
17198
+ }
17199
+ }
17200
+
17201
+ module.exports = checkReactTypeSpec;
17202
+ }).call(this)}).call(this,require('_process'))
17203
+ },{"./ReactPropTypeLocationNames":103,"./ReactPropTypesSecret":104,"./reactProdInvariant":154,"_process":29,"fbjs/lib/invariant":20,"fbjs/lib/warning":27,"react/lib/ReactComponentTreeHook":169}],134:[function(require,module,exports){
17204
+ /**
17205
+ * Copyright (c) 2013-present, Facebook, Inc.
17206
+ *
17207
+ * This source code is licensed under the MIT license found in the
17208
+ * LICENSE file in the root directory of this source tree.
17209
+ *
17210
+ */
17211
+
17212
+ /* globals MSApp */
17213
+
17214
+ 'use strict';
17215
+
17216
+ /**
17217
+ * Create a function which has 'unsafe' privileges (required by windows8 apps)
17218
+ */
17219
+
17220
+ var createMicrosoftUnsafeLocalFunction = function (func) {
17221
+ if (typeof MSApp !== 'undefined' && MSApp.execUnsafeLocalFunction) {
17222
+ return function (arg0, arg1, arg2, arg3) {
17223
+ MSApp.execUnsafeLocalFunction(function () {
17224
+ return func(arg0, arg1, arg2, arg3);
17225
+ });
17226
+ };
17227
+ } else {
17228
+ return func;
17229
+ }
17230
+ };
17231
+
17232
+ module.exports = createMicrosoftUnsafeLocalFunction;
17233
+ },{}],135:[function(require,module,exports){
17234
+ (function (process){(function (){
17235
+ /**
17236
+ * Copyright (c) 2013-present, Facebook, Inc.
17237
+ *
17238
+ * This source code is licensed under the MIT license found in the
17239
+ * LICENSE file in the root directory of this source tree.
17240
+ *
17241
+ */
17242
+
17243
+ 'use strict';
17244
+
17245
+ var CSSProperty = require('./CSSProperty');
17246
+ var warning = require('fbjs/lib/warning');
17247
+
17248
+ var isUnitlessNumber = CSSProperty.isUnitlessNumber;
17249
+ var styleWarnings = {};
17250
+
17251
+ /**
17252
+ * Convert a value into the proper css writable value. The style name `name`
17253
+ * should be logical (no hyphens), as specified
17254
+ * in `CSSProperty.isUnitlessNumber`.
17255
+ *
17256
+ * @param {string} name CSS property name such as `topMargin`.
17257
+ * @param {*} value CSS property value such as `10px`.
17258
+ * @param {ReactDOMComponent} component
17259
+ * @return {string} Normalized style value with dimensions applied.
17260
+ */
17261
+ function dangerousStyleValue(name, value, component, isCustomProperty) {
17262
+ // Note that we've removed escapeTextForBrowser() calls here since the
17263
+ // whole string will be escaped when the attribute is injected into
17264
+ // the markup. If you provide unsafe user data here they can inject
17265
+ // arbitrary CSS which may be problematic (I couldn't repro this):
17266
+ // https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet
17267
+ // http://www.thespanner.co.uk/2007/11/26/ultimate-xss-css-injection/
17268
+ // This is not an XSS hole but instead a potential CSS injection issue
17269
+ // which has lead to a greater discussion about how we're going to
17270
+ // trust URLs moving forward. See #2115901
17271
+
17272
+ var isEmpty = value == null || typeof value === 'boolean' || value === '';
17273
+ if (isEmpty) {
17274
+ return '';
17275
+ }
17276
+
17277
+ var isNonNumeric = isNaN(value);
17278
+ if (isCustomProperty || isNonNumeric || value === 0 || isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name]) {
17279
+ return '' + value; // cast to string
17280
+ }
17281
+
17282
+ if (typeof value === 'string') {
17283
+ if (process.env.NODE_ENV !== 'production') {
17284
+ // Allow '0' to pass through without warning. 0 is already special and
17285
+ // doesn't require units, so we don't need to warn about it.
17286
+ if (component && value !== '0') {
17287
+ var owner = component._currentElement._owner;
17288
+ var ownerName = owner ? owner.getName() : null;
17289
+ if (ownerName && !styleWarnings[ownerName]) {
17290
+ styleWarnings[ownerName] = {};
17291
+ }
17292
+ var warned = false;
17293
+ if (ownerName) {
17294
+ var warnings = styleWarnings[ownerName];
17295
+ warned = warnings[name];
17296
+ if (!warned) {
17297
+ warnings[name] = true;
17298
+ }
17299
+ }
17300
+ if (!warned) {
17301
+ process.env.NODE_ENV !== 'production' ? warning(false, 'a `%s` tag (owner: `%s`) was passed a numeric string value ' + 'for CSS property `%s` (value: `%s`) which will be treated ' + 'as a unitless number in a future version of React.', component._currentElement.type, ownerName || 'unknown', name, value) : void 0;
17302
+ }
17303
+ }
17304
+ }
17305
+ value = value.trim();
17306
+ }
17307
+ return value + 'px';
17308
+ }
17309
+
17310
+ module.exports = dangerousStyleValue;
17311
+ }).call(this)}).call(this,require('_process'))
17312
+ },{"./CSSProperty":38,"_process":29,"fbjs/lib/warning":27}],136:[function(require,module,exports){
17313
+ /**
17314
+ * Copyright (c) 2016-present, Facebook, Inc.
17315
+ *
17316
+ * This source code is licensed under the MIT license found in the
17317
+ * LICENSE file in the root directory of this source tree.
17318
+ *
17319
+ * Based on the escape-html library, which is used under the MIT License below:
17320
+ *
17321
+ * Copyright (c) 2012-2013 TJ Holowaychuk
17322
+ * Copyright (c) 2015 Andreas Lubbe
17323
+ * Copyright (c) 2015 Tiancheng "Timothy" Gu
17324
+ *
17325
+ * Permission is hereby granted, free of charge, to any person obtaining
17326
+ * a copy of this software and associated documentation files (the
17327
+ * 'Software'), to deal in the Software without restriction, including
17328
+ * without limitation the rights to use, copy, modify, merge, publish,
17329
+ * distribute, sublicense, and/or sell copies of the Software, and to
17330
+ * permit persons to whom the Software is furnished to do so, subject to
17331
+ * the following conditions:
17332
+ *
17333
+ * The above copyright notice and this permission notice shall be
17334
+ * included in all copies or substantial portions of the Software.
17335
+ *
17336
+ * THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
17337
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17338
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
17339
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
17340
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
17341
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
17342
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
17343
+ *
17344
+ */
17345
+
17346
+ 'use strict';
17347
+
17348
+ // code copied and modified from escape-html
17349
+ /**
17350
+ * Module variables.
17351
+ * @private
17352
+ */
17353
+
17354
+ var matchHtmlRegExp = /["'&<>]/;
17355
+
17356
+ /**
17357
+ * Escape special characters in the given string of html.
17358
+ *
17359
+ * @param {string} string The string to escape for inserting into HTML
17360
+ * @return {string}
17361
+ * @public
17362
+ */
17363
+
17364
+ function escapeHtml(string) {
17365
+ var str = '' + string;
17366
+ var match = matchHtmlRegExp.exec(str);
17367
+
17368
+ if (!match) {
17369
+ return str;
17370
+ }
17371
+
17372
+ var escape;
17373
+ var html = '';
17374
+ var index = 0;
17375
+ var lastIndex = 0;
17376
+
17377
+ for (index = match.index; index < str.length; index++) {
17378
+ switch (str.charCodeAt(index)) {
17379
+ case 34:
17380
+ // "
17381
+ escape = '&quot;';
17382
+ break;
17383
+ case 38:
17384
+ // &
17385
+ escape = '&amp;';
17386
+ break;
17387
+ case 39:
17388
+ // '
17389
+ escape = '&#x27;'; // modified from escape-html; used to be '&#39'
17390
+ break;
17391
+ case 60:
17392
+ // <
17393
+ escape = '&lt;';
17394
+ break;
17395
+ case 62:
17396
+ // >
17397
+ escape = '&gt;';
17398
+ break;
17399
+ default:
17400
+ continue;
17401
+ }
17402
+
17403
+ if (lastIndex !== index) {
17404
+ html += str.substring(lastIndex, index);
17405
+ }
17406
+
17407
+ lastIndex = index + 1;
17408
+ html += escape;
17409
+ }
17410
+
17411
+ return lastIndex !== index ? html + str.substring(lastIndex, index) : html;
17412
+ }
17413
+ // end code copied and modified from escape-html
17414
+
17415
+ /**
17416
+ * Escapes text to prevent scripting attacks.
17417
+ *
17418
+ * @param {*} text Text value to escape.
17419
+ * @return {string} An escaped string.
17420
+ */
17421
+ function escapeTextContentForBrowser(text) {
17422
+ if (typeof text === 'boolean' || typeof text === 'number') {
17423
+ // this shortcircuit helps perf for types that we know will never have
17424
+ // special characters, especially given that this function is used often
17425
+ // for numeric dom ids.
17426
+ return '' + text;
17427
+ }
17428
+ return escapeHtml(text);
17429
+ }
17430
+
17431
+ module.exports = escapeTextContentForBrowser;
17432
+ },{}],137:[function(require,module,exports){
17433
+ (function (process){(function (){
17434
+ /**
17435
+ * Copyright (c) 2013-present, Facebook, Inc.
17436
+ *
17437
+ * This source code is licensed under the MIT license found in the
17438
+ * LICENSE file in the root directory of this source tree.
17439
+ *
17440
+ */
17441
+
17442
+ 'use strict';
17443
+
17444
+ var _prodInvariant = require('./reactProdInvariant');
17445
+
17446
+ var ReactCurrentOwner = require('react/lib/ReactCurrentOwner');
17447
+ var ReactDOMComponentTree = require('./ReactDOMComponentTree');
17448
+ var ReactInstanceMap = require('./ReactInstanceMap');
17449
+
17450
+ var getHostComponentFromComposite = require('./getHostComponentFromComposite');
17451
+ var invariant = require('fbjs/lib/invariant');
17452
+ var warning = require('fbjs/lib/warning');
17453
+
17454
+ /**
17455
+ * Returns the DOM node rendered by this element.
17456
+ *
17457
+ * See https://facebook.github.io/react/docs/top-level-api.html#reactdom.finddomnode
17458
+ *
17459
+ * @param {ReactComponent|DOMElement} componentOrElement
17460
+ * @return {?DOMElement} The root node of this element.
17461
+ */
17462
+ function findDOMNode(componentOrElement) {
17463
+ if (process.env.NODE_ENV !== 'production') {
17464
+ var owner = ReactCurrentOwner.current;
17465
+ if (owner !== null) {
17466
+ process.env.NODE_ENV !== 'production' ? warning(owner._warnedAboutRefsInRender, '%s is accessing findDOMNode inside its render(). ' + 'render() should be a pure function of props and state. It should ' + 'never access something that requires stale data from the previous ' + 'render, such as refs. Move this logic to componentDidMount and ' + 'componentDidUpdate instead.', owner.getName() || 'A component') : void 0;
17467
+ owner._warnedAboutRefsInRender = true;
17468
+ }
17469
+ }
17470
+ if (componentOrElement == null) {
17471
+ return null;
17472
+ }
17473
+ if (componentOrElement.nodeType === 1) {
17474
+ return componentOrElement;
17475
+ }
17476
+
17477
+ var inst = ReactInstanceMap.get(componentOrElement);
17478
+ if (inst) {
17479
+ inst = getHostComponentFromComposite(inst);
17480
+ return inst ? ReactDOMComponentTree.getNodeFromInstance(inst) : null;
17481
+ }
17482
+
17483
+ if (typeof componentOrElement.render === 'function') {
17484
+ !false ? process.env.NODE_ENV !== 'production' ? invariant(false, 'findDOMNode was called on an unmounted component.') : _prodInvariant('44') : void 0;
17485
+ } else {
17486
+ !false ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Element appears to be neither ReactComponent nor DOMNode (keys: %s)', Object.keys(componentOrElement)) : _prodInvariant('45', Object.keys(componentOrElement)) : void 0;
17487
+ }
17488
+ }
17489
+
17490
+ module.exports = findDOMNode;
17491
+ }).call(this)}).call(this,require('_process'))
17492
+ },{"./ReactDOMComponentTree":67,"./ReactInstanceMap":95,"./getHostComponentFromComposite":144,"./reactProdInvariant":154,"_process":29,"fbjs/lib/invariant":20,"fbjs/lib/warning":27,"react/lib/ReactCurrentOwner":170}],138:[function(require,module,exports){
17493
+ (function (process){(function (){
17494
+ /**
17495
+ * Copyright (c) 2013-present, Facebook, Inc.
17496
+ *
17497
+ * This source code is licensed under the MIT license found in the
17498
+ * LICENSE file in the root directory of this source tree.
17499
+ *
17500
+ *
17501
+ */
17502
+
17503
+ 'use strict';
17504
+
17505
+ var KeyEscapeUtils = require('./KeyEscapeUtils');
17506
+ var traverseAllChildren = require('./traverseAllChildren');
17507
+ var warning = require('fbjs/lib/warning');
17508
+
17509
+ var ReactComponentTreeHook;
17510
+
17511
+ if (typeof process !== 'undefined' && process.env && process.env.NODE_ENV === 'test') {
17512
+ // Temporary hack.
17513
+ // Inline requires don't work well with Jest:
17514
+ // https://github.com/facebook/react/issues/7240
17515
+ // Remove the inline requires when we don't need them anymore:
17516
+ // https://github.com/facebook/react/pull/7178
17517
+ ReactComponentTreeHook = require('react/lib/ReactComponentTreeHook');
17518
+ }
17519
+
17520
+ /**
17521
+ * @param {function} traverseContext Context passed through traversal.
17522
+ * @param {?ReactComponent} child React child component.
17523
+ * @param {!string} name String name of key path to child.
17524
+ * @param {number=} selfDebugID Optional debugID of the current internal instance.
17525
+ */
17526
+ function flattenSingleChildIntoContext(traverseContext, child, name, selfDebugID) {
17527
+ // We found a component instance.
17528
+ if (traverseContext && typeof traverseContext === 'object') {
17529
+ var result = traverseContext;
17530
+ var keyUnique = result[name] === undefined;
17531
+ if (process.env.NODE_ENV !== 'production') {
17532
+ if (!ReactComponentTreeHook) {
17533
+ ReactComponentTreeHook = require('react/lib/ReactComponentTreeHook');
17534
+ }
17535
+ if (!keyUnique) {
17536
+ process.env.NODE_ENV !== '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;
17537
+ }
17538
+ }
17539
+ if (keyUnique && child != null) {
17540
+ result[name] = child;
17541
+ }
17542
+ }
17543
+ }
17544
+
17545
+ /**
17546
+ * Flattens children that are typically specified as `props.children`. Any null
17547
+ * children will not be included in the resulting object.
17548
+ * @return {!object} flattened children keyed by name.
17549
+ */
17550
+ function flattenChildren(children, selfDebugID) {
17551
+ if (children == null) {
17552
+ return children;
17553
+ }
17554
+ var result = {};
17555
+
17556
+ if (process.env.NODE_ENV !== 'production') {
17557
+ traverseAllChildren(children, function (traverseContext, child, name) {
17558
+ return flattenSingleChildIntoContext(traverseContext, child, name, selfDebugID);
17559
+ }, result);
17560
+ } else {
17561
+ traverseAllChildren(children, flattenSingleChildIntoContext, result);
17562
+ }
17563
+ return result;
17564
+ }
17565
+
17566
+ module.exports = flattenChildren;
17567
+ }).call(this)}).call(this,require('_process'))
17568
+ },{"./KeyEscapeUtils":56,"./traverseAllChildren":159,"_process":29,"fbjs/lib/warning":27,"react/lib/ReactComponentTreeHook":169}],139:[function(require,module,exports){
17569
+ /**
17570
+ * Copyright (c) 2013-present, Facebook, Inc.
17571
+ *
17572
+ * This source code is licensed under the MIT license found in the
17573
+ * LICENSE file in the root directory of this source tree.
17574
+ *
17575
+ *
17576
+ */
17577
+
17578
+ 'use strict';
17579
+
17580
+ /**
17581
+ * @param {array} arr an "accumulation" of items which is either an Array or
17582
+ * a single item. Useful when paired with the `accumulate` module. This is a
17583
+ * simple utility that allows us to reason about a collection of items, but
17584
+ * handling the case when there is exactly one item (and we do not need to
17585
+ * allocate an array).
17586
+ */
17587
+
17588
+ function forEachAccumulated(arr, cb, scope) {
17589
+ if (Array.isArray(arr)) {
17590
+ arr.forEach(cb, scope);
17591
+ } else if (arr) {
17592
+ cb.call(scope, arr);
17593
+ }
17594
+ }
17595
+
17596
+ module.exports = forEachAccumulated;
17597
+ },{}],140:[function(require,module,exports){
17598
+ /**
17599
+ * Copyright (c) 2013-present, Facebook, Inc.
17600
+ *
17601
+ * This source code is licensed under the MIT license found in the
17602
+ * LICENSE file in the root directory of this source tree.
17603
+ *
17604
+ */
17605
+
17606
+ 'use strict';
17607
+
17608
+ /**
17609
+ * `charCode` represents the actual "character code" and is safe to use with
17610
+ * `String.fromCharCode`. As such, only keys that correspond to printable
17611
+ * characters produce a valid `charCode`, the only exception to this is Enter.
17612
+ * The Tab-key is considered non-printable and does not have a `charCode`,
17613
+ * presumably because it does not produce a tab-character in browsers.
17614
+ *
17615
+ * @param {object} nativeEvent Native browser event.
17616
+ * @return {number} Normalized `charCode` property.
17617
+ */
17618
+
17619
+ function getEventCharCode(nativeEvent) {
17620
+ var charCode;
17621
+ var keyCode = nativeEvent.keyCode;
17622
+
17623
+ if ('charCode' in nativeEvent) {
17624
+ charCode = nativeEvent.charCode;
17625
+
17626
+ // FF does not set `charCode` for the Enter-key, check against `keyCode`.
17627
+ if (charCode === 0 && keyCode === 13) {
17628
+ charCode = 13;
17629
+ }
17630
+ } else {
17631
+ // IE8 does not implement `charCode`, but `keyCode` has the correct value.
17632
+ charCode = keyCode;
17633
+ }
17634
+
17635
+ // Some non-printable keys are reported in `charCode`/`keyCode`, discard them.
17636
+ // Must not discard the (non-)printable Enter-key.
17637
+ if (charCode >= 32 || charCode === 13) {
17638
+ return charCode;
17639
+ }
17640
+
17641
+ return 0;
17642
+ }
17643
+
17644
+ module.exports = getEventCharCode;
17645
+ },{}],141:[function(require,module,exports){
17646
+ /**
17647
+ * Copyright (c) 2013-present, Facebook, Inc.
17648
+ *
17649
+ * This source code is licensed under the MIT license found in the
17650
+ * LICENSE file in the root directory of this source tree.
17651
+ *
17652
+ */
17653
+
17654
+ 'use strict';
17655
+
17656
+ var getEventCharCode = require('./getEventCharCode');
17657
+
17658
+ /**
17659
+ * Normalization of deprecated HTML5 `key` values
17660
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names
17661
+ */
17662
+ var normalizeKey = {
17663
+ Esc: 'Escape',
17664
+ Spacebar: ' ',
17665
+ Left: 'ArrowLeft',
17666
+ Up: 'ArrowUp',
17667
+ Right: 'ArrowRight',
17668
+ Down: 'ArrowDown',
17669
+ Del: 'Delete',
17670
+ Win: 'OS',
17671
+ Menu: 'ContextMenu',
17672
+ Apps: 'ContextMenu',
17673
+ Scroll: 'ScrollLock',
17674
+ MozPrintableKey: 'Unidentified'
17675
+ };
17676
+
17677
+ /**
17678
+ * Translation from legacy `keyCode` to HTML5 `key`
17679
+ * Only special keys supported, all others depend on keyboard layout or browser
17680
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names
17681
+ */
17682
+ var translateToKey = {
17683
+ 8: 'Backspace',
17684
+ 9: 'Tab',
17685
+ 12: 'Clear',
17686
+ 13: 'Enter',
17687
+ 16: 'Shift',
17688
+ 17: 'Control',
17689
+ 18: 'Alt',
17690
+ 19: 'Pause',
17691
+ 20: 'CapsLock',
17692
+ 27: 'Escape',
17693
+ 32: ' ',
17694
+ 33: 'PageUp',
17695
+ 34: 'PageDown',
17696
+ 35: 'End',
17697
+ 36: 'Home',
17698
+ 37: 'ArrowLeft',
17699
+ 38: 'ArrowUp',
17700
+ 39: 'ArrowRight',
17701
+ 40: 'ArrowDown',
17702
+ 45: 'Insert',
17703
+ 46: 'Delete',
17704
+ 112: 'F1',
17705
+ 113: 'F2',
17706
+ 114: 'F3',
17707
+ 115: 'F4',
17708
+ 116: 'F5',
17709
+ 117: 'F6',
17710
+ 118: 'F7',
17711
+ 119: 'F8',
17712
+ 120: 'F9',
17713
+ 121: 'F10',
17714
+ 122: 'F11',
17715
+ 123: 'F12',
17716
+ 144: 'NumLock',
17717
+ 145: 'ScrollLock',
17718
+ 224: 'Meta'
17719
+ };
17720
+
17721
+ /**
17722
+ * @param {object} nativeEvent Native browser event.
17723
+ * @return {string} Normalized `key` property.
17724
+ */
17725
+ function getEventKey(nativeEvent) {
17726
+ if (nativeEvent.key) {
17727
+ // Normalize inconsistent values reported by browsers due to
17728
+ // implementations of a working draft specification.
17729
+
17730
+ // FireFox implements `key` but returns `MozPrintableKey` for all
17731
+ // printable characters (normalized to `Unidentified`), ignore it.
17732
+ var key = normalizeKey[nativeEvent.key] || nativeEvent.key;
17733
+ if (key !== 'Unidentified') {
17734
+ return key;
17735
+ }
17736
+ }
17737
+
17738
+ // Browser does not implement `key`, polyfill as much of it as we can.
17739
+ if (nativeEvent.type === 'keypress') {
17740
+ var charCode = getEventCharCode(nativeEvent);
17741
+
17742
+ // The enter-key is technically both printable and non-printable and can
17743
+ // thus be captured by `keypress`, no other non-printable key should.
17744
+ return charCode === 13 ? 'Enter' : String.fromCharCode(charCode);
17745
+ }
17746
+ if (nativeEvent.type === 'keydown' || nativeEvent.type === 'keyup') {
17747
+ // While user keyboard layout determines the actual meaning of each
17748
+ // `keyCode` value, almost all function keys have a universal value.
17749
+ return translateToKey[nativeEvent.keyCode] || 'Unidentified';
17750
+ }
17751
+ return '';
17752
+ }
17753
+
17754
+ module.exports = getEventKey;
17755
+ },{"./getEventCharCode":140}],142:[function(require,module,exports){
17756
+ /**
17757
+ * Copyright (c) 2013-present, Facebook, Inc.
17758
+ *
17759
+ * This source code is licensed under the MIT license found in the
17760
+ * LICENSE file in the root directory of this source tree.
17761
+ *
17762
+ */
17763
+
17764
+ 'use strict';
17765
+
17766
+ /**
17767
+ * Translation from modifier key to the associated property in the event.
17768
+ * @see http://www.w3.org/TR/DOM-Level-3-Events/#keys-Modifiers
17769
+ */
17770
+
17771
+ var modifierKeyToProp = {
17772
+ Alt: 'altKey',
17773
+ Control: 'ctrlKey',
17774
+ Meta: 'metaKey',
17775
+ Shift: 'shiftKey'
17776
+ };
17777
+
17778
+ // IE8 does not implement getModifierState so we simply map it to the only
17779
+ // modifier keys exposed by the event itself, does not support Lock-keys.
17780
+ // Currently, all major browsers except Chrome seems to support Lock-keys.
17781
+ function modifierStateGetter(keyArg) {
17782
+ var syntheticEvent = this;
17783
+ var nativeEvent = syntheticEvent.nativeEvent;
17784
+ if (nativeEvent.getModifierState) {
17785
+ return nativeEvent.getModifierState(keyArg);
17786
+ }
17787
+ var keyProp = modifierKeyToProp[keyArg];
17788
+ return keyProp ? !!nativeEvent[keyProp] : false;
17789
+ }
17790
+
17791
+ function getEventModifierState(nativeEvent) {
17792
+ return modifierStateGetter;
17793
+ }
17794
+
17795
+ module.exports = getEventModifierState;
17796
+ },{}],143:[function(require,module,exports){
17797
+ /**
17798
+ * Copyright (c) 2013-present, Facebook, Inc.
17799
+ *
17800
+ * This source code is licensed under the MIT license found in the
17801
+ * LICENSE file in the root directory of this source tree.
17802
+ *
17803
+ */
17804
+
17805
+ 'use strict';
17806
+
17807
+ /**
17808
+ * Gets the target node from a native browser event by accounting for
17809
+ * inconsistencies in browser DOM APIs.
17810
+ *
17811
+ * @param {object} nativeEvent Native browser event.
17812
+ * @return {DOMEventTarget} Target node.
17813
+ */
17814
+
17815
+ function getEventTarget(nativeEvent) {
17816
+ var target = nativeEvent.target || nativeEvent.srcElement || window;
17817
+
17818
+ // Normalize SVG <use> element events #4963
17819
+ if (target.correspondingUseElement) {
17820
+ target = target.correspondingUseElement;
17821
+ }
17822
+
17823
+ // Safari may fire events on text nodes (Node.TEXT_NODE is 3).
17824
+ // @see http://www.quirksmode.org/js/events_properties.html
17825
+ return target.nodeType === 3 ? target.parentNode : target;
17826
+ }
17827
+
17828
+ module.exports = getEventTarget;
17829
+ },{}],144:[function(require,module,exports){
17830
+ /**
17831
+ * Copyright (c) 2013-present, Facebook, Inc.
17832
+ *
17833
+ * This source code is licensed under the MIT license found in the
17834
+ * LICENSE file in the root directory of this source tree.
17835
+ *
17836
+ */
17837
+
17838
+ 'use strict';
17839
+
17840
+ var ReactNodeTypes = require('./ReactNodeTypes');
17841
+
17842
+ function getHostComponentFromComposite(inst) {
17843
+ var type;
17844
+
17845
+ while ((type = inst._renderedNodeType) === ReactNodeTypes.COMPOSITE) {
17846
+ inst = inst._renderedComponent;
17847
+ }
17848
+
17849
+ if (type === ReactNodeTypes.HOST) {
17850
+ return inst._renderedComponent;
17851
+ } else if (type === ReactNodeTypes.EMPTY) {
17852
+ return null;
17853
+ }
17854
+ }
17855
+
17856
+ module.exports = getHostComponentFromComposite;
17857
+ },{"./ReactNodeTypes":101}],145:[function(require,module,exports){
17858
+ /**
17859
+ * Copyright (c) 2013-present, Facebook, Inc.
17860
+ *
17861
+ * This source code is licensed under the MIT license found in the
17862
+ * LICENSE file in the root directory of this source tree.
17863
+ *
17864
+ *
17865
+ */
17866
+
17867
+ 'use strict';
17868
+
17869
+ /* global Symbol */
17870
+
17871
+ var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
17872
+ var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
17873
+
17874
+ /**
17875
+ * Returns the iterator method function contained on the iterable object.
17876
+ *
17877
+ * Be sure to invoke the function with the iterable as context:
17878
+ *
17879
+ * var iteratorFn = getIteratorFn(myIterable);
17880
+ * if (iteratorFn) {
17881
+ * var iterator = iteratorFn.call(myIterable);
17882
+ * ...
17883
+ * }
17884
+ *
17885
+ * @param {?object} maybeIterable
17886
+ * @return {?function}
17887
+ */
17888
+ function getIteratorFn(maybeIterable) {
17889
+ var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
17890
+ if (typeof iteratorFn === 'function') {
17891
+ return iteratorFn;
17892
+ }
17893
+ }
17894
+
17895
+ module.exports = getIteratorFn;
17896
+ },{}],146:[function(require,module,exports){
17897
+ /**
17898
+ * Copyright (c) 2013-present, Facebook, Inc.
17899
+ *
17900
+ * This source code is licensed under the MIT license found in the
17901
+ * LICENSE file in the root directory of this source tree.
17902
+ *
17903
+ */
17904
+
17905
+ 'use strict';
17906
+
17907
+ /**
17908
+ * Given any node return the first leaf node without children.
17909
+ *
17910
+ * @param {DOMElement|DOMTextNode} node
17911
+ * @return {DOMElement|DOMTextNode}
17912
+ */
17913
+
17914
+ function getLeafNode(node) {
17915
+ while (node && node.firstChild) {
17916
+ node = node.firstChild;
17917
+ }
17918
+ return node;
17919
+ }
17920
+
17921
+ /**
17922
+ * Get the next sibling within a container. This will walk up the
17923
+ * DOM if a node's siblings have been exhausted.
17924
+ *
17925
+ * @param {DOMElement|DOMTextNode} node
17926
+ * @return {?DOMElement|DOMTextNode}
17927
+ */
17928
+ function getSiblingNode(node) {
17929
+ while (node) {
17930
+ if (node.nextSibling) {
17931
+ return node.nextSibling;
17932
+ }
17933
+ node = node.parentNode;
17934
+ }
17935
+ }
17936
+
17937
+ /**
17938
+ * Get object describing the nodes which contain characters at offset.
17939
+ *
17940
+ * @param {DOMElement|DOMTextNode} root
17941
+ * @param {number} offset
17942
+ * @return {?object}
17943
+ */
17944
+ function getNodeForCharacterOffset(root, offset) {
17945
+ var node = getLeafNode(root);
17946
+ var nodeStart = 0;
17947
+ var nodeEnd = 0;
17948
+
17949
+ while (node) {
17950
+ if (node.nodeType === 3) {
17951
+ nodeEnd = nodeStart + node.textContent.length;
17952
+
17953
+ if (nodeStart <= offset && nodeEnd >= offset) {
17954
+ return {
17955
+ node: node,
17956
+ offset: offset - nodeStart
17957
+ };
17958
+ }
17959
+
17960
+ nodeStart = nodeEnd;
17961
+ }
17962
+
17963
+ node = getLeafNode(getSiblingNode(node));
17964
+ }
17965
+ }
17966
+
17967
+ module.exports = getNodeForCharacterOffset;
17968
+ },{}],147:[function(require,module,exports){
17969
+ /**
17970
+ * Copyright (c) 2013-present, Facebook, Inc.
17971
+ *
17972
+ * This source code is licensed under the MIT license found in the
17973
+ * LICENSE file in the root directory of this source tree.
17974
+ *
17975
+ */
17976
+
17977
+ 'use strict';
17978
+
17979
+ var ExecutionEnvironment = require('fbjs/lib/ExecutionEnvironment');
17980
+
17981
+ var contentKey = null;
17982
+
17983
+ /**
17984
+ * Gets the key used to access text content on a DOM node.
17985
+ *
17986
+ * @return {?string} Key used to access text content.
17987
+ * @internal
17988
+ */
17989
+ function getTextContentAccessor() {
17990
+ if (!contentKey && ExecutionEnvironment.canUseDOM) {
17991
+ // Prefer textContent to innerText because many browsers support both but
17992
+ // SVG <text> elements don't support innerText even when <div> does.
17993
+ contentKey = 'textContent' in document.documentElement ? 'textContent' : 'innerText';
17994
+ }
17995
+ return contentKey;
17996
+ }
17997
+
17998
+ module.exports = getTextContentAccessor;
17999
+ },{"fbjs/lib/ExecutionEnvironment":6}],148:[function(require,module,exports){
18000
+ /**
18001
+ * Copyright (c) 2013-present, Facebook, Inc.
18002
+ *
18003
+ * This source code is licensed under the MIT license found in the
18004
+ * LICENSE file in the root directory of this source tree.
18005
+ *
18006
+ */
18007
+
18008
+ 'use strict';
18009
+
18010
+ var ExecutionEnvironment = require('fbjs/lib/ExecutionEnvironment');
18011
+
18012
+ /**
18013
+ * Generate a mapping of standard vendor prefixes using the defined style property and event name.
18014
+ *
18015
+ * @param {string} styleProp
18016
+ * @param {string} eventName
18017
+ * @returns {object}
18018
+ */
18019
+ function makePrefixMap(styleProp, eventName) {
18020
+ var prefixes = {};
18021
+
18022
+ prefixes[styleProp.toLowerCase()] = eventName.toLowerCase();
18023
+ prefixes['Webkit' + styleProp] = 'webkit' + eventName;
18024
+ prefixes['Moz' + styleProp] = 'moz' + eventName;
18025
+ prefixes['ms' + styleProp] = 'MS' + eventName;
18026
+ prefixes['O' + styleProp] = 'o' + eventName.toLowerCase();
18027
+
18028
+ return prefixes;
18029
+ }
18030
+
18031
+ /**
18032
+ * A list of event names to a configurable list of vendor prefixes.
18033
+ */
18034
+ var vendorPrefixes = {
18035
+ animationend: makePrefixMap('Animation', 'AnimationEnd'),
18036
+ animationiteration: makePrefixMap('Animation', 'AnimationIteration'),
18037
+ animationstart: makePrefixMap('Animation', 'AnimationStart'),
18038
+ transitionend: makePrefixMap('Transition', 'TransitionEnd')
18039
+ };
18040
+
18041
+ /**
18042
+ * Event names that have already been detected and prefixed (if applicable).
18043
+ */
18044
+ var prefixedEventNames = {};
18045
+
18046
+ /**
18047
+ * Element to check for prefixes on.
18048
+ */
18049
+ var style = {};
18050
+
18051
+ /**
18052
+ * Bootstrap if a DOM exists.
18053
+ */
18054
+ if (ExecutionEnvironment.canUseDOM) {
18055
+ style = document.createElement('div').style;
18056
+
18057
+ // On some platforms, in particular some releases of Android 4.x,
18058
+ // the un-prefixed "animation" and "transition" properties are defined on the
18059
+ // style object but the events that fire will still be prefixed, so we need
18060
+ // to check if the un-prefixed events are usable, and if not remove them from the map.
18061
+ if (!('AnimationEvent' in window)) {
18062
+ delete vendorPrefixes.animationend.animation;
18063
+ delete vendorPrefixes.animationiteration.animation;
18064
+ delete vendorPrefixes.animationstart.animation;
18065
+ }
18066
+
18067
+ // Same as above
18068
+ if (!('TransitionEvent' in window)) {
18069
+ delete vendorPrefixes.transitionend.transition;
18070
+ }
18071
+ }
18072
+
18073
+ /**
18074
+ * Attempts to determine the correct vendor prefixed event name.
18075
+ *
18076
+ * @param {string} eventName
18077
+ * @returns {string}
18078
+ */
18079
+ function getVendorPrefixedEventName(eventName) {
18080
+ if (prefixedEventNames[eventName]) {
18081
+ return prefixedEventNames[eventName];
18082
+ } else if (!vendorPrefixes[eventName]) {
18083
+ return eventName;
18084
+ }
18085
+
18086
+ var prefixMap = vendorPrefixes[eventName];
18087
+
18088
+ for (var styleProp in prefixMap) {
18089
+ if (prefixMap.hasOwnProperty(styleProp) && styleProp in style) {
18090
+ return prefixedEventNames[eventName] = prefixMap[styleProp];
18091
+ }
18092
+ }
18093
+
18094
+ return '';
18095
+ }
18096
+
18097
+ module.exports = getVendorPrefixedEventName;
18098
+ },{"fbjs/lib/ExecutionEnvironment":6}],149:[function(require,module,exports){
18099
+ /**
18100
+ * Copyright (c) 2013-present, Facebook, Inc.
18101
+ *
18102
+ * This source code is licensed under the MIT license found in the
18103
+ * LICENSE file in the root directory of this source tree.
18104
+ *
18105
+ */
18106
+
18107
+ 'use strict';
18108
+
18109
+ var ReactDOMComponentTree = require('./ReactDOMComponentTree');
18110
+
18111
+ function isCheckable(elem) {
18112
+ var type = elem.type;
18113
+ var nodeName = elem.nodeName;
18114
+ return nodeName && nodeName.toLowerCase() === 'input' && (type === 'checkbox' || type === 'radio');
18115
+ }
18116
+
18117
+ function getTracker(inst) {
18118
+ return inst._wrapperState.valueTracker;
18119
+ }
18120
+
18121
+ function attachTracker(inst, tracker) {
18122
+ inst._wrapperState.valueTracker = tracker;
18123
+ }
18124
+
18125
+ function detachTracker(inst) {
18126
+ inst._wrapperState.valueTracker = null;
18127
+ }
18128
+
18129
+ function getValueFromNode(node) {
18130
+ var value;
18131
+ if (node) {
18132
+ value = isCheckable(node) ? '' + node.checked : node.value;
18133
+ }
18134
+ return value;
18135
+ }
18136
+
18137
+ var inputValueTracking = {
18138
+ // exposed for testing
18139
+ _getTrackerFromNode: function (node) {
18140
+ return getTracker(ReactDOMComponentTree.getInstanceFromNode(node));
18141
+ },
18142
+
18143
+
18144
+ track: function (inst) {
18145
+ if (getTracker(inst)) {
18146
+ return;
18147
+ }
18148
+
18149
+ var node = ReactDOMComponentTree.getNodeFromInstance(inst);
18150
+ var valueField = isCheckable(node) ? 'checked' : 'value';
18151
+ var descriptor = Object.getOwnPropertyDescriptor(node.constructor.prototype, valueField);
18152
+
18153
+ var currentValue = '' + node[valueField];
18154
+
18155
+ // if someone has already defined a value or Safari, then bail
18156
+ // and don't track value will cause over reporting of changes,
18157
+ // but it's better then a hard failure
18158
+ // (needed for certain tests that spyOn input values and Safari)
18159
+ if (node.hasOwnProperty(valueField) || typeof descriptor.get !== 'function' || typeof descriptor.set !== 'function') {
18160
+ return;
18161
+ }
18162
+
18163
+ Object.defineProperty(node, valueField, {
18164
+ enumerable: descriptor.enumerable,
18165
+ configurable: true,
18166
+ get: function () {
18167
+ return descriptor.get.call(this);
18168
+ },
18169
+ set: function (value) {
18170
+ currentValue = '' + value;
18171
+ descriptor.set.call(this, value);
18172
+ }
18173
+ });
18174
+
18175
+ attachTracker(inst, {
18176
+ getValue: function () {
18177
+ return currentValue;
18178
+ },
18179
+ setValue: function (value) {
18180
+ currentValue = '' + value;
18181
+ },
18182
+ stopTracking: function () {
18183
+ detachTracker(inst);
18184
+ delete node[valueField];
18185
+ }
18186
+ });
18187
+ },
18188
+
18189
+ updateValueIfChanged: function (inst) {
18190
+ if (!inst) {
18191
+ return false;
18192
+ }
18193
+ var tracker = getTracker(inst);
18194
+
18195
+ if (!tracker) {
18196
+ inputValueTracking.track(inst);
18197
+ return true;
18198
+ }
18199
+
18200
+ var lastValue = tracker.getValue();
18201
+ var nextValue = getValueFromNode(ReactDOMComponentTree.getNodeFromInstance(inst));
18202
+
18203
+ if (nextValue !== lastValue) {
18204
+ tracker.setValue(nextValue);
18205
+ return true;
18206
+ }
18207
+
18208
+ return false;
18209
+ },
18210
+ stopTracking: function (inst) {
18211
+ var tracker = getTracker(inst);
18212
+ if (tracker) {
18213
+ tracker.stopTracking();
18214
+ }
18215
+ }
18216
+ };
18217
+
18218
+ module.exports = inputValueTracking;
18219
+ },{"./ReactDOMComponentTree":67}],150:[function(require,module,exports){
18220
+ (function (process){(function (){
18221
+ /**
18222
+ * Copyright (c) 2013-present, Facebook, Inc.
18223
+ *
18224
+ * This source code is licensed under the MIT license found in the
18225
+ * LICENSE file in the root directory of this source tree.
18226
+ *
18227
+ */
18228
+
18229
+ 'use strict';
18230
+
18231
+ var _prodInvariant = require('./reactProdInvariant'),
18232
+ _assign = require('object-assign');
18233
+
18234
+ var ReactCompositeComponent = require('./ReactCompositeComponent');
18235
+ var ReactEmptyComponent = require('./ReactEmptyComponent');
18236
+ var ReactHostComponent = require('./ReactHostComponent');
18237
+
18238
+ var getNextDebugID = require('react/lib/getNextDebugID');
18239
+ var invariant = require('fbjs/lib/invariant');
18240
+ var warning = require('fbjs/lib/warning');
18241
+
18242
+ // To avoid a cyclic dependency, we create the final class in this module
18243
+ var ReactCompositeComponentWrapper = function (element) {
18244
+ this.construct(element);
18245
+ };
18246
+
18247
+ function getDeclarationErrorAddendum(owner) {
18248
+ if (owner) {
18249
+ var name = owner.getName();
18250
+ if (name) {
18251
+ return ' Check the render method of `' + name + '`.';
18252
+ }
18253
+ }
18254
+ return '';
18255
+ }
18256
+
18257
+ /**
18258
+ * Check if the type reference is a known internal type. I.e. not a user
18259
+ * provided composite type.
18260
+ *
18261
+ * @param {function} type
18262
+ * @return {boolean} Returns true if this is a valid internal type.
18263
+ */
18264
+ function isInternalComponentType(type) {
18265
+ return typeof type === 'function' && typeof type.prototype !== 'undefined' && typeof type.prototype.mountComponent === 'function' && typeof type.prototype.receiveComponent === 'function';
18266
+ }
18267
+
18268
+ /**
18269
+ * Given a ReactNode, create an instance that will actually be mounted.
18270
+ *
18271
+ * @param {ReactNode} node
18272
+ * @param {boolean} shouldHaveDebugID
18273
+ * @return {object} A new instance of the element's constructor.
18274
+ * @protected
18275
+ */
18276
+ function instantiateReactComponent(node, shouldHaveDebugID) {
18277
+ var instance;
18278
+
18279
+ if (node === null || node === false) {
18280
+ instance = ReactEmptyComponent.create(instantiateReactComponent);
18281
+ } else if (typeof node === 'object') {
18282
+ var element = node;
18283
+ var type = element.type;
18284
+ if (typeof type !== 'function' && typeof type !== 'string') {
18285
+ var info = '';
18286
+ if (process.env.NODE_ENV !== 'production') {
18287
+ if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
18288
+ info += ' You likely forgot to export your component from the file ' + "it's defined in.";
18289
+ }
18290
+ }
18291
+ info += getDeclarationErrorAddendum(element._owner);
18292
+ !false ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Element 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) : _prodInvariant('130', type == null ? type : typeof type, info) : void 0;
18293
+ }
18294
+
18295
+ // Special case string values
18296
+ if (typeof element.type === 'string') {
18297
+ instance = ReactHostComponent.createInternalComponent(element);
18298
+ } else if (isInternalComponentType(element.type)) {
18299
+ // This is temporarily available for custom components that are not string
18300
+ // representations. I.e. ART. Once those are updated to use the string
18301
+ // representation, we can drop this code path.
18302
+ instance = new element.type(element);
18303
+
18304
+ // We renamed this. Allow the old name for compat. :(
18305
+ if (!instance.getHostNode) {
18306
+ instance.getHostNode = instance.getNativeNode;
18307
+ }
18308
+ } else {
18309
+ instance = new ReactCompositeComponentWrapper(element);
18310
+ }
18311
+ } else if (typeof node === 'string' || typeof node === 'number') {
18312
+ instance = ReactHostComponent.createInstanceForText(node);
18313
+ } else {
18314
+ !false ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Encountered invalid React node of type %s', typeof node) : _prodInvariant('131', typeof node) : void 0;
18315
+ }
18316
+
18317
+ if (process.env.NODE_ENV !== 'production') {
18318
+ process.env.NODE_ENV !== 'production' ? warning(typeof instance.mountComponent === 'function' && typeof instance.receiveComponent === 'function' && typeof instance.getHostNode === 'function' && typeof instance.unmountComponent === 'function', 'Only React Components can be mounted.') : void 0;
18319
+ }
18320
+
18321
+ // These two fields are used by the DOM and ART diffing algorithms
18322
+ // respectively. Instead of using expandos on components, we should be
18323
+ // storing the state needed by the diffing algorithms elsewhere.
18324
+ instance._mountIndex = 0;
18325
+ instance._mountImage = null;
18326
+
18327
+ if (process.env.NODE_ENV !== 'production') {
18328
+ instance._debugID = shouldHaveDebugID ? getNextDebugID() : 0;
18329
+ }
18330
+
18331
+ // Internal instances should fully constructed at this point, so they should
18332
+ // not get any new fields added to them at this point.
18333
+ if (process.env.NODE_ENV !== 'production') {
18334
+ if (Object.preventExtensions) {
18335
+ Object.preventExtensions(instance);
18336
+ }
18337
+ }
18338
+
18339
+ return instance;
18340
+ }
18341
+
18342
+ _assign(ReactCompositeComponentWrapper.prototype, ReactCompositeComponent, {
18343
+ _instantiateReactComponent: instantiateReactComponent
18344
+ });
18345
+
18346
+ module.exports = instantiateReactComponent;
18347
+ }).call(this)}).call(this,require('_process'))
18348
+ },{"./ReactCompositeComponent":63,"./ReactEmptyComponent":86,"./ReactHostComponent":91,"./reactProdInvariant":154,"_process":29,"fbjs/lib/invariant":20,"fbjs/lib/warning":27,"object-assign":28,"react/lib/getNextDebugID":184}],151:[function(require,module,exports){
18349
+ /**
18350
+ * Copyright (c) 2013-present, Facebook, Inc.
18351
+ *
18352
+ * This source code is licensed under the MIT license found in the
18353
+ * LICENSE file in the root directory of this source tree.
18354
+ *
18355
+ */
18356
+
18357
+ 'use strict';
18358
+
18359
+ var ExecutionEnvironment = require('fbjs/lib/ExecutionEnvironment');
18360
+
18361
+ var useHasFeature;
18362
+ if (ExecutionEnvironment.canUseDOM) {
18363
+ useHasFeature = document.implementation && document.implementation.hasFeature &&
18364
+ // always returns true in newer browsers as per the standard.
18365
+ // @see http://dom.spec.whatwg.org/#dom-domimplementation-hasfeature
18366
+ document.implementation.hasFeature('', '') !== true;
18367
+ }
18368
+
18369
+ /**
18370
+ * Checks if an event is supported in the current execution environment.
18371
+ *
18372
+ * NOTE: This will not work correctly for non-generic events such as `change`,
18373
+ * `reset`, `load`, `error`, and `select`.
18374
+ *
18375
+ * Borrows from Modernizr.
18376
+ *
18377
+ * @param {string} eventNameSuffix Event name, e.g. "click".
18378
+ * @param {?boolean} capture Check if the capture phase is supported.
18379
+ * @return {boolean} True if the event is supported.
18380
+ * @internal
18381
+ * @license Modernizr 3.0.0pre (Custom Build) | MIT
18382
+ */
18383
+ function isEventSupported(eventNameSuffix, capture) {
18384
+ if (!ExecutionEnvironment.canUseDOM || capture && !('addEventListener' in document)) {
18385
+ return false;
18386
+ }
18387
+
18388
+ var eventName = 'on' + eventNameSuffix;
18389
+ var isSupported = eventName in document;
18390
+
18391
+ if (!isSupported) {
18392
+ var element = document.createElement('div');
18393
+ element.setAttribute(eventName, 'return;');
18394
+ isSupported = typeof element[eventName] === 'function';
18395
+ }
18396
+
18397
+ if (!isSupported && useHasFeature && eventNameSuffix === 'wheel') {
18398
+ // This is the only way to test support for the `wheel` event in IE9+.
18399
+ isSupported = document.implementation.hasFeature('Events.wheel', '3.0');
18400
+ }
18401
+
18402
+ return isSupported;
18403
+ }
18404
+
18405
+ module.exports = isEventSupported;
18406
+ },{"fbjs/lib/ExecutionEnvironment":6}],152:[function(require,module,exports){
18407
+ /**
18408
+ * Copyright (c) 2013-present, Facebook, Inc.
18409
+ *
18410
+ * This source code is licensed under the MIT license found in the
18411
+ * LICENSE file in the root directory of this source tree.
18412
+ *
18413
+ *
18414
+ */
18415
+
18416
+ 'use strict';
18417
+
18418
+ /**
18419
+ * @see http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary
18420
+ */
18421
+
18422
+ var supportedInputTypes = {
18423
+ color: true,
18424
+ date: true,
18425
+ datetime: true,
18426
+ 'datetime-local': true,
18427
+ email: true,
18428
+ month: true,
18429
+ number: true,
18430
+ password: true,
18431
+ range: true,
18432
+ search: true,
18433
+ tel: true,
18434
+ text: true,
18435
+ time: true,
18436
+ url: true,
18437
+ week: true
18438
+ };
18439
+
18440
+ function isTextInputElement(elem) {
18441
+ var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();
18442
+
18443
+ if (nodeName === 'input') {
18444
+ return !!supportedInputTypes[elem.type];
18445
+ }
18446
+
18447
+ if (nodeName === 'textarea') {
18448
+ return true;
18449
+ }
18450
+
18451
+ return false;
18452
+ }
18453
+
18454
+ module.exports = isTextInputElement;
18455
+ },{}],153:[function(require,module,exports){
18456
+ /**
18457
+ * Copyright (c) 2013-present, Facebook, Inc.
18458
+ *
18459
+ * This source code is licensed under the MIT license found in the
18460
+ * LICENSE file in the root directory of this source tree.
18461
+ *
18462
+ */
18463
+
18464
+ 'use strict';
18465
+
18466
+ var escapeTextContentForBrowser = require('./escapeTextContentForBrowser');
18467
+
18468
+ /**
18469
+ * Escapes attribute value to prevent scripting attacks.
18470
+ *
18471
+ * @param {*} value Value to escape.
18472
+ * @return {string} An escaped string.
18473
+ */
18474
+ function quoteAttributeValueForBrowser(value) {
18475
+ return '"' + escapeTextContentForBrowser(value) + '"';
18476
+ }
18477
+
18478
+ module.exports = quoteAttributeValueForBrowser;
18479
+ },{"./escapeTextContentForBrowser":136}],154:[function(require,module,exports){
18480
+ /**
18481
+ * Copyright (c) 2013-present, Facebook, Inc.
18482
+ *
18483
+ * This source code is licensed under the MIT license found in the
18484
+ * LICENSE file in the root directory of this source tree.
18485
+ *
18486
+ *
18487
+ */
18488
+ 'use strict';
18489
+
18490
+ /**
18491
+ * WARNING: DO NOT manually require this module.
18492
+ * This is a replacement for `invariant(...)` used by the error code system
18493
+ * and will _only_ be required by the corresponding babel pass.
18494
+ * It always throws.
18495
+ */
18496
+
18497
+ function reactProdInvariant(code) {
18498
+ var argCount = arguments.length - 1;
18499
+
18500
+ var message = 'Minified React error #' + code + '; visit ' + 'http://facebook.github.io/react/docs/error-decoder.html?invariant=' + code;
18501
+
18502
+ for (var argIdx = 0; argIdx < argCount; argIdx++) {
18503
+ message += '&args[]=' + encodeURIComponent(arguments[argIdx + 1]);
18504
+ }
18505
+
18506
+ message += ' for the full message or use the non-minified dev environment' + ' for full errors and additional helpful warnings.';
18507
+
18508
+ var error = new Error(message);
18509
+ error.name = 'Invariant Violation';
18510
+ error.framesToPop = 1; // we don't care about reactProdInvariant's own frame
18511
+
18512
+ throw error;
18513
+ }
18514
+
18515
+ module.exports = reactProdInvariant;
18516
+ },{}],155:[function(require,module,exports){
18517
+ /**
18518
+ * Copyright (c) 2013-present, Facebook, Inc.
18519
+ *
18520
+ * This source code is licensed under the MIT license found in the
18521
+ * LICENSE file in the root directory of this source tree.
18522
+ *
18523
+ */
18524
+
18525
+ 'use strict';
18526
+
18527
+ var ReactMount = require('./ReactMount');
18528
+
18529
+ module.exports = ReactMount.renderSubtreeIntoContainer;
18530
+ },{"./ReactMount":99}],156:[function(require,module,exports){
18531
+ /**
18532
+ * Copyright (c) 2013-present, Facebook, Inc.
18533
+ *
18534
+ * This source code is licensed under the MIT license found in the
18535
+ * LICENSE file in the root directory of this source tree.
18536
+ *
18537
+ */
18538
+
18539
+ 'use strict';
18540
+
18541
+ var ExecutionEnvironment = require('fbjs/lib/ExecutionEnvironment');
18542
+ var DOMNamespaces = require('./DOMNamespaces');
18543
+
18544
+ var WHITESPACE_TEST = /^[ \r\n\t\f]/;
18545
+ var NONVISIBLE_TEST = /<(!--|link|noscript|meta|script|style)[ \r\n\t\f\/>]/;
18546
+
18547
+ var createMicrosoftUnsafeLocalFunction = require('./createMicrosoftUnsafeLocalFunction');
18548
+
18549
+ // SVG temp container for IE lacking innerHTML
18550
+ var reusableSVGContainer;
18551
+
18552
+ /**
18553
+ * Set the innerHTML property of a node, ensuring that whitespace is preserved
18554
+ * even in IE8.
18555
+ *
18556
+ * @param {DOMElement} node
18557
+ * @param {string} html
18558
+ * @internal
18559
+ */
18560
+ var setInnerHTML = createMicrosoftUnsafeLocalFunction(function (node, html) {
18561
+ // IE does not have innerHTML for SVG nodes, so instead we inject the
18562
+ // new markup in a temp node and then move the child nodes across into
18563
+ // the target node
18564
+ if (node.namespaceURI === DOMNamespaces.svg && !('innerHTML' in node)) {
18565
+ reusableSVGContainer = reusableSVGContainer || document.createElement('div');
18566
+ reusableSVGContainer.innerHTML = '<svg>' + html + '</svg>';
18567
+ var svgNode = reusableSVGContainer.firstChild;
18568
+ while (svgNode.firstChild) {
18569
+ node.appendChild(svgNode.firstChild);
18570
+ }
18571
+ } else {
18572
+ node.innerHTML = html;
18573
+ }
18574
+ });
18575
+
18576
+ if (ExecutionEnvironment.canUseDOM) {
18577
+ // IE8: When updating a just created node with innerHTML only leading
18578
+ // whitespace is removed. When updating an existing node with innerHTML
18579
+ // whitespace in root TextNodes is also collapsed.
18580
+ // @see quirksmode.org/bugreports/archives/2004/11/innerhtml_and_t.html
18581
+
18582
+ // Feature detection; only IE8 is known to behave improperly like this.
18583
+ var testElement = document.createElement('div');
18584
+ testElement.innerHTML = ' ';
18585
+ if (testElement.innerHTML === '') {
18586
+ setInnerHTML = function (node, html) {
18587
+ // Magic theory: IE8 supposedly differentiates between added and updated
18588
+ // nodes when processing innerHTML, innerHTML on updated nodes suffers
18589
+ // from worse whitespace behavior. Re-adding a node like this triggers
18590
+ // the initial and more favorable whitespace behavior.
18591
+ // TODO: What to do on a detached node?
18592
+ if (node.parentNode) {
18593
+ node.parentNode.replaceChild(node, node);
18594
+ }
18595
+
18596
+ // We also implement a workaround for non-visible tags disappearing into
18597
+ // thin air on IE8, this only happens if there is no visible text
18598
+ // in-front of the non-visible tags. Piggyback on the whitespace fix
18599
+ // and simply check if any non-visible tags appear in the source.
18600
+ if (WHITESPACE_TEST.test(html) || html[0] === '<' && NONVISIBLE_TEST.test(html)) {
18601
+ // Recover leading whitespace by temporarily prepending any character.
18602
+ // \uFEFF has the potential advantage of being zero-width/invisible.
18603
+ // UglifyJS drops U+FEFF chars when parsing, so use String.fromCharCode
18604
+ // in hopes that this is preserved even if "\uFEFF" is transformed to
18605
+ // the actual Unicode character (by Babel, for example).
18606
+ // https://github.com/mishoo/UglifyJS2/blob/v2.4.20/lib/parse.js#L216
18607
+ node.innerHTML = String.fromCharCode(0xfeff) + html;
18608
+
18609
+ // deleteData leaves an empty `TextNode` which offsets the index of all
18610
+ // children. Definitely want to avoid this.
18611
+ var textNode = node.firstChild;
18612
+ if (textNode.data.length === 1) {
18613
+ node.removeChild(textNode);
18614
+ } else {
18615
+ textNode.deleteData(0, 1);
18616
+ }
18617
+ } else {
18618
+ node.innerHTML = html;
18619
+ }
18620
+ };
18621
+ }
18622
+ testElement = null;
18623
+ }
18624
+
18625
+ module.exports = setInnerHTML;
18626
+ },{"./DOMNamespaces":44,"./createMicrosoftUnsafeLocalFunction":134,"fbjs/lib/ExecutionEnvironment":6}],157:[function(require,module,exports){
18627
+ /**
18628
+ * Copyright (c) 2013-present, Facebook, Inc.
18629
+ *
18630
+ * This source code is licensed under the MIT license found in the
18631
+ * LICENSE file in the root directory of this source tree.
18632
+ *
18633
+ */
18634
+
18635
+ 'use strict';
18636
+
18637
+ var ExecutionEnvironment = require('fbjs/lib/ExecutionEnvironment');
18638
+ var escapeTextContentForBrowser = require('./escapeTextContentForBrowser');
18639
+ var setInnerHTML = require('./setInnerHTML');
18640
+
18641
+ /**
18642
+ * Set the textContent property of a node, ensuring that whitespace is preserved
18643
+ * even in IE8. innerText is a poor substitute for textContent and, among many
18644
+ * issues, inserts <br> instead of the literal newline chars. innerHTML behaves
18645
+ * as it should.
18646
+ *
18647
+ * @param {DOMElement} node
18648
+ * @param {string} text
18649
+ * @internal
18650
+ */
18651
+ var setTextContent = function (node, text) {
18652
+ if (text) {
18653
+ var firstChild = node.firstChild;
18654
+
18655
+ if (firstChild && firstChild === node.lastChild && firstChild.nodeType === 3) {
18656
+ firstChild.nodeValue = text;
18657
+ return;
18658
+ }
18659
+ }
18660
+ node.textContent = text;
18661
+ };
18662
+
18663
+ if (ExecutionEnvironment.canUseDOM) {
18664
+ if (!('textContent' in document.documentElement)) {
18665
+ setTextContent = function (node, text) {
18666
+ if (node.nodeType === 3) {
18667
+ node.nodeValue = text;
18668
+ return;
18669
+ }
18670
+ setInnerHTML(node, escapeTextContentForBrowser(text));
18671
+ };
18672
+ }
18673
+ }
18674
+
18675
+ module.exports = setTextContent;
18676
+ },{"./escapeTextContentForBrowser":136,"./setInnerHTML":156,"fbjs/lib/ExecutionEnvironment":6}],158:[function(require,module,exports){
18677
+ /**
18678
+ * Copyright (c) 2013-present, Facebook, Inc.
18679
+ *
18680
+ * This source code is licensed under the MIT license found in the
18681
+ * LICENSE file in the root directory of this source tree.
18682
+ *
18683
+ */
18684
+
18685
+ 'use strict';
18686
+
18687
+ /**
18688
+ * Given a `prevElement` and `nextElement`, determines if the existing
18689
+ * instance should be updated as opposed to being destroyed or replaced by a new
18690
+ * instance. Both arguments are elements. This ensures that this logic can
18691
+ * operate on stateless trees without any backing instance.
18692
+ *
18693
+ * @param {?object} prevElement
18694
+ * @param {?object} nextElement
18695
+ * @return {boolean} True if the existing instance should be updated.
18696
+ * @protected
18697
+ */
18698
+
18699
+ function shouldUpdateReactComponent(prevElement, nextElement) {
18700
+ var prevEmpty = prevElement === null || prevElement === false;
18701
+ var nextEmpty = nextElement === null || nextElement === false;
18702
+ if (prevEmpty || nextEmpty) {
18703
+ return prevEmpty === nextEmpty;
18704
+ }
18705
+
18706
+ var prevType = typeof prevElement;
18707
+ var nextType = typeof nextElement;
18708
+ if (prevType === 'string' || prevType === 'number') {
18709
+ return nextType === 'string' || nextType === 'number';
18710
+ } else {
18711
+ return nextType === 'object' && prevElement.type === nextElement.type && prevElement.key === nextElement.key;
18712
+ }
18713
+ }
18714
+
18715
+ module.exports = shouldUpdateReactComponent;
18716
+ },{}],159:[function(require,module,exports){
18717
+ (function (process){(function (){
18718
+ /**
18719
+ * Copyright (c) 2013-present, Facebook, Inc.
18720
+ *
18721
+ * This source code is licensed under the MIT license found in the
18722
+ * LICENSE file in the root directory of this source tree.
18723
+ *
18724
+ */
18725
+
18726
+ 'use strict';
18727
+
18728
+ var _prodInvariant = require('./reactProdInvariant');
18729
+
18730
+ var ReactCurrentOwner = require('react/lib/ReactCurrentOwner');
18731
+ var REACT_ELEMENT_TYPE = require('./ReactElementSymbol');
18732
+
18733
+ var getIteratorFn = require('./getIteratorFn');
18734
+ var invariant = require('fbjs/lib/invariant');
18735
+ var KeyEscapeUtils = require('./KeyEscapeUtils');
18736
+ var warning = require('fbjs/lib/warning');
18737
+
18738
+ var SEPARATOR = '.';
18739
+ var SUBSEPARATOR = ':';
18740
+
18741
+ /**
18742
+ * This is inlined from ReactElement since this file is shared between
18743
+ * isomorphic and renderers. We could extract this to a
18744
+ *
18745
+ */
18746
+
18747
+ /**
18748
+ * TODO: Test that a single child and an array with one item have the same key
18749
+ * pattern.
18750
+ */
18751
+
18752
+ var didWarnAboutMaps = false;
18753
+
18754
+ /**
18755
+ * Generate a key string that identifies a component within a set.
18756
+ *
18757
+ * @param {*} component A component that could contain a manual key.
18758
+ * @param {number} index Index that is used if a manual key is not provided.
18759
+ * @return {string}
18760
+ */
18761
+ function getComponentKey(component, index) {
18762
+ // Do some typechecking here since we call this blindly. We want to ensure
18763
+ // that we don't block potential future ES APIs.
18764
+ if (component && typeof component === 'object' && component.key != null) {
18765
+ // Explicit key
18766
+ return KeyEscapeUtils.escape(component.key);
18767
+ }
18768
+ // Implicit key determined by the index in the set
18769
+ return index.toString(36);
18770
+ }
18771
+
18772
+ /**
18773
+ * @param {?*} children Children tree container.
18774
+ * @param {!string} nameSoFar Name of the key path so far.
18775
+ * @param {!function} callback Callback to invoke with each child found.
18776
+ * @param {?*} traverseContext Used to pass information throughout the traversal
18777
+ * process.
18778
+ * @return {!number} The number of children in this subtree.
18779
+ */
18780
+ function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext) {
18781
+ var type = typeof children;
18782
+
18783
+ if (type === 'undefined' || type === 'boolean') {
18784
+ // All of the above are perceived as null.
18785
+ children = null;
18786
+ }
18787
+
18788
+ if (children === null || type === 'string' || type === 'number' ||
18789
+ // The following is inlined from ReactElement. This means we can optimize
18790
+ // some checks. React Fiber also inlines this logic for similar purposes.
18791
+ type === 'object' && children.$$typeof === REACT_ELEMENT_TYPE) {
18792
+ callback(traverseContext, children,
18793
+ // If it's the only child, treat the name as if it was wrapped in an array
18794
+ // so that it's consistent if the number of children grows.
18795
+ nameSoFar === '' ? SEPARATOR + getComponentKey(children, 0) : nameSoFar);
18796
+ return 1;
18797
+ }
18798
+
18799
+ var child;
18800
+ var nextName;
18801
+ var subtreeCount = 0; // Count of children found in the current subtree.
18802
+ var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR;
18803
+
18804
+ if (Array.isArray(children)) {
18805
+ for (var i = 0; i < children.length; i++) {
18806
+ child = children[i];
18807
+ nextName = nextNamePrefix + getComponentKey(child, i);
18808
+ subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
18809
+ }
18810
+ } else {
18811
+ var iteratorFn = getIteratorFn(children);
18812
+ if (iteratorFn) {
18813
+ var iterator = iteratorFn.call(children);
18814
+ var step;
18815
+ if (iteratorFn !== children.entries) {
18816
+ var ii = 0;
18817
+ while (!(step = iterator.next()).done) {
18818
+ child = step.value;
18819
+ nextName = nextNamePrefix + getComponentKey(child, ii++);
18820
+ subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
18821
+ }
18822
+ } else {
18823
+ if (process.env.NODE_ENV !== 'production') {
18824
+ var mapsAsChildrenAddendum = '';
18825
+ if (ReactCurrentOwner.current) {
18826
+ var mapsAsChildrenOwnerName = ReactCurrentOwner.current.getName();
18827
+ if (mapsAsChildrenOwnerName) {
18828
+ mapsAsChildrenAddendum = ' Check the render method of `' + mapsAsChildrenOwnerName + '`.';
18829
+ }
18830
+ }
18831
+ process.env.NODE_ENV !== '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;
18832
+ didWarnAboutMaps = true;
18833
+ }
18834
+ // Iterator will provide entry [k,v] tuples rather than values.
18835
+ while (!(step = iterator.next()).done) {
18836
+ var entry = step.value;
18837
+ if (entry) {
18838
+ child = entry[1];
18839
+ nextName = nextNamePrefix + KeyEscapeUtils.escape(entry[0]) + SUBSEPARATOR + getComponentKey(child, 0);
18840
+ subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
18841
+ }
18842
+ }
18843
+ }
18844
+ } else if (type === 'object') {
18845
+ var addendum = '';
18846
+ if (process.env.NODE_ENV !== 'production') {
18847
+ 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.';
18848
+ if (children._isReactElement) {
18849
+ 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.';
18850
+ }
18851
+ if (ReactCurrentOwner.current) {
18852
+ var name = ReactCurrentOwner.current.getName();
18853
+ if (name) {
18854
+ addendum += ' Check the render method of `' + name + '`.';
18855
+ }
18856
+ }
18857
+ }
18858
+ var childrenString = String(children);
18859
+ !false ? process.env.NODE_ENV !== '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;
18860
+ }
18861
+ }
18862
+
18863
+ return subtreeCount;
18864
+ }
18865
+
18866
+ /**
18867
+ * Traverses children that are typically specified as `props.children`, but
18868
+ * might also be specified through attributes:
18869
+ *
18870
+ * - `traverseAllChildren(this.props.children, ...)`
18871
+ * - `traverseAllChildren(this.props.leftPanelChildren, ...)`
18872
+ *
18873
+ * The `traverseContext` is an optional argument that is passed through the
18874
+ * entire traversal. It can be used to store accumulations or anything else that
18875
+ * the callback might find relevant.
18876
+ *
18877
+ * @param {?*} children Children tree object.
18878
+ * @param {!function} callback To invoke upon traversing each child.
18879
+ * @param {?*} traverseContext Context for traversal.
18880
+ * @return {!number} The number of children in this subtree.
18881
+ */
18882
+ function traverseAllChildren(children, callback, traverseContext) {
18883
+ if (children == null) {
18884
+ return 0;
18885
+ }
18886
+
18887
+ return traverseAllChildrenImpl(children, '', callback, traverseContext);
18888
+ }
18889
+
18890
+ module.exports = traverseAllChildren;
18891
+ }).call(this)}).call(this,require('_process'))
18892
+ },{"./KeyEscapeUtils":56,"./ReactElementSymbol":85,"./getIteratorFn":145,"./reactProdInvariant":154,"_process":29,"fbjs/lib/invariant":20,"fbjs/lib/warning":27,"react/lib/ReactCurrentOwner":170}],160:[function(require,module,exports){
18893
+ (function (process){(function (){
18894
+ /**
18895
+ * Copyright (c) 2015-present, Facebook, Inc.
18896
+ *
18897
+ * This source code is licensed under the MIT license found in the
18898
+ * LICENSE file in the root directory of this source tree.
18899
+ *
18900
+ */
18901
+
18902
+ 'use strict';
18903
+
18904
+ var _assign = require('object-assign');
18905
+
18906
+ var emptyFunction = require('fbjs/lib/emptyFunction');
18907
+ var warning = require('fbjs/lib/warning');
18908
+
18909
+ var validateDOMNesting = emptyFunction;
18910
+
18911
+ if (process.env.NODE_ENV !== 'production') {
18912
+ // This validation code was written based on the HTML5 parsing spec:
18913
+ // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-scope
18914
+ //
18915
+ // Note: this does not catch all invalid nesting, nor does it try to (as it's
18916
+ // not clear what practical benefit doing so provides); instead, we warn only
18917
+ // for cases where the parser will give a parse tree differing from what React
18918
+ // intended. For example, <b><div></div></b> is invalid but we don't warn
18919
+ // because it still parses correctly; we do warn for other cases like nested
18920
+ // <p> tags where the beginning of the second element implicitly closes the
18921
+ // first, causing a confusing mess.
18922
+
18923
+ // https://html.spec.whatwg.org/multipage/syntax.html#special
18924
+ var specialTags = ['address', 'applet', 'area', 'article', 'aside', 'base', 'basefont', 'bgsound', 'blockquote', 'body', 'br', 'button', 'caption', 'center', 'col', 'colgroup', 'dd', 'details', 'dir', 'div', 'dl', 'dt', 'embed', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'frame', 'frameset', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'iframe', 'img', 'input', 'isindex', 'li', 'link', 'listing', 'main', 'marquee', 'menu', 'menuitem', 'meta', 'nav', 'noembed', 'noframes', 'noscript', 'object', 'ol', 'p', 'param', 'plaintext', 'pre', 'script', 'section', 'select', 'source', 'style', 'summary', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'title', 'tr', 'track', 'ul', 'wbr', 'xmp'];
18925
+
18926
+ // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-scope
18927
+ var inScopeTags = ['applet', 'caption', 'html', 'table', 'td', 'th', 'marquee', 'object', 'template',
18928
+
18929
+ // https://html.spec.whatwg.org/multipage/syntax.html#html-integration-point
18930
+ // TODO: Distinguish by namespace here -- for <title>, including it here
18931
+ // errs on the side of fewer warnings
18932
+ 'foreignObject', 'desc', 'title'];
18933
+
18934
+ // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-button-scope
18935
+ var buttonScopeTags = inScopeTags.concat(['button']);
18936
+
18937
+ // https://html.spec.whatwg.org/multipage/syntax.html#generate-implied-end-tags
18938
+ var impliedEndTags = ['dd', 'dt', 'li', 'option', 'optgroup', 'p', 'rp', 'rt'];
18939
+
18940
+ var emptyAncestorInfo = {
18941
+ current: null,
18942
+
18943
+ formTag: null,
18944
+ aTagInScope: null,
18945
+ buttonTagInScope: null,
18946
+ nobrTagInScope: null,
18947
+ pTagInButtonScope: null,
18948
+
18949
+ listItemTagAutoclosing: null,
18950
+ dlItemTagAutoclosing: null
18951
+ };
18952
+
18953
+ var updatedAncestorInfo = function (oldInfo, tag, instance) {
18954
+ var ancestorInfo = _assign({}, oldInfo || emptyAncestorInfo);
18955
+ var info = { tag: tag, instance: instance };
18956
+
18957
+ if (inScopeTags.indexOf(tag) !== -1) {
18958
+ ancestorInfo.aTagInScope = null;
18959
+ ancestorInfo.buttonTagInScope = null;
18960
+ ancestorInfo.nobrTagInScope = null;
18961
+ }
18962
+ if (buttonScopeTags.indexOf(tag) !== -1) {
18963
+ ancestorInfo.pTagInButtonScope = null;
18964
+ }
18965
+
18966
+ // See rules for 'li', 'dd', 'dt' start tags in
18967
+ // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody
18968
+ if (specialTags.indexOf(tag) !== -1 && tag !== 'address' && tag !== 'div' && tag !== 'p') {
18969
+ ancestorInfo.listItemTagAutoclosing = null;
18970
+ ancestorInfo.dlItemTagAutoclosing = null;
18971
+ }
18972
+
18973
+ ancestorInfo.current = info;
18974
+
18975
+ if (tag === 'form') {
18976
+ ancestorInfo.formTag = info;
18977
+ }
18978
+ if (tag === 'a') {
18979
+ ancestorInfo.aTagInScope = info;
18980
+ }
18981
+ if (tag === 'button') {
18982
+ ancestorInfo.buttonTagInScope = info;
18983
+ }
18984
+ if (tag === 'nobr') {
18985
+ ancestorInfo.nobrTagInScope = info;
18986
+ }
18987
+ if (tag === 'p') {
18988
+ ancestorInfo.pTagInButtonScope = info;
18989
+ }
18990
+ if (tag === 'li') {
18991
+ ancestorInfo.listItemTagAutoclosing = info;
18992
+ }
18993
+ if (tag === 'dd' || tag === 'dt') {
18994
+ ancestorInfo.dlItemTagAutoclosing = info;
18995
+ }
18996
+
18997
+ return ancestorInfo;
18998
+ };
18999
+
19000
+ /**
19001
+ * Returns whether
19002
+ */
19003
+ var isTagValidWithParent = function (tag, parentTag) {
19004
+ // First, let's check if we're in an unusual parsing mode...
19005
+ switch (parentTag) {
19006
+ // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inselect
19007
+ case 'select':
19008
+ return tag === 'option' || tag === 'optgroup' || tag === '#text';
19009
+ case 'optgroup':
19010
+ return tag === 'option' || tag === '#text';
19011
+ // Strictly speaking, seeing an <option> doesn't mean we're in a <select>
19012
+ // but
19013
+ case 'option':
19014
+ return tag === '#text';
19015
+ // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intd
19016
+ // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-incaption
19017
+ // No special behavior since these rules fall back to "in body" mode for
19018
+ // all except special table nodes which cause bad parsing behavior anyway.
19019
+
19020
+ // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intr
19021
+ case 'tr':
19022
+ return tag === 'th' || tag === 'td' || tag === 'style' || tag === 'script' || tag === 'template';
19023
+ // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intbody
19024
+ case 'tbody':
19025
+ case 'thead':
19026
+ case 'tfoot':
19027
+ return tag === 'tr' || tag === 'style' || tag === 'script' || tag === 'template';
19028
+ // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-incolgroup
19029
+ case 'colgroup':
19030
+ return tag === 'col' || tag === 'template';
19031
+ // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intable
19032
+ case 'table':
19033
+ return tag === 'caption' || tag === 'colgroup' || tag === 'tbody' || tag === 'tfoot' || tag === 'thead' || tag === 'style' || tag === 'script' || tag === 'template';
19034
+ // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inhead
19035
+ case 'head':
19036
+ return tag === 'base' || tag === 'basefont' || tag === 'bgsound' || tag === 'link' || tag === 'meta' || tag === 'title' || tag === 'noscript' || tag === 'noframes' || tag === 'style' || tag === 'script' || tag === 'template';
19037
+ // https://html.spec.whatwg.org/multipage/semantics.html#the-html-element
19038
+ case 'html':
19039
+ return tag === 'head' || tag === 'body';
19040
+ case '#document':
19041
+ return tag === 'html';
19042
+ }
19043
+
19044
+ // Probably in the "in body" parsing mode, so we outlaw only tag combos
19045
+ // where the parsing rules cause implicit opens or closes to be added.
19046
+ // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody
19047
+ switch (tag) {
19048
+ case 'h1':
19049
+ case 'h2':
19050
+ case 'h3':
19051
+ case 'h4':
19052
+ case 'h5':
19053
+ case 'h6':
19054
+ return parentTag !== 'h1' && parentTag !== 'h2' && parentTag !== 'h3' && parentTag !== 'h4' && parentTag !== 'h5' && parentTag !== 'h6';
19055
+
19056
+ case 'rp':
19057
+ case 'rt':
19058
+ return impliedEndTags.indexOf(parentTag) === -1;
19059
+
19060
+ case 'body':
19061
+ case 'caption':
19062
+ case 'col':
19063
+ case 'colgroup':
19064
+ case 'frame':
19065
+ case 'head':
19066
+ case 'html':
19067
+ case 'tbody':
19068
+ case 'td':
19069
+ case 'tfoot':
19070
+ case 'th':
19071
+ case 'thead':
19072
+ case 'tr':
19073
+ // These tags are only valid with a few parents that have special child
19074
+ // parsing rules -- if we're down here, then none of those matched and
19075
+ // so we allow it only if we don't know what the parent is, as all other
19076
+ // cases are invalid.
19077
+ return parentTag == null;
19078
+ }
19079
+
19080
+ return true;
19081
+ };
19082
+
19083
+ /**
19084
+ * Returns whether
19085
+ */
19086
+ var findInvalidAncestorForTag = function (tag, ancestorInfo) {
19087
+ switch (tag) {
19088
+ case 'address':
19089
+ case 'article':
19090
+ case 'aside':
19091
+ case 'blockquote':
19092
+ case 'center':
19093
+ case 'details':
19094
+ case 'dialog':
19095
+ case 'dir':
19096
+ case 'div':
19097
+ case 'dl':
19098
+ case 'fieldset':
19099
+ case 'figcaption':
19100
+ case 'figure':
19101
+ case 'footer':
19102
+ case 'header':
19103
+ case 'hgroup':
19104
+ case 'main':
19105
+ case 'menu':
19106
+ case 'nav':
19107
+ case 'ol':
19108
+ case 'p':
19109
+ case 'section':
19110
+ case 'summary':
19111
+ case 'ul':
19112
+ case 'pre':
19113
+ case 'listing':
19114
+ case 'table':
19115
+ case 'hr':
19116
+ case 'xmp':
19117
+ case 'h1':
19118
+ case 'h2':
19119
+ case 'h3':
19120
+ case 'h4':
19121
+ case 'h5':
19122
+ case 'h6':
19123
+ return ancestorInfo.pTagInButtonScope;
19124
+
19125
+ case 'form':
19126
+ return ancestorInfo.formTag || ancestorInfo.pTagInButtonScope;
19127
+
19128
+ case 'li':
19129
+ return ancestorInfo.listItemTagAutoclosing;
19130
+
19131
+ case 'dd':
19132
+ case 'dt':
19133
+ return ancestorInfo.dlItemTagAutoclosing;
19134
+
19135
+ case 'button':
19136
+ return ancestorInfo.buttonTagInScope;
19137
+
19138
+ case 'a':
19139
+ // Spec says something about storing a list of markers, but it sounds
19140
+ // equivalent to this check.
19141
+ return ancestorInfo.aTagInScope;
19142
+
19143
+ case 'nobr':
19144
+ return ancestorInfo.nobrTagInScope;
19145
+ }
19146
+
19147
+ return null;
19148
+ };
19149
+
19150
+ /**
19151
+ * Given a ReactCompositeComponent instance, return a list of its recursive
19152
+ * owners, starting at the root and ending with the instance itself.
19153
+ */
19154
+ var findOwnerStack = function (instance) {
19155
+ if (!instance) {
19156
+ return [];
19157
+ }
19158
+
19159
+ var stack = [];
19160
+ do {
19161
+ stack.push(instance);
19162
+ } while (instance = instance._currentElement._owner);
19163
+ stack.reverse();
19164
+ return stack;
19165
+ };
19166
+
19167
+ var didWarn = {};
19168
+
19169
+ validateDOMNesting = function (childTag, childText, childInstance, ancestorInfo) {
19170
+ ancestorInfo = ancestorInfo || emptyAncestorInfo;
19171
+ var parentInfo = ancestorInfo.current;
19172
+ var parentTag = parentInfo && parentInfo.tag;
19173
+
19174
+ if (childText != null) {
19175
+ process.env.NODE_ENV !== 'production' ? warning(childTag == null, 'validateDOMNesting: when childText is passed, childTag should be null') : void 0;
19176
+ childTag = '#text';
19177
+ }
19178
+
19179
+ var invalidParent = isTagValidWithParent(childTag, parentTag) ? null : parentInfo;
19180
+ var invalidAncestor = invalidParent ? null : findInvalidAncestorForTag(childTag, ancestorInfo);
19181
+ var problematic = invalidParent || invalidAncestor;
19182
+
19183
+ if (problematic) {
19184
+ var ancestorTag = problematic.tag;
19185
+ var ancestorInstance = problematic.instance;
19186
+
19187
+ var childOwner = childInstance && childInstance._currentElement._owner;
19188
+ var ancestorOwner = ancestorInstance && ancestorInstance._currentElement._owner;
19189
+
19190
+ var childOwners = findOwnerStack(childOwner);
19191
+ var ancestorOwners = findOwnerStack(ancestorOwner);
19192
+
19193
+ var minStackLen = Math.min(childOwners.length, ancestorOwners.length);
19194
+ var i;
19195
+
19196
+ var deepestCommon = -1;
19197
+ for (i = 0; i < minStackLen; i++) {
19198
+ if (childOwners[i] === ancestorOwners[i]) {
19199
+ deepestCommon = i;
19200
+ } else {
19201
+ break;
19202
+ }
19203
+ }
19204
+
19205
+ var UNKNOWN = '(unknown)';
19206
+ var childOwnerNames = childOwners.slice(deepestCommon + 1).map(function (inst) {
19207
+ return inst.getName() || UNKNOWN;
19208
+ });
19209
+ var ancestorOwnerNames = ancestorOwners.slice(deepestCommon + 1).map(function (inst) {
19210
+ return inst.getName() || UNKNOWN;
19211
+ });
19212
+ var ownerInfo = [].concat(
19213
+ // If the parent and child instances have a common owner ancestor, start
19214
+ // with that -- otherwise we just start with the parent's owners.
19215
+ deepestCommon !== -1 ? childOwners[deepestCommon].getName() || UNKNOWN : [], ancestorOwnerNames, ancestorTag,
19216
+ // If we're warning about an invalid (non-parent) ancestry, add '...'
19217
+ invalidAncestor ? ['...'] : [], childOwnerNames, childTag).join(' > ');
19218
+
19219
+ var warnKey = !!invalidParent + '|' + childTag + '|' + ancestorTag + '|' + ownerInfo;
19220
+ if (didWarn[warnKey]) {
19221
+ return;
19222
+ }
19223
+ didWarn[warnKey] = true;
19224
+
19225
+ var tagDisplayName = childTag;
19226
+ var whitespaceInfo = '';
19227
+ if (childTag === '#text') {
19228
+ if (/\S/.test(childText)) {
19229
+ tagDisplayName = 'Text nodes';
19230
+ } else {
19231
+ tagDisplayName = 'Whitespace text nodes';
19232
+ whitespaceInfo = " Make sure you don't have any extra whitespace between tags on " + 'each line of your source code.';
19233
+ }
19234
+ } else {
19235
+ tagDisplayName = '<' + childTag + '>';
19236
+ }
19237
+
19238
+ if (invalidParent) {
19239
+ var info = '';
19240
+ if (ancestorTag === 'table' && childTag === 'tr') {
19241
+ info += ' Add a <tbody> to your code to match the DOM tree generated by ' + 'the browser.';
19242
+ }
19243
+ process.env.NODE_ENV !== 'production' ? warning(false, 'validateDOMNesting(...): %s cannot appear as a child of <%s>.%s ' + 'See %s.%s', tagDisplayName, ancestorTag, whitespaceInfo, ownerInfo, info) : void 0;
19244
+ } else {
19245
+ process.env.NODE_ENV !== 'production' ? warning(false, 'validateDOMNesting(...): %s cannot appear as a descendant of ' + '<%s>. See %s.', tagDisplayName, ancestorTag, ownerInfo) : void 0;
19246
+ }
19247
+ }
19248
+ };
19249
+
19250
+ validateDOMNesting.updatedAncestorInfo = updatedAncestorInfo;
19251
+
19252
+ // For testing
19253
+ validateDOMNesting.isTagValidInContext = function (tag, ancestorInfo) {
19254
+ ancestorInfo = ancestorInfo || emptyAncestorInfo;
19255
+ var parentInfo = ancestorInfo.current;
19256
+ var parentTag = parentInfo && parentInfo.tag;
19257
+ return isTagValidWithParent(tag, parentTag) && !findInvalidAncestorForTag(tag, ancestorInfo);
19258
+ };
19259
+ }
19260
+
19261
+ module.exports = validateDOMNesting;
19262
+ }).call(this)}).call(this,require('_process'))
19263
+ },{"_process":29,"fbjs/lib/emptyFunction":12,"fbjs/lib/warning":27,"object-assign":28}],161:[function(require,module,exports){
19264
+ (function (process){(function (){
19265
+ /** @license React v16.13.1
19266
+ * react-is.development.js
19267
+ *
19268
+ * Copyright (c) Facebook, Inc. and its affiliates.
19269
+ *
19270
+ * This source code is licensed under the MIT license found in the
19271
+ * LICENSE file in the root directory of this source tree.
19272
+ */
19273
+
19274
+ 'use strict';
19275
+
19276
+
19277
+
19278
+ if (process.env.NODE_ENV !== "production") {
19279
+ (function() {
19280
+ 'use strict';
19281
+
19282
+ // The Symbol used to tag the ReactElement-like types. If there is no native Symbol
19283
+ // nor polyfill, then a plain number is used for performance.
19284
+ var hasSymbol = typeof Symbol === 'function' && Symbol.for;
19285
+ var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
19286
+ var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
19287
+ var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
19288
+ var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
19289
+ var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
19290
+ var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
19291
+ var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
19292
+ // (unstable) APIs that have been removed. Can we remove the symbols?
19293
+
19294
+ var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
19295
+ var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
19296
+ var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
19297
+ var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
19298
+ var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
19299
+ var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
19300
+ var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
19301
+ var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;
19302
+ var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
19303
+ var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;
19304
+ var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;
19305
+
19306
+ function isValidElementType(type) {
19307
+ return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
19308
+ type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);
19309
+ }
19310
+
19311
+ function typeOf(object) {
19312
+ if (typeof object === 'object' && object !== null) {
19313
+ var $$typeof = object.$$typeof;
19314
+
19315
+ switch ($$typeof) {
19316
+ case REACT_ELEMENT_TYPE:
19317
+ var type = object.type;
19318
+
19319
+ switch (type) {
19320
+ case REACT_ASYNC_MODE_TYPE:
19321
+ case REACT_CONCURRENT_MODE_TYPE:
19322
+ case REACT_FRAGMENT_TYPE:
19323
+ case REACT_PROFILER_TYPE:
19324
+ case REACT_STRICT_MODE_TYPE:
19325
+ case REACT_SUSPENSE_TYPE:
19326
+ return type;
19327
+
19328
+ default:
19329
+ var $$typeofType = type && type.$$typeof;
19330
+
19331
+ switch ($$typeofType) {
19332
+ case REACT_CONTEXT_TYPE:
19333
+ case REACT_FORWARD_REF_TYPE:
19334
+ case REACT_LAZY_TYPE:
19335
+ case REACT_MEMO_TYPE:
19336
+ case REACT_PROVIDER_TYPE:
19337
+ return $$typeofType;
19338
+
19339
+ default:
19340
+ return $$typeof;
19341
+ }
19342
+
19343
+ }
19344
+
19345
+ case REACT_PORTAL_TYPE:
19346
+ return $$typeof;
19347
+ }
19348
+ }
19349
+
19350
+ return undefined;
19351
+ } // AsyncMode is deprecated along with isAsyncMode
19352
+
19353
+ var AsyncMode = REACT_ASYNC_MODE_TYPE;
19354
+ var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
19355
+ var ContextConsumer = REACT_CONTEXT_TYPE;
19356
+ var ContextProvider = REACT_PROVIDER_TYPE;
19357
+ var Element = REACT_ELEMENT_TYPE;
19358
+ var ForwardRef = REACT_FORWARD_REF_TYPE;
19359
+ var Fragment = REACT_FRAGMENT_TYPE;
19360
+ var Lazy = REACT_LAZY_TYPE;
19361
+ var Memo = REACT_MEMO_TYPE;
19362
+ var Portal = REACT_PORTAL_TYPE;
19363
+ var Profiler = REACT_PROFILER_TYPE;
19364
+ var StrictMode = REACT_STRICT_MODE_TYPE;
19365
+ var Suspense = REACT_SUSPENSE_TYPE;
19366
+ var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated
19367
+
19368
+ function isAsyncMode(object) {
19369
+ {
19370
+ if (!hasWarnedAboutDeprecatedIsAsyncMode) {
19371
+ hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint
19372
+
19373
+ console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');
19374
+ }
19375
+ }
19376
+
19377
+ return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
19378
+ }
19379
+ function isConcurrentMode(object) {
19380
+ return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
19381
+ }
19382
+ function isContextConsumer(object) {
19383
+ return typeOf(object) === REACT_CONTEXT_TYPE;
19384
+ }
19385
+ function isContextProvider(object) {
19386
+ return typeOf(object) === REACT_PROVIDER_TYPE;
19387
+ }
19388
+ function isElement(object) {
19389
+ return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
19390
+ }
19391
+ function isForwardRef(object) {
19392
+ return typeOf(object) === REACT_FORWARD_REF_TYPE;
19393
+ }
19394
+ function isFragment(object) {
19395
+ return typeOf(object) === REACT_FRAGMENT_TYPE;
19396
+ }
19397
+ function isLazy(object) {
19398
+ return typeOf(object) === REACT_LAZY_TYPE;
19399
+ }
19400
+ function isMemo(object) {
19401
+ return typeOf(object) === REACT_MEMO_TYPE;
19402
+ }
19403
+ function isPortal(object) {
19404
+ return typeOf(object) === REACT_PORTAL_TYPE;
19405
+ }
19406
+ function isProfiler(object) {
19407
+ return typeOf(object) === REACT_PROFILER_TYPE;
19408
+ }
19409
+ function isStrictMode(object) {
19410
+ return typeOf(object) === REACT_STRICT_MODE_TYPE;
19411
+ }
19412
+ function isSuspense(object) {
19413
+ return typeOf(object) === REACT_SUSPENSE_TYPE;
19414
+ }
19415
+
19416
+ exports.AsyncMode = AsyncMode;
19417
+ exports.ConcurrentMode = ConcurrentMode;
19418
+ exports.ContextConsumer = ContextConsumer;
19419
+ exports.ContextProvider = ContextProvider;
19420
+ exports.Element = Element;
19421
+ exports.ForwardRef = ForwardRef;
19422
+ exports.Fragment = Fragment;
19423
+ exports.Lazy = Lazy;
19424
+ exports.Memo = Memo;
19425
+ exports.Portal = Portal;
19426
+ exports.Profiler = Profiler;
19427
+ exports.StrictMode = StrictMode;
19428
+ exports.Suspense = Suspense;
19429
+ exports.isAsyncMode = isAsyncMode;
19430
+ exports.isConcurrentMode = isConcurrentMode;
19431
+ exports.isContextConsumer = isContextConsumer;
19432
+ exports.isContextProvider = isContextProvider;
19433
+ exports.isElement = isElement;
19434
+ exports.isForwardRef = isForwardRef;
19435
+ exports.isFragment = isFragment;
19436
+ exports.isLazy = isLazy;
19437
+ exports.isMemo = isMemo;
19438
+ exports.isPortal = isPortal;
19439
+ exports.isProfiler = isProfiler;
19440
+ exports.isStrictMode = isStrictMode;
19441
+ exports.isSuspense = isSuspense;
19442
+ exports.isValidElementType = isValidElementType;
19443
+ exports.typeOf = typeOf;
19444
+ })();
19445
+ }
19446
+
19447
+ }).call(this)}).call(this,require('_process'))
19448
+ },{"_process":29}],162:[function(require,module,exports){
19449
+ /** @license React v16.13.1
19450
+ * react-is.production.min.js
19451
+ *
19452
+ * Copyright (c) Facebook, Inc. and its affiliates.
19453
+ *
19454
+ * This source code is licensed under the MIT license found in the
19455
+ * LICENSE file in the root directory of this source tree.
19456
+ */
19457
+
19458
+ 'use strict';var b="function"===typeof Symbol&&Symbol.for,c=b?Symbol.for("react.element"):60103,d=b?Symbol.for("react.portal"):60106,e=b?Symbol.for("react.fragment"):60107,f=b?Symbol.for("react.strict_mode"):60108,g=b?Symbol.for("react.profiler"):60114,h=b?Symbol.for("react.provider"):60109,k=b?Symbol.for("react.context"):60110,l=b?Symbol.for("react.async_mode"):60111,m=b?Symbol.for("react.concurrent_mode"):60111,n=b?Symbol.for("react.forward_ref"):60112,p=b?Symbol.for("react.suspense"):60113,q=b?
19459
+ Symbol.for("react.suspense_list"):60120,r=b?Symbol.for("react.memo"):60115,t=b?Symbol.for("react.lazy"):60116,v=b?Symbol.for("react.block"):60121,w=b?Symbol.for("react.fundamental"):60117,x=b?Symbol.for("react.responder"):60118,y=b?Symbol.for("react.scope"):60119;
19460
+ function z(a){if("object"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}exports.AsyncMode=l;exports.ConcurrentMode=m;exports.ContextConsumer=k;exports.ContextProvider=h;exports.Element=c;exports.ForwardRef=n;exports.Fragment=e;exports.Lazy=t;exports.Memo=r;exports.Portal=d;
19461
+ exports.Profiler=g;exports.StrictMode=f;exports.Suspense=p;exports.isAsyncMode=function(a){return A(a)||z(a)===l};exports.isConcurrentMode=A;exports.isContextConsumer=function(a){return z(a)===k};exports.isContextProvider=function(a){return z(a)===h};exports.isElement=function(a){return"object"===typeof a&&null!==a&&a.$$typeof===c};exports.isForwardRef=function(a){return z(a)===n};exports.isFragment=function(a){return z(a)===e};exports.isLazy=function(a){return z(a)===t};
19462
+ exports.isMemo=function(a){return z(a)===r};exports.isPortal=function(a){return z(a)===d};exports.isProfiler=function(a){return z(a)===g};exports.isStrictMode=function(a){return z(a)===f};exports.isSuspense=function(a){return z(a)===p};
19463
+ exports.isValidElementType=function(a){return"string"===typeof a||"function"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||"object"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};exports.typeOf=z;
19464
+
19465
+ },{}],163:[function(require,module,exports){
19466
+ (function (process){(function (){
19467
+ 'use strict';
19468
+
19469
+ if (process.env.NODE_ENV === 'production') {
19470
+ module.exports = require('./cjs/react-is.production.min.js');
19471
+ } else {
19472
+ module.exports = require('./cjs/react-is.development.js');
19473
+ }
19474
+
19475
+ }).call(this)}).call(this,require('_process'))
19476
+ },{"./cjs/react-is.development.js":161,"./cjs/react-is.production.min.js":162,"_process":29}],164:[function(require,module,exports){
19477
+ arguments[4][56][0].apply(exports,arguments)
19478
+ },{"dup":56}],165:[function(require,module,exports){
19479
+ arguments[4][58][0].apply(exports,arguments)
19480
+ },{"./reactProdInvariant":187,"_process":29,"dup":58,"fbjs/lib/invariant":20}],166:[function(require,module,exports){
19481
+ (function (process){(function (){
19482
+ /**
19483
+ * Copyright (c) 2013-present, Facebook, Inc.
19484
+ *
19485
+ * This source code is licensed under the MIT license found in the
19486
+ * LICENSE file in the root directory of this source tree.
19487
+ *
19488
+ */
19489
+
19490
+ 'use strict';
19491
+
19492
+ var _assign = require('object-assign');
19493
+
19494
+ var ReactBaseClasses = require('./ReactBaseClasses');
19495
+ var ReactChildren = require('./ReactChildren');
19496
+ var ReactDOMFactories = require('./ReactDOMFactories');
19497
+ var ReactElement = require('./ReactElement');
19498
+ var ReactPropTypes = require('./ReactPropTypes');
19499
+ var ReactVersion = require('./ReactVersion');
19500
+
19501
+ var createReactClass = require('./createClass');
19502
+ var onlyChild = require('./onlyChild');
19503
+
19504
+ var createElement = ReactElement.createElement;
19505
+ var createFactory = ReactElement.createFactory;
19506
+ var cloneElement = ReactElement.cloneElement;
19507
+
19508
+ if (process.env.NODE_ENV !== 'production') {
19509
+ var lowPriorityWarning = require('./lowPriorityWarning');
19510
+ var canDefineProperty = require('./canDefineProperty');
19511
+ var ReactElementValidator = require('./ReactElementValidator');
19512
+ var didWarnPropTypesDeprecated = false;
19513
+ createElement = ReactElementValidator.createElement;
19514
+ createFactory = ReactElementValidator.createFactory;
19515
+ cloneElement = ReactElementValidator.cloneElement;
19516
+ }
19517
+
19518
+ var __spread = _assign;
19519
+ var createMixin = function (mixin) {
19520
+ return mixin;
19521
+ };
19522
+
19523
+ if (process.env.NODE_ENV !== 'production') {
19524
+ var warnedForSpread = false;
19525
+ var warnedForCreateMixin = false;
19526
+ __spread = function () {
19527
+ lowPriorityWarning(warnedForSpread, '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.');
19528
+ warnedForSpread = true;
19529
+ return _assign.apply(null, arguments);
19530
+ };
19531
+
19532
+ createMixin = function (mixin) {
19533
+ lowPriorityWarning(warnedForCreateMixin, 'React.createMixin is deprecated and should not be used. ' + 'In React v16.0, it will be removed. ' + 'You can use this mixin directly instead. ' + 'See https://fb.me/createmixin-was-never-implemented for more info.');
19534
+ warnedForCreateMixin = true;
19535
+ return mixin;
19536
+ };
19537
+ }
19538
+
19539
+ var React = {
19540
+ // Modern
19541
+
19542
+ Children: {
19543
+ map: ReactChildren.map,
19544
+ forEach: ReactChildren.forEach,
19545
+ count: ReactChildren.count,
19546
+ toArray: ReactChildren.toArray,
19547
+ only: onlyChild
19548
+ },
19549
+
19550
+ Component: ReactBaseClasses.Component,
19551
+ PureComponent: ReactBaseClasses.PureComponent,
19552
+
19553
+ createElement: createElement,
19554
+ cloneElement: cloneElement,
19555
+ isValidElement: ReactElement.isValidElement,
19556
+
19557
+ // Classic
19558
+
19559
+ PropTypes: ReactPropTypes,
19560
+ createClass: createReactClass,
19561
+ createFactory: createFactory,
19562
+ createMixin: createMixin,
19563
+
19564
+ // This looks DOM specific but these are actually isomorphic helpers
19565
+ // since they are just generating DOM strings.
19566
+ DOM: ReactDOMFactories,
19567
+
19568
+ version: ReactVersion,
19569
+
19570
+ // Deprecated hook for JSX spread, don't use this for anything.
19571
+ __spread: __spread
19572
+ };
19573
+
19574
+ if (process.env.NODE_ENV !== 'production') {
19575
+ var warnedForCreateClass = false;
19576
+ if (canDefineProperty) {
19577
+ Object.defineProperty(React, 'PropTypes', {
19578
+ get: function () {
19579
+ lowPriorityWarning(didWarnPropTypesDeprecated, 'Accessing PropTypes via the main React package is deprecated,' + ' and will be removed in React v16.0.' + ' Use the latest available v15.* prop-types package from npm instead.' + ' For info on usage, compatibility, migration and more, see ' + 'https://fb.me/prop-types-docs');
19580
+ didWarnPropTypesDeprecated = true;
19581
+ return ReactPropTypes;
19582
+ }
19583
+ });
19584
+
19585
+ Object.defineProperty(React, 'createClass', {
19586
+ get: function () {
19587
+ lowPriorityWarning(warnedForCreateClass, 'Accessing createClass via the main React package is deprecated,' + ' and will be removed in React v16.0.' + " Use a plain JavaScript class instead. If you're not yet " + 'ready to migrate, create-react-class v15.* is available ' + 'on npm as a temporary, drop-in replacement. ' + 'For more info see https://fb.me/react-create-class');
19588
+ warnedForCreateClass = true;
19589
+ return createReactClass;
19590
+ }
19591
+ });
19592
+ }
19593
+
19594
+ // React.DOM factories are deprecated. Wrap these methods so that
19595
+ // invocations of the React.DOM namespace and alert users to switch
19596
+ // to the `react-dom-factories` package.
19597
+ React.DOM = {};
19598
+ var warnedForFactories = false;
19599
+ Object.keys(ReactDOMFactories).forEach(function (factory) {
19600
+ React.DOM[factory] = function () {
19601
+ if (!warnedForFactories) {
19602
+ lowPriorityWarning(false, 'Accessing factories like React.DOM.%s has been deprecated ' + 'and will be removed in v16.0+. Use the ' + 'react-dom-factories package instead. ' + ' Version 1.0 provides a drop-in replacement.' + ' For more info, see https://fb.me/react-dom-factories', factory);
19603
+ warnedForFactories = true;
19604
+ }
19605
+ return ReactDOMFactories[factory].apply(ReactDOMFactories, arguments);
19606
+ };
19607
+ });
19608
+ }
19609
+
19610
+ module.exports = React;
19611
+ }).call(this)}).call(this,require('_process'))
19612
+ },{"./ReactBaseClasses":167,"./ReactChildren":168,"./ReactDOMFactories":171,"./ReactElement":172,"./ReactElementValidator":174,"./ReactPropTypes":177,"./ReactVersion":179,"./canDefineProperty":180,"./createClass":182,"./lowPriorityWarning":185,"./onlyChild":186,"_process":29,"object-assign":28}],167:[function(require,module,exports){
19613
+ (function (process){(function (){
19614
+ /**
19615
+ * Copyright (c) 2013-present, Facebook, Inc.
19616
+ *
19617
+ * This source code is licensed under the MIT license found in the
19618
+ * LICENSE file in the root directory of this source tree.
19619
+ *
19620
+ */
19621
+
19622
+ 'use strict';
19623
+
19624
+ var _prodInvariant = require('./reactProdInvariant'),
19625
+ _assign = require('object-assign');
19626
+
19627
+ var ReactNoopUpdateQueue = require('./ReactNoopUpdateQueue');
19628
+
19629
+ var canDefineProperty = require('./canDefineProperty');
19630
+ var emptyObject = require('fbjs/lib/emptyObject');
19631
+ var invariant = require('fbjs/lib/invariant');
19632
+ var lowPriorityWarning = require('./lowPriorityWarning');
19633
+
19634
+ /**
19635
+ * Base class helpers for the updating state of a component.
19636
+ */
19637
+ function ReactComponent(props, context, updater) {
19638
+ this.props = props;
19639
+ this.context = context;
19640
+ this.refs = emptyObject;
19641
+ // We initialize the default updater but the real one gets injected by the
19642
+ // renderer.
19643
+ this.updater = updater || ReactNoopUpdateQueue;
19644
+ }
19645
+
19646
+ ReactComponent.prototype.isReactComponent = {};
19647
+
19648
+ /**
19649
+ * Sets a subset of the state. Always use this to mutate
19650
+ * state. You should treat `this.state` as immutable.
19651
+ *
19652
+ * There is no guarantee that `this.state` will be immediately updated, so
19653
+ * accessing `this.state` after calling this method may return the old value.
19654
+ *
19655
+ * There is no guarantee that calls to `setState` will run synchronously,
19656
+ * as they may eventually be batched together. You can provide an optional
19657
+ * callback that will be executed when the call to setState is actually
19658
+ * completed.
19659
+ *
19660
+ * When a function is provided to setState, it will be called at some point in
19661
+ * the future (not synchronously). It will be called with the up to date
19662
+ * component arguments (state, props, context). These values can be different
19663
+ * from this.* because your function may be called after receiveProps but before
19664
+ * shouldComponentUpdate, and this new state, props, and context will not yet be
19665
+ * assigned to this.
19666
+ *
19667
+ * @param {object|function} partialState Next partial state or function to
19668
+ * produce next partial state to be merged with current state.
19669
+ * @param {?function} callback Called after state is updated.
19670
+ * @final
19671
+ * @protected
19672
+ */
19673
+ ReactComponent.prototype.setState = function (partialState, callback) {
19674
+ !(typeof partialState === 'object' || typeof partialState === 'function' || partialState == null) ? process.env.NODE_ENV !== '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;
19675
+ this.updater.enqueueSetState(this, partialState);
19676
+ if (callback) {
19677
+ this.updater.enqueueCallback(this, callback, 'setState');
19678
+ }
19679
+ };
19680
+
19681
+ /**
19682
+ * Forces an update. This should only be invoked when it is known with
19683
+ * certainty that we are **not** in a DOM transaction.
19684
+ *
19685
+ * You may want to call this when you know that some deeper aspect of the
19686
+ * component's state has changed but `setState` was not called.
19687
+ *
19688
+ * This will not invoke `shouldComponentUpdate`, but it will invoke
19689
+ * `componentWillUpdate` and `componentDidUpdate`.
19690
+ *
19691
+ * @param {?function} callback Called after update is complete.
19692
+ * @final
19693
+ * @protected
19694
+ */
19695
+ ReactComponent.prototype.forceUpdate = function (callback) {
19696
+ this.updater.enqueueForceUpdate(this);
19697
+ if (callback) {
19698
+ this.updater.enqueueCallback(this, callback, 'forceUpdate');
19699
+ }
19700
+ };
19701
+
19702
+ /**
19703
+ * Deprecated APIs. These APIs used to exist on classic React classes but since
19704
+ * we would like to deprecate them, we're not going to move them over to this
19705
+ * modern base class. Instead, we define a getter that warns if it's accessed.
19706
+ */
19707
+ if (process.env.NODE_ENV !== 'production') {
19708
+ var deprecatedAPIs = {
19709
+ isMounted: ['isMounted', 'Instead, make sure to clean up subscriptions and pending requests in ' + 'componentWillUnmount to prevent memory leaks.'],
19710
+ replaceState: ['replaceState', 'Refactor your code to use setState instead (see ' + 'https://github.com/facebook/react/issues/3236).']
19711
+ };
19712
+ var defineDeprecationWarning = function (methodName, info) {
19713
+ if (canDefineProperty) {
19714
+ Object.defineProperty(ReactComponent.prototype, methodName, {
19715
+ get: function () {
19716
+ lowPriorityWarning(false, '%s(...) is deprecated in plain JavaScript React classes. %s', info[0], info[1]);
19717
+ return undefined;
19718
+ }
19719
+ });
19720
+ }
19721
+ };
19722
+ for (var fnName in deprecatedAPIs) {
19723
+ if (deprecatedAPIs.hasOwnProperty(fnName)) {
19724
+ defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);
19725
+ }
19726
+ }
19727
+ }
19728
+
19729
+ /**
19730
+ * Base class helpers for the updating state of a component.
19731
+ */
19732
+ function ReactPureComponent(props, context, updater) {
19733
+ // Duplicated from ReactComponent.
19734
+ this.props = props;
19735
+ this.context = context;
19736
+ this.refs = emptyObject;
19737
+ // We initialize the default updater but the real one gets injected by the
19738
+ // renderer.
19739
+ this.updater = updater || ReactNoopUpdateQueue;
19740
+ }
19741
+
19742
+ function ComponentDummy() {}
19743
+ ComponentDummy.prototype = ReactComponent.prototype;
19744
+ ReactPureComponent.prototype = new ComponentDummy();
19745
+ ReactPureComponent.prototype.constructor = ReactPureComponent;
19746
+ // Avoid an extra prototype jump for these methods.
19747
+ _assign(ReactPureComponent.prototype, ReactComponent.prototype);
19748
+ ReactPureComponent.prototype.isPureReactComponent = true;
19749
+
19750
+ module.exports = {
19751
+ Component: ReactComponent,
19752
+ PureComponent: ReactPureComponent
19753
+ };
19754
+ }).call(this)}).call(this,require('_process'))
19755
+ },{"./ReactNoopUpdateQueue":175,"./canDefineProperty":180,"./lowPriorityWarning":185,"./reactProdInvariant":187,"_process":29,"fbjs/lib/emptyObject":13,"fbjs/lib/invariant":20,"object-assign":28}],168:[function(require,module,exports){
19756
+ /**
19757
+ * Copyright (c) 2013-present, Facebook, Inc.
19758
+ *
19759
+ * This source code is licensed under the MIT license found in the
19760
+ * LICENSE file in the root directory of this source tree.
19761
+ *
19762
+ */
19763
+
19764
+ 'use strict';
19765
+
19766
+ var PooledClass = require('./PooledClass');
19767
+ var ReactElement = require('./ReactElement');
19768
+
19769
+ var emptyFunction = require('fbjs/lib/emptyFunction');
19770
+ var traverseAllChildren = require('./traverseAllChildren');
19771
+
19772
+ var twoArgumentPooler = PooledClass.twoArgumentPooler;
19773
+ var fourArgumentPooler = PooledClass.fourArgumentPooler;
19774
+
19775
+ var userProvidedKeyEscapeRegex = /\/+/g;
19776
+ function escapeUserProvidedKey(text) {
19777
+ return ('' + text).replace(userProvidedKeyEscapeRegex, '$&/');
19778
+ }
19779
+
19780
+ /**
19781
+ * PooledClass representing the bookkeeping associated with performing a child
19782
+ * traversal. Allows avoiding binding callbacks.
19783
+ *
19784
+ * @constructor ForEachBookKeeping
19785
+ * @param {!function} forEachFunction Function to perform traversal with.
19786
+ * @param {?*} forEachContext Context to perform context with.
19787
+ */
19788
+ function ForEachBookKeeping(forEachFunction, forEachContext) {
19789
+ this.func = forEachFunction;
19790
+ this.context = forEachContext;
19791
+ this.count = 0;
19792
+ }
19793
+ ForEachBookKeeping.prototype.destructor = function () {
19794
+ this.func = null;
19795
+ this.context = null;
19796
+ this.count = 0;
19797
+ };
19798
+ PooledClass.addPoolingTo(ForEachBookKeeping, twoArgumentPooler);
19799
+
19800
+ function forEachSingleChild(bookKeeping, child, name) {
19801
+ var func = bookKeeping.func,
19802
+ context = bookKeeping.context;
19803
+
19804
+ func.call(context, child, bookKeeping.count++);
19805
+ }
19806
+
19807
+ /**
19808
+ * Iterates through children that are typically specified as `props.children`.
19809
+ *
19810
+ * See https://facebook.github.io/react/docs/top-level-api.html#react.children.foreach
19811
+ *
19812
+ * The provided forEachFunc(child, index) will be called for each
19813
+ * leaf child.
19814
+ *
19815
+ * @param {?*} children Children tree container.
19816
+ * @param {function(*, int)} forEachFunc
19817
+ * @param {*} forEachContext Context for forEachContext.
19818
+ */
19819
+ function forEachChildren(children, forEachFunc, forEachContext) {
19820
+ if (children == null) {
19821
+ return children;
19822
+ }
19823
+ var traverseContext = ForEachBookKeeping.getPooled(forEachFunc, forEachContext);
19824
+ traverseAllChildren(children, forEachSingleChild, traverseContext);
19825
+ ForEachBookKeeping.release(traverseContext);
19826
+ }
19827
+
19828
+ /**
19829
+ * PooledClass representing the bookkeeping associated with performing a child
19830
+ * mapping. Allows avoiding binding callbacks.
19831
+ *
19832
+ * @constructor MapBookKeeping
19833
+ * @param {!*} mapResult Object containing the ordered map of results.
19834
+ * @param {!function} mapFunction Function to perform mapping with.
19835
+ * @param {?*} mapContext Context to perform mapping with.
19836
+ */
19837
+ function MapBookKeeping(mapResult, keyPrefix, mapFunction, mapContext) {
19838
+ this.result = mapResult;
19839
+ this.keyPrefix = keyPrefix;
19840
+ this.func = mapFunction;
19841
+ this.context = mapContext;
19842
+ this.count = 0;
19843
+ }
19844
+ MapBookKeeping.prototype.destructor = function () {
19845
+ this.result = null;
19846
+ this.keyPrefix = null;
19847
+ this.func = null;
19848
+ this.context = null;
19849
+ this.count = 0;
19850
+ };
19851
+ PooledClass.addPoolingTo(MapBookKeeping, fourArgumentPooler);
19852
+
19853
+ function mapSingleChildIntoContext(bookKeeping, child, childKey) {
19854
+ var result = bookKeeping.result,
19855
+ keyPrefix = bookKeeping.keyPrefix,
19856
+ func = bookKeeping.func,
19857
+ context = bookKeeping.context;
19858
+
19859
+
19860
+ var mappedChild = func.call(context, child, bookKeeping.count++);
19861
+ if (Array.isArray(mappedChild)) {
19862
+ mapIntoWithKeyPrefixInternal(mappedChild, result, childKey, emptyFunction.thatReturnsArgument);
19863
+ } else if (mappedChild != null) {
19864
+ if (ReactElement.isValidElement(mappedChild)) {
19865
+ mappedChild = ReactElement.cloneAndReplaceKey(mappedChild,
19866
+ // Keep both the (mapped) and old keys if they differ, just as
19867
+ // traverseAllChildren used to do for objects as children
19868
+ keyPrefix + (mappedChild.key && (!child || child.key !== mappedChild.key) ? escapeUserProvidedKey(mappedChild.key) + '/' : '') + childKey);
19869
+ }
19870
+ result.push(mappedChild);
19871
+ }
19872
+ }
19873
+
19874
+ function mapIntoWithKeyPrefixInternal(children, array, prefix, func, context) {
19875
+ var escapedPrefix = '';
19876
+ if (prefix != null) {
19877
+ escapedPrefix = escapeUserProvidedKey(prefix) + '/';
19878
+ }
19879
+ var traverseContext = MapBookKeeping.getPooled(array, escapedPrefix, func, context);
19880
+ traverseAllChildren(children, mapSingleChildIntoContext, traverseContext);
19881
+ MapBookKeeping.release(traverseContext);
19882
+ }
19883
+
19884
+ /**
19885
+ * Maps children that are typically specified as `props.children`.
19886
+ *
19887
+ * See https://facebook.github.io/react/docs/top-level-api.html#react.children.map
19888
+ *
19889
+ * The provided mapFunction(child, key, index) will be called for each
19890
+ * leaf child.
19891
+ *
19892
+ * @param {?*} children Children tree container.
19893
+ * @param {function(*, int)} func The map function.
19894
+ * @param {*} context Context for mapFunction.
19895
+ * @return {object} Object containing the ordered map of results.
19896
+ */
19897
+ function mapChildren(children, func, context) {
19898
+ if (children == null) {
19899
+ return children;
19900
+ }
19901
+ var result = [];
19902
+ mapIntoWithKeyPrefixInternal(children, result, null, func, context);
19903
+ return result;
19904
+ }
19905
+
19906
+ function forEachSingleChildDummy(traverseContext, child, name) {
19907
+ return null;
19908
+ }
19909
+
19910
+ /**
19911
+ * Count the number of children that are typically specified as
19912
+ * `props.children`.
19913
+ *
19914
+ * See https://facebook.github.io/react/docs/top-level-api.html#react.children.count
19915
+ *
19916
+ * @param {?*} children Children tree container.
19917
+ * @return {number} The number of children.
19918
+ */
19919
+ function countChildren(children, context) {
19920
+ return traverseAllChildren(children, forEachSingleChildDummy, null);
19921
+ }
19922
+
19923
+ /**
19924
+ * Flatten a children object (typically specified as `props.children`) and
19925
+ * return an array with appropriately re-keyed children.
19926
+ *
19927
+ * See https://facebook.github.io/react/docs/top-level-api.html#react.children.toarray
19928
+ */
19929
+ function toArray(children) {
19930
+ var result = [];
19931
+ mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);
19932
+ return result;
19933
+ }
19934
+
19935
+ var ReactChildren = {
19936
+ forEach: forEachChildren,
19937
+ map: mapChildren,
19938
+ mapIntoWithKeyPrefixInternal: mapIntoWithKeyPrefixInternal,
19939
+ count: countChildren,
19940
+ toArray: toArray
19941
+ };
19942
+
19943
+ module.exports = ReactChildren;
19944
+ },{"./PooledClass":165,"./ReactElement":172,"./traverseAllChildren":188,"fbjs/lib/emptyFunction":12}],169:[function(require,module,exports){
19945
+ (function (process){(function (){
19946
+ /**
19947
+ * Copyright (c) 2016-present, Facebook, Inc.
19948
+ *
19949
+ * This source code is licensed under the MIT license found in the
19950
+ * LICENSE file in the root directory of this source tree.
19951
+ *
19952
+ *
19953
+ */
19954
+
19955
+ 'use strict';
19956
+
19957
+ var _prodInvariant = require('./reactProdInvariant');
19958
+
19959
+ var ReactCurrentOwner = require('./ReactCurrentOwner');
19960
+
19961
+ var invariant = require('fbjs/lib/invariant');
19962
+ var warning = require('fbjs/lib/warning');
19963
+
19964
+ function isNative(fn) {
19965
+ // Based on isNative() from Lodash
19966
+ var funcToString = Function.prototype.toString;
19967
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
19968
+ var reIsNative = RegExp('^' + funcToString
19969
+ // Take an example native function source for comparison
19970
+ .call(hasOwnProperty
19971
+ // Strip regex characters so we can use it for regex
19972
+ ).replace(/[\\^$.*+?()[\]{}|]/g, '\\$&'
19973
+ // Remove hasOwnProperty from the template to make it generic
19974
+ ).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$');
19975
+ try {
19976
+ var source = funcToString.call(fn);
19977
+ return reIsNative.test(source);
19978
+ } catch (err) {
19979
+ return false;
19980
+ }
19981
+ }
19982
+
19983
+ var canUseCollections =
19984
+ // Array.from
19985
+ typeof Array.from === 'function' &&
19986
+ // Map
19987
+ typeof Map === 'function' && isNative(Map) &&
19988
+ // Map.prototype.keys
19989
+ Map.prototype != null && typeof Map.prototype.keys === 'function' && isNative(Map.prototype.keys) &&
19990
+ // Set
19991
+ typeof Set === 'function' && isNative(Set) &&
19992
+ // Set.prototype.keys
19993
+ Set.prototype != null && typeof Set.prototype.keys === 'function' && isNative(Set.prototype.keys);
19994
+
19995
+ var setItem;
19996
+ var getItem;
19997
+ var removeItem;
19998
+ var getItemIDs;
19999
+ var addRoot;
20000
+ var removeRoot;
20001
+ var getRootIDs;
20002
+
20003
+ if (canUseCollections) {
20004
+ var itemMap = new Map();
20005
+ var rootIDSet = new Set();
20006
+
20007
+ setItem = function (id, item) {
20008
+ itemMap.set(id, item);
20009
+ };
20010
+ getItem = function (id) {
20011
+ return itemMap.get(id);
20012
+ };
20013
+ removeItem = function (id) {
20014
+ itemMap['delete'](id);
20015
+ };
20016
+ getItemIDs = function () {
20017
+ return Array.from(itemMap.keys());
20018
+ };
20019
+
20020
+ addRoot = function (id) {
20021
+ rootIDSet.add(id);
20022
+ };
20023
+ removeRoot = function (id) {
20024
+ rootIDSet['delete'](id);
20025
+ };
20026
+ getRootIDs = function () {
20027
+ return Array.from(rootIDSet.keys());
20028
+ };
20029
+ } else {
20030
+ var itemByKey = {};
20031
+ var rootByKey = {};
20032
+
20033
+ // Use non-numeric keys to prevent V8 performance issues:
20034
+ // https://github.com/facebook/react/pull/7232
20035
+ var getKeyFromID = function (id) {
20036
+ return '.' + id;
20037
+ };
20038
+ var getIDFromKey = function (key) {
20039
+ return parseInt(key.substr(1), 10);
20040
+ };
20041
+
20042
+ setItem = function (id, item) {
20043
+ var key = getKeyFromID(id);
20044
+ itemByKey[key] = item;
20045
+ };
20046
+ getItem = function (id) {
20047
+ var key = getKeyFromID(id);
20048
+ return itemByKey[key];
20049
+ };
20050
+ removeItem = function (id) {
20051
+ var key = getKeyFromID(id);
20052
+ delete itemByKey[key];
20053
+ };
20054
+ getItemIDs = function () {
20055
+ return Object.keys(itemByKey).map(getIDFromKey);
20056
+ };
20057
+
20058
+ addRoot = function (id) {
20059
+ var key = getKeyFromID(id);
20060
+ rootByKey[key] = true;
20061
+ };
20062
+ removeRoot = function (id) {
20063
+ var key = getKeyFromID(id);
20064
+ delete rootByKey[key];
20065
+ };
20066
+ getRootIDs = function () {
20067
+ return Object.keys(rootByKey).map(getIDFromKey);
20068
+ };
20069
+ }
20070
+
20071
+ var unmountedIDs = [];
20072
+
20073
+ function purgeDeep(id) {
20074
+ var item = getItem(id);
20075
+ if (item) {
20076
+ var childIDs = item.childIDs;
20077
+
20078
+ removeItem(id);
20079
+ childIDs.forEach(purgeDeep);
20080
+ }
20081
+ }
20082
+
20083
+ function describeComponentFrame(name, source, ownerName) {
20084
+ return '\n in ' + (name || 'Unknown') + (source ? ' (at ' + source.fileName.replace(/^.*[\\\/]/, '') + ':' + source.lineNumber + ')' : ownerName ? ' (created by ' + ownerName + ')' : '');
20085
+ }
20086
+
20087
+ function getDisplayName(element) {
20088
+ if (element == null) {
20089
+ return '#empty';
20090
+ } else if (typeof element === 'string' || typeof element === 'number') {
20091
+ return '#text';
20092
+ } else if (typeof element.type === 'string') {
20093
+ return element.type;
20094
+ } else {
20095
+ return element.type.displayName || element.type.name || 'Unknown';
20096
+ }
20097
+ }
20098
+
20099
+ function describeID(id) {
20100
+ var name = ReactComponentTreeHook.getDisplayName(id);
20101
+ var element = ReactComponentTreeHook.getElement(id);
20102
+ var ownerID = ReactComponentTreeHook.getOwnerID(id);
20103
+ var ownerName;
20104
+ if (ownerID) {
20105
+ ownerName = ReactComponentTreeHook.getDisplayName(ownerID);
20106
+ }
20107
+ process.env.NODE_ENV !== 'production' ? warning(element, 'ReactComponentTreeHook: Missing React element for debugID %s when ' + 'building stack', id) : void 0;
20108
+ return describeComponentFrame(name, element && element._source, ownerName);
20109
+ }
20110
+
20111
+ var ReactComponentTreeHook = {
20112
+ onSetChildren: function (id, nextChildIDs) {
20113
+ var item = getItem(id);
20114
+ !item ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Item must have been set') : _prodInvariant('144') : void 0;
20115
+ item.childIDs = nextChildIDs;
20116
+
20117
+ for (var i = 0; i < nextChildIDs.length; i++) {
20118
+ var nextChildID = nextChildIDs[i];
20119
+ var nextChild = getItem(nextChildID);
20120
+ !nextChild ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected hook events to fire for the child before its parent includes it in onSetChildren().') : _prodInvariant('140') : void 0;
20121
+ !(nextChild.childIDs != null || typeof nextChild.element !== 'object' || nextChild.element == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected onSetChildren() to fire for a container child before its parent includes it in onSetChildren().') : _prodInvariant('141') : void 0;
20122
+ !nextChild.isMounted ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected onMountComponent() to fire for the child before its parent includes it in onSetChildren().') : _prodInvariant('71') : void 0;
20123
+ if (nextChild.parentID == null) {
20124
+ nextChild.parentID = id;
20125
+ // TODO: This shouldn't be necessary but mounting a new root during in
20126
+ // componentWillMount currently causes not-yet-mounted components to
20127
+ // be purged from our tree data so their parent id is missing.
20128
+ }
20129
+ !(nextChild.parentID === id) ? process.env.NODE_ENV !== '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;
20130
+ }
20131
+ },
20132
+ onBeforeMountComponent: function (id, element, parentID) {
20133
+ var item = {
20134
+ element: element,
20135
+ parentID: parentID,
20136
+ text: null,
20137
+ childIDs: [],
20138
+ isMounted: false,
20139
+ updateCount: 0
20140
+ };
20141
+ setItem(id, item);
20142
+ },
20143
+ onBeforeUpdateComponent: function (id, element) {
20144
+ var item = getItem(id);
20145
+ if (!item || !item.isMounted) {
20146
+ // We may end up here as a result of setState() in componentWillUnmount().
20147
+ // In this case, ignore the element.
20148
+ return;
20149
+ }
20150
+ item.element = element;
20151
+ },
20152
+ onMountComponent: function (id) {
20153
+ var item = getItem(id);
20154
+ !item ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Item must have been set') : _prodInvariant('144') : void 0;
20155
+ item.isMounted = true;
20156
+ var isRoot = item.parentID === 0;
20157
+ if (isRoot) {
20158
+ addRoot(id);
20159
+ }
20160
+ },
20161
+ onUpdateComponent: function (id) {
20162
+ var item = getItem(id);
20163
+ if (!item || !item.isMounted) {
20164
+ // We may end up here as a result of setState() in componentWillUnmount().
20165
+ // In this case, ignore the element.
20166
+ return;
20167
+ }
20168
+ item.updateCount++;
20169
+ },
20170
+ onUnmountComponent: function (id) {
20171
+ var item = getItem(id);
20172
+ if (item) {
20173
+ // We need to check if it exists.
20174
+ // `item` might not exist if it is inside an error boundary, and a sibling
20175
+ // error boundary child threw while mounting. Then this instance never
20176
+ // got a chance to mount, but it still gets an unmounting event during
20177
+ // the error boundary cleanup.
20178
+ item.isMounted = false;
20179
+ var isRoot = item.parentID === 0;
20180
+ if (isRoot) {
20181
+ removeRoot(id);
20182
+ }
20183
+ }
20184
+ unmountedIDs.push(id);
20185
+ },
20186
+ purgeUnmountedComponents: function () {
20187
+ if (ReactComponentTreeHook._preventPurging) {
20188
+ // Should only be used for testing.
20189
+ return;
20190
+ }
20191
+
20192
+ for (var i = 0; i < unmountedIDs.length; i++) {
20193
+ var id = unmountedIDs[i];
20194
+ purgeDeep(id);
20195
+ }
20196
+ unmountedIDs.length = 0;
20197
+ },
20198
+ isMounted: function (id) {
20199
+ var item = getItem(id);
20200
+ return item ? item.isMounted : false;
20201
+ },
20202
+ getCurrentStackAddendum: function (topElement) {
20203
+ var info = '';
20204
+ if (topElement) {
20205
+ var name = getDisplayName(topElement);
20206
+ var owner = topElement._owner;
20207
+ info += describeComponentFrame(name, topElement._source, owner && owner.getName());
20208
+ }
20209
+
20210
+ var currentOwner = ReactCurrentOwner.current;
20211
+ var id = currentOwner && currentOwner._debugID;
20212
+
20213
+ info += ReactComponentTreeHook.getStackAddendumByID(id);
20214
+ return info;
20215
+ },
20216
+ getStackAddendumByID: function (id) {
20217
+ var info = '';
20218
+ while (id) {
20219
+ info += describeID(id);
20220
+ id = ReactComponentTreeHook.getParentID(id);
20221
+ }
20222
+ return info;
20223
+ },
20224
+ getChildIDs: function (id) {
20225
+ var item = getItem(id);
20226
+ return item ? item.childIDs : [];
20227
+ },
20228
+ getDisplayName: function (id) {
20229
+ var element = ReactComponentTreeHook.getElement(id);
20230
+ if (!element) {
20231
+ return null;
20232
+ }
20233
+ return getDisplayName(element);
20234
+ },
20235
+ getElement: function (id) {
20236
+ var item = getItem(id);
20237
+ return item ? item.element : null;
20238
+ },
20239
+ getOwnerID: function (id) {
20240
+ var element = ReactComponentTreeHook.getElement(id);
20241
+ if (!element || !element._owner) {
20242
+ return null;
20243
+ }
20244
+ return element._owner._debugID;
20245
+ },
20246
+ getParentID: function (id) {
20247
+ var item = getItem(id);
20248
+ return item ? item.parentID : null;
20249
+ },
20250
+ getSource: function (id) {
20251
+ var item = getItem(id);
20252
+ var element = item ? item.element : null;
20253
+ var source = element != null ? element._source : null;
20254
+ return source;
20255
+ },
20256
+ getText: function (id) {
20257
+ var element = ReactComponentTreeHook.getElement(id);
20258
+ if (typeof element === 'string') {
20259
+ return element;
20260
+ } else if (typeof element === 'number') {
20261
+ return '' + element;
20262
+ } else {
20263
+ return null;
20264
+ }
20265
+ },
20266
+ getUpdateCount: function (id) {
20267
+ var item = getItem(id);
20268
+ return item ? item.updateCount : 0;
20269
+ },
20270
+
20271
+
20272
+ getRootIDs: getRootIDs,
20273
+ getRegisteredIDs: getItemIDs,
20274
+
20275
+ pushNonStandardWarningStack: function (isCreatingElement, currentSource) {
20276
+ if (typeof console.reactStack !== 'function') {
20277
+ return;
20278
+ }
20279
+
20280
+ var stack = [];
20281
+ var currentOwner = ReactCurrentOwner.current;
20282
+ var id = currentOwner && currentOwner._debugID;
20283
+
20284
+ try {
20285
+ if (isCreatingElement) {
20286
+ stack.push({
20287
+ name: id ? ReactComponentTreeHook.getDisplayName(id) : null,
20288
+ fileName: currentSource ? currentSource.fileName : null,
20289
+ lineNumber: currentSource ? currentSource.lineNumber : null
20290
+ });
20291
+ }
20292
+
20293
+ while (id) {
20294
+ var element = ReactComponentTreeHook.getElement(id);
20295
+ var parentID = ReactComponentTreeHook.getParentID(id);
20296
+ var ownerID = ReactComponentTreeHook.getOwnerID(id);
20297
+ var ownerName = ownerID ? ReactComponentTreeHook.getDisplayName(ownerID) : null;
20298
+ var source = element && element._source;
20299
+ stack.push({
20300
+ name: ownerName,
20301
+ fileName: source ? source.fileName : null,
20302
+ lineNumber: source ? source.lineNumber : null
20303
+ });
20304
+ id = parentID;
20305
+ }
20306
+ } catch (err) {
20307
+ // Internal state is messed up.
20308
+ // Stop building the stack (it's just a nice to have).
20309
+ }
20310
+
20311
+ console.reactStack(stack);
20312
+ },
20313
+ popNonStandardWarningStack: function () {
20314
+ if (typeof console.reactStackEnd !== 'function') {
20315
+ return;
20316
+ }
20317
+ console.reactStackEnd();
20318
+ }
20319
+ };
20320
+
20321
+ module.exports = ReactComponentTreeHook;
20322
+ }).call(this)}).call(this,require('_process'))
20323
+ },{"./ReactCurrentOwner":170,"./reactProdInvariant":187,"_process":29,"fbjs/lib/invariant":20,"fbjs/lib/warning":27}],170:[function(require,module,exports){
20324
+ /**
20325
+ * Copyright (c) 2013-present, Facebook, Inc.
20326
+ *
20327
+ * This source code is licensed under the MIT license found in the
20328
+ * LICENSE file in the root directory of this source tree.
20329
+ *
20330
+ *
20331
+ */
20332
+
20333
+ 'use strict';
20334
+
20335
+ /**
20336
+ * Keeps track of the current owner.
20337
+ *
20338
+ * The current owner is the component who should own any components that are
20339
+ * currently being constructed.
20340
+ */
20341
+ var ReactCurrentOwner = {
20342
+ /**
20343
+ * @internal
20344
+ * @type {ReactComponent}
20345
+ */
20346
+ current: null
20347
+ };
20348
+
20349
+ module.exports = ReactCurrentOwner;
20350
+ },{}],171:[function(require,module,exports){
20351
+ (function (process){(function (){
20352
+ /**
20353
+ * Copyright (c) 2013-present, Facebook, Inc.
20354
+ *
20355
+ * This source code is licensed under the MIT license found in the
20356
+ * LICENSE file in the root directory of this source tree.
20357
+ *
20358
+ */
20359
+
20360
+ 'use strict';
20361
+
20362
+ var ReactElement = require('./ReactElement');
20363
+
20364
+ /**
20365
+ * Create a factory that creates HTML tag elements.
20366
+ *
20367
+ * @private
20368
+ */
20369
+ var createDOMFactory = ReactElement.createFactory;
20370
+ if (process.env.NODE_ENV !== 'production') {
20371
+ var ReactElementValidator = require('./ReactElementValidator');
20372
+ createDOMFactory = ReactElementValidator.createFactory;
20373
+ }
20374
+
20375
+ /**
20376
+ * Creates a mapping from supported HTML tags to `ReactDOMComponent` classes.
20377
+ *
20378
+ * @public
20379
+ */
20380
+ var ReactDOMFactories = {
20381
+ a: createDOMFactory('a'),
20382
+ abbr: createDOMFactory('abbr'),
20383
+ address: createDOMFactory('address'),
20384
+ area: createDOMFactory('area'),
20385
+ article: createDOMFactory('article'),
20386
+ aside: createDOMFactory('aside'),
20387
+ audio: createDOMFactory('audio'),
20388
+ b: createDOMFactory('b'),
20389
+ base: createDOMFactory('base'),
20390
+ bdi: createDOMFactory('bdi'),
20391
+ bdo: createDOMFactory('bdo'),
20392
+ big: createDOMFactory('big'),
20393
+ blockquote: createDOMFactory('blockquote'),
20394
+ body: createDOMFactory('body'),
20395
+ br: createDOMFactory('br'),
20396
+ button: createDOMFactory('button'),
20397
+ canvas: createDOMFactory('canvas'),
20398
+ caption: createDOMFactory('caption'),
20399
+ cite: createDOMFactory('cite'),
20400
+ code: createDOMFactory('code'),
20401
+ col: createDOMFactory('col'),
20402
+ colgroup: createDOMFactory('colgroup'),
20403
+ data: createDOMFactory('data'),
20404
+ datalist: createDOMFactory('datalist'),
20405
+ dd: createDOMFactory('dd'),
20406
+ del: createDOMFactory('del'),
20407
+ details: createDOMFactory('details'),
20408
+ dfn: createDOMFactory('dfn'),
20409
+ dialog: createDOMFactory('dialog'),
20410
+ div: createDOMFactory('div'),
20411
+ dl: createDOMFactory('dl'),
20412
+ dt: createDOMFactory('dt'),
20413
+ em: createDOMFactory('em'),
20414
+ embed: createDOMFactory('embed'),
20415
+ fieldset: createDOMFactory('fieldset'),
20416
+ figcaption: createDOMFactory('figcaption'),
20417
+ figure: createDOMFactory('figure'),
20418
+ footer: createDOMFactory('footer'),
20419
+ form: createDOMFactory('form'),
20420
+ h1: createDOMFactory('h1'),
20421
+ h2: createDOMFactory('h2'),
20422
+ h3: createDOMFactory('h3'),
20423
+ h4: createDOMFactory('h4'),
20424
+ h5: createDOMFactory('h5'),
20425
+ h6: createDOMFactory('h6'),
20426
+ head: createDOMFactory('head'),
20427
+ header: createDOMFactory('header'),
20428
+ hgroup: createDOMFactory('hgroup'),
20429
+ hr: createDOMFactory('hr'),
20430
+ html: createDOMFactory('html'),
20431
+ i: createDOMFactory('i'),
20432
+ iframe: createDOMFactory('iframe'),
20433
+ img: createDOMFactory('img'),
20434
+ input: createDOMFactory('input'),
20435
+ ins: createDOMFactory('ins'),
20436
+ kbd: createDOMFactory('kbd'),
20437
+ keygen: createDOMFactory('keygen'),
20438
+ label: createDOMFactory('label'),
20439
+ legend: createDOMFactory('legend'),
20440
+ li: createDOMFactory('li'),
20441
+ link: createDOMFactory('link'),
20442
+ main: createDOMFactory('main'),
20443
+ map: createDOMFactory('map'),
20444
+ mark: createDOMFactory('mark'),
20445
+ menu: createDOMFactory('menu'),
20446
+ menuitem: createDOMFactory('menuitem'),
20447
+ meta: createDOMFactory('meta'),
20448
+ meter: createDOMFactory('meter'),
20449
+ nav: createDOMFactory('nav'),
20450
+ noscript: createDOMFactory('noscript'),
20451
+ object: createDOMFactory('object'),
20452
+ ol: createDOMFactory('ol'),
20453
+ optgroup: createDOMFactory('optgroup'),
20454
+ option: createDOMFactory('option'),
20455
+ output: createDOMFactory('output'),
20456
+ p: createDOMFactory('p'),
20457
+ param: createDOMFactory('param'),
20458
+ picture: createDOMFactory('picture'),
20459
+ pre: createDOMFactory('pre'),
20460
+ progress: createDOMFactory('progress'),
20461
+ q: createDOMFactory('q'),
20462
+ rp: createDOMFactory('rp'),
20463
+ rt: createDOMFactory('rt'),
20464
+ ruby: createDOMFactory('ruby'),
20465
+ s: createDOMFactory('s'),
20466
+ samp: createDOMFactory('samp'),
20467
+ script: createDOMFactory('script'),
20468
+ section: createDOMFactory('section'),
20469
+ select: createDOMFactory('select'),
20470
+ small: createDOMFactory('small'),
20471
+ source: createDOMFactory('source'),
20472
+ span: createDOMFactory('span'),
20473
+ strong: createDOMFactory('strong'),
20474
+ style: createDOMFactory('style'),
20475
+ sub: createDOMFactory('sub'),
20476
+ summary: createDOMFactory('summary'),
20477
+ sup: createDOMFactory('sup'),
20478
+ table: createDOMFactory('table'),
20479
+ tbody: createDOMFactory('tbody'),
20480
+ td: createDOMFactory('td'),
20481
+ textarea: createDOMFactory('textarea'),
20482
+ tfoot: createDOMFactory('tfoot'),
20483
+ th: createDOMFactory('th'),
20484
+ thead: createDOMFactory('thead'),
20485
+ time: createDOMFactory('time'),
20486
+ title: createDOMFactory('title'),
20487
+ tr: createDOMFactory('tr'),
20488
+ track: createDOMFactory('track'),
20489
+ u: createDOMFactory('u'),
20490
+ ul: createDOMFactory('ul'),
20491
+ 'var': createDOMFactory('var'),
20492
+ video: createDOMFactory('video'),
20493
+ wbr: createDOMFactory('wbr'),
20494
+
20495
+ // SVG
20496
+ circle: createDOMFactory('circle'),
20497
+ clipPath: createDOMFactory('clipPath'),
20498
+ defs: createDOMFactory('defs'),
20499
+ ellipse: createDOMFactory('ellipse'),
20500
+ g: createDOMFactory('g'),
20501
+ image: createDOMFactory('image'),
20502
+ line: createDOMFactory('line'),
20503
+ linearGradient: createDOMFactory('linearGradient'),
20504
+ mask: createDOMFactory('mask'),
20505
+ path: createDOMFactory('path'),
20506
+ pattern: createDOMFactory('pattern'),
20507
+ polygon: createDOMFactory('polygon'),
20508
+ polyline: createDOMFactory('polyline'),
20509
+ radialGradient: createDOMFactory('radialGradient'),
20510
+ rect: createDOMFactory('rect'),
20511
+ stop: createDOMFactory('stop'),
20512
+ svg: createDOMFactory('svg'),
20513
+ text: createDOMFactory('text'),
20514
+ tspan: createDOMFactory('tspan')
20515
+ };
20516
+
20517
+ module.exports = ReactDOMFactories;
20518
+ }).call(this)}).call(this,require('_process'))
20519
+ },{"./ReactElement":172,"./ReactElementValidator":174,"_process":29}],172:[function(require,module,exports){
20520
+ (function (process){(function (){
20521
+ /**
20522
+ * Copyright (c) 2014-present, Facebook, Inc.
20523
+ *
20524
+ * This source code is licensed under the MIT license found in the
20525
+ * LICENSE file in the root directory of this source tree.
20526
+ *
20527
+ */
20528
+
20529
+ 'use strict';
20530
+
20531
+ var _assign = require('object-assign');
20532
+
20533
+ var ReactCurrentOwner = require('./ReactCurrentOwner');
20534
+
20535
+ var warning = require('fbjs/lib/warning');
20536
+ var canDefineProperty = require('./canDefineProperty');
20537
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
20538
+
20539
+ var REACT_ELEMENT_TYPE = require('./ReactElementSymbol');
20540
+
20541
+ var RESERVED_PROPS = {
20542
+ key: true,
20543
+ ref: true,
20544
+ __self: true,
20545
+ __source: true
20546
+ };
20547
+
20548
+ var specialPropKeyWarningShown, specialPropRefWarningShown;
20549
+
20550
+ function hasValidRef(config) {
20551
+ if (process.env.NODE_ENV !== 'production') {
20552
+ if (hasOwnProperty.call(config, 'ref')) {
20553
+ var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;
20554
+ if (getter && getter.isReactWarning) {
20555
+ return false;
20556
+ }
20557
+ }
20558
+ }
20559
+ return config.ref !== undefined;
20560
+ }
20561
+
20562
+ function hasValidKey(config) {
20563
+ if (process.env.NODE_ENV !== 'production') {
20564
+ if (hasOwnProperty.call(config, 'key')) {
20565
+ var getter = Object.getOwnPropertyDescriptor(config, 'key').get;
20566
+ if (getter && getter.isReactWarning) {
20567
+ return false;
20568
+ }
20569
+ }
20570
+ }
20571
+ return config.key !== undefined;
20572
+ }
20573
+
20574
+ function defineKeyPropWarningGetter(props, displayName) {
20575
+ var warnAboutAccessingKey = function () {
20576
+ if (!specialPropKeyWarningShown) {
20577
+ specialPropKeyWarningShown = true;
20578
+ process.env.NODE_ENV !== '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;
20579
+ }
20580
+ };
20581
+ warnAboutAccessingKey.isReactWarning = true;
20582
+ Object.defineProperty(props, 'key', {
20583
+ get: warnAboutAccessingKey,
20584
+ configurable: true
20585
+ });
20586
+ }
20587
+
20588
+ function defineRefPropWarningGetter(props, displayName) {
20589
+ var warnAboutAccessingRef = function () {
20590
+ if (!specialPropRefWarningShown) {
20591
+ specialPropRefWarningShown = true;
20592
+ process.env.NODE_ENV !== '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;
20593
+ }
20594
+ };
20595
+ warnAboutAccessingRef.isReactWarning = true;
20596
+ Object.defineProperty(props, 'ref', {
20597
+ get: warnAboutAccessingRef,
20598
+ configurable: true
20599
+ });
20600
+ }
20601
+
20602
+ /**
20603
+ * Factory method to create a new React element. This no longer adheres to
20604
+ * the class pattern, so do not use new to call it. Also, no instanceof check
20605
+ * will work. Instead test $$typeof field against Symbol.for('react.element') to check
20606
+ * if something is a React Element.
20607
+ *
20608
+ * @param {*} type
20609
+ * @param {*} key
20610
+ * @param {string|object} ref
20611
+ * @param {*} self A *temporary* helper to detect places where `this` is
20612
+ * different from the `owner` when React.createElement is called, so that we
20613
+ * can warn. We want to get rid of owner and replace string `ref`s with arrow
20614
+ * functions, and as long as `this` and owner are the same, there will be no
20615
+ * change in behavior.
20616
+ * @param {*} source An annotation object (added by a transpiler or otherwise)
20617
+ * indicating filename, line number, and/or other information.
20618
+ * @param {*} owner
20619
+ * @param {*} props
20620
+ * @internal
20621
+ */
20622
+ var ReactElement = function (type, key, ref, self, source, owner, props) {
20623
+ var element = {
20624
+ // This tag allow us to uniquely identify this as a React Element
20625
+ $$typeof: REACT_ELEMENT_TYPE,
20626
+
20627
+ // Built-in properties that belong on the element
20628
+ type: type,
20629
+ key: key,
20630
+ ref: ref,
20631
+ props: props,
20632
+
20633
+ // Record the component responsible for creating this element.
20634
+ _owner: owner
20635
+ };
20636
+
20637
+ if (process.env.NODE_ENV !== 'production') {
20638
+ // The validation flag is currently mutative. We put it on
20639
+ // an external backing store so that we can freeze the whole object.
20640
+ // This can be replaced with a WeakMap once they are implemented in
20641
+ // commonly used development environments.
20642
+ element._store = {};
20643
+
20644
+ // To make comparing ReactElements easier for testing purposes, we make
20645
+ // the validation flag non-enumerable (where possible, which should
20646
+ // include every environment we run tests in), so the test framework
20647
+ // ignores it.
20648
+ if (canDefineProperty) {
20649
+ Object.defineProperty(element._store, 'validated', {
20650
+ configurable: false,
20651
+ enumerable: false,
20652
+ writable: true,
20653
+ value: false
20654
+ });
20655
+ // self and source are DEV only properties.
20656
+ Object.defineProperty(element, '_self', {
20657
+ configurable: false,
20658
+ enumerable: false,
20659
+ writable: false,
20660
+ value: self
20661
+ });
20662
+ // Two elements created in two different places should be considered
20663
+ // equal for testing purposes and therefore we hide it from enumeration.
20664
+ Object.defineProperty(element, '_source', {
20665
+ configurable: false,
20666
+ enumerable: false,
20667
+ writable: false,
20668
+ value: source
20669
+ });
20670
+ } else {
20671
+ element._store.validated = false;
20672
+ element._self = self;
20673
+ element._source = source;
20674
+ }
20675
+ if (Object.freeze) {
20676
+ Object.freeze(element.props);
20677
+ Object.freeze(element);
20678
+ }
20679
+ }
20680
+
20681
+ return element;
20682
+ };
20683
+
20684
+ /**
20685
+ * Create and return a new ReactElement of the given type.
20686
+ * See https://facebook.github.io/react/docs/top-level-api.html#react.createelement
20687
+ */
20688
+ ReactElement.createElement = function (type, config, children) {
20689
+ var propName;
20690
+
20691
+ // Reserved names are extracted
20692
+ var props = {};
20693
+
20694
+ var key = null;
20695
+ var ref = null;
20696
+ var self = null;
20697
+ var source = null;
20698
+
20699
+ if (config != null) {
20700
+ if (hasValidRef(config)) {
20701
+ ref = config.ref;
20702
+ }
20703
+ if (hasValidKey(config)) {
20704
+ key = '' + config.key;
20705
+ }
20706
+
20707
+ self = config.__self === undefined ? null : config.__self;
20708
+ source = config.__source === undefined ? null : config.__source;
20709
+ // Remaining properties are added to a new props object
20710
+ for (propName in config) {
20711
+ if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
20712
+ props[propName] = config[propName];
20713
+ }
20714
+ }
20715
+ }
20716
+
20717
+ // Children can be more than one argument, and those are transferred onto
20718
+ // the newly allocated props object.
20719
+ var childrenLength = arguments.length - 2;
20720
+ if (childrenLength === 1) {
20721
+ props.children = children;
20722
+ } else if (childrenLength > 1) {
20723
+ var childArray = Array(childrenLength);
20724
+ for (var i = 0; i < childrenLength; i++) {
20725
+ childArray[i] = arguments[i + 2];
20726
+ }
20727
+ if (process.env.NODE_ENV !== 'production') {
20728
+ if (Object.freeze) {
20729
+ Object.freeze(childArray);
20730
+ }
20731
+ }
20732
+ props.children = childArray;
20733
+ }
20734
+
20735
+ // Resolve default props
20736
+ if (type && type.defaultProps) {
20737
+ var defaultProps = type.defaultProps;
20738
+ for (propName in defaultProps) {
20739
+ if (props[propName] === undefined) {
20740
+ props[propName] = defaultProps[propName];
20741
+ }
20742
+ }
20743
+ }
20744
+ if (process.env.NODE_ENV !== 'production') {
20745
+ if (key || ref) {
20746
+ if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {
20747
+ var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;
20748
+ if (key) {
20749
+ defineKeyPropWarningGetter(props, displayName);
20750
+ }
20751
+ if (ref) {
20752
+ defineRefPropWarningGetter(props, displayName);
20753
+ }
20754
+ }
20755
+ }
20756
+ }
20757
+ return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
20758
+ };
20759
+
20760
+ /**
20761
+ * Return a function that produces ReactElements of a given type.
20762
+ * See https://facebook.github.io/react/docs/top-level-api.html#react.createfactory
20763
+ */
20764
+ ReactElement.createFactory = function (type) {
20765
+ var factory = ReactElement.createElement.bind(null, type);
20766
+ // Expose the type on the factory and the prototype so that it can be
20767
+ // easily accessed on elements. E.g. `<Foo />.type === Foo`.
20768
+ // This should not be named `constructor` since this may not be the function
20769
+ // that created the element, and it may not even be a constructor.
20770
+ // Legacy hook TODO: Warn if this is accessed
20771
+ factory.type = type;
20772
+ return factory;
20773
+ };
20774
+
20775
+ ReactElement.cloneAndReplaceKey = function (oldElement, newKey) {
20776
+ var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props);
20777
+
20778
+ return newElement;
20779
+ };
20780
+
20781
+ /**
20782
+ * Clone and return a new ReactElement using element as the starting point.
20783
+ * See https://facebook.github.io/react/docs/top-level-api.html#react.cloneelement
20784
+ */
20785
+ ReactElement.cloneElement = function (element, config, children) {
20786
+ var propName;
20787
+
20788
+ // Original props are copied
20789
+ var props = _assign({}, element.props);
20790
+
20791
+ // Reserved names are extracted
20792
+ var key = element.key;
20793
+ var ref = element.ref;
20794
+ // Self is preserved since the owner is preserved.
20795
+ var self = element._self;
20796
+ // Source is preserved since cloneElement is unlikely to be targeted by a
20797
+ // transpiler, and the original source is probably a better indicator of the
20798
+ // true owner.
20799
+ var source = element._source;
20800
+
20801
+ // Owner will be preserved, unless ref is overridden
20802
+ var owner = element._owner;
20803
+
20804
+ if (config != null) {
20805
+ if (hasValidRef(config)) {
20806
+ // Silently steal the ref from the parent.
20807
+ ref = config.ref;
20808
+ owner = ReactCurrentOwner.current;
20809
+ }
20810
+ if (hasValidKey(config)) {
20811
+ key = '' + config.key;
20812
+ }
20813
+
20814
+ // Remaining properties override existing props
20815
+ var defaultProps;
20816
+ if (element.type && element.type.defaultProps) {
20817
+ defaultProps = element.type.defaultProps;
20818
+ }
20819
+ for (propName in config) {
20820
+ if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
20821
+ if (config[propName] === undefined && defaultProps !== undefined) {
20822
+ // Resolve default props
20823
+ props[propName] = defaultProps[propName];
20824
+ } else {
20825
+ props[propName] = config[propName];
20826
+ }
20827
+ }
20828
+ }
20829
+ }
20830
+
20831
+ // Children can be more than one argument, and those are transferred onto
20832
+ // the newly allocated props object.
20833
+ var childrenLength = arguments.length - 2;
20834
+ if (childrenLength === 1) {
20835
+ props.children = children;
20836
+ } else if (childrenLength > 1) {
20837
+ var childArray = Array(childrenLength);
20838
+ for (var i = 0; i < childrenLength; i++) {
20839
+ childArray[i] = arguments[i + 2];
20840
+ }
20841
+ props.children = childArray;
20842
+ }
20843
+
20844
+ return ReactElement(element.type, key, ref, self, source, owner, props);
20845
+ };
20846
+
20847
+ /**
20848
+ * Verifies the object is a ReactElement.
20849
+ * See https://facebook.github.io/react/docs/top-level-api.html#react.isvalidelement
20850
+ * @param {?object} object
20851
+ * @return {boolean} True if `object` is a valid component.
20852
+ * @final
20853
+ */
20854
+ ReactElement.isValidElement = function (object) {
20855
+ return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
20856
+ };
20857
+
20858
+ module.exports = ReactElement;
20859
+ }).call(this)}).call(this,require('_process'))
20860
+ },{"./ReactCurrentOwner":170,"./ReactElementSymbol":173,"./canDefineProperty":180,"_process":29,"fbjs/lib/warning":27,"object-assign":28}],173:[function(require,module,exports){
20861
+ arguments[4][85][0].apply(exports,arguments)
20862
+ },{"dup":85}],174:[function(require,module,exports){
20863
+ (function (process){(function (){
20864
+ /**
20865
+ * Copyright (c) 2014-present, Facebook, Inc.
20866
+ *
20867
+ * This source code is licensed under the MIT license found in the
20868
+ * LICENSE file in the root directory of this source tree.
20869
+ *
20870
+ */
20871
+
20872
+ /**
20873
+ * ReactElementValidator provides a wrapper around a element factory
20874
+ * which validates the props passed to the element. This is intended to be
20875
+ * used only in DEV and could be replaced by a static type checker for languages
20876
+ * that support it.
20877
+ */
20878
+
20879
+ 'use strict';
20880
+
20881
+ var ReactCurrentOwner = require('./ReactCurrentOwner');
20882
+ var ReactComponentTreeHook = require('./ReactComponentTreeHook');
20883
+ var ReactElement = require('./ReactElement');
20884
+
20885
+ var checkReactTypeSpec = require('./checkReactTypeSpec');
20886
+
20887
+ var canDefineProperty = require('./canDefineProperty');
20888
+ var getIteratorFn = require('./getIteratorFn');
20889
+ var warning = require('fbjs/lib/warning');
20890
+ var lowPriorityWarning = require('./lowPriorityWarning');
20891
+
20892
+ function getDeclarationErrorAddendum() {
20893
+ if (ReactCurrentOwner.current) {
20894
+ var name = ReactCurrentOwner.current.getName();
20895
+ if (name) {
20896
+ return ' Check the render method of `' + name + '`.';
20897
+ }
20898
+ }
20899
+ return '';
20900
+ }
20901
+
20902
+ function getSourceInfoErrorAddendum(elementProps) {
20903
+ if (elementProps !== null && elementProps !== undefined && elementProps.__source !== undefined) {
20904
+ var source = elementProps.__source;
20905
+ var fileName = source.fileName.replace(/^.*[\\\/]/, '');
20906
+ var lineNumber = source.lineNumber;
20907
+ return ' Check your code at ' + fileName + ':' + lineNumber + '.';
20908
+ }
20909
+ return '';
20910
+ }
20911
+
20912
+ /**
20913
+ * Warn if there's no key explicitly set on dynamic arrays of children or
20914
+ * object keys are not valid. This allows us to keep track of children between
20915
+ * updates.
20916
+ */
20917
+ var ownerHasKeyUseWarning = {};
20918
+
20919
+ function getCurrentComponentErrorInfo(parentType) {
20920
+ var info = getDeclarationErrorAddendum();
20921
+
20922
+ if (!info) {
20923
+ var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;
20924
+ if (parentName) {
20925
+ info = ' Check the top-level render call using <' + parentName + '>.';
20926
+ }
20927
+ }
20928
+ return info;
20929
+ }
20930
+
20931
+ /**
20932
+ * Warn if the element doesn't have an explicit key assigned to it.
20933
+ * This element is in an array. The array could grow and shrink or be
20934
+ * reordered. All children that haven't already been validated are required to
20935
+ * have a "key" property assigned to it. Error statuses are cached so a warning
20936
+ * will only be shown once.
20937
+ *
20938
+ * @internal
20939
+ * @param {ReactElement} element Element that requires a key.
20940
+ * @param {*} parentType element's parent's type.
20941
+ */
20942
+ function validateExplicitKey(element, parentType) {
20943
+ if (!element._store || element._store.validated || element.key != null) {
20944
+ return;
20945
+ }
20946
+ element._store.validated = true;
20947
+
20948
+ var memoizer = ownerHasKeyUseWarning.uniqueKey || (ownerHasKeyUseWarning.uniqueKey = {});
20949
+
20950
+ var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
20951
+ if (memoizer[currentComponentErrorInfo]) {
20952
+ return;
20953
+ }
20954
+ memoizer[currentComponentErrorInfo] = true;
20955
+
20956
+ // Usually the current owner is the offender, but if it accepts children as a
20957
+ // property, it may be the creator of the child that's responsible for
20958
+ // assigning it a key.
20959
+ var childOwner = '';
20960
+ if (element && element._owner && element._owner !== ReactCurrentOwner.current) {
20961
+ // Give the component that originally created this child.
20962
+ childOwner = ' It was passed a child from ' + element._owner.getName() + '.';
20963
+ }
20964
+
20965
+ process.env.NODE_ENV !== '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;
20966
+ }
20967
+
20968
+ /**
20969
+ * Ensure that every element either is passed in a static location, in an
20970
+ * array with an explicit keys property defined, or in an object literal
20971
+ * with valid key property.
20972
+ *
20973
+ * @internal
20974
+ * @param {ReactNode} node Statically passed child of any type.
20975
+ * @param {*} parentType node's parent's type.
20976
+ */
20977
+ function validateChildKeys(node, parentType) {
20978
+ if (typeof node !== 'object') {
20979
+ return;
20980
+ }
20981
+ if (Array.isArray(node)) {
20982
+ for (var i = 0; i < node.length; i++) {
20983
+ var child = node[i];
20984
+ if (ReactElement.isValidElement(child)) {
20985
+ validateExplicitKey(child, parentType);
20986
+ }
20987
+ }
20988
+ } else if (ReactElement.isValidElement(node)) {
20989
+ // This element was passed in a valid location.
20990
+ if (node._store) {
20991
+ node._store.validated = true;
20992
+ }
20993
+ } else if (node) {
20994
+ var iteratorFn = getIteratorFn(node);
20995
+ // Entry iterators provide implicit keys.
20996
+ if (iteratorFn) {
20997
+ if (iteratorFn !== node.entries) {
20998
+ var iterator = iteratorFn.call(node);
20999
+ var step;
21000
+ while (!(step = iterator.next()).done) {
21001
+ if (ReactElement.isValidElement(step.value)) {
21002
+ validateExplicitKey(step.value, parentType);
21003
+ }
21004
+ }
21005
+ }
21006
+ }
21007
+ }
21008
+ }
21009
+
21010
+ /**
21011
+ * Given an element, validate that its props follow the propTypes definition,
21012
+ * provided by the type.
21013
+ *
21014
+ * @param {ReactElement} element
21015
+ */
21016
+ function validatePropTypes(element) {
21017
+ var componentClass = element.type;
21018
+ if (typeof componentClass !== 'function') {
21019
+ return;
21020
+ }
21021
+ var name = componentClass.displayName || componentClass.name;
21022
+ if (componentClass.propTypes) {
21023
+ checkReactTypeSpec(componentClass.propTypes, element.props, 'prop', name, element, null);
21024
+ }
21025
+ if (typeof componentClass.getDefaultProps === 'function') {
21026
+ process.env.NODE_ENV !== 'production' ? warning(componentClass.getDefaultProps.isReactClassApproved, 'getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.') : void 0;
21027
+ }
21028
+ }
21029
+
21030
+ var ReactElementValidator = {
21031
+ createElement: function (type, props, children) {
21032
+ var validType = typeof type === 'string' || typeof type === 'function';
21033
+ // We warn in this case but don't throw. We expect the element creation to
21034
+ // succeed and there will likely be errors in render.
21035
+ if (!validType) {
21036
+ if (typeof type !== 'function' && typeof type !== 'string') {
21037
+ var info = '';
21038
+ if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
21039
+ info += ' You likely forgot to export your component from the file ' + "it's defined in.";
21040
+ }
21041
+
21042
+ var sourceInfo = getSourceInfoErrorAddendum(props);
21043
+ if (sourceInfo) {
21044
+ info += sourceInfo;
21045
+ } else {
21046
+ info += getDeclarationErrorAddendum();
21047
+ }
21048
+
21049
+ info += ReactComponentTreeHook.getCurrentStackAddendum();
21050
+
21051
+ var currentSource = props !== null && props !== undefined && props.__source !== undefined ? props.__source : null;
21052
+ ReactComponentTreeHook.pushNonStandardWarningStack(true, currentSource);
21053
+ process.env.NODE_ENV !== '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;
21054
+ ReactComponentTreeHook.popNonStandardWarningStack();
21055
+ }
21056
+ }
21057
+
21058
+ var element = ReactElement.createElement.apply(this, arguments);
21059
+
21060
+ // The result can be nullish if a mock or a custom function is used.
21061
+ // TODO: Drop this when these are no longer allowed as the type argument.
21062
+ if (element == null) {
21063
+ return element;
21064
+ }
21065
+
21066
+ // Skip key warning if the type isn't valid since our key validation logic
21067
+ // doesn't expect a non-string/function type and can throw confusing errors.
21068
+ // We don't want exception behavior to differ between dev and prod.
21069
+ // (Rendering will throw with a helpful message and as soon as the type is
21070
+ // fixed, the key warnings will appear.)
21071
+ if (validType) {
21072
+ for (var i = 2; i < arguments.length; i++) {
21073
+ validateChildKeys(arguments[i], type);
21074
+ }
21075
+ }
21076
+
21077
+ validatePropTypes(element);
21078
+
21079
+ return element;
21080
+ },
21081
+
21082
+ createFactory: function (type) {
21083
+ var validatedFactory = ReactElementValidator.createElement.bind(null, type);
21084
+ // Legacy hook TODO: Warn if this is accessed
21085
+ validatedFactory.type = type;
21086
+
21087
+ if (process.env.NODE_ENV !== 'production') {
21088
+ if (canDefineProperty) {
21089
+ Object.defineProperty(validatedFactory, 'type', {
21090
+ enumerable: false,
21091
+ get: function () {
21092
+ lowPriorityWarning(false, 'Factory.type is deprecated. Access the class directly ' + 'before passing it to createFactory.');
21093
+ Object.defineProperty(this, 'type', {
21094
+ value: type
21095
+ });
21096
+ return type;
21097
+ }
21098
+ });
21099
+ }
21100
+ }
21101
+
21102
+ return validatedFactory;
21103
+ },
21104
+
21105
+ cloneElement: function (element, props, children) {
21106
+ var newElement = ReactElement.cloneElement.apply(this, arguments);
21107
+ for (var i = 2; i < arguments.length; i++) {
21108
+ validateChildKeys(arguments[i], newElement.type);
21109
+ }
21110
+ validatePropTypes(newElement);
21111
+ return newElement;
21112
+ }
21113
+ };
21114
+
21115
+ module.exports = ReactElementValidator;
21116
+ }).call(this)}).call(this,require('_process'))
21117
+ },{"./ReactComponentTreeHook":169,"./ReactCurrentOwner":170,"./ReactElement":172,"./canDefineProperty":180,"./checkReactTypeSpec":181,"./getIteratorFn":183,"./lowPriorityWarning":185,"_process":29,"fbjs/lib/warning":27}],175:[function(require,module,exports){
21118
+ (function (process){(function (){
21119
+ /**
21120
+ * Copyright (c) 2015-present, Facebook, Inc.
21121
+ *
21122
+ * This source code is licensed under the MIT license found in the
21123
+ * LICENSE file in the root directory of this source tree.
21124
+ *
21125
+ */
21126
+
21127
+ 'use strict';
21128
+
21129
+ var warning = require('fbjs/lib/warning');
21130
+
21131
+ function warnNoop(publicInstance, callerName) {
21132
+ if (process.env.NODE_ENV !== 'production') {
21133
+ var constructor = publicInstance.constructor;
21134
+ process.env.NODE_ENV !== '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;
21135
+ }
21136
+ }
21137
+
21138
+ /**
21139
+ * This is the abstract API for an update queue.
21140
+ */
21141
+ var ReactNoopUpdateQueue = {
21142
+ /**
21143
+ * Checks whether or not this composite component is mounted.
21144
+ * @param {ReactClass} publicInstance The instance we want to test.
21145
+ * @return {boolean} True if mounted, false otherwise.
21146
+ * @protected
21147
+ * @final
21148
+ */
21149
+ isMounted: function (publicInstance) {
21150
+ return false;
21151
+ },
21152
+
21153
+ /**
21154
+ * Enqueue a callback that will be executed after all the pending updates
21155
+ * have processed.
21156
+ *
21157
+ * @param {ReactClass} publicInstance The instance to use as `this` context.
21158
+ * @param {?function} callback Called after state is updated.
21159
+ * @internal
21160
+ */
21161
+ enqueueCallback: function (publicInstance, callback) {},
21162
+
21163
+ /**
21164
+ * Forces an update. This should only be invoked when it is known with
21165
+ * certainty that we are **not** in a DOM transaction.
21166
+ *
21167
+ * You may want to call this when you know that some deeper aspect of the
21168
+ * component's state has changed but `setState` was not called.
21169
+ *
21170
+ * This will not invoke `shouldComponentUpdate`, but it will invoke
21171
+ * `componentWillUpdate` and `componentDidUpdate`.
21172
+ *
21173
+ * @param {ReactClass} publicInstance The instance that should rerender.
21174
+ * @internal
21175
+ */
21176
+ enqueueForceUpdate: function (publicInstance) {
21177
+ warnNoop(publicInstance, 'forceUpdate');
21178
+ },
21179
+
21180
+ /**
21181
+ * Replaces all of the state. Always use this or `setState` to mutate state.
21182
+ * You should treat `this.state` as immutable.
21183
+ *
21184
+ * There is no guarantee that `this.state` will be immediately updated, so
21185
+ * accessing `this.state` after calling this method may return the old value.
21186
+ *
21187
+ * @param {ReactClass} publicInstance The instance that should rerender.
21188
+ * @param {object} completeState Next state.
21189
+ * @internal
21190
+ */
21191
+ enqueueReplaceState: function (publicInstance, completeState) {
21192
+ warnNoop(publicInstance, 'replaceState');
21193
+ },
21194
+
21195
+ /**
21196
+ * Sets a subset of the state. This only exists because _pendingState is
21197
+ * internal. This provides a merging strategy that is not available to deep
21198
+ * properties which is confusing. TODO: Expose pendingState or don't use it
21199
+ * during the merge.
21200
+ *
21201
+ * @param {ReactClass} publicInstance The instance that should rerender.
21202
+ * @param {object} partialState Next partial state to be merged with state.
21203
+ * @internal
21204
+ */
21205
+ enqueueSetState: function (publicInstance, partialState) {
21206
+ warnNoop(publicInstance, 'setState');
21207
+ }
21208
+ };
21209
+
21210
+ module.exports = ReactNoopUpdateQueue;
21211
+ }).call(this)}).call(this,require('_process'))
21212
+ },{"_process":29,"fbjs/lib/warning":27}],176:[function(require,module,exports){
21213
+ arguments[4][103][0].apply(exports,arguments)
21214
+ },{"_process":29,"dup":103}],177:[function(require,module,exports){
21215
+ /**
21216
+ * Copyright (c) 2013-present, Facebook, Inc.
21217
+ *
21218
+ * This source code is licensed under the MIT license found in the
21219
+ * LICENSE file in the root directory of this source tree.
21220
+ *
21221
+ */
21222
+
21223
+ 'use strict';
21224
+
21225
+ var _require = require('./ReactElement'),
21226
+ isValidElement = _require.isValidElement;
21227
+
21228
+ var factory = require('prop-types/factory');
21229
+
21230
+ module.exports = factory(isValidElement);
21231
+ },{"./ReactElement":172,"prop-types/factory":31}],178:[function(require,module,exports){
21232
+ arguments[4][104][0].apply(exports,arguments)
21233
+ },{"dup":104}],179:[function(require,module,exports){
21234
+ /**
21235
+ * Copyright (c) 2013-present, Facebook, Inc.
21236
+ *
21237
+ * This source code is licensed under the MIT license found in the
21238
+ * LICENSE file in the root directory of this source tree.
21239
+ *
21240
+ */
21241
+
21242
+ 'use strict';
21243
+
21244
+ module.exports = '15.7.0';
21245
+
21246
+ },{}],180:[function(require,module,exports){
21247
+ (function (process){(function (){
21248
+ /**
21249
+ * Copyright (c) 2013-present, Facebook, Inc.
21250
+ *
21251
+ * This source code is licensed under the MIT license found in the
21252
+ * LICENSE file in the root directory of this source tree.
21253
+ *
21254
+ *
21255
+ */
21256
+
21257
+ 'use strict';
21258
+
21259
+ var canDefineProperty = false;
21260
+ if (process.env.NODE_ENV !== 'production') {
21261
+ try {
21262
+ // $FlowFixMe https://github.com/facebook/flow/issues/285
21263
+ Object.defineProperty({}, 'x', { get: function () {} });
21264
+ canDefineProperty = true;
21265
+ } catch (x) {
21266
+ // IE will fail on defineProperty
21267
+ }
21268
+ }
21269
+
21270
+ module.exports = canDefineProperty;
21271
+ }).call(this)}).call(this,require('_process'))
21272
+ },{"_process":29}],181:[function(require,module,exports){
21273
+ (function (process){(function (){
21274
+ /**
21275
+ * Copyright (c) 2013-present, Facebook, Inc.
21276
+ *
21277
+ * This source code is licensed under the MIT license found in the
21278
+ * LICENSE file in the root directory of this source tree.
21279
+ *
21280
+ */
21281
+
21282
+ 'use strict';
21283
+
21284
+ var _prodInvariant = require('./reactProdInvariant');
21285
+
21286
+ var ReactPropTypeLocationNames = require('./ReactPropTypeLocationNames');
21287
+ var ReactPropTypesSecret = require('./ReactPropTypesSecret');
21288
+
21289
+ var invariant = require('fbjs/lib/invariant');
21290
+ var warning = require('fbjs/lib/warning');
21291
+
21292
+ var ReactComponentTreeHook;
21293
+
21294
+ if (typeof process !== 'undefined' && process.env && process.env.NODE_ENV === 'test') {
21295
+ // Temporary hack.
21296
+ // Inline requires don't work well with Jest:
21297
+ // https://github.com/facebook/react/issues/7240
21298
+ // Remove the inline requires when we don't need them anymore:
21299
+ // https://github.com/facebook/react/pull/7178
21300
+ ReactComponentTreeHook = require('./ReactComponentTreeHook');
21301
+ }
21302
+
21303
+ var loggedTypeFailures = {};
21304
+
21305
+ /**
21306
+ * Assert that the values match with the type specs.
21307
+ * Error messages are memorized and will only be shown once.
21308
+ *
21309
+ * @param {object} typeSpecs Map of name to a ReactPropType
21310
+ * @param {object} values Runtime values that need to be type-checked
21311
+ * @param {string} location e.g. "prop", "context", "child context"
21312
+ * @param {string} componentName Name of the component for error messages.
21313
+ * @param {?object} element The React element that is being type-checked
21314
+ * @param {?number} debugID The React component instance that is being type-checked
21315
+ * @private
21316
+ */
21317
+ function checkReactTypeSpec(typeSpecs, values, location, componentName, element, debugID) {
21318
+ for (var typeSpecName in typeSpecs) {
21319
+ if (typeSpecs.hasOwnProperty(typeSpecName)) {
21320
+ var error;
21321
+ // Prop type validation may throw. In case they do, we don't want to
21322
+ // fail the render phase where it didn't fail before. So we log it.
21323
+ // After these have been cleaned up, we'll let them throw.
21324
+ try {
21325
+ // This is intentionally an invariant that gets caught. It's the same
21326
+ // behavior as without this statement except with a better message.
21327
+ !(typeof typeSpecs[typeSpecName] === 'function') ? process.env.NODE_ENV !== '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;
21328
+ error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
21329
+ } catch (ex) {
21330
+ error = ex;
21331
+ }
21332
+ process.env.NODE_ENV !== '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;
21333
+ if (error instanceof Error && !(error.message in loggedTypeFailures)) {
21334
+ // Only monitor this failure once because there tends to be a lot of the
21335
+ // same error.
21336
+ loggedTypeFailures[error.message] = true;
21337
+
21338
+ var componentStackInfo = '';
21339
+
21340
+ if (process.env.NODE_ENV !== 'production') {
21341
+ if (!ReactComponentTreeHook) {
21342
+ ReactComponentTreeHook = require('./ReactComponentTreeHook');
21343
+ }
21344
+ if (debugID !== null) {
21345
+ componentStackInfo = ReactComponentTreeHook.getStackAddendumByID(debugID);
21346
+ } else if (element !== null) {
21347
+ componentStackInfo = ReactComponentTreeHook.getCurrentStackAddendum(element);
21348
+ }
21349
+ }
21350
+
21351
+ process.env.NODE_ENV !== 'production' ? warning(false, 'Failed %s type: %s%s', location, error.message, componentStackInfo) : void 0;
21352
+ }
21353
+ }
21354
+ }
21355
+ }
21356
+
21357
+ module.exports = checkReactTypeSpec;
21358
+ }).call(this)}).call(this,require('_process'))
21359
+ },{"./ReactComponentTreeHook":169,"./ReactPropTypeLocationNames":176,"./ReactPropTypesSecret":178,"./reactProdInvariant":187,"_process":29,"fbjs/lib/invariant":20,"fbjs/lib/warning":27}],182:[function(require,module,exports){
21360
+ /**
21361
+ * Copyright (c) 2013-present, Facebook, Inc.
21362
+ *
21363
+ * This source code is licensed under the MIT license found in the
21364
+ * LICENSE file in the root directory of this source tree.
21365
+ *
21366
+ */
21367
+
21368
+ 'use strict';
21369
+
21370
+ var _require = require('./ReactBaseClasses'),
21371
+ Component = _require.Component;
21372
+
21373
+ var _require2 = require('./ReactElement'),
21374
+ isValidElement = _require2.isValidElement;
21375
+
21376
+ var ReactNoopUpdateQueue = require('./ReactNoopUpdateQueue');
21377
+ var factory = require('create-react-class/factory');
21378
+
21379
+ module.exports = factory(Component, isValidElement, ReactNoopUpdateQueue);
21380
+ },{"./ReactBaseClasses":167,"./ReactElement":172,"./ReactNoopUpdateQueue":175,"create-react-class/factory":4}],183:[function(require,module,exports){
21381
+ arguments[4][145][0].apply(exports,arguments)
21382
+ },{"dup":145}],184:[function(require,module,exports){
21383
+ /**
21384
+ * Copyright (c) 2013-present, Facebook, Inc.
21385
+ *
21386
+ * This source code is licensed under the MIT license found in the
21387
+ * LICENSE file in the root directory of this source tree.
21388
+ *
21389
+ *
21390
+ */
21391
+
21392
+ 'use strict';
21393
+
21394
+ var nextDebugID = 1;
21395
+
21396
+ function getNextDebugID() {
21397
+ return nextDebugID++;
21398
+ }
21399
+
21400
+ module.exports = getNextDebugID;
21401
+ },{}],185:[function(require,module,exports){
21402
+ (function (process){(function (){
21403
+ /**
21404
+ * Copyright (c) 2014-present, Facebook, Inc.
21405
+ *
21406
+ * This source code is licensed under the MIT license found in the
21407
+ * LICENSE file in the root directory of this source tree.
21408
+ *
21409
+ */
21410
+
21411
+ 'use strict';
21412
+
21413
+ /**
21414
+ * Forked from fbjs/warning:
21415
+ * https://github.com/facebook/fbjs/blob/e66ba20ad5be433eb54423f2b097d829324d9de6/packages/fbjs/src/__forks__/warning.js
21416
+ *
21417
+ * Only change is we use console.warn instead of console.error,
21418
+ * and do nothing when 'console' is not supported.
21419
+ * This really simplifies the code.
21420
+ * ---
21421
+ * Similar to invariant but only logs a warning if the condition is not met.
21422
+ * This can be used to log issues in development environments in critical
21423
+ * paths. Removing the logging code for production environments will keep the
21424
+ * same logic and follow the same code paths.
21425
+ */
21426
+
21427
+ var lowPriorityWarning = function () {};
21428
+
21429
+ if (process.env.NODE_ENV !== 'production') {
21430
+ var printWarning = function (format) {
21431
+ for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
21432
+ args[_key - 1] = arguments[_key];
21433
+ }
21434
+
21435
+ var argIndex = 0;
21436
+ var message = 'Warning: ' + format.replace(/%s/g, function () {
21437
+ return args[argIndex++];
21438
+ });
21439
+ if (typeof console !== 'undefined') {
21440
+ console.warn(message);
21441
+ }
21442
+ try {
21443
+ // --- Welcome to debugging React ---
21444
+ // This error was thrown as a convenience so that you can use this stack
21445
+ // to find the callsite that caused this warning to fire.
21446
+ throw new Error(message);
21447
+ } catch (x) {}
21448
+ };
21449
+
21450
+ lowPriorityWarning = function (condition, format) {
21451
+ if (format === undefined) {
21452
+ throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');
21453
+ }
21454
+ if (!condition) {
21455
+ for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
21456
+ args[_key2 - 2] = arguments[_key2];
21457
+ }
21458
+
21459
+ printWarning.apply(undefined, [format].concat(args));
21460
+ }
21461
+ };
21462
+ }
21463
+
21464
+ module.exports = lowPriorityWarning;
21465
+ }).call(this)}).call(this,require('_process'))
21466
+ },{"_process":29}],186:[function(require,module,exports){
21467
+ (function (process){(function (){
21468
+ /**
21469
+ * Copyright (c) 2013-present, Facebook, Inc.
21470
+ *
21471
+ * This source code is licensed under the MIT license found in the
21472
+ * LICENSE file in the root directory of this source tree.
21473
+ *
21474
+ */
21475
+ 'use strict';
21476
+
21477
+ var _prodInvariant = require('./reactProdInvariant');
21478
+
21479
+ var ReactElement = require('./ReactElement');
21480
+
21481
+ var invariant = require('fbjs/lib/invariant');
21482
+
21483
+ /**
21484
+ * Returns the first child in a collection of children and verifies that there
21485
+ * is only one child in the collection.
21486
+ *
21487
+ * See https://facebook.github.io/react/docs/top-level-api.html#react.children.only
21488
+ *
21489
+ * The current implementation of this function assumes that a single child gets
21490
+ * passed without a wrapper, but the purpose of this helper function is to
21491
+ * abstract away the particular structure of children.
21492
+ *
21493
+ * @param {?object} children Child collection structure.
21494
+ * @return {ReactElement} The first and only `ReactElement` contained in the
21495
+ * structure.
21496
+ */
21497
+ function onlyChild(children) {
21498
+ !ReactElement.isValidElement(children) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'React.Children.only expected to receive a single React element child.') : _prodInvariant('143') : void 0;
21499
+ return children;
21500
+ }
21501
+
21502
+ module.exports = onlyChild;
21503
+ }).call(this)}).call(this,require('_process'))
21504
+ },{"./ReactElement":172,"./reactProdInvariant":187,"_process":29,"fbjs/lib/invariant":20}],187:[function(require,module,exports){
21505
+ arguments[4][154][0].apply(exports,arguments)
21506
+ },{"dup":154}],188:[function(require,module,exports){
21507
+ (function (process){(function (){
21508
+ /**
21509
+ * Copyright (c) 2013-present, Facebook, Inc.
21510
+ *
21511
+ * This source code is licensed under the MIT license found in the
21512
+ * LICENSE file in the root directory of this source tree.
21513
+ *
21514
+ */
21515
+
21516
+ 'use strict';
21517
+
21518
+ var _prodInvariant = require('./reactProdInvariant');
21519
+
21520
+ var ReactCurrentOwner = require('./ReactCurrentOwner');
21521
+ var REACT_ELEMENT_TYPE = require('./ReactElementSymbol');
21522
+
21523
+ var getIteratorFn = require('./getIteratorFn');
21524
+ var invariant = require('fbjs/lib/invariant');
21525
+ var KeyEscapeUtils = require('./KeyEscapeUtils');
21526
+ var warning = require('fbjs/lib/warning');
21527
+
21528
+ var SEPARATOR = '.';
21529
+ var SUBSEPARATOR = ':';
21530
+
21531
+ /**
21532
+ * This is inlined from ReactElement since this file is shared between
21533
+ * isomorphic and renderers. We could extract this to a
21534
+ *
21535
+ */
21536
+
21537
+ /**
21538
+ * TODO: Test that a single child and an array with one item have the same key
21539
+ * pattern.
21540
+ */
21541
+
21542
+ var didWarnAboutMaps = false;
21543
+
21544
+ /**
21545
+ * Generate a key string that identifies a component within a set.
21546
+ *
21547
+ * @param {*} component A component that could contain a manual key.
21548
+ * @param {number} index Index that is used if a manual key is not provided.
21549
+ * @return {string}
21550
+ */
21551
+ function getComponentKey(component, index) {
21552
+ // Do some typechecking here since we call this blindly. We want to ensure
21553
+ // that we don't block potential future ES APIs.
21554
+ if (component && typeof component === 'object' && component.key != null) {
21555
+ // Explicit key
21556
+ return KeyEscapeUtils.escape(component.key);
21557
+ }
21558
+ // Implicit key determined by the index in the set
21559
+ return index.toString(36);
21560
+ }
21561
+
21562
+ /**
21563
+ * @param {?*} children Children tree container.
21564
+ * @param {!string} nameSoFar Name of the key path so far.
21565
+ * @param {!function} callback Callback to invoke with each child found.
21566
+ * @param {?*} traverseContext Used to pass information throughout the traversal
21567
+ * process.
21568
+ * @return {!number} The number of children in this subtree.
21569
+ */
21570
+ function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext) {
21571
+ var type = typeof children;
21572
+
21573
+ if (type === 'undefined' || type === 'boolean') {
21574
+ // All of the above are perceived as null.
21575
+ children = null;
21576
+ }
21577
+
21578
+ if (children === null || type === 'string' || type === 'number' ||
21579
+ // The following is inlined from ReactElement. This means we can optimize
21580
+ // some checks. React Fiber also inlines this logic for similar purposes.
21581
+ type === 'object' && children.$$typeof === REACT_ELEMENT_TYPE) {
21582
+ callback(traverseContext, children,
21583
+ // If it's the only child, treat the name as if it was wrapped in an array
21584
+ // so that it's consistent if the number of children grows.
21585
+ nameSoFar === '' ? SEPARATOR + getComponentKey(children, 0) : nameSoFar);
21586
+ return 1;
21587
+ }
21588
+
21589
+ var child;
21590
+ var nextName;
21591
+ var subtreeCount = 0; // Count of children found in the current subtree.
21592
+ var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR;
21593
+
21594
+ if (Array.isArray(children)) {
21595
+ for (var i = 0; i < children.length; i++) {
21596
+ child = children[i];
21597
+ nextName = nextNamePrefix + getComponentKey(child, i);
21598
+ subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
21599
+ }
21600
+ } else {
21601
+ var iteratorFn = getIteratorFn(children);
21602
+ if (iteratorFn) {
21603
+ var iterator = iteratorFn.call(children);
21604
+ var step;
21605
+ if (iteratorFn !== children.entries) {
21606
+ var ii = 0;
21607
+ while (!(step = iterator.next()).done) {
21608
+ child = step.value;
21609
+ nextName = nextNamePrefix + getComponentKey(child, ii++);
21610
+ subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
21611
+ }
21612
+ } else {
21613
+ if (process.env.NODE_ENV !== 'production') {
21614
+ var mapsAsChildrenAddendum = '';
21615
+ if (ReactCurrentOwner.current) {
21616
+ var mapsAsChildrenOwnerName = ReactCurrentOwner.current.getName();
21617
+ if (mapsAsChildrenOwnerName) {
21618
+ mapsAsChildrenAddendum = ' Check the render method of `' + mapsAsChildrenOwnerName + '`.';
21619
+ }
21620
+ }
21621
+ process.env.NODE_ENV !== '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;
21622
+ didWarnAboutMaps = true;
21623
+ }
21624
+ // Iterator will provide entry [k,v] tuples rather than values.
21625
+ while (!(step = iterator.next()).done) {
21626
+ var entry = step.value;
21627
+ if (entry) {
21628
+ child = entry[1];
21629
+ nextName = nextNamePrefix + KeyEscapeUtils.escape(entry[0]) + SUBSEPARATOR + getComponentKey(child, 0);
21630
+ subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
21631
+ }
21632
+ }
21633
+ }
21634
+ } else if (type === 'object') {
21635
+ var addendum = '';
21636
+ if (process.env.NODE_ENV !== 'production') {
21637
+ 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.';
21638
+ if (children._isReactElement) {
21639
+ 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.';
21640
+ }
21641
+ if (ReactCurrentOwner.current) {
21642
+ var name = ReactCurrentOwner.current.getName();
21643
+ if (name) {
21644
+ addendum += ' Check the render method of `' + name + '`.';
21645
+ }
21646
+ }
21647
+ }
21648
+ var childrenString = String(children);
21649
+ !false ? process.env.NODE_ENV !== '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;
21650
+ }
21651
+ }
21652
+
21653
+ return subtreeCount;
21654
+ }
21655
+
21656
+ /**
21657
+ * Traverses children that are typically specified as `props.children`, but
21658
+ * might also be specified through attributes:
21659
+ *
21660
+ * - `traverseAllChildren(this.props.children, ...)`
21661
+ * - `traverseAllChildren(this.props.leftPanelChildren, ...)`
21662
+ *
21663
+ * The `traverseContext` is an optional argument that is passed through the
21664
+ * entire traversal. It can be used to store accumulations or anything else that
21665
+ * the callback might find relevant.
21666
+ *
21667
+ * @param {?*} children Children tree object.
21668
+ * @param {!function} callback To invoke upon traversing each child.
21669
+ * @param {?*} traverseContext Context for traversal.
21670
+ * @return {!number} The number of children in this subtree.
21671
+ */
21672
+ function traverseAllChildren(children, callback, traverseContext) {
21673
+ if (children == null) {
21674
+ return 0;
21675
+ }
21676
+
21677
+ return traverseAllChildrenImpl(children, '', callback, traverseContext);
21678
+ }
21679
+
21680
+ module.exports = traverseAllChildren;
21681
+ }).call(this)}).call(this,require('_process'))
21682
+ },{"./KeyEscapeUtils":164,"./ReactCurrentOwner":170,"./ReactElementSymbol":173,"./getIteratorFn":183,"./reactProdInvariant":187,"_process":29,"fbjs/lib/invariant":20,"fbjs/lib/warning":27}],189:[function(require,module,exports){
21683
+ 'use strict';
21684
+
21685
+ module.exports = require('./lib/React');
21686
+
21687
+ },{"./lib/React":166}],190:[function(require,module,exports){
21688
+ /**
21689
+ * Copyright (c) 2016-present, Facebook, Inc.
21690
+ * All rights reserved.
21691
+ *
21692
+ * This source code is licensed under the BSD-style license found in the
21693
+ * LICENSE file in the root directory of this source tree. An additional grant
21694
+ * of patent rights can be found in the PATENTS file in the code directory.
21695
+ */
21696
+
21697
+ 'use strict';
21698
+
21699
+ var FBUtils = (function(){
21700
+ return {
21701
+ isIE : function isIE() {
21702
+ return (
21703
+ /MSIE |Trident\/|Edge\//.test(window.navigator.userAgent)
21704
+ );
21705
+ },
21706
+
21707
+ parseURL : function parseURL(url) {
21708
+ var parser = document.createElement('a');
21709
+ parser.href = url;
21710
+ return parser;
21711
+ },
21712
+
21713
+ urlFromSameDomain : function urlFromSameDomain(url1, url2) {
21714
+ var u1 = FBUtils.parseURL(url1);
21715
+ var u2 = FBUtils.parseURL(url2);
21716
+ var u1host = u1.host.replace('web.', 'www.');
21717
+ var u2host = u2.host.replace('web.', 'www.');
21718
+ return u1.protocol === u2.protocol && u1host === u2host;
21719
+ },
21720
+
21721
+ togglePopupOriginWeb : function togglePopupOriginWeb(fae_origin) {
21722
+ var current_origin = window.facebookAdsExtensionConfig.popupOrigin;
21723
+ if (fae_origin.includes('web.') && !current_origin.includes('web.')) {
21724
+ window.facebookAdsExtensionConfig.popupOrigin = current_origin.replace('www.', 'web.');
21725
+ } else if (!fae_origin.includes('web.') && current_origin.includes('web.')) {
21726
+ window.facebookAdsExtensionConfig.popupOrigin = current_origin.replace('web.', 'www.');
21727
+ }
21728
+ }
21729
+ }
21730
+ }());
21731
+
21732
+ module.exports = FBUtils;
21733
+
21734
+ },{}]},{},[3]);
languages/official-facebook-pixel-ar_AR.po CHANGED
@@ -1,8 +1,8 @@
1
- # Copyright (C) 2018 Official Facebook Pixel
2
  # This file is distributed under the same license as the Facebook Pixel package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Official Facebook Pixel 2.2.2\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/official-facebook-"
7
  "pixel\n"
8
  "POT-Creation-Date: 2018-11-29 01:26:28+00:00\n"
@@ -60,7 +60,7 @@ msgstr "تجاهل هذا الإشعار."
60
  #. Plugin Name of the plugin/theme
61
  #, fuzzy
62
  #| msgid "Facebook Pixel"
63
- msgid "Official Facebook Pixel"
64
  msgstr "بيكسل فيسبوك"
65
 
66
  #. Plugin URI of the plugin/theme
1
+ # Copyright (C) 2018 Facebook for WordPress
2
  # This file is distributed under the same license as the Facebook Pixel package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Facebook for WordPress 3.0.0\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/official-facebook-"
7
  "pixel\n"
8
  "POT-Creation-Date: 2018-11-29 01:26:28+00:00\n"
60
  #. Plugin Name of the plugin/theme
61
  #, fuzzy
62
  #| msgid "Facebook Pixel"
63
+ msgid "Facebook for WordPress"
64
  msgstr "بيكسل فيسبوك"
65
 
66
  #. Plugin URI of the plugin/theme
languages/official-facebook-pixel-cs_CZ.po CHANGED
@@ -1,8 +1,8 @@
1
- # Copyright (C) 2018 Official Facebook Pixel
2
  # This file is distributed under the same license as the Facebook Pixel package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Official Facebook Pixel 2.2.2\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/official-facebook-"
7
  "pixel\n"
8
  "POT-Creation-Date: 2018-11-29 01:26:28+00:00\n"
@@ -58,7 +58,7 @@ msgid "Dismiss this notice."
58
  msgstr "Toto upozornění ignorujte."
59
 
60
  #. Plugin Name of the plugin/theme
61
- msgid "Official Facebook Pixel"
62
  msgstr "Official Facebook pixel"
63
 
64
  #. Plugin URI of the plugin/theme
1
+ # Copyright (C) 2018 Facebook for WordPress
2
  # This file is distributed under the same license as the Facebook Pixel package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Facebook for WordPress 3.0.0\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/official-facebook-"
7
  "pixel\n"
8
  "POT-Creation-Date: 2018-11-29 01:26:28+00:00\n"
58
  msgstr "Toto upozornění ignorujte."
59
 
60
  #. Plugin Name of the plugin/theme
61
+ msgid "Facebook for WordPress"
62
  msgstr "Official Facebook pixel"
63
 
64
  #. Plugin URI of the plugin/theme
languages/official-facebook-pixel-da_DK.po CHANGED
@@ -1,8 +1,8 @@
1
- # Copyright (C) 2018 Official Facebook Pixel
2
  # This file is distributed under the same license as the Facebook Pixel package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Official Facebook Pixel 2.2.2\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/official-facebook-"
7
  "pixel\n"
8
  "POT-Creation-Date: 2018-11-29 01:26:28+00:00\n"
@@ -59,7 +59,7 @@ msgid "Dismiss this notice."
59
  msgstr "Afvis meddelelsen."
60
 
61
  #. Plugin Name of the plugin/theme
62
- msgid "Official Facebook Pixel"
63
  msgstr "Official Facebook-pixel"
64
 
65
  #. Plugin URI of the plugin/theme
1
+ # Copyright (C) 2018 Facebook for WordPress
2
  # This file is distributed under the same license as the Facebook Pixel package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Facebook for WordPress 3.0.0\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/official-facebook-"
7
  "pixel\n"
8
  "POT-Creation-Date: 2018-11-29 01:26:28+00:00\n"
59
  msgstr "Afvis meddelelsen."
60
 
61
  #. Plugin Name of the plugin/theme
62
+ msgid "Facebook for WordPress"
63
  msgstr "Official Facebook-pixel"
64
 
65
  #. Plugin URI of the plugin/theme
languages/official-facebook-pixel-de_DE.po CHANGED
@@ -1,8 +1,8 @@
1
- # Copyright (C) 2018 Official Facebook Pixel
2
  # This file is distributed under the same license as the Facebook Pixel package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Official Facebook Pixel 2.2.2\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/official-facebook-"
7
  "pixel\n"
8
  "POT-Creation-Date: 2018-11-29 01:26:28+00:00\n"
@@ -61,7 +61,7 @@ msgid "Dismiss this notice."
61
  msgstr "Diese Nachricht schließen."
62
 
63
  #. Plugin Name of the plugin/theme
64
- msgid "Official Facebook Pixel"
65
  msgstr "Official Facebook-Pixel"
66
 
67
  #. Plugin URI of the plugin/theme
1
+ # Copyright (C) 2018 Facebook for WordPress
2
  # This file is distributed under the same license as the Facebook Pixel package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Facebook for WordPress 3.0.0\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/official-facebook-"
7
  "pixel\n"
8
  "POT-Creation-Date: 2018-11-29 01:26:28+00:00\n"
61
  msgstr "Diese Nachricht schließen."
62
 
63
  #. Plugin Name of the plugin/theme
64
+ msgid "Facebook for WordPress"
65
  msgstr "Official Facebook-Pixel"
66
 
67
  #. Plugin URI of the plugin/theme
languages/official-facebook-pixel-en_GB.po CHANGED
@@ -1,8 +1,8 @@
1
- # Copyright (C) 2018 Official Facebook Pixel
2
  # This file is distributed under the same license as the Facebook Pixel package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Official Facebook Pixel 2.2.2\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/official-facebook-"
7
  "pixel\n"
8
  "POT-Creation-Date: 2018-11-29 01:26:28+00:00\n"
@@ -58,7 +58,7 @@ msgid "Dismiss this notice."
58
  msgstr "Dismiss this notice."
59
 
60
  #. Plugin Name of the plugin/theme
61
- msgid "Official Facebook Pixel"
62
  msgstr "Official Facebook pixel"
63
 
64
  #. Plugin URI of the plugin/theme
1
+ # Copyright (C) 2018 Facebook for WordPress
2
  # This file is distributed under the same license as the Facebook Pixel package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Facebook for WordPress 3.0.0\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/official-facebook-"
7
  "pixel\n"
8
  "POT-Creation-Date: 2018-11-29 01:26:28+00:00\n"
58
  msgstr "Dismiss this notice."
59
 
60
  #. Plugin Name of the plugin/theme
61
+ msgid "Facebook for WordPress"
62
  msgstr "Official Facebook pixel"
63
 
64
  #. Plugin URI of the plugin/theme
languages/official-facebook-pixel-es_ES.po CHANGED
@@ -1,8 +1,8 @@
1
- # Copyright (C) 2018 Official Facebook Pixel
2
  # This file is distributed under the same license as the Facebook Pixel package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Official Facebook Pixel 2.2.2\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/official-facebook-"
7
  "pixel\n"
8
  "POT-Creation-Date: 2018-11-29 01:26:28+00:00\n"
@@ -63,7 +63,7 @@ msgstr "Ignorar este aviso."
63
  #. Plugin Name of the plugin/theme
64
  #, fuzzy
65
  #| msgid "Facebook Pixel"
66
- msgid "Official Facebook Pixel"
67
  msgstr "Píxel de Facebook"
68
 
69
  #. Plugin URI of the plugin/theme
1
+ # Copyright (C) 2018 Facebook for WordPress
2
  # This file is distributed under the same license as the Facebook Pixel package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Facebook for WordPress 3.0.0\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/official-facebook-"
7
  "pixel\n"
8
  "POT-Creation-Date: 2018-11-29 01:26:28+00:00\n"
63
  #. Plugin Name of the plugin/theme
64
  #, fuzzy
65
  #| msgid "Facebook Pixel"
66
+ msgid "Facebook for WordPress"
67
  msgstr "Píxel de Facebook"
68
 
69
  #. Plugin URI of the plugin/theme
languages/official-facebook-pixel-es_LA.po CHANGED
@@ -1,8 +1,8 @@
1
- # Copyright (C) 2018 Official Facebook Pixel
2
  # This file is distributed under the same license as the Facebook Pixel package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Official Facebook Pixel 2.2.2\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/official-facebook-"
7
  "pixel\n"
8
  "POT-Creation-Date: 2018-11-29 01:26:28+00:00\n"
@@ -61,7 +61,7 @@ msgstr "Ignorar este aviso."
61
  #. Plugin Name of the plugin/theme
62
  #, fuzzy
63
  #| msgid "Facebook Pixel"
64
- msgid "Official Facebook Pixel"
65
  msgstr "Píxel de Facebook"
66
 
67
  #. Plugin URI of the plugin/theme
1
+ # Copyright (C) 2018 Facebook for WordPress
2
  # This file is distributed under the same license as the Facebook Pixel package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Facebook for WordPress 3.0.0\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/official-facebook-"
7
  "pixel\n"
8
  "POT-Creation-Date: 2018-11-29 01:26:28+00:00\n"
61
  #. Plugin Name of the plugin/theme
62
  #, fuzzy
63
  #| msgid "Facebook Pixel"
64
+ msgid "Facebook for WordPress"
65
  msgstr "Píxel de Facebook"
66
 
67
  #. Plugin URI of the plugin/theme
languages/official-facebook-pixel-fi_FI.po CHANGED
@@ -1,8 +1,8 @@
1
- # Copyright (C) 2018 Official Facebook Pixel
2
  # This file is distributed under the same license as the Facebook Pixel package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Official Facebook Pixel 2.2.2\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/official-facebook-"
7
  "pixel\n"
8
  "POT-Creation-Date: 2018-11-29 01:26:28+00:00\n"
@@ -61,7 +61,7 @@ msgstr "Ohita tämä ilmoitus."
61
  #. Plugin Name of the plugin/theme
62
  #, fuzzy
63
  #| msgid "Facebook Pixel"
64
- msgid "Official Facebook Pixel"
65
  msgstr "Facebook-pikseli"
66
 
67
  #. Plugin URI of the plugin/theme
1
+ # Copyright (C) 2018 Facebook for WordPress
2
  # This file is distributed under the same license as the Facebook Pixel package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Facebook for WordPress 3.0.0\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/official-facebook-"
7
  "pixel\n"
8
  "POT-Creation-Date: 2018-11-29 01:26:28+00:00\n"
61
  #. Plugin Name of the plugin/theme
62
  #, fuzzy
63
  #| msgid "Facebook Pixel"
64
+ msgid "Facebook for WordPress"
65
  msgstr "Facebook-pikseli"
66
 
67
  #. Plugin URI of the plugin/theme
languages/official-facebook-pixel-fr_CA.po CHANGED
@@ -1,8 +1,8 @@
1
- # Copyright (C) 2018 Official Facebook Pixel
2
  # This file is distributed under the same license as the Facebook Pixel package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Official Facebook Pixel 2.2.2\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/official-facebook-"
7
  "pixel\n"
8
  "POT-Creation-Date: 2018-11-29 01:26:28+00:00\n"
@@ -63,7 +63,7 @@ msgstr "Ignorer cet avis"
63
  #. Plugin Name of the plugin/theme
64
  #, fuzzy
65
  #| msgid "Facebook Pixel"
66
- msgid "Official Facebook Pixel"
67
  msgstr "Pixel Facebook"
68
 
69
  #. Plugin URI of the plugin/theme
1
+ # Copyright (C) 2018 Facebook for WordPress
2
  # This file is distributed under the same license as the Facebook Pixel package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Facebook for WordPress 3.0.0\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/official-facebook-"
7
  "pixel\n"
8
  "POT-Creation-Date: 2018-11-29 01:26:28+00:00\n"
63
  #. Plugin Name of the plugin/theme
64
  #, fuzzy
65
  #| msgid "Facebook Pixel"
66
+ msgid "Facebook for WordPress"
67
  msgstr "Pixel Facebook"
68
 
69
  #. Plugin URI of the plugin/theme
languages/official-facebook-pixel-fr_FR.po CHANGED
@@ -1,8 +1,8 @@
1
- # Copyright (C) 2018 Official Facebook Pixel
2
  # This file is distributed under the same license as the Facebook Pixel package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Official Facebook Pixel 2.2.2\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/official-facebook-"
7
  "pixel\n"
8
  "POT-Creation-Date: 2018-11-29 01:26:28+00:00\n"
@@ -64,7 +64,7 @@ msgstr "Ignorer cet avertissement."
64
  #. Plugin Name of the plugin/theme
65
  #, fuzzy
66
  #| msgid "Facebook Pixel"
67
- msgid "Official Facebook Pixel"
68
  msgstr "PixelFacebook"
69
 
70
  #. Plugin URI of the plugin/theme
1
+ # Copyright (C) 2018 Facebook for WordPress
2
  # This file is distributed under the same license as the Facebook Pixel package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Facebook for WordPress 3.0.0\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/official-facebook-"
7
  "pixel\n"
8
  "POT-Creation-Date: 2018-11-29 01:26:28+00:00\n"
64
  #. Plugin Name of the plugin/theme
65
  #, fuzzy
66
  #| msgid "Facebook Pixel"
67
+ msgid "Facebook for WordPress"
68
  msgstr "PixelFacebook"
69
 
70
  #. Plugin URI of the plugin/theme
languages/official-facebook-pixel-he_IL.po CHANGED
@@ -1,8 +1,8 @@
1
- # Copyright (C) 2018 Official Facebook Pixel
2
  # This file is distributed under the same license as the Facebook Pixel package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Official Facebook Pixel 2.2.2\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/official-facebook-"
7
  "pixel\n"
8
  "POT-Creation-Date: 2018-11-29 01:26:28+00:00\n"
@@ -59,7 +59,7 @@ msgstr "התעלם מהודעה זו."
59
  #. Plugin Name of the plugin/theme
60
  #, fuzzy
61
  #| msgid "Facebook Pixel"
62
- msgid "Official Facebook Pixel"
63
  msgstr "פיקסל פייסבוק"
64
 
65
  #. Plugin URI of the plugin/theme
1
+ # Copyright (C) 2018 Facebook for WordPress
2
  # This file is distributed under the same license as the Facebook Pixel package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Facebook for WordPress 3.0.0\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/official-facebook-"
7
  "pixel\n"
8
  "POT-Creation-Date: 2018-11-29 01:26:28+00:00\n"
59
  #. Plugin Name of the plugin/theme
60
  #, fuzzy
61
  #| msgid "Facebook Pixel"
62
+ msgid "Facebook for WordPress"
63
  msgstr "פיקסל פייסבוק"
64
 
65
  #. Plugin URI of the plugin/theme
languages/official-facebook-pixel-it_IT.po CHANGED
@@ -1,8 +1,8 @@
1
- # Copyright (C) 2018 Official Facebook Pixel
2
  # This file is distributed under the same license as the Facebook Pixel package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Official Facebook Pixel 2.2.2\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/official-facebook-"
7
  "pixel\n"
8
  "POT-Creation-Date: 2018-11-29 01:26:28+00:00\n"
@@ -63,7 +63,7 @@ msgstr "Ignora questa notifica."
63
  #. Plugin Name of the plugin/theme
64
  #, fuzzy
65
  #| msgid "Facebook Pixel"
66
- msgid "Official Facebook Pixel"
67
  msgstr "Pixel di Facebook"
68
 
69
  #. Plugin URI of the plugin/theme
1
+ # Copyright (C) 2018 Facebook for WordPress
2
  # This file is distributed under the same license as the Facebook Pixel package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Facebook for WordPress 3.0.0\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/official-facebook-"
7
  "pixel\n"
8
  "POT-Creation-Date: 2018-11-29 01:26:28+00:00\n"
63
  #. Plugin Name of the plugin/theme
64
  #, fuzzy
65
  #| msgid "Facebook Pixel"
66
+ msgid "Facebook for WordPress"
67
  msgstr "Pixel di Facebook"
68
 
69
  #. Plugin URI of the plugin/theme
languages/official-facebook-pixel-ja_JP.po CHANGED
@@ -1,8 +1,8 @@
1
- # Copyright (C) 2018 Official Facebook Pixel
2
  # This file is distributed under the same license as the Facebook Pixel package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Official Facebook Pixel 2.2.2\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/official-facebook-"
7
  "pixel\n"
8
  "POT-Creation-Date: 2018-11-29 01:26:28+00:00\n"
@@ -60,7 +60,7 @@ msgstr "この通知を破棄します。"
60
  #. Plugin Name of the plugin/theme
61
  #, fuzzy
62
  #| msgid "Facebook Pixel"
63
- msgid "Official Facebook Pixel"
64
  msgstr "Facebookピクセル"
65
 
66
  #. Plugin URI of the plugin/theme
1
+ # Copyright (C) 2018 Facebook for WordPress
2
  # This file is distributed under the same license as the Facebook Pixel package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Facebook for WordPress 3.0.0\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/official-facebook-"
7
  "pixel\n"
8
  "POT-Creation-Date: 2018-11-29 01:26:28+00:00\n"
60
  #. Plugin Name of the plugin/theme
61
  #, fuzzy
62
  #| msgid "Facebook Pixel"
63
+ msgid "Facebook for WordPress"
64
  msgstr "Facebookピクセル"
65
 
66
  #. Plugin URI of the plugin/theme
languages/official-facebook-pixel-ko_KR.po CHANGED
@@ -1,8 +1,8 @@
1
- # Copyright (C) 2018 Official Facebook Pixel
2
  # This file is distributed under the same license as the Facebook Pixel package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Official Facebook Pixel 2.2.2\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/official-facebook-"
7
  "pixel\n"
8
  "POT-Creation-Date: 2018-11-29 01:26:28+00:00\n"
@@ -59,7 +59,7 @@ msgstr "이 공지를 무시합니다."
59
  #. Plugin Name of the plugin/theme
60
  #, fuzzy
61
  #| msgid "Facebook Pixel"
62
- msgid "Official Facebook Pixel"
63
  msgstr "Facebook 픽셀"
64
 
65
  #. Plugin URI of the plugin/theme
1
+ # Copyright (C) 2018 Facebook for WordPress
2
  # This file is distributed under the same license as the Facebook Pixel package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Facebook for WordPress 3.0.0\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/official-facebook-"
7
  "pixel\n"
8
  "POT-Creation-Date: 2018-11-29 01:26:28+00:00\n"
59
  #. Plugin Name of the plugin/theme
60
  #, fuzzy
61
  #| msgid "Facebook Pixel"
62
+ msgid "Facebook for WordPress"
63
  msgstr "Facebook 픽셀"
64
 
65
  #. Plugin URI of the plugin/theme
languages/official-facebook-pixel-nb_NO.po CHANGED
@@ -1,8 +1,8 @@
1
- # Copyright (C) 2018 Official Facebook Pixel
2
  # This file is distributed under the same license as the Facebook Pixel package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Official Facebook Pixel 2.2.2\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/official-facebook-"
7
  "pixel\n"
8
  "POT-Creation-Date: 2018-11-29 01:26:28+00:00\n"
@@ -61,7 +61,7 @@ msgstr "Avvis dette varselet."
61
  #. Plugin Name of the plugin/theme
62
  #, fuzzy
63
  #| msgid "Facebook Pixel"
64
- msgid "Official Facebook Pixel"
65
  msgstr "Facebook-piksel"
66
 
67
  #. Plugin URI of the plugin/theme
1
+ # Copyright (C) 2018 Facebook for WordPress
2
  # This file is distributed under the same license as the Facebook Pixel package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Facebook for WordPress 3.0.0\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/official-facebook-"
7
  "pixel\n"
8
  "POT-Creation-Date: 2018-11-29 01:26:28+00:00\n"
61
  #. Plugin Name of the plugin/theme
62
  #, fuzzy
63
  #| msgid "Facebook Pixel"
64
+ msgid "Facebook for WordPress"
65
  msgstr "Facebook-piksel"
66
 
67
  #. Plugin URI of the plugin/theme
languages/official-facebook-pixel-nl_NL.po CHANGED
@@ -1,8 +1,8 @@
1
- # Copyright (C) 2018 Official Facebook Pixel
2
  # This file is distributed under the same license as the Facebook Pixel package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Official Facebook Pixel 2.2.2\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/official-facebook-"
7
  "pixel\n"
8
  "POT-Creation-Date: 2018-11-29 01:26:28+00:00\n"
@@ -62,7 +62,7 @@ msgstr "Deze kennisgeving negeren."
62
  #. Plugin Name of the plugin/theme
63
  #, fuzzy
64
  #| msgid "Facebook Pixel"
65
- msgid "Official Facebook Pixel"
66
  msgstr "Facebook-pixel"
67
 
68
  #. Plugin URI of the plugin/theme
1
+ # Copyright (C) 2018 Facebook for WordPress
2
  # This file is distributed under the same license as the Facebook Pixel package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Facebook for WordPress 3.0.0\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/official-facebook-"
7
  "pixel\n"
8
  "POT-Creation-Date: 2018-11-29 01:26:28+00:00\n"
62
  #. Plugin Name of the plugin/theme
63
  #, fuzzy
64
  #| msgid "Facebook Pixel"
65
+ msgid "Facebook for WordPress"
66
  msgstr "Facebook-pixel"
67
 
68
  #. Plugin URI of the plugin/theme
languages/official-facebook-pixel-pl_PL.po CHANGED
@@ -1,8 +1,8 @@
1
- # Copyright (C) 2018 Official Facebook Pixel
2
  # This file is distributed under the same license as the Facebook Pixel package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Official Facebook Pixel 2.2.2\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/official-facebook-"
7
  "pixel\n"
8
  "POT-Creation-Date: 2018-11-29 01:26:28+00:00\n"
@@ -62,7 +62,7 @@ msgstr "Odrzuć to powiadomienie."
62
  #. Plugin Name of the plugin/theme
63
  #, fuzzy
64
  #| msgid "Facebook Pixel"
65
- msgid "Official Facebook Pixel"
66
  msgstr "Piksel Facebooka"
67
 
68
  #. Plugin URI of the plugin/theme
1
+ # Copyright (C) 2018 Facebook for WordPress
2
  # This file is distributed under the same license as the Facebook Pixel package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Facebook for WordPress 3.0.0\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/official-facebook-"
7
  "pixel\n"
8
  "POT-Creation-Date: 2018-11-29 01:26:28+00:00\n"
62
  #. Plugin Name of the plugin/theme
63
  #, fuzzy
64
  #| msgid "Facebook Pixel"
65
+ msgid "Facebook for WordPress"
66
  msgstr "Piksel Facebooka"
67
 
68
  #. Plugin URI of the plugin/theme
languages/official-facebook-pixel-pt_BR.po CHANGED
@@ -1,8 +1,8 @@
1
- # Copyright (C) 2018 Official Facebook Pixel
2
  # This file is distributed under the same license as the Facebook Pixel package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Official Facebook Pixel 2.2.2\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/official-facebook-"
7
  "pixel\n"
8
  "POT-Creation-Date: 2018-11-29 01:26:28+00:00\n"
@@ -60,7 +60,7 @@ msgstr "Ignore esta notificação."
60
  #. Plugin Name of the plugin/theme
61
  #, fuzzy
62
  #| msgid "Facebook Pixel"
63
- msgid "Official Facebook Pixel"
64
  msgstr "Pixel do Facebook"
65
 
66
  #. Plugin URI of the plugin/theme
1
+ # Copyright (C) 2018 Facebook for WordPress
2
  # This file is distributed under the same license as the Facebook Pixel package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Facebook for WordPress 3.0.0\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/official-facebook-"
7
  "pixel\n"
8
  "POT-Creation-Date: 2018-11-29 01:26:28+00:00\n"
60
  #. Plugin Name of the plugin/theme
61
  #, fuzzy
62
  #| msgid "Facebook Pixel"
63
+ msgid "Facebook for WordPress"
64
  msgstr "Pixel do Facebook"
65
 
66
  #. Plugin URI of the plugin/theme
languages/official-facebook-pixel-pt_PT.po CHANGED
@@ -1,8 +1,8 @@
1
- # Copyright (C) 2018 Official Facebook Pixel
2
  # This file is distributed under the same license as the Facebook Pixel package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Official Facebook Pixel 2.2.2\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/official-facebook-"
7
  "pixel\n"
8
  "POT-Creation-Date: 2018-11-29 01:26:28+00:00\n"
@@ -60,7 +60,7 @@ msgstr "Ignora esta notificação."
60
  #. Plugin Name of the plugin/theme
61
  #, fuzzy
62
  #| msgid "Facebook Pixel"
63
- msgid "Official Facebook Pixel"
64
  msgstr "Píxel do Facebook"
65
 
66
  #. Plugin URI of the plugin/theme
1
+ # Copyright (C) 2018 Facebook for WordPress
2
  # This file is distributed under the same license as the Facebook Pixel package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Facebook for WordPress 3.0.0\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/official-facebook-"
7
  "pixel\n"
8
  "POT-Creation-Date: 2018-11-29 01:26:28+00:00\n"
60
  #. Plugin Name of the plugin/theme
61
  #, fuzzy
62
  #| msgid "Facebook Pixel"
63
+ msgid "Facebook for WordPress"
64
  msgstr "Píxel do Facebook"
65
 
66
  #. Plugin URI of the plugin/theme
languages/official-facebook-pixel-ru_RU.po CHANGED
@@ -1,8 +1,8 @@
1
- # Copyright (C) 2018 Official Facebook Pixel
2
  # This file is distributed under the same license as the Facebook Pixel package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Official Facebook Pixel 2.2.2\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/official-facebook-"
7
  "pixel\n"
8
  "POT-Creation-Date: 2018-11-29 01:26:28+00:00\n"
@@ -59,7 +59,7 @@ msgstr "Пропустить напоминание."
59
  #. Plugin Name of the plugin/theme
60
  #, fuzzy
61
  #| msgid "Facebook Pixel"
62
- msgid "Official Facebook Pixel"
63
  msgstr "Пиксель Facebook"
64
 
65
  #. Plugin URI of the plugin/theme
1
+ # Copyright (C) 2018 Facebook for WordPress
2
  # This file is distributed under the same license as the Facebook Pixel package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Facebook for WordPress 3.0.0\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/official-facebook-"
7
  "pixel\n"
8
  "POT-Creation-Date: 2018-11-29 01:26:28+00:00\n"
59
  #. Plugin Name of the plugin/theme
60
  #, fuzzy
61
  #| msgid "Facebook Pixel"
62
+ msgid "Facebook for WordPress"
63
  msgstr "Пиксель Facebook"
64
 
65
  #. Plugin URI of the plugin/theme
languages/official-facebook-pixel-sv_SE.po CHANGED
@@ -1,8 +1,8 @@
1
- # Copyright (C) 2018 Official Facebook Pixel
2
  # This file is distributed under the same license as the Facebook Pixel package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Official Facebook Pixel 2.2.2\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/official-facebook-"
7
  "pixel\n"
8
  "POT-Creation-Date: 2018-11-29 01:26:28+00:00\n"
@@ -60,7 +60,7 @@ msgstr "Stäng den här aviseringen."
60
  #. Plugin Name of the plugin/theme
61
  #, fuzzy
62
  #| msgid "Facebook Pixel"
63
- msgid "Official Facebook Pixel"
64
  msgstr "Facebook-pixel"
65
 
66
  #. Plugin URI of the plugin/theme
1
+ # Copyright (C) 2018 Facebook for WordPress
2
  # This file is distributed under the same license as the Facebook Pixel package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Facebook for WordPress 3.0.0\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/official-facebook-"
7
  "pixel\n"
8
  "POT-Creation-Date: 2018-11-29 01:26:28+00:00\n"
60
  #. Plugin Name of the plugin/theme
61
  #, fuzzy
62
  #| msgid "Facebook Pixel"
63
+ msgid "Facebook for WordPress"
64
  msgstr "Facebook-pixel"
65
 
66
  #. Plugin URI of the plugin/theme
languages/official-facebook-pixel-th_TH.po CHANGED
@@ -1,8 +1,8 @@
1
- # Copyright (C) 2018 Official Facebook Pixel
2
  # This file is distributed under the same license as the Facebook Pixel package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Official Facebook Pixel 2.2.2\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/official-facebook-pixel\n"
7
  "POT-Creation-Date: 2018-11-29 01:26:28+00:00\n"
8
  "PO-Revision-Date: 2018-11-28 17:37-0800\n"
@@ -55,7 +55,7 @@ msgstr "ข้ามประกาศนี้"
55
  #. Plugin Name of the plugin/theme
56
  #, fuzzy
57
  #| msgid "Facebook Pixel"
58
- msgid "Official Facebook Pixel"
59
  msgstr "พิกเซลของ Facebook"
60
 
61
  #. Plugin URI of the plugin/theme
1
+ # Copyright (C) 2018 Facebook for WordPress
2
  # This file is distributed under the same license as the Facebook Pixel package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Facebook for WordPress 3.0.0\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/official-facebook-pixel\n"
7
  "POT-Creation-Date: 2018-11-29 01:26:28+00:00\n"
8
  "PO-Revision-Date: 2018-11-28 17:37-0800\n"
55
  #. Plugin Name of the plugin/theme
56
  #, fuzzy
57
  #| msgid "Facebook Pixel"
58
+ msgid "Facebook for WordPress"
59
  msgstr "พิกเซลของ Facebook"
60
 
61
  #. Plugin URI of the plugin/theme
languages/official-facebook-pixel-tr_TR.po CHANGED
@@ -1,8 +1,8 @@
1
- # Copyright (C) 2018 Official Facebook Pixel
2
  # This file is distributed under the same license as the Facebook Pixel package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Official Facebook Pixel 2.2.2\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/official-facebook-"
7
  "pixel\n"
8
  "POT-Creation-Date: 2018-11-29 01:26:28+00:00\n"
@@ -62,7 +62,7 @@ msgstr "Bu uyarıyı yok sayın."
62
  #. Plugin Name of the plugin/theme
63
  #, fuzzy
64
  #| msgid "Facebook Pixel"
65
- msgid "Official Facebook Pixel"
66
  msgstr "Facebook Pikseli"
67
 
68
  #. Plugin URI of the plugin/theme
1
+ # Copyright (C) 2018 Facebook for WordPress
2
  # This file is distributed under the same license as the Facebook Pixel package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Facebook for WordPress 3.0.0\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/official-facebook-"
7
  "pixel\n"
8
  "POT-Creation-Date: 2018-11-29 01:26:28+00:00\n"
62
  #. Plugin Name of the plugin/theme
63
  #, fuzzy
64
  #| msgid "Facebook Pixel"
65
+ msgid "Facebook for WordPress"
66
  msgstr "Facebook Pikseli"
67
 
68
  #. Plugin URI of the plugin/theme
languages/official-facebook-pixel-vi_VN.po CHANGED
@@ -1,8 +1,8 @@
1
- # Copyright (C) 2018 Official Facebook Pixel
2
  # This file is distributed under the same license as the Facebook Pixel package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Official Facebook Pixel 2.2.2\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/official-facebook-"
7
  "pixel\n"
8
  "POT-Creation-Date: 2018-11-29 01:26:28+00:00\n"
@@ -62,7 +62,7 @@ msgstr "Loại bỏ thông báo này."
62
  #. Plugin Name of the plugin/theme
63
  #, fuzzy
64
  #| msgid "Facebook Pixel"
65
- msgid "Official Facebook Pixel"
66
  msgstr "Facebook Pixel"
67
 
68
  #. Plugin URI of the plugin/theme
1
+ # Copyright (C) 2018 Facebook for WordPress
2
  # This file is distributed under the same license as the Facebook Pixel package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Facebook for WordPress 3.0.0\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/official-facebook-"
7
  "pixel\n"
8
  "POT-Creation-Date: 2018-11-29 01:26:28+00:00\n"
62
  #. Plugin Name of the plugin/theme
63
  #, fuzzy
64
  #| msgid "Facebook Pixel"
65
+ msgid "Facebook for WordPress"
66
  msgstr "Facebook Pixel"
67
 
68
  #. Plugin URI of the plugin/theme
languages/official-facebook-pixel-zh_CN.po CHANGED
@@ -1,8 +1,8 @@
1
- # Copyright (C) 2018 Official Facebook Pixel
2
  # This file is distributed under the same license as the Facebook Pixel package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Official Facebook Pixel 2.2.2\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/official-facebook-"
7
  "pixel\n"
8
  "POT-Creation-Date: 2018-11-29 01:26:28+00:00\n"
@@ -56,7 +56,7 @@ msgstr "关闭此通知。"
56
  #. Plugin Name of the plugin/theme
57
  #, fuzzy
58
  #| msgid "Facebook Pixel"
59
- msgid "Official Facebook Pixel"
60
  msgstr "Facebook 像素"
61
 
62
  #. Plugin URI of the plugin/theme
1
+ # Copyright (C) 2018 Facebook for WordPress
2
  # This file is distributed under the same license as the Facebook Pixel package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Facebook for WordPress 3.0.0\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/official-facebook-"
7
  "pixel\n"
8
  "POT-Creation-Date: 2018-11-29 01:26:28+00:00\n"
56
  #. Plugin Name of the plugin/theme
57
  #, fuzzy
58
  #| msgid "Facebook Pixel"
59
+ msgid "Facebook for WordPress"
60
  msgstr "Facebook 像素"
61
 
62
  #. Plugin URI of the plugin/theme
languages/official-facebook-pixel-zh_TW.po CHANGED
@@ -1,8 +1,8 @@
1
- # Copyright (C) 2018 Official Facebook Pixel
2
  # This file is distributed under the same license as the Facebook Pixel package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Official Facebook Pixel 2.2.2\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/official-facebook-"
7
  "pixel\n"
8
  "POT-Creation-Date: 2018-11-29 01:26:28+00:00\n"
@@ -59,7 +59,7 @@ msgstr "關閉這則通知。"
59
  #. Plugin Name of the plugin/theme
60
  #, fuzzy
61
  #| msgid "Facebook Pixel"
62
- msgid "Official Facebook Pixel"
63
  msgstr "Facebook 像素"
64
 
65
  #. Plugin URI of the plugin/theme
1
+ # Copyright (C) 2018 Facebook for WordPress
2
  # This file is distributed under the same license as the Facebook Pixel package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Facebook for WordPress 3.0.0\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/official-facebook-"
7
  "pixel\n"
8
  "POT-Creation-Date: 2018-11-29 01:26:28+00:00\n"
59
  #. Plugin Name of the plugin/theme
60
  #, fuzzy
61
  #| msgid "Facebook Pixel"
62
+ msgid "Facebook for WordPress"
63
  msgstr "Facebook 像素"
64
 
65
  #. Plugin URI of the plugin/theme
languages/official-facebook-pixel.pot CHANGED
@@ -1,8 +1,8 @@
1
- # Copyright (C) 2018 Official Facebook Pixel
2
- # This file is distributed under the same license as the Official Facebook Pixel package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Official Facebook Pixel 2.0.0\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/official-facebook-"
7
  "pixel\n"
8
  "POT-Creation-Date: 2018-11-29 01:26:28+00:00\n"
@@ -50,7 +50,7 @@ msgid "Dismiss this notice."
50
  msgstr ""
51
 
52
  #. Plugin Name of the plugin/theme
53
- msgid "Official Facebook Pixel"
54
  msgstr ""
55
 
56
  #. Plugin URI of the plugin/theme
1
+ # Copyright (C) 2018 Facebook for WordPress
2
+ # This file is distributed under the same license as the Facebook for WordPress package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Facebook for WordPress 2.0.0\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/official-facebook-"
7
  "pixel\n"
8
  "POT-Creation-Date: 2018-11-29 01:26:28+00:00\n"
50
  msgstr ""
51
 
52
  #. Plugin Name of the plugin/theme
53
+ msgid "Facebook for WordPress"
54
  msgstr ""
55
 
56
  #. Plugin URI of the plugin/theme
readme.txt CHANGED
@@ -1,14 +1,14 @@
1
- === Official Facebook Pixel ===
2
  Contributors: facebook
3
  Tags: Facebook, Facebook Conversion Pixel, Facebook Pixel, Facebook Pixel Events, facebook retargeting, facebook standard events
4
  Requires at least: 4.4
5
  Tested up to: 7.4
6
  Requires PHP: 5.6
7
- Stable tag: 2.2.1
8
  License: GPLv2
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
11
- Grow your business with Official Facebook Pixel!
12
 
13
  == Description ==
14
  This plugin will install a Facebook Pixel for your page so you can capture the actions people take when they interact with your page, such as Lead, ViewContent, AddToCart, InitiateCheckout and Purchase events. Version 2.0.0 also includes support for the Conversions API, which lets you send events directly from your page's server so you can capture a more of these events when they happen. This can help you better understand your customer's journey from the moment they show interest in your business to the moment they complete a conversion. You can use this information to create ad campaigns that are relevant to your audience. [Learn More](https://www.facebook.com/business/learn/facebook-ads-pixel)
@@ -28,28 +28,36 @@ This plugin also includes built-in support for these other WordPress plugins:
28
  == Installation ==
29
  __To install from your WordPress site__ <br />
30
  1. Log in to your WordPress dashboard, navigate to the Plugins menu and click Add New. <br />
31
- 2. In the search field, type 'Official Facebook Pixel' and click 'Search Plugins'. Select the plugin authored by 'Facebook'. You can install it by simply clicking 'Install Now'. <br />
32
 
33
  __To download and install plugin from Facebook Events Manager__ <br />
34
  [Facebook Help Page](https://www.facebook.com/business/help/881403525362441) <br />
35
 
36
  __Configure plugin for first use__ <br />
37
- After plugin installed, go to settings page of the plugin, input your pixel ID in the text box, check 'Enabling Advanced Matching improves audience building' if you want to enable Advanced Matching. <br />
 
 
 
 
38
 
39
  == Frequently Asked Questions ==
40
  = Where can I find more information on Facebook Pixel? =
41
  You can find more information on the [Facebook Pixel](https://www.facebook.com/business/learn/facebook-ads-pixel).
42
 
43
- = Where can I find more information on Official Facebook Pixel plugin? =
44
  You can refer to [this page](https://www.facebook.com/business/help/881403525362441?helpref=faq_content)
45
 
46
  = Where can I find support? =
47
- If you get stuck, or have any questions, you can ask for help in the [Official Facebook Pixel plugin forum](https://wordpress.org/support/plugin/official-facebook-pixel).
48
 
49
  = I am a developer. Can I help improve the plugin? =
50
  Of course! This plugin is open sourced on the Facebook Incubator GitHub. You can find the code and contribution instructions in the [plugin repository](https://github.com/facebookincubator/Facebook-Pixel-for-WordPress).
51
 
52
  == Changelog ==
 
 
 
 
53
  = 2020-12-08 version 2.2.2 =
54
  * Update Business SDK to v9.0.1
55
 
1
+ === Facebook for WordPress ===
2
  Contributors: facebook
3
  Tags: Facebook, Facebook Conversion Pixel, Facebook Pixel, Facebook Pixel Events, facebook retargeting, facebook standard events
4
  Requires at least: 4.4
5
  Tested up to: 7.4
6
  Requires PHP: 5.6
7
+ Stable tag: 2.2.2
8
  License: GPLv2
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
11
+ Grow your business with Facebook for WordPress!
12
 
13
  == Description ==
14
  This plugin will install a Facebook Pixel for your page so you can capture the actions people take when they interact with your page, such as Lead, ViewContent, AddToCart, InitiateCheckout and Purchase events. Version 2.0.0 also includes support for the Conversions API, which lets you send events directly from your page's server so you can capture a more of these events when they happen. This can help you better understand your customer's journey from the moment they show interest in your business to the moment they complete a conversion. You can use this information to create ad campaigns that are relevant to your audience. [Learn More](https://www.facebook.com/business/learn/facebook-ads-pixel)
28
  == Installation ==
29
  __To install from your WordPress site__ <br />
30
  1. Log in to your WordPress dashboard, navigate to the Plugins menu and click Add New. <br />
31
+ 2. In the search field, type 'Facebook for WordPress' and click 'Search Plugins'. Select the plugin authored by 'Facebook'. You can install it by simply clicking 'Install Now'. <br />
32
 
33
  __To download and install plugin from Facebook Events Manager__ <br />
34
  [Facebook Help Page](https://www.facebook.com/business/help/881403525362441) <br />
35
 
36
  __Configure plugin for first use__ <br />
37
+ After plugin installed: <br />
38
+ 1. Go to settings page of the plugin. <br />
39
+ 2. Click Get Started. <br />
40
+ 3. Complete the Facebook Business Extension flow. <br />
41
+ 4. Agree to share your access token with your site. <br />
42
 
43
  == Frequently Asked Questions ==
44
  = Where can I find more information on Facebook Pixel? =
45
  You can find more information on the [Facebook Pixel](https://www.facebook.com/business/learn/facebook-ads-pixel).
46
 
47
+ = Where can I find more information on Facebook for WordPress plugin? =
48
  You can refer to [this page](https://www.facebook.com/business/help/881403525362441?helpref=faq_content)
49
 
50
  = Where can I find support? =
51
+ If you get stuck, or have any questions, you can ask for help in the [Facebook for WordPress plugin forum](https://wordpress.org/support/plugin/official-facebook-pixel).
52
 
53
  = I am a developer. Can I help improve the plugin? =
54
  Of course! This plugin is open sourced on the Facebook Incubator GitHub. You can find the code and contribution instructions in the [plugin repository](https://github.com/facebookincubator/Facebook-Pixel-for-WordPress).
55
 
56
  == Changelog ==
57
+ = 2021-01-06 version 3.0.0 =
58
+ * Adding Facebook Business Extension based configuration
59
+ * Renaming to Facebook for WordPress
60
+
61
  = 2020-12-08 version 2.2.2 =
62
  * Update Business SDK to v9.0.1
63
 
vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
- return ComposerAutoloaderInitf5dc60b911b965ef7d900e2c71f975ec::getLoader();
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInitf8f919e692beb380a8018b435b9f844c::getLoader();
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInitf5dc60b911b965ef7d900e2c71f975ec
6
  {
7
  private static $loader;
8
 
@@ -22,15 +22,15 @@ class ComposerAutoloaderInitf5dc60b911b965ef7d900e2c71f975ec
22
  return self::$loader;
23
  }
24
 
25
- spl_autoload_register(array('ComposerAutoloaderInitf5dc60b911b965ef7d900e2c71f975ec', 'loadClassLoader'), true, true);
26
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
27
- spl_autoload_unregister(array('ComposerAutoloaderInitf5dc60b911b965ef7d900e2c71f975ec', 'loadClassLoader'));
28
 
29
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
30
  if ($useStaticLoader) {
31
  require_once __DIR__ . '/autoload_static.php';
32
 
33
- call_user_func(\Composer\Autoload\ComposerStaticInitf5dc60b911b965ef7d900e2c71f975ec::getInitializer($loader));
34
  } else {
35
  $map = require __DIR__ . '/autoload_namespaces.php';
36
  foreach ($map as $namespace => $path) {
@@ -51,19 +51,19 @@ class ComposerAutoloaderInitf5dc60b911b965ef7d900e2c71f975ec
51
  $loader->register(true);
52
 
53
  if ($useStaticLoader) {
54
- $includeFiles = Composer\Autoload\ComposerStaticInitf5dc60b911b965ef7d900e2c71f975ec::$files;
55
  } else {
56
  $includeFiles = require __DIR__ . '/autoload_files.php';
57
  }
58
  foreach ($includeFiles as $fileIdentifier => $file) {
59
- composerRequiref5dc60b911b965ef7d900e2c71f975ec($fileIdentifier, $file);
60
  }
61
 
62
  return $loader;
63
  }
64
  }
65
 
66
- function composerRequiref5dc60b911b965ef7d900e2c71f975ec($fileIdentifier, $file)
67
  {
68
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
69
  require $file;
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
+ class ComposerAutoloaderInitf8f919e692beb380a8018b435b9f844c
6
  {
7
  private static $loader;
8
 
22
  return self::$loader;
23
  }
24
 
25
+ spl_autoload_register(array('ComposerAutoloaderInitf8f919e692beb380a8018b435b9f844c', 'loadClassLoader'), true, true);
26
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
27
+ spl_autoload_unregister(array('ComposerAutoloaderInitf8f919e692beb380a8018b435b9f844c', 'loadClassLoader'));
28
 
29
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
30
  if ($useStaticLoader) {
31
  require_once __DIR__ . '/autoload_static.php';
32
 
33
+ call_user_func(\Composer\Autoload\ComposerStaticInitf8f919e692beb380a8018b435b9f844c::getInitializer($loader));
34
  } else {
35
  $map = require __DIR__ . '/autoload_namespaces.php';
36
  foreach ($map as $namespace => $path) {
51
  $loader->register(true);
52
 
53
  if ($useStaticLoader) {
54
+ $includeFiles = Composer\Autoload\ComposerStaticInitf8f919e692beb380a8018b435b9f844c::$files;
55
  } else {
56
  $includeFiles = require __DIR__ . '/autoload_files.php';
57
  }
58
  foreach ($includeFiles as $fileIdentifier => $file) {
59
+ composerRequiref8f919e692beb380a8018b435b9f844c($fileIdentifier, $file);
60
  }
61
 
62
  return $loader;
63
  }
64
  }
65
 
66
+ function composerRequiref8f919e692beb380a8018b435b9f844c($fileIdentifier, $file)
67
  {
68
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
69
  require $file;
vendor/composer/autoload_static.php CHANGED
@@ -4,7 +4,7 @@
4
 
5
  namespace Composer\Autoload;
6
 
7
- class ComposerStaticInitf5dc60b911b965ef7d900e2c71f975ec
8
  {
9
  public static $files = array (
10
  '25072dd6e2470089de65ae7bf11d3109' => __DIR__ . '/..' . '/symfony/polyfill-php72/bootstrap.php',
@@ -110,9 +110,9 @@ class ComposerStaticInitf5dc60b911b965ef7d900e2c71f975ec
110
  public static function getInitializer(ClassLoader $loader)
111
  {
112
  return \Closure::bind(function () use ($loader) {
113
- $loader->prefixLengthsPsr4 = ComposerStaticInitf5dc60b911b965ef7d900e2c71f975ec::$prefixLengthsPsr4;
114
- $loader->prefixDirsPsr4 = ComposerStaticInitf5dc60b911b965ef7d900e2c71f975ec::$prefixDirsPsr4;
115
- $loader->classMap = ComposerStaticInitf5dc60b911b965ef7d900e2c71f975ec::$classMap;
116
 
117
  }, null, ClassLoader::class);
118
  }
4
 
5
  namespace Composer\Autoload;
6
 
7
+ class ComposerStaticInitf8f919e692beb380a8018b435b9f844c
8
  {
9
  public static $files = array (
10
  '25072dd6e2470089de65ae7bf11d3109' => __DIR__ . '/..' . '/symfony/polyfill-php72/bootstrap.php',
110
  public static function getInitializer(ClassLoader $loader)
111
  {
112
  return \Closure::bind(function () use ($loader) {
113
+ $loader->prefixLengthsPsr4 = ComposerStaticInitf8f919e692beb380a8018b435b9f844c::$prefixLengthsPsr4;
114
+ $loader->prefixDirsPsr4 = ComposerStaticInitf8f919e692beb380a8018b435b9f844c::$prefixDirsPsr4;
115
+ $loader->classMap = ComposerStaticInitf8f919e692beb380a8018b435b9f844c::$classMap;
116
 
117
  }, null, ClassLoader::class);
118
  }