Instant Images – One Click Unsplash Uploads - Version 4.4.0.3

Version Description

  • July 30, 2021 =
  • Fix: WP 5.8 issue resolved - added fix for Instant Images causing the Widget Block Editor to fail due to JS error.
  • Update: Code clean up.
Download this release

Release Info

Developer dcooney
Plugin Icon 128x128 Instant Images – One Click Unsplash Uploads
Version 4.4.0.3
Comparing to
See all releases

Code changes from version 4.4.0.2 to 4.4.0.3

README.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: dcooney, connekthq
3
  Donate link: https://connekthq.com/donate/
4
  Tags: stock photo, unsplash, prototyping, photos, upload, media library, image upload, free photos
5
  Requires at least: 4.0
6
- Tested up to: 5.7
7
  Stable tag: trunk
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -125,11 +125,17 @@ How to install Instant Images.
125
 
126
  == Changelog ==
127
 
 
 
 
 
 
128
  = 4.4.0.2 - June 7, 2021 =
129
  * Fix: Added fix for CSS conflict causing issues in the WordPress menus section.
130
  * Fix: Removed browser console error with regards `activeFrame.querySelector is not a function` that could appear when creating a gallery.
131
  * Updated: Improved coding standard and overall code quality.
132
 
 
133
  = 4.4.0.1 - May 3, 2021 =
134
  * UPDATE - Updated Instant Images settings page to sanitize inputs before saving.
135
 
3
  Donate link: https://connekthq.com/donate/
4
  Tags: stock photo, unsplash, prototyping, photos, upload, media library, image upload, free photos
5
  Requires at least: 4.0
6
+ Tested up to: 5.8
7
  Stable tag: trunk
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
125
 
126
  == Changelog ==
127
 
128
+ = 4.4.0.3 - July 30, 2021 =
129
+ * Fix: WP 5.8 issue resolved - added fix for Instant Images causing the Widget Block Editor to fail due to JS error.
130
+ * Update: Code clean up.
131
+
132
+
133
  = 4.4.0.2 - June 7, 2021 =
134
  * Fix: Added fix for CSS conflict causing issues in the WordPress menus section.
135
  * Fix: Removed browser console error with regards `activeFrame.querySelector is not a function` that could appear when creating a gallery.
136
  * Updated: Improved coding standard and overall code quality.
137
 
138
+
139
  = 4.4.0.1 - May 3, 2021 =
140
  * UPDATE - Updated Instant Images settings page to sanitize inputs before saving.
141
 
admin/admin.php CHANGED
@@ -28,7 +28,6 @@ function instant_images_create_page() {
28
  }
29
  add_action( 'admin_menu', 'instant_images_create_page' );
30
 
31
-
32
  /**
33
  * Settings page callback.
34
  *
@@ -99,7 +98,6 @@ function instant_images_media_upload_tabs_handler( $tabs ) {
99
  }
100
  add_filter( 'media_upload_tabs', 'instant_images_media_upload_tabs_handler' );
101
 
102
-
103
  /**
104
  * Add Instant Images media button to classic editor screens.
105
  *
@@ -122,8 +120,8 @@ add_filter( 'media_buttons', 'instant_images_media_buttons' );
122
  * @see https://developer.wordpress.org/reference/hooks/media_upload_tab/
123
  * @since 3.2.1
124
  * @author ConnektMedia <support@connekthq.com>
125
- * @codingStandardsIgnoreStart
126
  */
 
127
  function media_upload_instant_images_handler() {
128
  wp_iframe( 'instant_images_media_tab' );
129
  }
28
  }
29
  add_action( 'admin_menu', 'instant_images_create_page' );
30
 
 
31
  /**
32
  * Settings page callback.
33
  *
98
  }
99
  add_filter( 'media_upload_tabs', 'instant_images_media_upload_tabs_handler' );
100
 
 
101
  /**
102
  * Add Instant Images media button to classic editor screens.
103
  *
120
  * @see https://developer.wordpress.org/reference/hooks/media_upload_tab/
121
  * @since 3.2.1
122
  * @author ConnektMedia <support@connekthq.com>
 
123
  */
124
+ // @codingStandardsIgnoreStart
125
  function media_upload_instant_images_handler() {
126
  wp_iframe( 'instant_images_media_tab' );
127
  }
dist/css/instant-images.css CHANGED
@@ -735,7 +735,6 @@ body.media_page_instant-images #wpfooter p {
735
 
736
  #photos {
737
  width: 100%;
738
- width: -webkit-calc(100% + 10px);
739
  width: calc(100% + 10px);
740
  margin: 0 0 0 -5px;
741
  padding: 0;
@@ -1348,7 +1347,6 @@ body.media_page_instant-images #wpfooter p {
1348
 
1349
  .instant-images-settings .cnkt-sidebar .cta.ii-plugins {
1350
  width: 68.666%;
1351
- width: -webkit-calc(68.666% - 25px);
1352
  width: calc(68.666% - 25px);
1353
  float: right;
1354
  }
@@ -1482,11 +1480,9 @@ body.media_page_instant-images #wpfooter p {
1482
  .instant-images-sidebar-icon,
1483
  .instant-images-sidebar-icon svg {
1484
  display: -webkit-inline-box;
1485
- display: -webkit-inline-flex;
1486
  display: -ms-inline-flexbox;
1487
  display: inline-flex;
1488
  -webkit-box-flex: 0;
1489
- -webkit-flex: 0 0 auto;
1490
  -ms-flex: 0 0 auto;
1491
  flex: 0 0 auto;
1492
  }
@@ -1556,7 +1552,6 @@ body.media_page_instant-images #wpfooter p {
1556
 
1557
  .components-panel .control-nav li.search-field form {
1558
  height: auto;
1559
- width: -webkit-calc(100% + 16px);
1560
  width: calc(100% + 16px);
1561
  margin-left: -8px;
1562
  }
@@ -1694,11 +1689,9 @@ body.media_page_instant-images #wpfooter p {
1694
 
1695
  .orientation-list {
1696
  display: -webkit-box;
1697
- display: -webkit-flex;
1698
  display: -ms-flexbox;
1699
  display: flex;
1700
  -webkit-box-align: center;
1701
- -webkit-align-items: center;
1702
  -ms-flex-align: center;
1703
  align-items: center;
1704
  width: 100%;
@@ -1718,11 +1711,9 @@ body.media_page_instant-images #wpfooter p {
1718
 
1719
  .orientation-list ul {
1720
  -webkit-box-flex: 1;
1721
- -webkit-flex: 1;
1722
  -ms-flex: 1;
1723
  flex: 1;
1724
  display: -webkit-box;
1725
- display: -webkit-flex;
1726
  display: -ms-flexbox;
1727
  display: flex;
1728
  }
@@ -1761,11 +1752,9 @@ body.media_page_instant-images #wpfooter p {
1761
  .components-panel .orientation-list {
1762
  position: static;
1763
  text-align: center;
1764
- -webkit-flex-wrap: wrap;
1765
- -ms-flex-wrap: wrap;
1766
- flex-wrap: wrap;
1767
  -webkit-box-pack: center;
1768
- -webkit-justify-content: center;
1769
  -ms-flex-pack: center;
1770
  justify-content: center;
1771
  border-top: none;
@@ -1781,7 +1770,6 @@ body.media_page_instant-images #wpfooter p {
1781
  padding: 0;
1782
  width: 100%;
1783
  -webkit-box-pack: center;
1784
- -webkit-justify-content: center;
1785
  -ms-flex-pack: center;
1786
  justify-content: center;
1787
  }
735
 
736
  #photos {
737
  width: 100%;
 
738
  width: calc(100% + 10px);
739
  margin: 0 0 0 -5px;
740
  padding: 0;
1347
 
1348
  .instant-images-settings .cnkt-sidebar .cta.ii-plugins {
1349
  width: 68.666%;
 
1350
  width: calc(68.666% - 25px);
1351
  float: right;
1352
  }
1480
  .instant-images-sidebar-icon,
1481
  .instant-images-sidebar-icon svg {
1482
  display: -webkit-inline-box;
 
1483
  display: -ms-inline-flexbox;
1484
  display: inline-flex;
1485
  -webkit-box-flex: 0;
 
1486
  -ms-flex: 0 0 auto;
1487
  flex: 0 0 auto;
1488
  }
1552
 
1553
  .components-panel .control-nav li.search-field form {
1554
  height: auto;
 
1555
  width: calc(100% + 16px);
1556
  margin-left: -8px;
1557
  }
1689
 
1690
  .orientation-list {
1691
  display: -webkit-box;
 
1692
  display: -ms-flexbox;
1693
  display: flex;
1694
  -webkit-box-align: center;
 
1695
  -ms-flex-align: center;
1696
  align-items: center;
1697
  width: 100%;
1711
 
1712
  .orientation-list ul {
1713
  -webkit-box-flex: 1;
 
1714
  -ms-flex: 1;
1715
  flex: 1;
1716
  display: -webkit-box;
 
1717
  display: -ms-flexbox;
1718
  display: flex;
1719
  }
1752
  .components-panel .orientation-list {
1753
  position: static;
1754
  text-align: center;
1755
+ -ms-flex-wrap: wrap;
1756
+ flex-wrap: wrap;
 
1757
  -webkit-box-pack: center;
 
1758
  -ms-flex-pack: center;
1759
  justify-content: center;
1760
  border-top: none;
1770
  padding: 0;
1771
  width: 100%;
1772
  -webkit-box-pack: center;
 
1773
  -ms-flex-pack: center;
1774
  justify-content: center;
1775
  }
dist/js/instant-images-block.js CHANGED
@@ -1954,7 +1954,7 @@ module.exports = {
1954
  /***/ (function(module, exports, __webpack_require__) {
1955
 
1956
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
1957
- Copyright (c) 2017 Jed Watson.
1958
  Licensed under the MIT License (MIT), see
1959
  http://jedwatson.github.io/classnames
1960
  */
@@ -1965,7 +1965,7 @@ var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
1965
 
1966
  var hasOwn = {}.hasOwnProperty;
1967
 
1968
- function classNames () {
1969
  var classes = [];
1970
 
1971
  for (var i = 0; i < arguments.length; i++) {
@@ -1976,16 +1976,22 @@ var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
1976
 
1977
  if (argType === 'string' || argType === 'number') {
1978
  classes.push(arg);
1979
- } else if (Array.isArray(arg) && arg.length) {
1980
- var inner = classNames.apply(null, arg);
1981
- if (inner) {
1982
- classes.push(inner);
 
 
1983
  }
1984
  } else if (argType === 'object') {
1985
- for (var key in arg) {
1986
- if (hasOwn.call(arg, key) && arg[key]) {
1987
- classes.push(key);
 
 
1988
  }
 
 
1989
  }
1990
  }
1991
  }
@@ -2008,968 +2014,450 @@ var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
2008
 
2009
  /***/ }),
2010
 
2011
- /***/ "./node_modules/create-react-class/factory.js":
2012
- /*!****************************************************!*\
2013
- !*** ./node_modules/create-react-class/factory.js ***!
2014
- \****************************************************/
2015
  /*! no static exports found */
2016
  /***/ (function(module, exports, __webpack_require__) {
2017
 
2018
- "use strict";
2019
- /**
2020
- * Copyright (c) 2013-present, Facebook, Inc.
2021
- *
2022
- * This source code is licensed under the MIT license found in the
2023
- * LICENSE file in the root directory of this source tree.
2024
- *
2025
  */
2026
 
 
2027
 
 
 
 
 
 
 
 
 
 
 
 
 
2028
 
2029
- var _assign = __webpack_require__(/*! object-assign */ "./node_modules/object-assign/index.js");
 
2030
 
2031
- var emptyObject = __webpack_require__(/*! fbjs/lib/emptyObject */ "./node_modules/fbjs/lib/emptyObject.js");
2032
- var _invariant = __webpack_require__(/*! fbjs/lib/invariant */ "./node_modules/fbjs/lib/invariant.js");
 
 
 
 
 
 
 
 
 
 
2033
 
2034
- if (true) {
2035
- var warning = __webpack_require__(/*! fbjs/lib/warning */ "./node_modules/fbjs/lib/warning.js");
2036
- }
 
 
 
 
 
2037
 
2038
- var MIXINS_KEY = 'mixins';
 
 
2039
 
2040
- // Helper function to allow the creation of anonymous functions which do not
2041
- // have .name set to the name of the variable being assigned to.
2042
- function identity(fn) {
2043
- return fn;
2044
- }
2045
 
2046
- var ReactPropTypeLocationNames;
2047
- if (true) {
2048
- ReactPropTypeLocationNames = {
2049
- prop: 'prop',
2050
- context: 'context',
2051
- childContext: 'child context'
2052
- };
2053
- } else {}
2054
 
2055
- function factory(ReactComponent, isValidElement, ReactNoopUpdateQueue) {
2056
- /**
2057
- * Policies that describe methods in `ReactClassInterface`.
2058
- */
2059
 
2060
- var injectedMixins = [];
 
 
 
 
 
2061
 
2062
- /**
2063
- * Composite components are higher-level components that compose other composite
2064
- * or host components.
2065
- *
2066
- * To create a new type of `ReactClass`, pass a specification of
2067
- * your new class to `React.createClass`. The only requirement of your class
2068
- * specification is that you implement a `render` method.
2069
- *
2070
- * var MyComponent = React.createClass({
2071
- * render: function() {
2072
- * return <div>Hello World</div>;
2073
- * }
2074
- * });
2075
- *
2076
- * The class specification supports a specific protocol of methods that have
2077
- * special meaning (e.g. `render`). See `ReactClassInterface` for
2078
- * more the comprehensive protocol. Any other properties and methods in the
2079
- * class specification will be available on the prototype.
2080
- *
2081
- * @interface ReactClassInterface
2082
- * @internal
2083
- */
2084
- var ReactClassInterface = {
2085
- /**
2086
- * An array of Mixin objects to include when defining your component.
2087
- *
2088
- * @type {array}
2089
- * @optional
2090
- */
2091
- mixins: 'DEFINE_MANY',
2092
 
2093
- /**
2094
- * An object containing properties and methods that should be defined on
2095
- * the component's constructor instead of its prototype (static methods).
2096
- *
2097
- * @type {object}
2098
- * @optional
2099
- */
2100
- statics: 'DEFINE_MANY',
2101
 
2102
- /**
2103
- * Definition of prop types for this component.
2104
- *
2105
- * @type {object}
2106
- * @optional
2107
- */
2108
- propTypes: 'DEFINE_MANY',
 
 
 
 
2109
 
2110
- /**
2111
- * Definition of context types for this component.
2112
- *
2113
- * @type {object}
2114
- * @optional
2115
- */
2116
- contextTypes: 'DEFINE_MANY',
2117
 
2118
- /**
2119
- * Definition of context types this component sets for its children.
2120
- *
2121
- * @type {object}
2122
- * @optional
2123
- */
2124
- childContextTypes: 'DEFINE_MANY',
2125
 
2126
- // ==== Definition methods ====
2127
 
2128
- /**
2129
- * Invoked when the component is mounted. Values in the mapping will be set on
2130
- * `this.props` if that prop is not specified (i.e. using an `in` check).
2131
- *
2132
- * This method is invoked before `getInitialState` and therefore cannot rely
2133
- * on `this.state` or use `this.setState`.
2134
- *
2135
- * @return {object}
2136
- * @optional
2137
- */
2138
- getDefaultProps: 'DEFINE_MANY_MERGED',
2139
 
2140
- /**
2141
- * Invoked once before the component is mounted. The return value will be used
2142
- * as the initial value of `this.state`.
2143
- *
2144
- * getInitialState: function() {
2145
- * return {
2146
- * isOn: false,
2147
- * fooBaz: new BazFoo()
2148
- * }
2149
- * }
2150
- *
2151
- * @return {object}
2152
- * @optional
2153
- */
2154
- getInitialState: 'DEFINE_MANY_MERGED',
2155
 
2156
- /**
2157
- * @return {object}
2158
- * @optional
2159
- */
2160
- getChildContext: 'DEFINE_MANY_MERGED',
2161
 
2162
- /**
2163
- * Uses props from `this.props` and state from `this.state` to render the
2164
- * structure of the component.
2165
- *
2166
- * No guarantees are made about when or how often this method is invoked, so
2167
- * it must not have side effects.
2168
- *
2169
- * render: function() {
2170
- * var name = this.props.name;
2171
- * return <div>Hello, {name}!</div>;
2172
- * }
2173
- *
2174
- * @return {ReactComponent}
2175
- * @required
2176
- */
2177
- render: 'DEFINE_ONCE',
2178
 
2179
- // ==== Delegate methods ====
 
2180
 
2181
- /**
2182
- * Invoked when the component is initially created and about to be mounted.
2183
- * This may have side effects, but any external subscriptions or data created
2184
- * by this method must be cleaned up in `componentWillUnmount`.
2185
- *
2186
- * @optional
2187
- */
2188
- componentWillMount: 'DEFINE_MANY',
 
2189
 
2190
- /**
2191
- * Invoked when the component has been mounted and has a DOM representation.
2192
- * However, there is no guarantee that the DOM node is in the document.
2193
- *
2194
- * Use this as an opportunity to operate on the DOM when the component has
2195
- * been mounted (initialized and rendered) for the first time.
2196
- *
2197
- * @param {DOMElement} rootNode DOM element representing the component.
2198
- * @optional
2199
- */
2200
- componentDidMount: 'DEFINE_MANY',
2201
 
2202
- /**
2203
- * Invoked before the component receives new props.
2204
- *
2205
- * Use this as an opportunity to react to a prop transition by updating the
2206
- * state using `this.setState`. Current props are accessed via `this.props`.
2207
- *
2208
- * componentWillReceiveProps: function(nextProps, nextContext) {
2209
- * this.setState({
2210
- * likesIncreasing: nextProps.likeCount > this.props.likeCount
2211
- * });
2212
- * }
2213
- *
2214
- * NOTE: There is no equivalent `componentWillReceiveState`. An incoming prop
2215
- * transition may cause a state change, but the opposite is not true. If you
2216
- * need it, you are probably looking for `componentWillUpdate`.
2217
- *
2218
- * @param {object} nextProps
2219
- * @optional
2220
- */
2221
- componentWillReceiveProps: 'DEFINE_MANY',
2222
 
2223
- /**
2224
- * Invoked while deciding if the component should be updated as a result of
2225
- * receiving new props, state and/or context.
2226
- *
2227
- * Use this as an opportunity to `return false` when you're certain that the
2228
- * transition to the new props/state/context will not require a component
2229
- * update.
2230
- *
2231
- * shouldComponentUpdate: function(nextProps, nextState, nextContext) {
2232
- * return !equal(nextProps, this.props) ||
2233
- * !equal(nextState, this.state) ||
2234
- * !equal(nextContext, this.context);
2235
- * }
2236
- *
2237
- * @param {object} nextProps
2238
- * @param {?object} nextState
2239
- * @param {?object} nextContext
2240
- * @return {boolean} True if the component should update.
2241
- * @optional
2242
- */
2243
- shouldComponentUpdate: 'DEFINE_ONCE',
2244
 
2245
- /**
2246
- * Invoked when the component is about to update due to a transition from
2247
- * `this.props`, `this.state` and `this.context` to `nextProps`, `nextState`
2248
- * and `nextContext`.
2249
- *
2250
- * Use this as an opportunity to perform preparation before an update occurs.
2251
- *
2252
- * NOTE: You **cannot** use `this.setState()` in this method.
2253
- *
2254
- * @param {object} nextProps
2255
- * @param {?object} nextState
2256
- * @param {?object} nextContext
2257
- * @param {ReactReconcileTransaction} transaction
2258
- * @optional
2259
- */
2260
- componentWillUpdate: 'DEFINE_MANY',
2261
 
2262
- /**
2263
- * Invoked when the component's DOM representation has been updated.
2264
- *
2265
- * Use this as an opportunity to operate on the DOM when the component has
2266
- * been updated.
2267
- *
2268
- * @param {object} prevProps
2269
- * @param {?object} prevState
2270
- * @param {?object} prevContext
2271
- * @param {DOMElement} rootNode DOM element representing the component.
2272
- * @optional
2273
- */
2274
- componentDidUpdate: 'DEFINE_MANY',
2275
 
2276
- /**
2277
- * Invoked when the component is about to be removed from its parent and have
2278
- * its DOM representation destroyed.
2279
- *
2280
- * Use this as an opportunity to deallocate any external resources.
2281
- *
2282
- * NOTE: There is no `componentDidUnmount` since your component will have been
2283
- * destroyed by that point.
2284
- *
2285
- * @optional
2286
- */
2287
- componentWillUnmount: 'DEFINE_MANY',
2288
 
2289
- // ==== Advanced methods ====
2290
 
2291
- /**
2292
- * Updates the component's currently mounted DOM representation.
2293
- *
2294
- * By default, this implements React's rendering and reconciliation algorithm.
2295
- * Sophisticated clients may wish to override this.
2296
- *
2297
- * @param {ReactReconcileTransaction} transaction
2298
- * @internal
2299
- * @overridable
2300
- */
2301
- updateComponent: 'OVERRIDE_BASE'
2302
- };
2303
 
2304
- /**
2305
- * Mapping from class specification keys to special processing functions.
2306
- *
2307
- * Although these are declared like instance properties in the specification
2308
- * when defining classes using `React.createClass`, they are actually static
2309
- * and are accessible on the constructor instead of the prototype. Despite
2310
- * being static, they must be defined outside of the "statics" key under
2311
- * which all other static methods are defined.
2312
- */
2313
- var RESERVED_SPEC_KEYS = {
2314
- displayName: function(Constructor, displayName) {
2315
- Constructor.displayName = displayName;
2316
- },
2317
- mixins: function(Constructor, mixins) {
2318
- if (mixins) {
2319
- for (var i = 0; i < mixins.length; i++) {
2320
- mixSpecIntoComponent(Constructor, mixins[i]);
2321
- }
2322
- }
2323
- },
2324
- childContextTypes: function(Constructor, childContextTypes) {
2325
- if (true) {
2326
- validateTypeDef(Constructor, childContextTypes, 'childContext');
2327
- }
2328
- Constructor.childContextTypes = _assign(
2329
- {},
2330
- Constructor.childContextTypes,
2331
- childContextTypes
2332
- );
2333
- },
2334
- contextTypes: function(Constructor, contextTypes) {
2335
- if (true) {
2336
- validateTypeDef(Constructor, contextTypes, 'context');
2337
- }
2338
- Constructor.contextTypes = _assign(
2339
- {},
2340
- Constructor.contextTypes,
2341
- contextTypes
2342
- );
2343
- },
2344
- /**
2345
- * Special case getDefaultProps which should move into statics but requires
2346
- * automatic merging.
2347
- */
2348
- getDefaultProps: function(Constructor, getDefaultProps) {
2349
- if (Constructor.getDefaultProps) {
2350
- Constructor.getDefaultProps = createMergedResultFunction(
2351
- Constructor.getDefaultProps,
2352
- getDefaultProps
2353
- );
2354
- } else {
2355
- Constructor.getDefaultProps = getDefaultProps;
2356
- }
2357
- },
2358
- propTypes: function(Constructor, propTypes) {
2359
- if (true) {
2360
- validateTypeDef(Constructor, propTypes, 'prop');
2361
- }
2362
- Constructor.propTypes = _assign({}, Constructor.propTypes, propTypes);
2363
- },
2364
- statics: function(Constructor, statics) {
2365
- mixStaticSpecIntoComponent(Constructor, statics);
2366
- },
2367
- autobind: function() {}
2368
- };
2369
-
2370
- function validateTypeDef(Constructor, typeDef, location) {
2371
- for (var propName in typeDef) {
2372
- if (typeDef.hasOwnProperty(propName)) {
2373
- // use a warning instead of an _invariant so components
2374
- // don't show up in prod but only in __DEV__
2375
- if (true) {
2376
- warning(
2377
- typeof typeDef[propName] === 'function',
2378
- '%s: %s type `%s` is invalid; it must be a function, usually from ' +
2379
- 'React.PropTypes.',
2380
- Constructor.displayName || 'ReactClass',
2381
- ReactPropTypeLocationNames[location],
2382
- propName
2383
- );
2384
- }
2385
- }
2386
- }
2387
- }
2388
-
2389
- function validateMethodOverride(isAlreadyDefined, name) {
2390
- var specPolicy = ReactClassInterface.hasOwnProperty(name)
2391
- ? ReactClassInterface[name]
2392
- : null;
2393
-
2394
- // Disallow overriding of base class methods unless explicitly allowed.
2395
- if (ReactClassMixin.hasOwnProperty(name)) {
2396
- _invariant(
2397
- specPolicy === 'OVERRIDE_BASE',
2398
- 'ReactClassInterface: You are attempting to override ' +
2399
- '`%s` from your class specification. Ensure that your method names ' +
2400
- 'do not overlap with React methods.',
2401
- name
2402
- );
2403
- }
2404
-
2405
- // Disallow defining methods more than once unless explicitly allowed.
2406
- if (isAlreadyDefined) {
2407
- _invariant(
2408
- specPolicy === 'DEFINE_MANY' || specPolicy === 'DEFINE_MANY_MERGED',
2409
- 'ReactClassInterface: You are attempting to define ' +
2410
- '`%s` on your component more than once. This conflict may be due ' +
2411
- 'to a mixin.',
2412
- name
2413
- );
2414
- }
2415
- }
2416
 
2417
- /**
2418
- * Mixin helper which handles policy validation and reserved
2419
- * specification keys when building React classes.
2420
- */
2421
- function mixSpecIntoComponent(Constructor, spec) {
2422
- if (!spec) {
2423
- if (true) {
2424
- var typeofSpec = typeof spec;
2425
- var isMixinValid = typeofSpec === 'object' && spec !== null;
2426
 
2427
- if (true) {
2428
- warning(
2429
- isMixinValid,
2430
- "%s: You're attempting to include a mixin that is either null " +
2431
- 'or not an object. Check the mixins included by the component, ' +
2432
- 'as well as any mixins they include themselves. ' +
2433
- 'Expected object but got %s.',
2434
- Constructor.displayName || 'ReactClass',
2435
- spec === null ? null : typeofSpec
2436
- );
2437
- }
2438
- }
2439
 
2440
- return;
2441
- }
2442
 
2443
- _invariant(
2444
- typeof spec !== 'function',
2445
- "ReactClass: You're attempting to " +
2446
- 'use a component class or function as a mixin. Instead, just use a ' +
2447
- 'regular object.'
2448
- );
2449
- _invariant(
2450
- !isValidElement(spec),
2451
- "ReactClass: You're attempting to " +
2452
- 'use a component as a mixin. Instead, just use a regular object.'
2453
- );
2454
 
2455
- var proto = Constructor.prototype;
2456
- var autoBindPairs = proto.__reactAutoBindPairs;
 
 
 
 
 
 
 
2457
 
2458
- // By handling mixins before any other properties, we ensure the same
2459
- // chaining order is applied to methods with DEFINE_MANY policy, whether
2460
- // mixins are listed before or after these methods in the spec.
2461
- if (spec.hasOwnProperty(MIXINS_KEY)) {
2462
- RESERVED_SPEC_KEYS.mixins(Constructor, spec.mixins);
2463
- }
2464
 
2465
- for (var name in spec) {
2466
- if (!spec.hasOwnProperty(name)) {
2467
- continue;
2468
- }
2469
 
2470
- if (name === MIXINS_KEY) {
2471
- // We have already handled mixins in a special case above.
2472
- continue;
2473
- }
2474
 
2475
- var property = spec[name];
2476
- var isAlreadyDefined = proto.hasOwnProperty(name);
2477
- validateMethodOverride(isAlreadyDefined, name);
2478
 
2479
- if (RESERVED_SPEC_KEYS.hasOwnProperty(name)) {
2480
- RESERVED_SPEC_KEYS[name](Constructor, property);
2481
- } else {
2482
- // Setup methods on prototype:
2483
- // The following member methods should not be automatically bound:
2484
- // 1. Expected ReactClass methods (in the "interface").
2485
- // 2. Overridden methods (that were mixed in).
2486
- var isReactClassMethod = ReactClassInterface.hasOwnProperty(name);
2487
- var isFunction = typeof property === 'function';
2488
- var shouldAutoBind =
2489
- isFunction &&
2490
- !isReactClassMethod &&
2491
- !isAlreadyDefined &&
2492
- spec.autobind !== false;
2493
-
2494
- if (shouldAutoBind) {
2495
- autoBindPairs.push(name, property);
2496
- proto[name] = property;
2497
- } else {
2498
- if (isAlreadyDefined) {
2499
- var specPolicy = ReactClassInterface[name];
2500
-
2501
- // These cases should already be caught by validateMethodOverride.
2502
- _invariant(
2503
- isReactClassMethod &&
2504
- (specPolicy === 'DEFINE_MANY_MERGED' ||
2505
- specPolicy === 'DEFINE_MANY'),
2506
- 'ReactClass: Unexpected spec policy %s for key %s ' +
2507
- 'when mixing in component specs.',
2508
- specPolicy,
2509
- name
2510
- );
2511
-
2512
- // For methods which are defined more than once, call the existing
2513
- // methods before calling the new property, merging if appropriate.
2514
- if (specPolicy === 'DEFINE_MANY_MERGED') {
2515
- proto[name] = createMergedResultFunction(proto[name], property);
2516
- } else if (specPolicy === 'DEFINE_MANY') {
2517
- proto[name] = createChainedFunction(proto[name], property);
2518
- }
2519
- } else {
2520
- proto[name] = property;
2521
- if (true) {
2522
- // Add verbose displayName to the function, which helps when looking
2523
- // at profiling tools.
2524
- if (typeof property === 'function' && spec.displayName) {
2525
- proto[name].displayName = spec.displayName + '_' + name;
2526
- }
2527
- }
2528
- }
2529
- }
2530
- }
2531
- }
2532
  }
 
 
2533
 
2534
- function mixStaticSpecIntoComponent(Constructor, statics) {
2535
- if (!statics) {
2536
- return;
2537
- }
2538
- for (var name in statics) {
2539
- var property = statics[name];
2540
- if (!statics.hasOwnProperty(name)) {
2541
- continue;
2542
- }
2543
-
2544
- var isReserved = name in RESERVED_SPEC_KEYS;
2545
- _invariant(
2546
- !isReserved,
2547
- 'ReactClass: You are attempting to define a reserved ' +
2548
- 'property, `%s`, that shouldn\'t be on the "statics" key. Define it ' +
2549
- 'as an instance property instead; it will still be accessible on the ' +
2550
- 'constructor.',
2551
- name
2552
- );
2553
 
2554
- var isInherited = name in Constructor;
2555
- _invariant(
2556
- !isInherited,
2557
- 'ReactClass: You are attempting to define ' +
2558
- '`%s` on your component more than once. This conflict may be ' +
2559
- 'due to a mixin.',
2560
- name
2561
- );
2562
- Constructor[name] = property;
2563
- }
2564
- }
2565
 
2566
- /**
2567
- * Merge two objects, but throw if both contain the same key.
2568
- *
2569
- * @param {object} one The first object, which is mutated.
2570
- * @param {object} two The second object
2571
- * @return {object} one after it has been mutated to contain everything in two.
2572
- */
2573
- function mergeIntoWithNoDuplicateKeys(one, two) {
2574
- _invariant(
2575
- one && two && typeof one === 'object' && typeof two === 'object',
2576
- 'mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.'
2577
- );
2578
 
2579
- for (var key in two) {
2580
- if (two.hasOwnProperty(key)) {
2581
- _invariant(
2582
- one[key] === undefined,
2583
- 'mergeIntoWithNoDuplicateKeys(): ' +
2584
- 'Tried to merge two objects with the same key: `%s`. This conflict ' +
2585
- 'may be due to a mixin; in particular, this may be caused by two ' +
2586
- 'getInitialState() or getDefaultProps() methods returning objects ' +
2587
- 'with clashing keys.',
2588
- key
2589
- );
2590
- one[key] = two[key];
2591
- }
2592
- }
2593
- return one;
2594
- }
2595
 
2596
- /**
2597
- * Creates a function that invokes two functions and merges their return values.
2598
- *
2599
- * @param {function} one Function to invoke first.
2600
- * @param {function} two Function to invoke second.
2601
- * @return {function} Function that invokes the two argument functions.
2602
- * @private
2603
- */
2604
- function createMergedResultFunction(one, two) {
2605
- return function mergedResult() {
2606
- var a = one.apply(this, arguments);
2607
- var b = two.apply(this, arguments);
2608
- if (a == null) {
2609
- return b;
2610
- } else if (b == null) {
2611
- return a;
2612
- }
2613
- var c = {};
2614
- mergeIntoWithNoDuplicateKeys(c, a);
2615
- mergeIntoWithNoDuplicateKeys(c, b);
2616
- return c;
2617
- };
2618
  }
2619
-
2620
- /**
2621
- * Creates a function that invokes two functions and ignores their return vales.
2622
- *
2623
- * @param {function} one Function to invoke first.
2624
- * @param {function} two Function to invoke second.
2625
- * @return {function} Function that invokes the two argument functions.
2626
- * @private
2627
- */
2628
- function createChainedFunction(one, two) {
2629
- return function chainedFunction() {
2630
- one.apply(this, arguments);
2631
- two.apply(this, arguments);
2632
- };
2633
  }
2634
 
2635
- /**
2636
- * Binds a method to the component.
2637
- *
2638
- * @param {object} component Component whose method is going to be bound.
2639
- * @param {function} method Method to be bound.
2640
- * @return {function} The bound method.
2641
- */
2642
- function bindAutoBindMethod(component, method) {
2643
- var boundMethod = method.bind(component);
2644
- if (true) {
2645
- boundMethod.__reactBoundContext = component;
2646
- boundMethod.__reactBoundMethod = method;
2647
- boundMethod.__reactBoundArguments = null;
2648
- var componentName = component.constructor.displayName;
2649
- var _bind = boundMethod.bind;
2650
- boundMethod.bind = function(newThis) {
2651
- for (
2652
- var _len = arguments.length,
2653
- args = Array(_len > 1 ? _len - 1 : 0),
2654
- _key = 1;
2655
- _key < _len;
2656
- _key++
2657
- ) {
2658
- args[_key - 1] = arguments[_key];
2659
- }
2660
-
2661
- // User is trying to bind() an autobound method; we effectively will
2662
- // ignore the value of "this" that the user is trying to use, so
2663
- // let's warn.
2664
- if (newThis !== component && newThis !== null) {
2665
- if (true) {
2666
- warning(
2667
- false,
2668
- 'bind(): React component methods may only be bound to the ' +
2669
- 'component instance. See %s',
2670
- componentName
2671
- );
2672
- }
2673
- } else if (!args.length) {
2674
- if (true) {
2675
- warning(
2676
- false,
2677
- 'bind(): You are binding a component method to the component. ' +
2678
- 'React does this for you automatically in a high-performance ' +
2679
- 'way, so you can safely remove this call. See %s',
2680
- componentName
2681
- );
2682
- }
2683
- return boundMethod;
2684
- }
2685
- var reboundMethod = _bind.apply(boundMethod, arguments);
2686
- reboundMethod.__reactBoundContext = component;
2687
- reboundMethod.__reactBoundMethod = method;
2688
- reboundMethod.__reactBoundArguments = args;
2689
- return reboundMethod;
2690
- };
2691
- }
2692
- return boundMethod;
2693
  }
2694
 
2695
- /**
2696
- * Binds all auto-bound methods in a component.
2697
- *
2698
- * @param {object} component Component whose method is going to be bound.
2699
- */
2700
- function bindAutoBindMethods(component) {
2701
- var pairs = component.__reactAutoBindPairs;
2702
- for (var i = 0; i < pairs.length; i += 2) {
2703
- var autoBindKey = pairs[i];
2704
- var method = pairs[i + 1];
2705
- component[autoBindKey] = bindAutoBindMethod(component, method);
2706
- }
2707
- }
2708
 
2709
- var IsMountedPreMixin = {
2710
- componentDidMount: function() {
2711
- this.__isMounted = true;
2712
- }
2713
- };
2714
 
2715
- var IsMountedPostMixin = {
2716
- componentWillUnmount: function() {
2717
- this.__isMounted = false;
2718
- }
2719
- };
 
2720
 
2721
- /**
2722
- * Add more to the ReactClass base class. These are all legacy features and
2723
- * therefore not already part of the modern ReactComponent.
2724
- */
2725
- var ReactClassMixin = {
2726
- /**
2727
- * TODO: This will be deprecated because state should always keep a consistent
2728
- * type signature and the only use case for this, is to avoid that.
2729
- */
2730
- replaceState: function(newState, callback) {
2731
- this.updater.enqueueReplaceState(this, newState, callback);
2732
- },
2733
 
2734
- /**
2735
- * Checks whether or not this composite component is mounted.
2736
- * @return {boolean} True if mounted, false otherwise.
2737
- * @protected
2738
- * @final
2739
- */
2740
- isMounted: function() {
2741
- if (true) {
2742
- warning(
2743
- this.__didWarnIsMounted,
2744
- '%s: isMounted is deprecated. Instead, make sure to clean up ' +
2745
- 'subscriptions and pending requests in componentWillUnmount to ' +
2746
- 'prevent memory leaks.',
2747
- (this.constructor && this.constructor.displayName) ||
2748
- this.name ||
2749
- 'Component'
2750
- );
2751
- this.__didWarnIsMounted = true;
2752
- }
2753
- return !!this.__isMounted;
2754
  }
2755
- };
2756
-
2757
- var ReactClassComponent = function() {};
2758
- _assign(
2759
- ReactClassComponent.prototype,
2760
- ReactComponent.prototype,
2761
- ReactClassMixin
2762
- );
2763
-
2764
- /**
2765
- * Creates a composite component class given a class specification.
2766
- * See https://facebook.github.io/react/docs/top-level-api.html#react.createclass
2767
- *
2768
- * @param {object} spec Class specification (which must define `render`).
2769
- * @return {function} Component constructor function.
2770
- * @public
2771
- */
2772
- function createClass(spec) {
2773
- // To keep our warnings more understandable, we'll use a little hack here to
2774
- // ensure that Constructor.name !== 'Constructor'. This makes sure we don't
2775
- // unnecessarily identify a class without displayName as 'Constructor'.
2776
- var Constructor = identity(function(props, context, updater) {
2777
- // This constructor gets overridden by mocks. The argument is used
2778
- // by mocks to assert on what gets mounted.
2779
-
2780
- if (true) {
2781
- warning(
2782
- this instanceof Constructor,
2783
- 'Something is calling a React component directly. Use a factory or ' +
2784
- 'JSX instead. See: https://fb.me/react-legacyfactory'
2785
- );
2786
- }
2787
-
2788
- // Wire up auto-binding
2789
- if (this.__reactAutoBindPairs.length) {
2790
- bindAutoBindMethods(this);
2791
- }
2792
-
2793
- this.props = props;
2794
- this.context = context;
2795
- this.refs = emptyObject;
2796
- this.updater = updater || ReactNoopUpdateQueue;
2797
 
2798
- this.state = null;
2799
 
2800
- // ReactClasses doesn't have constructors. Instead, they use the
2801
- // getInitialState and componentWillMount methods for initialization.
 
 
 
 
 
2802
 
2803
- var initialState = this.getInitialState ? this.getInitialState() : null;
2804
- if (true) {
2805
- // We allow auto-mocks to proceed as if they're returning null.
2806
- if (
2807
- initialState === undefined &&
2808
- this.getInitialState._isMockFunction
2809
- ) {
2810
- // This is probably bad practice. Consider warning here and
2811
- // deprecating this convenience.
2812
- initialState = null;
2813
- }
2814
- }
2815
- _invariant(
2816
- typeof initialState === 'object' && !Array.isArray(initialState),
2817
- '%s.getInitialState(): must return an object or null',
2818
- Constructor.displayName || 'ReactCompositeComponent'
2819
- );
2820
 
2821
- this.state = initialState;
2822
- });
2823
- Constructor.prototype = new ReactClassComponent();
2824
- Constructor.prototype.constructor = Constructor;
2825
- Constructor.prototype.__reactAutoBindPairs = [];
 
 
2826
 
2827
- injectedMixins.forEach(mixSpecIntoComponent.bind(null, Constructor));
2828
 
2829
- mixSpecIntoComponent(Constructor, IsMountedPreMixin);
2830
- mixSpecIntoComponent(Constructor, spec);
2831
- mixSpecIntoComponent(Constructor, IsMountedPostMixin);
 
2832
 
2833
- // Initialize the defaultProps property after all mixins have been merged.
2834
- if (Constructor.getDefaultProps) {
2835
- Constructor.defaultProps = Constructor.getDefaultProps();
 
2836
  }
2837
-
2838
- if (true) {
2839
- // This is a tag to indicate that the use of these method names is ok,
2840
- // since it's used with createClass. If it's not, then it's likely a
2841
- // mistake so we'll warn you to use the static property, property
2842
- // initializer or constructor respectively.
2843
- if (Constructor.getDefaultProps) {
2844
- Constructor.getDefaultProps.isReactClassApproved = {};
2845
- }
2846
- if (Constructor.prototype.getInitialState) {
2847
- Constructor.prototype.getInitialState.isReactClassApproved = {};
2848
- }
2849
  }
2850
-
2851
- _invariant(
2852
- Constructor.prototype.render,
2853
- 'createClass(...): Class specification must implement a `render` method.'
2854
- );
2855
-
2856
- if (true) {
2857
- warning(
2858
- !Constructor.prototype.componentShouldUpdate,
2859
- '%s has a method called ' +
2860
- 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' +
2861
- 'The name is phrased as a question because the function is ' +
2862
- 'expected to return a value.',
2863
- spec.displayName || 'A component'
2864
- );
2865
- warning(
2866
- !Constructor.prototype.componentWillRecieveProps,
2867
- '%s has a method called ' +
2868
- 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?',
2869
- spec.displayName || 'A component'
2870
- );
2871
  }
2872
-
2873
- // Reduce time spent doing lookups by setting these on the prototype.
2874
- for (var methodName in ReactClassInterface) {
2875
- if (!Constructor.prototype[methodName]) {
2876
- Constructor.prototype[methodName] = null;
2877
- }
2878
  }
 
2879
 
2880
- return Constructor;
2881
- }
2882
 
2883
- return createClass;
2884
- }
2885
 
2886
- module.exports = factory;
 
 
 
 
2887
 
 
 
 
2888
 
2889
- /***/ }),
 
 
 
 
 
 
 
2890
 
2891
- /***/ "./node_modules/desandro-matches-selector/matches-selector.js":
2892
- /*!********************************************************************!*\
2893
- !*** ./node_modules/desandro-matches-selector/matches-selector.js ***!
2894
- \********************************************************************/
2895
- /*! no static exports found */
2896
- /***/ (function(module, exports, __webpack_require__) {
2897
 
2898
- var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
2899
- * matchesSelector v2.0.2
2900
- * matchesSelector( element, '.selector' )
2901
- * MIT license
2902
- */
2903
-
2904
- /*jshint browser: true, strict: true, undef: true, unused: true */
 
 
2905
 
2906
- ( function( window, factory ) {
2907
- /*global define: false, module: false */
2908
- 'use strict';
2909
- // universal module definition
2910
- if ( true ) {
2911
- // AMD
2912
- !(__WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
2913
- __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
2914
- (__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) :
2915
- __WEBPACK_AMD_DEFINE_FACTORY__),
2916
- __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
2917
- } else {}
2918
 
2919
- }( window, function factory() {
2920
- 'use strict';
 
 
 
 
2921
 
2922
- var matchesMethod = ( function() {
2923
- var ElemProto = window.Element.prototype;
2924
- // check for the standard method name first
2925
- if ( ElemProto.matches ) {
2926
- return 'matches';
2927
- }
2928
- // check un-prefixed
2929
- if ( ElemProto.matchesSelector ) {
2930
- return 'matchesSelector';
2931
- }
2932
- // check vendor prefixes
2933
- var prefixes = [ 'webkit', 'moz', 'ms', 'o' ];
 
 
 
 
2934
 
2935
- for ( var i=0; i < prefixes.length; i++ ) {
2936
- var prefix = prefixes[i];
2937
- var method = prefix + 'MatchesSelector';
2938
- if ( ElemProto[ method ] ) {
2939
- return method;
 
 
 
 
 
 
 
 
2940
  }
2941
- }
2942
- })();
 
 
 
 
 
2943
 
2944
- return function matchesSelector( elem, selector ) {
2945
- return elem[ matchesMethod ]( selector );
2946
- };
 
 
 
2947
 
2948
  }));
2949
 
2950
 
2951
  /***/ }),
2952
 
2953
- /***/ "./node_modules/ev-emitter/ev-emitter.js":
2954
- /*!***********************************************!*\
2955
- !*** ./node_modules/ev-emitter/ev-emitter.js ***!
2956
- \***********************************************/
2957
  /*! no static exports found */
2958
  /***/ (function(module, exports, __webpack_require__) {
2959
 
2960
- var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
2961
- * EvEmitter v1.1.0
2962
- * Lil' event emitter
2963
- * MIT License
2964
  */
2965
 
2966
- /* jshint unused: true, undef: true, strict: true */
 
2967
 
2968
- ( function( global, factory ) {
2969
- // universal module definition
2970
- /* jshint strict: false */ /* globals define, module, window */
2971
  if ( true ) {
2972
- // AMD - RequireJS
2973
  !(__WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
2974
  __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
2975
  (__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) :
@@ -2977,23733 +2465,35283 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
2977
  __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
2978
  } else {}
2979
 
2980
- }( typeof window != 'undefined' ? window : this, function() {
 
2981
 
2982
- "use strict";
2983
 
2984
- function EvEmitter() {}
 
 
 
 
 
 
2985
 
2986
- var proto = EvEmitter.prototype;
2987
 
2988
- proto.on = function( eventName, listener ) {
2989
- if ( !eventName || !listener ) {
2990
- return;
2991
- }
2992
- // set events hash
2993
- var events = this._events = this._events || {};
2994
- // set listeners array
2995
- var listeners = events[ eventName ] = events[ eventName ] || [];
2996
- // only add once
2997
- if ( listeners.indexOf( listener ) == -1 ) {
2998
- listeners.push( listener );
2999
- }
3000
 
3001
- return this;
3002
- };
3003
 
3004
- proto.once = function( eventName, listener ) {
3005
- if ( !eventName || !listener ) {
3006
- return;
3007
- }
3008
- // add event
3009
- this.on( eventName, listener );
3010
- // set once flag
3011
- // set onceEvents hash
3012
- var onceEvents = this._onceEvents = this._onceEvents || {};
3013
- // set onceListeners object
3014
- var onceListeners = onceEvents[ eventName ] = onceEvents[ eventName ] || {};
3015
- // set flag
3016
- onceListeners[ listener ] = true;
 
3017
 
3018
- return this;
3019
- };
3020
 
3021
- proto.off = function( eventName, listener ) {
3022
- var listeners = this._events && this._events[ eventName ];
3023
- if ( !listeners || !listeners.length ) {
3024
- return;
3025
- }
3026
- var index = listeners.indexOf( listener );
3027
- if ( index != -1 ) {
3028
- listeners.splice( index, 1 );
 
 
 
 
3029
  }
 
 
3030
 
3031
- return this;
3032
- };
3033
 
3034
- proto.emitEvent = function( eventName, args ) {
3035
- var listeners = this._events && this._events[ eventName ];
3036
- if ( !listeners || !listeners.length ) {
3037
- return;
 
 
 
 
 
 
3038
  }
3039
- // copy over to avoid interference if .off() in listener
3040
- listeners = listeners.slice(0);
3041
- args = args || [];
3042
- // once stuff
3043
- var onceListeners = this._onceEvents && this._onceEvents[ eventName ];
3044
 
3045
- for ( var i=0; i < listeners.length; i++ ) {
3046
- var listener = listeners[i]
3047
- var isOnce = onceListeners && onceListeners[ listener ];
3048
- if ( isOnce ) {
3049
- // remove listener
3050
- // remove before trigger to prevent recursion
3051
- this.off( eventName, listener );
3052
- // unset once flag
3053
- delete onceListeners[ listener ];
3054
- }
3055
- // trigger listener
3056
- listener.apply( this, args );
3057
- }
3058
 
3059
- return this;
3060
- };
3061
-
3062
- proto.allOff = function() {
3063
- delete this._events;
3064
- delete this._onceEvents;
3065
- };
3066
-
3067
- return EvEmitter;
3068
-
3069
- }));
3070
-
3071
-
3072
- /***/ }),
3073
-
3074
- /***/ "./node_modules/fbjs/lib/EventListener.js":
3075
- /*!************************************************!*\
3076
- !*** ./node_modules/fbjs/lib/EventListener.js ***!
3077
- \************************************************/
3078
- /*! no static exports found */
3079
- /***/ (function(module, exports, __webpack_require__) {
3080
-
3081
- "use strict";
3082
 
 
3083
 
3084
  /**
3085
- * Copyright (c) 2013-present, Facebook, Inc.
3086
- *
3087
- * This source code is licensed under the MIT license found in the
3088
- * LICENSE file in the root directory of this source tree.
3089
- *
3090
- * @typechecks
3091
  */
 
 
 
 
 
 
3092
 
3093
- var emptyFunction = __webpack_require__(/*! ./emptyFunction */ "./node_modules/fbjs/lib/emptyFunction.js");
3094
-
3095
- /**
3096
- * Upstream version of event listener. Does not take into account specific
3097
- * nature of platform.
3098
- */
3099
- var EventListener = {
3100
- /**
3101
- * Listen to DOM events during the bubble phase.
3102
- *
3103
- * @param {DOMEventTarget} target DOM element to register listener on.
3104
- * @param {string} eventType Event type, e.g. 'click' or 'mouseover'.
3105
- * @param {function} callback Callback function.
3106
- * @return {object} Object with a `remove` method.
3107
- */
3108
- listen: function listen(target, eventType, callback) {
3109
- if (target.addEventListener) {
3110
- target.addEventListener(eventType, callback, false);
3111
- return {
3112
- remove: function remove() {
3113
- target.removeEventListener(eventType, callback, false);
3114
- }
3115
- };
3116
- } else if (target.attachEvent) {
3117
- target.attachEvent('on' + eventType, callback);
3118
- return {
3119
- remove: function remove() {
3120
- target.detachEvent('on' + eventType, callback);
3121
- }
3122
- };
3123
- }
3124
- },
3125
 
3126
  /**
3127
- * Listen to DOM events during the capture phase.
3128
- *
3129
- * @param {DOMEventTarget} target DOM element to register listener on.
3130
- * @param {string} eventType Event type, e.g. 'click' or 'mouseover'.
3131
- * @param {function} callback Callback function.
3132
- * @return {object} Object with a `remove` method.
3133
  */
3134
- capture: function capture(target, eventType, callback) {
3135
- if (target.addEventListener) {
3136
- target.addEventListener(eventType, callback, true);
3137
- return {
3138
- remove: function remove() {
3139
- target.removeEventListener(eventType, callback, true);
3140
- }
3141
- };
3142
- } else {
3143
- if (true) {
3144
- 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.');
3145
- }
3146
- return {
3147
- remove: emptyFunction
3148
- };
3149
- }
3150
- },
3151
-
3152
- registerDefault: function registerDefault() {}
3153
- };
3154
-
3155
- module.exports = EventListener;
3156
-
3157
- /***/ }),
3158
 
3159
- /***/ "./node_modules/fbjs/lib/ExecutionEnvironment.js":
3160
- /*!*******************************************************!*\
3161
- !*** ./node_modules/fbjs/lib/ExecutionEnvironment.js ***!
3162
- \*******************************************************/
3163
- /*! no static exports found */
3164
- /***/ (function(module, exports, __webpack_require__) {
3165
 
3166
- "use strict";
3167
- /**
3168
- * Copyright (c) 2013-present, Facebook, Inc.
3169
- *
3170
- * This source code is licensed under the MIT license found in the
3171
- * LICENSE file in the root directory of this source tree.
3172
- *
3173
- */
3174
 
 
3175
 
 
 
3176
 
3177
- var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);
 
 
 
3178
 
3179
- /**
3180
- * Simple, lightweight module assisting with the detection and context of
3181
- * Worker. Helps avoid circular dependencies and allows code to reason about
3182
- * whether or not they are in a Worker, even if they never include the main
3183
- * `ReactWorker` dependency.
3184
- */
3185
- var ExecutionEnvironment = {
3186
 
3187
- canUseDOM: canUseDOM,
3188
 
3189
- canUseWorkers: typeof Worker !== 'undefined',
 
 
 
3190
 
3191
- canUseEventListeners: canUseDOM && !!(window.addEventListener || window.attachEvent),
 
 
3192
 
3193
- canUseViewport: canUseDOM && !!window.screen,
3194
 
3195
- isInWorker: !canUseDOM // For now, this is true - might change in the future.
 
 
 
 
 
 
 
3196
 
3197
- };
 
 
 
 
 
3198
 
3199
- module.exports = ExecutionEnvironment;
3200
 
3201
- /***/ }),
 
 
 
 
 
 
3202
 
3203
- /***/ "./node_modules/fbjs/lib/camelize.js":
3204
- /*!*******************************************!*\
3205
- !*** ./node_modules/fbjs/lib/camelize.js ***!
3206
- \*******************************************/
3207
- /*! no static exports found */
3208
- /***/ (function(module, exports, __webpack_require__) {
3209
 
3210
- "use strict";
 
3211
 
 
 
3212
 
3213
- /**
3214
- * Copyright (c) 2013-present, Facebook, Inc.
3215
- *
3216
- * This source code is licensed under the MIT license found in the
3217
- * LICENSE file in the root directory of this source tree.
3218
- *
3219
- * @typechecks
3220
- */
3221
 
3222
- var _hyphenPattern = /-(.)/g;
3223
 
3224
- /**
3225
- * Camelcases a hyphenated string, for example:
3226
- *
3227
- * > camelize('background-color')
3228
- * < "backgroundColor"
3229
- *
3230
- * @param {string} string
3231
- * @return {string}
3232
- */
3233
- function camelize(string) {
3234
- return string.replace(_hyphenPattern, function (_, character) {
3235
- return character.toUpperCase();
3236
- });
3237
- }
3238
 
3239
- module.exports = camelize;
3240
 
3241
  /***/ }),
3242
 
3243
- /***/ "./node_modules/fbjs/lib/camelizeStyleName.js":
3244
- /*!****************************************************!*\
3245
- !*** ./node_modules/fbjs/lib/camelizeStyleName.js ***!
3246
- \****************************************************/
3247
  /*! no static exports found */
3248
  /***/ (function(module, exports, __webpack_require__) {
3249
 
3250
- "use strict";
3251
- /**
3252
- * Copyright (c) 2013-present, Facebook, Inc.
3253
- *
3254
- * This source code is licensed under the MIT license found in the
3255
- * LICENSE file in the root directory of this source tree.
3256
- *
3257
- * @typechecks
3258
  */
3259
 
 
 
3260
 
 
3261
 
3262
- var camelize = __webpack_require__(/*! ./camelize */ "./node_modules/fbjs/lib/camelize.js");
3263
-
3264
- var msPattern = /^-ms-/;
 
 
 
 
 
 
3265
 
3266
- /**
3267
- * Camelcases a hyphenated CSS property name, for example:
3268
- *
3269
- * > camelizeStyleName('background-color')
3270
- * < "backgroundColor"
3271
- * > camelizeStyleName('-moz-transition')
3272
- * < "MozTransition"
3273
- * > camelizeStyleName('-ms-transition')
3274
- * < "msTransition"
3275
- *
3276
- * As Andi Smith suggests
3277
- * (http://www.andismith.com/blog/2012/02/modernizr-prefixed/), an `-ms` prefix
3278
- * is converted to lowercase `ms`.
3279
- *
3280
- * @param {string} string
3281
- * @return {string}
3282
- */
3283
- function camelizeStyleName(string) {
3284
- return camelize(string.replace(msPattern, 'ms-'));
3285
- }
3286
 
3287
- module.exports = camelizeStyleName;
3288
 
3289
- /***/ }),
3290
 
3291
- /***/ "./node_modules/fbjs/lib/containsNode.js":
3292
- /*!***********************************************!*\
3293
- !*** ./node_modules/fbjs/lib/containsNode.js ***!
3294
- \***********************************************/
3295
- /*! no static exports found */
3296
- /***/ (function(module, exports, __webpack_require__) {
3297
 
3298
- "use strict";
 
3299
 
 
3300
 
3301
- /**
3302
- * Copyright (c) 2013-present, Facebook, Inc.
3303
- *
3304
- * This source code is licensed under the MIT license found in the
3305
- * LICENSE file in the root directory of this source tree.
3306
- *
3307
- *
3308
- */
3309
 
3310
- var isTextNode = __webpack_require__(/*! ./isTextNode */ "./node_modules/fbjs/lib/isTextNode.js");
3311
 
3312
- /*eslint-disable no-bitwise */
 
 
 
 
 
3313
 
3314
- /**
3315
- * Checks if a given DOM node contains or is another DOM node.
3316
- */
3317
- function containsNode(outerNode, innerNode) {
3318
- if (!outerNode || !innerNode) {
3319
- return false;
3320
- } else if (outerNode === innerNode) {
3321
- return true;
3322
- } else if (isTextNode(outerNode)) {
3323
- return false;
3324
- } else if (isTextNode(innerNode)) {
3325
- return containsNode(outerNode, innerNode.parentNode);
3326
- } else if ('contains' in outerNode) {
3327
- return outerNode.contains(innerNode);
3328
- } else if (outerNode.compareDocumentPosition) {
3329
- return !!(outerNode.compareDocumentPosition(innerNode) & 16);
3330
- } else {
3331
- return false;
3332
  }
 
 
 
3333
  }
3334
 
3335
- module.exports = containsNode;
3336
-
3337
- /***/ }),
3338
-
3339
- /***/ "./node_modules/fbjs/lib/createArrayFromMixed.js":
3340
- /*!*******************************************************!*\
3341
- !*** ./node_modules/fbjs/lib/createArrayFromMixed.js ***!
3342
- \*******************************************************/
3343
- /*! no static exports found */
3344
- /***/ (function(module, exports, __webpack_require__) {
3345
-
3346
- "use strict";
3347
-
3348
-
3349
- /**
3350
- * Copyright (c) 2013-present, Facebook, Inc.
3351
- *
3352
- * This source code is licensed under the MIT license found in the
3353
- * LICENSE file in the root directory of this source tree.
3354
- *
3355
- * @typechecks
3356
- */
3357
-
3358
- var invariant = __webpack_require__(/*! ./invariant */ "./node_modules/fbjs/lib/invariant.js");
3359
 
3360
  /**
3361
- * Convert array-like objects to arrays.
3362
- *
3363
- * This API assumes the caller knows the contents of the data type. For less
3364
- * well defined inputs use createArrayFromMixed.
3365
- *
3366
- * @param {object|function|filelist} obj
3367
- * @return {array}
3368
  */
3369
- function toArray(obj) {
3370
- var length = obj.length;
3371
-
3372
- // Some browsers builtin objects can report typeof 'function' (e.g. NodeList
3373
- // in old versions of Safari).
3374
- !(!Array.isArray(obj) && (typeof obj === 'object' || typeof obj === 'function')) ? true ? invariant(false, 'toArray: Array-like object expected') : undefined : void 0;
3375
-
3376
- !(typeof length === 'number') ? true ? invariant(false, 'toArray: Object needs a length property') : undefined : void 0;
3377
-
3378
- !(length === 0 || length - 1 in obj) ? true ? invariant(false, 'toArray: Object should have keys for indices') : undefined : void 0;
3379
-
3380
- !(typeof obj.callee !== 'function') ? true ? invariant(false, 'toArray: Object can\'t be `arguments`. Use rest params ' + '(function(...args) {}) or Array.from() instead.') : undefined : void 0;
 
 
 
3381
 
3382
- // Old IE doesn't give collections access to hasOwnProperty. Assume inputs
3383
- // without method will throw during the slice call and skip straight to the
3384
- // fallback.
3385
- if (obj.hasOwnProperty) {
3386
- try {
3387
- return Array.prototype.slice.call(obj);
3388
- } catch (e) {
3389
- // IE < 9 does not support Array#slice on collections objects
3390
- }
3391
  }
3392
 
3393
- // Fall back to copying key by key. This assumes all keys have a value,
3394
- // so will not preserve sparsely populated inputs.
3395
- var ret = Array(length);
3396
- for (var ii = 0; ii < length; ii++) {
3397
- ret[ii] = obj[ii];
3398
  }
3399
- return ret;
3400
- }
3401
 
3402
- /**
3403
- * Perform a heuristic test to determine if an object is "array-like".
3404
- *
3405
- * A monk asked Joshu, a Zen master, "Has a dog Buddha nature?"
3406
- * Joshu replied: "Mu."
3407
- *
3408
- * This function determines if its argument has "array nature": it returns
3409
- * true if the argument is an actual array, an `arguments' object, or an
3410
- * HTMLCollection (e.g. node.childNodes or node.getElementsByTagName()).
3411
- *
3412
- * It will return false for other array-like objects like Filelist.
3413
- *
3414
- * @param {*} obj
3415
- * @return {boolean}
3416
- */
3417
- function hasArrayNature(obj) {
3418
- return (
3419
- // not null/false
3420
- !!obj && (
3421
- // arrays are objects, NodeLists are functions in Safari
3422
- typeof obj == 'object' || typeof obj == 'function') &&
3423
- // quacks like an array
3424
- 'length' in obj &&
3425
- // not window
3426
- !('setInterval' in obj) &&
3427
- // no DOM node should be considered an array-like
3428
- // a 'select' element has 'length' and 'item' properties on IE8
3429
- typeof obj.nodeType != 'number' && (
3430
- // a real array
3431
- Array.isArray(obj) ||
3432
- // arguments
3433
- 'callee' in obj ||
3434
- // HTMLCollection/NodeList
3435
- 'item' in obj)
3436
- );
3437
- }
3438
 
3439
- /**
3440
- * Ensure that the argument is an array by wrapping it in an array if it is not.
3441
- * Creates a copy of the argument if it is already an array.
3442
- *
3443
- * This is mostly useful idiomatically:
3444
- *
3445
- * var createArrayFromMixed = require('createArrayFromMixed');
3446
- *
3447
- * function takesOneOrMoreThings(things) {
3448
- * things = createArrayFromMixed(things);
3449
- * ...
3450
- * }
3451
- *
3452
- * This allows you to treat `things' as an array, but accept scalars in the API.
3453
- *
3454
- * If you need to convert an array-like object, like `arguments`, into an array
3455
- * use toArray instead.
3456
- *
3457
- * @param {*} obj
3458
- * @return {array}
3459
- */
3460
- function createArrayFromMixed(obj) {
3461
- if (!hasArrayNature(obj)) {
3462
- return [obj];
3463
- } else if (Array.isArray(obj)) {
3464
- return obj.slice();
3465
- } else {
3466
- return toArray(obj);
3467
  }
3468
- }
3469
 
3470
- module.exports = createArrayFromMixed;
 
 
3471
 
3472
- /***/ }),
3473
 
3474
- /***/ "./node_modules/fbjs/lib/createNodesFromMarkup.js":
3475
- /*!********************************************************!*\
3476
- !*** ./node_modules/fbjs/lib/createNodesFromMarkup.js ***!
3477
- \********************************************************/
3478
- /*! no static exports found */
3479
- /***/ (function(module, exports, __webpack_require__) {
3480
 
3481
- "use strict";
 
3482
 
 
 
 
3483
 
3484
  /**
3485
- * Copyright (c) 2013-present, Facebook, Inc.
3486
- *
3487
- * This source code is licensed under the MIT license found in the
3488
- * LICENSE file in the root directory of this source tree.
3489
- *
3490
- * @typechecks
3491
  */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3492
 
3493
- /*eslint-disable fb-www/unsafe-html*/
 
 
 
 
 
 
 
 
3494
 
3495
- var ExecutionEnvironment = __webpack_require__(/*! ./ExecutionEnvironment */ "./node_modules/fbjs/lib/ExecutionEnvironment.js");
 
 
 
 
3496
 
3497
- var createArrayFromMixed = __webpack_require__(/*! ./createArrayFromMixed */ "./node_modules/fbjs/lib/createArrayFromMixed.js");
3498
- var getMarkupWrap = __webpack_require__(/*! ./getMarkupWrap */ "./node_modules/fbjs/lib/getMarkupWrap.js");
3499
- var invariant = __webpack_require__(/*! ./invariant */ "./node_modules/fbjs/lib/invariant.js");
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3500
 
3501
  /**
3502
- * Dummy container used to render all markup.
3503
  */
3504
- var dummyNode = ExecutionEnvironment.canUseDOM ? document.createElement('div') : null;
 
 
 
3505
 
3506
- /**
3507
- * Pattern used by `getNodeName`.
3508
- */
3509
- var nodeNamePattern = /^\s*<(\w+)/;
3510
 
3511
- /**
3512
- * Extracts the `nodeName` of the first element in a string of markup.
3513
- *
3514
- * @param {string} markup String of markup.
3515
- * @return {?string} Node name of the supplied markup.
3516
- */
3517
- function getNodeName(markup) {
3518
- var nodeNameMatch = markup.match(nodeNamePattern);
3519
- return nodeNameMatch && nodeNameMatch[1].toLowerCase();
3520
- }
3521
 
3522
- /**
3523
- * Creates an array containing the nodes rendered from the supplied markup. The
3524
- * optionally supplied `handleScript` function will be invoked once for each
3525
- * <script> element that is rendered. If no `handleScript` function is supplied,
3526
- * an exception is thrown if any <script> elements are rendered.
3527
- *
3528
- * @param {string} markup A string of valid HTML markup.
3529
- * @param {?function} handleScript Invoked once for each rendered <script>.
3530
- * @return {array<DOMElement|DOMTextNode>} An array of rendered nodes.
3531
- */
3532
- function createNodesFromMarkup(markup, handleScript) {
3533
- var node = dummyNode;
3534
- !!!dummyNode ? true ? invariant(false, 'createNodesFromMarkup dummy not initialized') : undefined : void 0;
3535
- var nodeName = getNodeName(markup);
3536
 
3537
- var wrap = nodeName && getMarkupWrap(nodeName);
3538
- if (wrap) {
3539
- node.innerHTML = wrap[1] + markup + wrap[2];
 
 
3540
 
3541
- var wrapDepth = wrap[0];
3542
- while (wrapDepth--) {
3543
- node = node.lastChild;
3544
- }
3545
- } else {
3546
- node.innerHTML = markup;
 
 
 
 
 
3547
  }
3548
 
3549
- var scripts = node.getElementsByTagName('script');
3550
- if (scripts.length) {
3551
- !handleScript ? true ? invariant(false, 'createNodesFromMarkup(...): Unexpected <script> element rendered.') : undefined : void 0;
3552
- createArrayFromMixed(scripts).forEach(handleScript);
3553
  }
 
3554
 
3555
- var nodes = Array.from(node.childNodes);
3556
- while (node.lastChild) {
3557
- node.removeChild(node.lastChild);
 
 
 
 
 
3558
  }
3559
- return nodes;
3560
- }
3561
 
3562
- module.exports = createNodesFromMarkup;
3563
 
3564
- /***/ }),
 
 
3565
 
3566
- /***/ "./node_modules/fbjs/lib/emptyFunction.js":
3567
- /*!************************************************!*\
3568
- !*** ./node_modules/fbjs/lib/emptyFunction.js ***!
3569
- \************************************************/
3570
- /*! no static exports found */
3571
- /***/ (function(module, exports, __webpack_require__) {
3572
 
3573
- "use strict";
 
 
 
 
 
 
 
 
3574
 
 
 
 
 
 
 
 
 
 
3575
 
3576
- /**
3577
- * Copyright (c) 2013-present, Facebook, Inc.
3578
- *
3579
- * This source code is licensed under the MIT license found in the
3580
- * LICENSE file in the root directory of this source tree.
3581
- *
3582
- *
3583
- */
3584
 
3585
- function makeEmptyFunction(arg) {
3586
- return function () {
3587
- return arg;
3588
- };
3589
- }
3590
 
3591
- /**
3592
- * This function accepts and discards inputs; it has no side effects. This is
3593
- * primarily useful idiomatically for overridable function endpoints which
3594
- * always need to be callable, since JS lacks a null-call idiom ala Cocoa.
3595
- */
3596
- var emptyFunction = function emptyFunction() {};
3597
 
3598
- emptyFunction.thatReturns = makeEmptyFunction;
3599
- emptyFunction.thatReturnsFalse = makeEmptyFunction(false);
3600
- emptyFunction.thatReturnsTrue = makeEmptyFunction(true);
3601
- emptyFunction.thatReturnsNull = makeEmptyFunction(null);
3602
- emptyFunction.thatReturnsThis = function () {
3603
- return this;
3604
- };
3605
- emptyFunction.thatReturnsArgument = function (arg) {
3606
- return arg;
3607
  };
3608
 
3609
- module.exports = emptyFunction;
3610
-
3611
- /***/ }),
3612
-
3613
- /***/ "./node_modules/fbjs/lib/emptyObject.js":
3614
- /*!**********************************************!*\
3615
- !*** ./node_modules/fbjs/lib/emptyObject.js ***!
3616
- \**********************************************/
3617
- /*! no static exports found */
3618
- /***/ (function(module, exports, __webpack_require__) {
3619
-
3620
- "use strict";
3621
- /**
3622
- * Copyright (c) 2013-present, Facebook, Inc.
3623
- *
3624
- * This source code is licensed under the MIT license found in the
3625
- * LICENSE file in the root directory of this source tree.
3626
- *
3627
- */
3628
 
 
 
 
 
3629
 
 
 
 
 
 
 
3630
 
3631
- var emptyObject = {};
3632
 
3633
- if (true) {
3634
- Object.freeze(emptyObject);
 
 
3635
  }
3636
 
3637
- module.exports = emptyObject;
3638
-
3639
- /***/ }),
3640
-
3641
- /***/ "./node_modules/fbjs/lib/focusNode.js":
3642
- /*!********************************************!*\
3643
- !*** ./node_modules/fbjs/lib/focusNode.js ***!
3644
- \********************************************/
3645
- /*! no static exports found */
3646
- /***/ (function(module, exports, __webpack_require__) {
3647
-
3648
- "use strict";
3649
- /**
3650
- * Copyright (c) 2013-present, Facebook, Inc.
3651
- *
3652
- * This source code is licensed under the MIT license found in the
3653
- * LICENSE file in the root directory of this source tree.
3654
- *
3655
- */
3656
-
3657
-
3658
-
3659
- /**
3660
- * @param {DOMElement} node input/textarea to focus
3661
- */
3662
-
3663
- function focusNode(node) {
3664
- // IE8 can throw "Can't move focus to the control because it is invisible,
3665
- // not enabled, or of a type that does not accept the focus." for all kinds of
3666
- // reasons that are too expensive and fragile to test.
3667
- try {
3668
- node.focus();
3669
- } catch (e) {}
3670
- }
3671
 
3672
- module.exports = focusNode;
 
 
 
 
 
 
 
 
 
 
3673
 
3674
- /***/ }),
 
 
 
3675
 
3676
- /***/ "./node_modules/fbjs/lib/getActiveElement.js":
3677
- /*!***************************************************!*\
3678
- !*** ./node_modules/fbjs/lib/getActiveElement.js ***!
3679
- \***************************************************/
3680
- /*! no static exports found */
3681
- /***/ (function(module, exports, __webpack_require__) {
3682
 
3683
- "use strict";
3684
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3685
 
3686
- /**
3687
- * Copyright (c) 2013-present, Facebook, Inc.
3688
- *
3689
- * This source code is licensed under the MIT license found in the
3690
- * LICENSE file in the root directory of this source tree.
3691
- *
3692
- * @typechecks
3693
- */
3694
 
3695
- /* eslint-disable fb-www/typeof-undefined */
3696
 
3697
- /**
3698
- * Same as document.activeElement but wraps in a try-catch block. In IE it is
3699
- * not safe to call document.activeElement if there is nothing focused.
3700
- *
3701
- * The activeElement will be null only if the document or document body is not
3702
- * yet defined.
3703
- *
3704
- * @param {?DOMDocument} doc Defaults to current document.
3705
- * @return {?DOMElement}
3706
- */
3707
- function getActiveElement(doc) /*?DOMElement*/{
3708
- doc = doc || (typeof document !== 'undefined' ? document : undefined);
3709
- if (typeof doc === 'undefined') {
3710
- return null;
3711
- }
3712
- try {
3713
- return doc.activeElement || doc.body;
3714
- } catch (e) {
3715
- return doc.body;
3716
- }
3717
- }
3718
 
3719
- module.exports = getActiveElement;
3720
 
3721
  /***/ }),
3722
 
3723
- /***/ "./node_modules/fbjs/lib/getMarkupWrap.js":
3724
  /*!************************************************!*\
3725
- !*** ./node_modules/fbjs/lib/getMarkupWrap.js ***!
3726
  \************************************************/
3727
  /*! no static exports found */
3728
  /***/ (function(module, exports, __webpack_require__) {
3729
 
3730
- "use strict";
3731
-
3732
-
3733
- /**
3734
- * Copyright (c) 2013-present, Facebook, Inc.
3735
- *
3736
- * This source code is licensed under the MIT license found in the
3737
- * LICENSE file in the root directory of this source tree.
3738
- *
3739
  */
3740
 
3741
- /*eslint-disable fb-www/unsafe-html */
3742
-
3743
- var ExecutionEnvironment = __webpack_require__(/*! ./ExecutionEnvironment */ "./node_modules/fbjs/lib/ExecutionEnvironment.js");
 
 
 
 
 
 
 
 
 
 
3744
 
3745
- var invariant = __webpack_require__(/*! ./invariant */ "./node_modules/fbjs/lib/invariant.js");
3746
 
3747
- /**
3748
- * Dummy container used to detect which wraps are necessary.
3749
- */
3750
- var dummyNode = ExecutionEnvironment.canUseDOM ? document.createElement('div') : null;
3751
 
3752
- /**
3753
- * Some browsers cannot use `innerHTML` to render certain elements standalone,
3754
- * so we wrap them, render the wrapped nodes, then extract the desired node.
3755
- *
3756
- * In IE8, certain elements cannot render alone, so wrap all elements ('*').
3757
- */
3758
 
3759
- var shouldWrap = {};
 
 
 
3760
 
3761
- var selectWrap = [1, '<select multiple="true">', '</select>'];
3762
- var tableWrap = [1, '<table>', '</table>'];
3763
- var trWrap = [3, '<table><tbody><tr>', '</tr></tbody></table>'];
3764
 
3765
- var svgWrap = [1, '<svg xmlns="http://www.w3.org/2000/svg">', '</svg>'];
 
 
 
 
3766
 
3767
- var markupWrap = {
3768
- '*': [1, '?<div>', '</div>'],
 
 
 
3769
 
3770
- 'area': [1, '<map>', '</map>'],
3771
- 'col': [2, '<table><tbody></tbody><colgroup>', '</colgroup></table>'],
3772
- 'legend': [1, '<fieldset>', '</fieldset>'],
3773
- 'param': [1, '<object>', '</object>'],
3774
- 'tr': [2, '<table><tbody>', '</tbody></table>'],
3775
 
3776
- 'optgroup': selectWrap,
3777
- 'option': selectWrap,
 
 
 
 
 
 
 
 
 
3778
 
3779
- 'caption': tableWrap,
3780
- 'colgroup': tableWrap,
3781
- 'tbody': tableWrap,
3782
- 'tfoot': tableWrap,
3783
- 'thead': tableWrap,
3784
 
3785
- 'td': trWrap,
3786
- 'th': trWrap
3787
- };
 
 
 
 
 
 
 
3788
 
3789
- // Initialize the SVG elements since we know they'll always need to be wrapped
3790
- // consistently. If they are created inside a <div> they will be initialized in
3791
- // the wrong namespace (and will not display).
3792
- var svgElements = ['circle', 'clipPath', 'defs', 'ellipse', 'g', 'image', 'line', 'linearGradient', 'mask', 'path', 'pattern', 'polygon', 'polyline', 'radialGradient', 'rect', 'stop', 'text', 'tspan'];
3793
- svgElements.forEach(function (nodeName) {
3794
- markupWrap[nodeName] = svgWrap;
3795
- shouldWrap[nodeName] = true;
3796
- });
 
3797
 
3798
- /**
3799
- * Gets the markup wrap configuration for the supplied `nodeName`.
3800
- *
3801
- * NOTE: This lazily detects which wraps are necessary for the current browser.
3802
- *
3803
- * @param {string} nodeName Lowercase `nodeName`.
3804
- * @return {?array} Markup wrap configuration, if applicable.
3805
- */
3806
- function getMarkupWrap(nodeName) {
3807
- !!!dummyNode ? true ? invariant(false, 'Markup wrapping node not initialized') : undefined : void 0;
3808
- if (!markupWrap.hasOwnProperty(nodeName)) {
3809
- nodeName = '*';
3810
- }
3811
- if (!shouldWrap.hasOwnProperty(nodeName)) {
3812
- if (nodeName === '*') {
3813
- dummyNode.innerHTML = '<link />';
3814
- } else {
3815
- dummyNode.innerHTML = '<' + nodeName + '></' + nodeName + '>';
 
 
 
 
3816
  }
3817
- shouldWrap[nodeName] = !dummyNode.firstChild;
3818
- }
3819
- return shouldWrap[nodeName] ? markupWrap[nodeName] : null;
3820
- }
3821
 
3822
- module.exports = getMarkupWrap;
 
3823
 
3824
- /***/ }),
 
 
 
3825
 
3826
- /***/ "./node_modules/fbjs/lib/getUnboundedScrollPosition.js":
3827
- /*!*************************************************************!*\
3828
- !*** ./node_modules/fbjs/lib/getUnboundedScrollPosition.js ***!
3829
- \*************************************************************/
3830
- /*! no static exports found */
3831
- /***/ (function(module, exports, __webpack_require__) {
3832
 
3833
- "use strict";
3834
- /**
3835
- * Copyright (c) 2013-present, Facebook, Inc.
3836
- *
3837
- * This source code is licensed under the MIT license found in the
3838
- * LICENSE file in the root directory of this source tree.
3839
- *
3840
- * @typechecks
3841
- */
3842
 
 
 
 
 
 
 
 
 
 
3843
 
 
 
 
 
 
 
 
 
 
3844
 
3845
- /**
3846
- * Gets the scroll position of the supplied element or window.
3847
- *
3848
- * The return values are unbounded, unlike `getScrollPosition`. This means they
3849
- * may be negative or exceed the element boundaries (which is possible using
3850
- * inertial scrolling).
3851
- *
3852
- * @param {DOMWindow|DOMElement} scrollable
3853
- * @return {object} Map with `x` and `y` keys.
3854
- */
3855
 
3856
- function getUnboundedScrollPosition(scrollable) {
3857
- if (scrollable.Window && scrollable instanceof scrollable.Window) {
3858
  return {
3859
- x: scrollable.pageXOffset || scrollable.document.documentElement.scrollLeft,
3860
- y: scrollable.pageYOffset || scrollable.document.documentElement.scrollTop
3861
  };
3862
- }
3863
- return {
3864
- x: scrollable.scrollLeft,
3865
- y: scrollable.scrollTop
3866
  };
3867
- }
3868
 
3869
- module.exports = getUnboundedScrollPosition;
 
 
 
 
 
 
 
 
 
 
 
 
 
3870
 
3871
- /***/ }),
 
 
 
 
 
 
3872
 
3873
- /***/ "./node_modules/fbjs/lib/hyphenate.js":
3874
- /*!********************************************!*\
3875
- !*** ./node_modules/fbjs/lib/hyphenate.js ***!
3876
- \********************************************/
3877
- /*! no static exports found */
3878
- /***/ (function(module, exports, __webpack_require__) {
3879
 
3880
- "use strict";
 
 
3881
 
 
 
3882
 
3883
- /**
3884
- * Copyright (c) 2013-present, Facebook, Inc.
3885
- *
3886
- * This source code is licensed under the MIT license found in the
3887
- * LICENSE file in the root directory of this source tree.
3888
- *
3889
- * @typechecks
3890
- */
 
 
 
 
 
3891
 
3892
- var _uppercasePattern = /([A-Z])/g;
 
 
 
 
3893
 
3894
- /**
3895
- * Hyphenates a camelcased string, for example:
3896
- *
3897
- * > hyphenate('backgroundColor')
3898
- * < "background-color"
3899
- *
3900
- * For CSS style names, use `hyphenateStyleName` instead which works properly
3901
- * with all vendor prefixes, including `ms`.
3902
- *
3903
- * @param {string} string
3904
- * @return {string}
3905
- */
3906
- function hyphenate(string) {
3907
- return string.replace(_uppercasePattern, '-$1').toLowerCase();
3908
- }
3909
 
3910
- module.exports = hyphenate;
3911
 
3912
  /***/ }),
3913
 
3914
- /***/ "./node_modules/fbjs/lib/hyphenateStyleName.js":
3915
- /*!*****************************************************!*\
3916
- !*** ./node_modules/fbjs/lib/hyphenateStyleName.js ***!
3917
- \*****************************************************/
3918
  /*! no static exports found */
3919
  /***/ (function(module, exports, __webpack_require__) {
3920
 
3921
  "use strict";
3922
- /**
3923
- * Copyright (c) 2013-present, Facebook, Inc.
3924
- *
3925
- * This source code is licensed under the MIT license found in the
3926
- * LICENSE file in the root directory of this source tree.
3927
- *
3928
- * @typechecks
3929
- */
3930
-
3931
 
3932
 
3933
- var hyphenate = __webpack_require__(/*! ./hyphenate */ "./node_modules/fbjs/lib/hyphenate.js");
 
 
 
3934
 
3935
- var msPattern = /^ms-/;
 
 
 
3936
 
3937
- /**
3938
- * Hyphenates a camelcased CSS property name, for example:
3939
- *
3940
- * > hyphenateStyleName('backgroundColor')
3941
- * < "background-color"
3942
- * > hyphenateStyleName('MozTransition')
3943
- * < "-moz-transition"
3944
- * > hyphenateStyleName('msTransition')
3945
- * < "-ms-transition"
3946
- *
3947
- * As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix
3948
- * is converted to `-ms-`.
3949
- *
3950
- * @param {string} string
3951
- * @return {string}
3952
- */
3953
- function hyphenateStyleName(string) {
3954
- return hyphenate(string).replace(msPattern, '-ms-');
3955
  }
3956
 
3957
- module.exports = hyphenateStyleName;
3958
-
3959
- /***/ }),
3960
-
3961
- /***/ "./node_modules/fbjs/lib/invariant.js":
3962
- /*!********************************************!*\
3963
- !*** ./node_modules/fbjs/lib/invariant.js ***!
3964
- \********************************************/
3965
- /*! no static exports found */
3966
- /***/ (function(module, exports, __webpack_require__) {
3967
-
3968
- "use strict";
3969
- /**
3970
- * Copyright (c) 2013-present, Facebook, Inc.
3971
- *
3972
- * This source code is licensed under the MIT license found in the
3973
- * LICENSE file in the root directory of this source tree.
3974
- *
3975
- */
3976
 
 
3977
 
 
 
 
 
 
 
3978
 
3979
- /**
3980
- * Use invariant() to assert state which your program assumes to be true.
3981
- *
3982
- * Provide sprintf-style format (only %s is supported) and arguments
3983
- * to provide information about what broke and what you were
3984
- * expecting.
3985
- *
3986
- * The invariant message will be stripped in production, but the invariant
3987
- * will remain to ensure logic does not differ in production.
3988
- */
 
3989
 
3990
- var validateFormat = function validateFormat(format) {};
 
 
 
 
 
 
 
 
3991
 
3992
- if (true) {
3993
- validateFormat = function validateFormat(format) {
3994
- if (format === undefined) {
3995
- throw new Error('invariant requires an error message argument');
3996
- }
3997
- };
3998
  }
3999
 
4000
- function invariant(condition, format, a, b, c, d, e, f) {
4001
- validateFormat(format);
 
 
4002
 
4003
- if (!condition) {
4004
- var error;
4005
- if (format === undefined) {
4006
- error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');
4007
- } else {
4008
- var args = [a, b, c, d, e, f];
4009
- var argIndex = 0;
4010
- error = new Error(format.replace(/%s/g, function () {
4011
- return args[argIndex++];
4012
- }));
4013
- error.name = 'Invariant Violation';
4014
- }
4015
 
4016
- error.framesToPop = 1; // we don't care about invariant's own frame
4017
- throw error;
4018
- }
4019
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4020
 
4021
- module.exports = invariant;
4022
 
4023
  /***/ }),
4024
 
4025
- /***/ "./node_modules/fbjs/lib/isNode.js":
4026
- /*!*****************************************!*\
4027
- !*** ./node_modules/fbjs/lib/isNode.js ***!
4028
- \*****************************************/
4029
  /*! no static exports found */
4030
  /***/ (function(module, exports, __webpack_require__) {
4031
 
4032
- "use strict";
4033
-
4034
-
4035
- /**
4036
- * Copyright (c) 2013-present, Facebook, Inc.
4037
- *
4038
- * This source code is licensed under the MIT license found in the
4039
- * LICENSE file in the root directory of this source tree.
4040
- *
4041
- * @typechecks
4042
- */
4043
-
4044
- /**
4045
- * @param {*} object The object to check.
4046
- * @return {boolean} Whether or not the object is a DOM node.
4047
  */
4048
- function isNode(object) {
4049
- var doc = object ? object.ownerDocument || object : document;
4050
- var defaultView = doc.defaultView || window;
4051
- return !!(object && (typeof defaultView.Node === 'function' ? object instanceof defaultView.Node : typeof object === 'object' && typeof object.nodeType === 'number' && typeof object.nodeName === 'string'));
4052
- }
4053
 
4054
- module.exports = isNode;
 
 
 
 
 
 
 
 
 
 
 
 
4055
 
4056
- /***/ }),
 
4057
 
4058
- /***/ "./node_modules/fbjs/lib/isTextNode.js":
4059
- /*!*********************************************!*\
4060
- !*** ./node_modules/fbjs/lib/isTextNode.js ***!
4061
- \*********************************************/
4062
- /*! no static exports found */
4063
- /***/ (function(module, exports, __webpack_require__) {
4064
 
4065
- "use strict";
 
 
 
 
 
 
4066
 
 
4067
 
4068
- /**
4069
- * Copyright (c) 2013-present, Facebook, Inc.
4070
- *
4071
- * This source code is licensed under the MIT license found in the
4072
- * LICENSE file in the root directory of this source tree.
4073
- *
4074
- * @typechecks
4075
- */
4076
 
4077
- var isNode = __webpack_require__(/*! ./isNode */ "./node_modules/fbjs/lib/isNode.js");
4078
 
4079
- /**
4080
- * @param {*} object The object to check.
4081
- * @return {boolean} Whether or not the object is a DOM text node.
4082
- */
4083
- function isTextNode(object) {
4084
- return isNode(object) && object.nodeType == 3;
4085
- }
4086
 
4087
- module.exports = isTextNode;
 
 
 
4088
 
4089
- /***/ }),
 
 
 
 
 
 
 
4090
 
4091
- /***/ "./node_modules/fbjs/lib/memoizeStringOnly.js":
4092
- /*!****************************************************!*\
4093
- !*** ./node_modules/fbjs/lib/memoizeStringOnly.js ***!
4094
- \****************************************************/
4095
- /*! no static exports found */
4096
- /***/ (function(module, exports, __webpack_require__) {
4097
 
4098
- "use strict";
4099
- /**
4100
- * Copyright (c) 2013-present, Facebook, Inc.
4101
- *
4102
- * This source code is licensed under the MIT license found in the
4103
- * LICENSE file in the root directory of this source tree.
4104
- *
4105
- *
4106
- * @typechecks static-only
4107
- */
4108
 
 
 
 
 
 
 
 
4109
 
 
 
4110
 
4111
- /**
4112
- * Memoizes the return value of a function that accepts one string argument.
4113
- */
4114
 
4115
- function memoizeStringOnly(callback) {
4116
- var cache = {};
4117
- return function (string) {
4118
- if (!cache.hasOwnProperty(string)) {
4119
- cache[string] = callback.call(this, string);
4120
- }
4121
- return cache[string];
4122
  };
4123
- }
4124
 
4125
- module.exports = memoizeStringOnly;
 
 
 
4126
 
4127
- /***/ }),
 
 
 
 
 
 
4128
 
4129
- /***/ "./node_modules/fbjs/lib/performance.js":
4130
- /*!**********************************************!*\
4131
- !*** ./node_modules/fbjs/lib/performance.js ***!
4132
- \**********************************************/
4133
- /*! no static exports found */
4134
- /***/ (function(module, exports, __webpack_require__) {
4135
 
4136
- "use strict";
4137
  /**
4138
- * Copyright (c) 2013-present, Facebook, Inc.
4139
- *
4140
- * This source code is licensed under the MIT license found in the
4141
- * LICENSE file in the root directory of this source tree.
4142
- *
4143
- * @typechecks
4144
  */
 
 
4145
 
 
 
 
 
 
 
4146
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4147
 
4148
- var ExecutionEnvironment = __webpack_require__(/*! ./ExecutionEnvironment */ "./node_modules/fbjs/lib/ExecutionEnvironment.js");
4149
-
4150
- var performance;
4151
-
4152
- if (ExecutionEnvironment.canUseDOM) {
4153
- performance = window.performance || window.msPerformance || window.webkitPerformance;
4154
- }
4155
 
4156
- module.exports = performance || {};
 
 
 
 
 
4157
 
4158
- /***/ }),
 
 
 
4159
 
4160
- /***/ "./node_modules/fbjs/lib/performanceNow.js":
4161
- /*!*************************************************!*\
4162
- !*** ./node_modules/fbjs/lib/performanceNow.js ***!
4163
- \*************************************************/
4164
- /*! no static exports found */
4165
- /***/ (function(module, exports, __webpack_require__) {
4166
 
4167
- "use strict";
 
 
 
4168
 
 
 
 
 
 
4169
 
4170
- /**
4171
- * Copyright (c) 2013-present, Facebook, Inc.
4172
- *
4173
- * This source code is licensed under the MIT license found in the
4174
- * LICENSE file in the root directory of this source tree.
4175
- *
4176
- * @typechecks
4177
- */
4178
 
4179
- var performance = __webpack_require__(/*! ./performance */ "./node_modules/fbjs/lib/performance.js");
 
 
 
 
4180
 
4181
- var performanceNow;
 
 
 
 
4182
 
4183
- /**
4184
- * Detect if we can use `window.performance.now()` and gracefully fallback to
4185
- * `Date.now()` if it doesn't exist. We need to support Firefox < 15 for now
4186
- * because of Facebook's testing infrastructure.
4187
- */
4188
- if (performance.now) {
4189
- performanceNow = function performanceNow() {
4190
- return performance.now();
4191
- };
4192
- } else {
4193
- performanceNow = function performanceNow() {
4194
- return Date.now();
4195
- };
4196
- }
4197
 
4198
- module.exports = performanceNow;
4199
 
4200
- /***/ }),
 
4201
 
4202
- /***/ "./node_modules/fbjs/lib/shallowEqual.js":
4203
- /*!***********************************************!*\
4204
- !*** ./node_modules/fbjs/lib/shallowEqual.js ***!
4205
- \***********************************************/
4206
- /*! no static exports found */
4207
- /***/ (function(module, exports, __webpack_require__) {
4208
 
4209
- "use strict";
4210
- /**
4211
- * Copyright (c) 2013-present, Facebook, Inc.
4212
- *
4213
- * This source code is licensed under the MIT license found in the
4214
- * LICENSE file in the root directory of this source tree.
4215
- *
4216
- * @typechecks
4217
- *
4218
- */
 
 
 
 
 
 
 
 
 
 
 
 
4219
 
4220
- /*eslint-disable no-self-compare */
 
 
 
 
4221
 
 
4222
 
 
 
 
 
4223
 
4224
- var hasOwnProperty = Object.prototype.hasOwnProperty;
4225
 
4226
  /**
4227
- * inlined Object.is polyfill to avoid requiring consumers ship their own
4228
- * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
4229
  */
4230
- function is(x, y) {
4231
- // SameValue algorithm
4232
- if (x === y) {
4233
- // Steps 1-5, 7-10
4234
- // Steps 6.b-6.e: +0 != -0
4235
- // Added the nonzero y check to make Flow happy, but it is redundant
4236
- return x !== 0 || y !== 0 || 1 / x === 1 / y;
4237
- } else {
4238
- // Step 6.a: NaN == NaN
4239
- return x !== x && y !== y;
4240
  }
4241
- }
 
 
 
4242
 
4243
  /**
4244
- * Performs equality by iterating through keys on an object and returning false
4245
- * when any key has values which are not strictly equal between the arguments.
4246
- * Returns true when the values of all keys are strictly equal.
 
 
 
4247
  */
4248
- function shallowEqual(objA, objB) {
4249
- if (is(objA, objB)) {
4250
- return true;
 
 
4251
  }
4252
 
4253
- if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {
4254
- return false;
 
 
4255
  }
4256
-
4257
- var keysA = Object.keys(objA);
4258
- var keysB = Object.keys(objB);
4259
-
4260
- if (keysA.length !== keysB.length) {
4261
- return false;
 
4262
  }
4263
 
4264
- // Test for A's keys different from B.
4265
- for (var i = 0; i < keysA.length; i++) {
4266
- if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {
4267
- return false;
4268
- }
 
 
4269
  }
 
 
 
 
4270
 
4271
- return true;
 
 
 
 
 
 
 
 
 
4272
  }
4273
 
4274
- module.exports = shallowEqual;
4275
 
4276
- /***/ }),
 
 
 
 
 
4277
 
4278
- /***/ "./node_modules/fbjs/lib/warning.js":
4279
- /*!******************************************!*\
4280
- !*** ./node_modules/fbjs/lib/warning.js ***!
4281
- \******************************************/
4282
- /*! no static exports found */
4283
- /***/ (function(module, exports, __webpack_require__) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4284
 
4285
- "use strict";
4286
- /**
4287
- * Copyright (c) 2014-present, Facebook, Inc.
4288
- *
4289
- * This source code is licensed under the MIT license found in the
4290
- * LICENSE file in the root directory of this source tree.
4291
- *
4292
- */
4293
 
 
 
 
4294
 
 
 
 
4295
 
4296
- var emptyFunction = __webpack_require__(/*! ./emptyFunction */ "./node_modules/fbjs/lib/emptyFunction.js");
 
 
 
4297
 
4298
- /**
4299
- * Similar to invariant but only logs a warning if the condition is not met.
4300
- * This can be used to log issues in development environments in critical
4301
- * paths. Removing the logging code for production environments will keep the
4302
- * same logic and follow the same code paths.
4303
- */
 
 
4304
 
4305
- var warning = emptyFunction;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4306
 
4307
- if (true) {
4308
- var printWarning = function printWarning(format) {
4309
- for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
4310
- args[_key - 1] = arguments[_key];
4311
- }
4312
 
4313
- var argIndex = 0;
4314
- var message = 'Warning: ' + format.replace(/%s/g, function () {
4315
- return args[argIndex++];
4316
- });
4317
- if (typeof console !== 'undefined') {
4318
- console.error(message);
4319
- }
4320
- try {
4321
- // --- Welcome to debugging React ---
4322
- // This error was thrown as a convenience so that you can use this stack
4323
- // to find the callsite that caused this warning to fire.
4324
- throw new Error(message);
4325
- } catch (x) {}
4326
- };
4327
 
4328
- warning = function warning(condition, format) {
4329
- if (format === undefined) {
4330
- throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');
4331
- }
 
 
 
 
 
 
 
 
4332
 
4333
- if (format.indexOf('Failed Composite propType: ') === 0) {
4334
- return; // Ignore CompositeComponent proptype check.
4335
- }
 
 
4336
 
4337
- if (!condition) {
4338
- for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
4339
- args[_key2 - 2] = arguments[_key2];
4340
- }
4341
 
4342
- printWarning.apply(undefined, [format].concat(args));
4343
- }
4344
- };
4345
- }
4346
 
4347
- module.exports = warning;
 
 
 
4348
 
4349
- /***/ }),
4350
 
4351
- /***/ "./node_modules/fizzy-ui-utils/utils.js":
4352
- /*!**********************************************!*\
4353
- !*** ./node_modules/fizzy-ui-utils/utils.js ***!
4354
- \**********************************************/
4355
- /*! no static exports found */
4356
- /***/ (function(module, exports, __webpack_require__) {
4357
-
4358
- var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
4359
- * Fizzy UI utils v2.0.7
4360
- * MIT license
4361
- */
4362
-
4363
- /*jshint browser: true, undef: true, unused: true, strict: true */
4364
-
4365
- ( function( window, factory ) {
4366
- // universal module definition
4367
- /*jshint strict: false */ /*globals define, module, require */
4368
 
4369
- if ( true ) {
4370
- // AMD
4371
- !(__WEBPACK_AMD_DEFINE_ARRAY__ = [
4372
- __webpack_require__(/*! desandro-matches-selector/matches-selector */ "./node_modules/desandro-matches-selector/matches-selector.js")
4373
- ], __WEBPACK_AMD_DEFINE_RESULT__ = (function( matchesSelector ) {
4374
- return factory( window, matchesSelector );
4375
- }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
4376
- __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
4377
- } else {}
4378
 
4379
- }( window, function factory( window, matchesSelector ) {
 
 
 
 
 
4380
 
4381
- 'use strict';
 
 
 
4382
 
4383
- var utils = {};
4384
 
4385
- // ----- extend ----- //
 
 
4386
 
4387
- // extends objects
4388
- utils.extend = function( a, b ) {
4389
- for ( var prop in b ) {
4390
- a[ prop ] = b[ prop ];
4391
- }
4392
- return a;
4393
  };
4394
 
4395
- // ----- modulo ----- //
4396
-
4397
- utils.modulo = function( num, div ) {
4398
- return ( ( num % div ) + div ) % div;
 
 
4399
  };
4400
 
4401
- // ----- makeArray ----- //
4402
-
4403
- var arraySlice = Array.prototype.slice;
4404
-
4405
- // turn element or nodeList into an array
4406
- utils.makeArray = function( obj ) {
4407
- if ( Array.isArray( obj ) ) {
4408
- // use object if already an array
4409
- return obj;
4410
- }
4411
- // return empty array if undefined or null. #6
4412
- if ( obj === null || obj === undefined ) {
4413
- return [];
4414
  }
4415
-
4416
- var isArrayLike = typeof obj == 'object' && typeof obj.length == 'number';
4417
- if ( isArrayLike ) {
4418
- // convert nodeList to array
4419
- return arraySlice.call( obj );
4420
  }
4421
-
4422
- // array of single index
4423
- return [ obj ];
4424
  };
4425
 
4426
- // ----- removeFrom ----- //
 
 
 
 
4427
 
4428
- utils.removeFrom = function( ary, obj ) {
4429
- var index = ary.indexOf( obj );
4430
- if ( index != -1 ) {
4431
- ary.splice( index, 1 );
4432
- }
4433
- };
4434
 
4435
- // ----- getParent ----- //
 
 
4436
 
4437
- utils.getParent = function( elem, selector ) {
4438
- while ( elem.parentNode && elem != document.body ) {
4439
- elem = elem.parentNode;
4440
- if ( matchesSelector( elem, selector ) ) {
4441
- return elem;
4442
- }
4443
- }
4444
  };
4445
 
4446
- // ----- getQueryElement ----- //
4447
-
4448
- // use element as selector string
4449
- utils.getQueryElement = function( elem ) {
4450
- if ( typeof elem == 'string' ) {
4451
- return document.querySelector( elem );
4452
  }
4453
- return elem;
4454
  };
4455
 
4456
- // ----- handleEvent ----- //
4457
-
4458
- // enable .ontype to trigger from .addEventListener( elem, 'type' )
4459
- utils.handleEvent = function( event ) {
4460
- var method = 'on' + event.type;
4461
- if ( this[ method ] ) {
4462
- this[ method ]( event );
4463
- }
 
 
4464
  };
4465
 
4466
- // ----- filterFindElements ----- //
4467
 
4468
- utils.filterFindElements = function( elems, selector ) {
4469
- // make array of elems
4470
- elems = utils.makeArray( elems );
4471
- var ffElems = [];
4472
 
4473
- elems.forEach( function( elem ) {
4474
- // check that elem is an actual element
4475
- if ( !( elem instanceof HTMLElement ) ) {
4476
- return;
4477
- }
4478
- // add elem if no selector
4479
- if ( !selector ) {
4480
- ffElems.push( elem );
4481
- return;
4482
- }
4483
- // filter & find items if we have a selector
4484
- // filter
4485
- if ( matchesSelector( elem, selector ) ) {
4486
- ffElems.push( elem );
4487
- }
4488
- // find children
4489
- var childElems = elem.querySelectorAll( selector );
4490
- // concat childElems to filterFound array
4491
- for ( var i=0; i < childElems.length; i++ ) {
4492
- ffElems.push( childElems[i] );
4493
- }
4494
- });
4495
 
4496
- return ffElems;
4497
- };
4498
 
4499
- // ----- debounceMethod ----- //
 
 
 
 
 
4500
 
4501
- utils.debounceMethod = function( _class, methodName, threshold ) {
4502
- threshold = threshold || 100;
4503
- // original method
4504
- var method = _class.prototype[ methodName ];
4505
- var timeoutName = methodName + 'Timeout';
4506
 
4507
- _class.prototype[ methodName ] = function() {
4508
- var timeout = this[ timeoutName ];
4509
- clearTimeout( timeout );
 
 
 
 
 
 
 
 
 
 
 
 
 
4510
 
4511
- var args = arguments;
4512
- var _this = this;
4513
- this[ timeoutName ] = setTimeout( function() {
4514
- method.apply( _this, args );
4515
- delete _this[ timeoutName ];
4516
- }, threshold );
4517
- };
4518
- };
4519
 
4520
- // ----- docReady ----- //
4521
 
4522
- utils.docReady = function( callback ) {
4523
- var readyState = document.readyState;
4524
- if ( readyState == 'complete' || readyState == 'interactive' ) {
4525
- // do async to allow for other scripts to run. metafizzy/flickity#441
4526
- setTimeout( callback );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4527
  } else {
4528
- document.addEventListener( 'DOMContentLoaded', callback );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4529
  }
4530
- };
4531
 
4532
- // ----- htmlInit ----- //
4533
 
4534
- // http://jamesroberts.name/blog/2010/02/22/string-functions-for-javascript-trim-to-camel-case-to-dashed-and-to-underscore/
4535
- utils.toDashed = function( str ) {
4536
- return str.replace( /(.)([A-Z])/g, function( match, $1, $2 ) {
4537
- return $1 + '-' + $2;
4538
- }).toLowerCase();
4539
- };
4540
 
4541
- var console = window.console;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4542
  /**
4543
- * allow user to initialize classes via [data-namespace] or .js-namespace class
4544
- * htmlInit( Widget, 'widgetName' )
4545
- * options are parsed from data-namespace-options
4546
  */
4547
- utils.htmlInit = function( WidgetClass, namespace ) {
4548
- utils.docReady( function() {
4549
- var dashedNamespace = utils.toDashed( namespace );
4550
- var dataAttr = 'data-' + dashedNamespace;
4551
- var dataAttrElems = document.querySelectorAll( '[' + dataAttr + ']' );
4552
- var jsDashElems = document.querySelectorAll( '.js-' + dashedNamespace );
4553
- var elems = utils.makeArray( dataAttrElems )
4554
- .concat( utils.makeArray( jsDashElems ) );
4555
- var dataOptionsAttr = dataAttr + '-options';
4556
- var jQuery = window.jQuery;
4557
 
4558
- elems.forEach( function( elem ) {
4559
- var attr = elem.getAttribute( dataAttr ) ||
4560
- elem.getAttribute( dataOptionsAttr );
4561
- var options;
4562
- try {
4563
- options = attr && JSON.parse( attr );
4564
- } catch ( error ) {
4565
- // log error, do not initialize
4566
- if ( console ) {
4567
- console.error( 'Error parsing ' + dataAttr + ' on ' + elem.className +
4568
- ': ' + error );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4569
  }
4570
- return;
4571
- }
4572
- // initialize
4573
- var instance = new WidgetClass( elem, options );
4574
- // make available via $().data('namespace')
4575
- if ( jQuery ) {
4576
- jQuery.data( elem, namespace, instance );
4577
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4578
  });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4579
 
4580
- });
4581
- };
4582
 
4583
- // ----- ----- //
 
 
 
4584
 
4585
- return utils;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4586
 
4587
- }));
 
4588
 
 
 
 
4589
 
4590
- /***/ }),
 
 
4591
 
4592
- /***/ "./node_modules/get-size/get-size.js":
4593
- /*!*******************************************!*\
4594
- !*** ./node_modules/get-size/get-size.js ***!
4595
- \*******************************************/
4596
- /*! no static exports found */
4597
- /***/ (function(module, exports, __webpack_require__) {
4598
 
4599
- var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
4600
- * getSize v2.0.3
4601
- * measure size of elements
4602
- * MIT license
 
 
 
 
 
 
 
 
4603
  */
4604
 
4605
- /* jshint browser: true, strict: true, undef: true, unused: true */
4606
- /* globals console: false */
 
 
4607
 
4608
- ( function( window, factory ) {
4609
- /* jshint strict: false */ /* globals define, module */
4610
- if ( true ) {
4611
- // AMD
4612
- !(__WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
4613
- __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
4614
- (__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) :
4615
- __WEBPACK_AMD_DEFINE_FACTORY__),
4616
- __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
4617
- } else {}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4618
 
4619
- })( window, function factory() {
4620
- 'use strict';
4621
 
4622
- // -------------------------- helpers -------------------------- //
 
 
 
 
4623
 
4624
- // get a number from a string, not a percentage
4625
- function getStyleSize( value ) {
4626
- var num = parseFloat( value );
4627
- // not a percent like '100%', and a number
4628
- var isValid = value.indexOf('%') == -1 && !isNaN( num );
4629
- return isValid && num;
4630
  }
4631
 
4632
- function noop() {}
 
 
 
 
 
 
 
 
 
 
 
 
4633
 
4634
- var logError = typeof console == 'undefined' ? noop :
4635
- function( message ) {
4636
- console.error( message );
4637
- };
4638
 
4639
- // -------------------------- measurements -------------------------- //
 
 
4640
 
4641
- var measurements = [
4642
- 'paddingLeft',
4643
- 'paddingRight',
4644
- 'paddingTop',
4645
- 'paddingBottom',
4646
- 'marginLeft',
4647
- 'marginRight',
4648
- 'marginTop',
4649
- 'marginBottom',
4650
- 'borderLeftWidth',
4651
- 'borderRightWidth',
4652
- 'borderTopWidth',
4653
- 'borderBottomWidth'
4654
- ];
4655
 
4656
- var measurementsLength = measurements.length;
 
 
 
4657
 
4658
- function getZeroSize() {
4659
- var size = {
4660
- width: 0,
4661
- height: 0,
4662
- innerWidth: 0,
4663
- innerHeight: 0,
4664
- outerWidth: 0,
4665
- outerHeight: 0
4666
- };
4667
- for ( var i=0; i < measurementsLength; i++ ) {
4668
- var measurement = measurements[i];
4669
- size[ measurement ] = 0;
4670
  }
4671
- return size;
4672
  }
 
 
 
4673
 
4674
- // -------------------------- getStyle -------------------------- //
4675
 
 
 
 
 
 
 
 
4676
  /**
4677
- * getStyle, get style of element, check for Firefox bug
4678
- * https://bugzilla.mozilla.org/show_bug.cgi?id=548397
 
4679
  */
4680
- function getStyle( elem ) {
4681
- var style = getComputedStyle( elem );
4682
- if ( !style ) {
4683
- logError( 'Style returned ' + style +
4684
- '. Are you running this code in a hidden iframe on Firefox? ' +
4685
- 'See https://bit.ly/getsizebug1' );
4686
- }
4687
- return style;
4688
- }
4689
 
4690
- // -------------------------- setup -------------------------- //
4691
 
4692
- var isSetup = false;
 
 
 
 
 
 
 
 
4693
 
4694
- var isBoxSizeOuter;
4695
 
 
 
 
 
 
 
 
 
 
4696
  /**
4697
- * setup
4698
- * check isBoxSizerOuter
4699
- * do on first getSize() rather than on page load for Firefox bug
4700
  */
4701
- function setup() {
4702
- // setup once
4703
- if ( isSetup ) {
 
4704
  return;
4705
  }
4706
- isSetup = true;
4707
 
4708
- // -------------------------- box sizing -------------------------- //
 
 
 
4709
 
4710
- /**
4711
- * Chrome & Safari measure the outer-width on style.width on border-box elems
4712
- * IE11 & Firefox<29 measures the inner-width
4713
- */
4714
- var div = document.createElement('div');
4715
- div.style.width = '200px';
4716
- div.style.padding = '1px 2px 3px 4px';
4717
- div.style.borderStyle = 'solid';
4718
- div.style.borderWidth = '1px 2px 3px 4px';
4719
- div.style.boxSizing = 'border-box';
 
 
 
 
 
 
 
 
4720
 
4721
- var body = document.body || document.documentElement;
4722
- body.appendChild( div );
4723
- var style = getStyle( div );
4724
- // round value for browser zoom. desandro/masonry#928
4725
- isBoxSizeOuter = Math.round( getStyleSize( style.width ) ) == 200;
4726
- getSize.isBoxSizeOuter = isBoxSizeOuter;
4727
 
4728
- body.removeChild( div );
 
 
 
 
 
 
 
 
 
 
 
 
 
4729
  }
 
 
 
4730
 
4731
- // -------------------------- getSize -------------------------- //
4732
 
4733
- function getSize( elem ) {
4734
- setup();
 
 
 
 
 
4735
 
4736
- // use querySeletor if elem is string
4737
- if ( typeof elem == 'string' ) {
4738
- elem = document.querySelector( elem );
4739
  }
 
4740
 
4741
- // do not proceed on non-objects
4742
- if ( !elem || typeof elem != 'object' || !elem.nodeType ) {
4743
- return;
4744
  }
 
4745
 
4746
- var style = getStyle( elem );
 
4747
 
4748
- // if hidden, everything is 0
4749
- if ( style.display == 'none' ) {
4750
- return getZeroSize();
4751
  }
4752
 
4753
- var size = {};
4754
- size.width = elem.offsetWidth;
4755
- size.height = elem.offsetHeight;
4756
-
4757
- var isBorderBox = size.isBorderBox = style.boxSizing == 'border-box';
4758
-
4759
- // get all measurements
4760
- for ( var i=0; i < measurementsLength; i++ ) {
4761
- var measurement = measurements[i];
4762
- var value = style[ measurement ];
4763
- var num = parseFloat( value );
4764
- // any 'auto', 'medium' value will be 0
4765
- size[ measurement ] = !isNaN( num ) ? num : 0;
4766
  }
 
 
 
 
 
 
 
 
 
 
 
4767
 
4768
- var paddingWidth = size.paddingLeft + size.paddingRight;
4769
- var paddingHeight = size.paddingTop + size.paddingBottom;
4770
- var marginWidth = size.marginLeft + size.marginRight;
4771
- var marginHeight = size.marginTop + size.marginBottom;
4772
- var borderWidth = size.borderLeftWidth + size.borderRightWidth;
4773
- var borderHeight = size.borderTopWidth + size.borderBottomWidth;
4774
 
4775
- var isBorderBoxSizeOuter = isBorderBox && isBoxSizeOuter;
 
 
4776
 
4777
- // overwrite width and height if we can get it from style
4778
- var styleWidth = getStyleSize( style.width );
4779
- if ( styleWidth !== false ) {
4780
- size.width = styleWidth +
4781
- // add padding and border unless it's already including it
4782
- ( isBorderBoxSizeOuter ? 0 : paddingWidth + borderWidth );
 
 
 
 
 
4783
  }
4784
 
4785
- var styleHeight = getStyleSize( style.height );
4786
- if ( styleHeight !== false ) {
4787
- size.height = styleHeight +
4788
- // add padding and border unless it's already including it
4789
- ( isBorderBoxSizeOuter ? 0 : paddingHeight + borderHeight );
 
 
4790
  }
4791
 
4792
- size.innerWidth = size.width - ( paddingWidth + borderWidth );
4793
- size.innerHeight = size.height - ( paddingHeight + borderHeight );
 
 
4794
 
4795
- size.outerWidth = size.width + marginWidth;
4796
- size.outerHeight = size.height + marginHeight;
 
 
4797
 
4798
- return size;
 
 
 
 
4799
  }
 
 
 
 
 
 
 
4800
 
4801
- return getSize;
4802
 
4803
- });
 
 
4804
 
 
 
 
 
 
 
4805
 
4806
- /***/ }),
 
 
 
 
 
 
 
4807
 
4808
- /***/ "./node_modules/imagesloaded/imagesloaded.js":
4809
- /*!***************************************************!*\
4810
- !*** ./node_modules/imagesloaded/imagesloaded.js ***!
4811
- \***************************************************/
4812
- /*! no static exports found */
4813
- /***/ (function(module, exports, __webpack_require__) {
4814
 
4815
- var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
4816
- * imagesLoaded v4.1.3
4817
- * JavaScript is all like "You images are done yet or what?"
4818
- * MIT License
4819
- */
4820
 
4821
- ( function( window, factory ) { 'use strict';
4822
- // universal module definition
 
 
 
 
4823
 
4824
- /*global define: false, module: false, require: false */
 
 
 
 
 
4825
 
4826
- if ( true ) {
4827
- // AMD
4828
- !(__WEBPACK_AMD_DEFINE_ARRAY__ = [
4829
- __webpack_require__(/*! ev-emitter/ev-emitter */ "./node_modules/ev-emitter/ev-emitter.js")
4830
- ], __WEBPACK_AMD_DEFINE_RESULT__ = (function( EvEmitter ) {
4831
- return factory( window, EvEmitter );
4832
- }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
4833
- __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
4834
- } else {}
4835
 
4836
- })( typeof window !== 'undefined' ? window : this,
 
4837
 
4838
- // -------------------------- factory -------------------------- //
 
4839
 
4840
- function factory( window, EvEmitter ) {
 
4841
 
4842
- 'use strict';
 
 
 
 
 
 
 
 
4843
 
4844
- var $ = window.jQuery;
4845
- var console = window.console;
 
 
4846
 
4847
- // -------------------------- helpers -------------------------- //
 
 
 
4848
 
4849
- // extend objects
4850
- function extend( a, b ) {
4851
- for ( var prop in b ) {
4852
- a[ prop ] = b[ prop ];
 
4853
  }
4854
- return a;
4855
- }
4856
 
4857
- // turn element or nodeList into an array
4858
- function makeArray( obj ) {
4859
- var ary = [];
4860
- if ( Array.isArray( obj ) ) {
4861
- // use object if already an array
4862
- ary = obj;
4863
- } else if ( typeof obj.length == 'number' ) {
4864
- // convert nodeList to array
4865
- for ( var i=0; i < obj.length; i++ ) {
4866
- ary.push( obj[i] );
4867
- }
4868
- } else {
4869
- // array of single index
4870
- ary.push( obj );
 
4871
  }
4872
- return ary;
4873
- }
4874
 
4875
- // -------------------------- imagesLoaded -------------------------- //
 
4876
 
4877
  /**
4878
- * @param {Array, Element, NodeList, String} elem
4879
- * @param {Object or Function} options - if function, use as callback
4880
- * @param {Function} onAlways - callback function
4881
  */
4882
- function ImagesLoaded( elem, options, onAlways ) {
4883
- // coerce ImagesLoaded() without new, to be new ImagesLoaded()
4884
- if ( !( this instanceof ImagesLoaded ) ) {
4885
- return new ImagesLoaded( elem, options, onAlways );
4886
- }
4887
- // use elem as selector string
4888
- if ( typeof elem == 'string' ) {
4889
- elem = document.querySelectorAll( elem );
4890
- }
4891
 
4892
- this.elements = makeArray( elem );
4893
- this.options = extend( {}, this.options );
4894
 
4895
- if ( typeof options == 'function' ) {
4896
- onAlways = options;
4897
- } else {
4898
- extend( this.options, options );
4899
- }
 
4900
 
4901
- if ( onAlways ) {
4902
- this.on( 'always', onAlways );
 
4903
  }
4904
 
4905
- this.getImages();
4906
-
4907
- if ( $ ) {
4908
- // add jQuery Deferred object
4909
- this.jqDeferred = new $.Deferred();
4910
  }
4911
 
4912
- // HACK check async to allow time to bind listeners
4913
- setTimeout( function() {
4914
- this.check();
4915
- }.bind( this ));
4916
- }
4917
 
4918
- ImagesLoaded.prototype = Object.create( EvEmitter.prototype );
 
 
4919
 
4920
- ImagesLoaded.prototype.options = {};
4921
 
4922
- ImagesLoaded.prototype.getImages = function() {
4923
- this.images = [];
 
 
 
4924
 
4925
- // filter & find items if we have an item selector
4926
- this.elements.forEach( this.addElementImages, this );
4927
- };
4928
 
4929
  /**
4930
- * @param {Node} element
 
 
 
4931
  */
4932
- ImagesLoaded.prototype.addElementImages = function( elem ) {
4933
- // filter siblings
4934
- if ( elem.nodeName == 'IMG' ) {
4935
- this.addImage( elem );
4936
- }
4937
- // get background image on element
4938
- if ( this.options.background === true ) {
4939
- this.addElementBackgroundImages( elem );
4940
- }
4941
 
4942
- // find children
4943
- // no non-element nodes, #143
4944
- var nodeType = elem.nodeType;
4945
- if ( !nodeType || !elementNodeTypes[ nodeType ] ) {
4946
- return;
4947
- }
4948
- var childImgs = elem.querySelectorAll('img');
4949
- // concat childElems to filterFound array
4950
- for ( var i=0; i < childImgs.length; i++ ) {
4951
- var img = childImgs[i];
4952
- this.addImage( img );
4953
  }
4954
 
4955
- // get child background images
4956
- if ( typeof this.options.background == 'string' ) {
4957
- var children = elem.querySelectorAll( this.options.background );
4958
- for ( i=0; i < children.length; i++ ) {
4959
- var child = children[i];
4960
- this.addElementBackgroundImages( child );
 
 
 
 
 
 
 
 
 
4961
  }
 
 
4962
  }
4963
- };
 
 
 
 
 
 
 
4964
 
4965
- var elementNodeTypes = {
4966
- 1: true,
4967
- 9: true,
4968
- 11: true
4969
- };
4970
 
4971
- ImagesLoaded.prototype.addElementBackgroundImages = function( elem ) {
4972
- var style = getComputedStyle( elem );
4973
- if ( !style ) {
4974
- // Firefox returns null if in a hidden iframe https://bugzil.la/548397
4975
- return;
4976
- }
4977
- // get url inside url("...")
4978
- var reURL = /url\((['"])?(.*?)\1\)/gi;
4979
- var matches = reURL.exec( style.backgroundImage );
4980
- while ( matches !== null ) {
4981
- var url = matches && matches[2];
4982
- if ( url ) {
4983
- this.addBackground( url, elem );
 
 
 
 
4984
  }
4985
- matches = reURL.exec( style.backgroundImage );
 
4986
  }
4987
- };
4988
 
4989
  /**
4990
- * @param {Image} img
 
4991
  */
4992
- ImagesLoaded.prototype.addImage = function( img ) {
4993
- var loadingImage = new LoadingImage( img );
4994
- this.images.push( loadingImage );
4995
- };
4996
-
4997
- ImagesLoaded.prototype.addBackground = function( url, elem ) {
4998
- var background = new Background( url, elem );
4999
- this.images.push( background );
5000
- };
5001
 
5002
- ImagesLoaded.prototype.check = function() {
5003
- var _this = this;
5004
- this.progressedCount = 0;
5005
- this.hasAnyBroken = false;
5006
- // complete if no images
5007
- if ( !this.images.length ) {
5008
- this.complete();
5009
- return;
5010
- }
5011
 
5012
- function onProgress( image, elem, message ) {
5013
- // HACK - Chrome triggers event before object properties have changed. #83
5014
- setTimeout( function() {
5015
- _this.progress( image, elem, message );
5016
- });
5017
  }
5018
 
5019
- this.images.forEach( function( loadingImage ) {
5020
- loadingImage.once( 'progress', onProgress );
5021
- loadingImage.check();
5022
- });
5023
- };
 
 
 
 
 
5024
 
5025
- ImagesLoaded.prototype.progress = function( image, elem, message ) {
5026
- this.progressedCount++;
5027
- this.hasAnyBroken = this.hasAnyBroken || !image.isLoaded;
5028
- // progress event
5029
- this.emitEvent( 'progress', [ this, image, elem ] );
5030
- if ( this.jqDeferred && this.jqDeferred.notify ) {
5031
- this.jqDeferred.notify( this, image );
5032
- }
5033
- // check if completed
5034
- if ( this.progressedCount == this.images.length ) {
5035
- this.complete();
5036
  }
5037
 
5038
- if ( this.options.debug && console ) {
5039
- console.log( 'progress: ' + message, image, elem );
5040
- }
5041
- };
 
 
 
 
 
 
 
5042
 
5043
- ImagesLoaded.prototype.complete = function() {
5044
- var eventName = this.hasAnyBroken ? 'fail' : 'done';
5045
- this.isComplete = true;
5046
- this.emitEvent( eventName, [ this ] );
5047
- this.emitEvent( 'always', [ this ] );
5048
- if ( this.jqDeferred ) {
5049
- var jqMethod = this.hasAnyBroken ? 'reject' : 'resolve';
5050
- this.jqDeferred[ jqMethod ]( this );
5051
- }
5052
- };
5053
 
5054
- // -------------------------- -------------------------- //
 
5055
 
5056
- function LoadingImage( img ) {
5057
- this.img = img;
5058
- }
 
5059
 
5060
- LoadingImage.prototype = Object.create( EvEmitter.prototype );
 
 
5061
 
5062
- LoadingImage.prototype.check = function() {
5063
- // If complete is true and browser supports natural sizes,
5064
- // try to check for image status manually.
5065
- var isComplete = this.getIsImageComplete();
5066
- if ( isComplete ) {
5067
- // report based on naturalWidth
5068
- this.confirm( this.img.naturalWidth !== 0, 'naturalWidth' );
5069
- return;
5070
- }
5071
 
5072
- // If none of the checks above matched, simulate loading on detached element.
5073
- this.proxyImage = new Image();
5074
- this.proxyImage.addEventListener( 'load', this );
5075
- this.proxyImage.addEventListener( 'error', this );
5076
- // bind to image as well for Firefox. #191
5077
- this.img.addEventListener( 'load', this );
5078
- this.img.addEventListener( 'error', this );
5079
- this.proxyImage.src = this.img.src;
5080
- };
5081
 
5082
- LoadingImage.prototype.getIsImageComplete = function() {
5083
- return this.img.complete && this.img.naturalWidth !== undefined;
5084
- };
5085
 
5086
- LoadingImage.prototype.confirm = function( isLoaded, message ) {
5087
- this.isLoaded = isLoaded;
5088
- this.emitEvent( 'progress', [ this, this.img, message ] );
5089
- };
5090
 
5091
- // ----- events ----- //
 
 
 
 
 
 
 
5092
 
5093
- // trigger specified handler for event type
5094
- LoadingImage.prototype.handleEvent = function( event ) {
5095
- var method = 'on' + event.type;
5096
- if ( this[ method ] ) {
5097
- this[ method ]( event );
5098
- }
5099
- };
5100
 
5101
- LoadingImage.prototype.onload = function() {
5102
- this.confirm( true, 'onload' );
5103
- this.unbindEvents();
5104
- };
5105
 
5106
- LoadingImage.prototype.onerror = function() {
5107
- this.confirm( false, 'onerror' );
5108
- this.unbindEvents();
5109
- };
5110
 
5111
- LoadingImage.prototype.unbindEvents = function() {
5112
- this.proxyImage.removeEventListener( 'load', this );
5113
- this.proxyImage.removeEventListener( 'error', this );
5114
- this.img.removeEventListener( 'load', this );
5115
- this.img.removeEventListener( 'error', this );
5116
- };
5117
 
5118
- // -------------------------- Background -------------------------- //
5119
 
5120
- function Background( url, element ) {
5121
- this.url = url;
5122
- this.element = element;
5123
- this.img = new Image();
 
 
 
 
 
 
 
 
 
5124
  }
 
 
 
 
 
 
 
 
 
 
 
 
5125
 
5126
- // inherit LoadingImage prototype
5127
- Background.prototype = Object.create( LoadingImage.prototype );
 
 
 
5128
 
5129
- Background.prototype.check = function() {
5130
- this.img.addEventListener( 'load', this );
5131
- this.img.addEventListener( 'error', this );
5132
- this.img.src = this.url;
5133
- // check if image is already complete
5134
- var isComplete = this.getIsImageComplete();
5135
- if ( isComplete ) {
5136
- this.confirm( this.img.naturalWidth !== 0, 'naturalWidth' );
5137
- this.unbindEvents();
5138
  }
5139
- };
5140
 
5141
- Background.prototype.unbindEvents = function() {
5142
- this.img.removeEventListener( 'load', this );
5143
- this.img.removeEventListener( 'error', this );
5144
- };
 
5145
 
5146
- Background.prototype.confirm = function( isLoaded, message ) {
5147
- this.isLoaded = isLoaded;
5148
- this.emitEvent( 'progress', [ this, this.element, message ] );
5149
- };
 
5150
 
5151
- // -------------------------- jQuery -------------------------- //
 
5152
 
5153
- ImagesLoaded.makeJQueryPlugin = function( jQuery ) {
5154
- jQuery = jQuery || window.jQuery;
5155
- if ( !jQuery ) {
5156
- return;
 
 
 
 
 
 
 
 
 
 
 
 
5157
  }
5158
- // set local variable
5159
- $ = jQuery;
5160
- // $().imagesLoaded()
5161
- $.fn.imagesLoaded = function( options, callback ) {
5162
- var instance = new ImagesLoaded( this, options, callback );
5163
- return instance.jqDeferred.promise( $(this) );
5164
- };
5165
- };
5166
- // try making plugin
5167
- ImagesLoaded.makeJQueryPlugin();
5168
 
5169
- // -------------------------- -------------------------- //
 
 
5170
 
5171
- return ImagesLoaded;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5172
 
5173
- });
 
 
5174
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5175
 
5176
- /***/ }),
 
 
5177
 
5178
- /***/ "./node_modules/masonry-layout/masonry.js":
5179
- /*!************************************************!*\
5180
- !*** ./node_modules/masonry-layout/masonry.js ***!
5181
- \************************************************/
5182
- /*! no static exports found */
5183
- /***/ (function(module, exports, __webpack_require__) {
5184
 
5185
- var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
5186
- * Masonry v4.2.2
5187
- * Cascading grid layout library
5188
- * https://masonry.desandro.com
5189
- * MIT License
5190
- * by David DeSandro
 
 
 
 
5191
  */
5192
 
5193
- ( function( window, factory ) {
5194
- // universal module definition
5195
- /* jshint strict: false */ /*globals define, module, require */
5196
- if ( true ) {
5197
- // AMD
5198
- !(__WEBPACK_AMD_DEFINE_ARRAY__ = [
5199
- __webpack_require__(/*! outlayer/outlayer */ "./node_modules/outlayer/outlayer.js"),
5200
- __webpack_require__(/*! get-size/get-size */ "./node_modules/get-size/get-size.js")
5201
- ], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
5202
- __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
5203
- (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
5204
- __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
5205
- } else {}
5206
 
5207
- }( window, function factory( Outlayer, getSize ) {
5208
 
5209
- 'use strict';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5210
 
5211
- // -------------------------- masonryDefinition -------------------------- //
 
 
 
5212
 
5213
- // create an Outlayer layout class
5214
- var Masonry = Outlayer.create('masonry');
5215
- // isFitWidth -> fitWidth
5216
- Masonry.compatOptions.fitWidth = 'isFitWidth';
5217
 
5218
- var proto = Masonry.prototype;
5219
 
5220
- proto._resetLayout = function() {
5221
- this.getSize();
5222
- this._getMeasurement( 'columnWidth', 'outerWidth' );
5223
- this._getMeasurement( 'gutter', 'outerWidth' );
5224
- this.measureColumns();
5225
 
5226
- // reset column Y
5227
- this.colYs = [];
5228
- for ( var i=0; i < this.cols; i++ ) {
5229
- this.colYs.push( 0 );
 
 
 
 
5230
  }
5231
 
5232
- this.maxY = 0;
5233
- this.horizontalColIndex = 0;
5234
- };
5235
 
5236
- proto.measureColumns = function() {
5237
- this.getContainerWidth();
5238
- // if columnWidth is 0, default to outerWidth of first item
5239
- if ( !this.columnWidth ) {
5240
- var firstItem = this.items[0];
5241
- var firstItemElem = firstItem && firstItem.element;
5242
- // columnWidth fall back to item of first element
5243
- this.columnWidth = firstItemElem && getSize( firstItemElem ).outerWidth ||
5244
- // if first elem has no width, default to size of container
5245
- this.containerWidth;
5246
  }
 
 
 
 
 
 
 
 
5247
 
5248
- var columnWidth = this.columnWidth += this.gutter;
 
5249
 
5250
- // calculate columns
5251
- var containerWidth = this.containerWidth + this.gutter;
5252
- var cols = containerWidth / columnWidth;
5253
- // fix rounding errors, typically with gutters
5254
- var excess = columnWidth - containerWidth % columnWidth;
5255
- // if overshoot is less than a pixel, round up, otherwise floor it
5256
- var mathMethod = excess && excess < 1 ? 'round' : 'floor';
5257
- cols = Math[ mathMethod ]( cols );
5258
- this.cols = Math.max( cols, 1 );
5259
- };
5260
 
5261
- proto.getContainerWidth = function() {
5262
- // container is parent if fit width
5263
- var isFitWidth = this._getOption('fitWidth');
5264
- var container = isFitWidth ? this.element.parentNode : this.element;
5265
- // check that this.size and size are there
5266
- // IE8 triggers resize on body size change, so they might not be
5267
- var size = getSize( container );
5268
- this.containerWidth = size && size.innerWidth;
5269
  };
 
 
 
 
 
 
 
5270
 
5271
- proto._getItemLayoutPosition = function( item ) {
5272
- item.getSize();
5273
- // how many columns does this brick span
5274
- var remainder = item.size.outerWidth % this.columnWidth;
5275
- var mathMethod = remainder && remainder < 1 ? 'round' : 'ceil';
5276
- // round if off by 1 pixel, otherwise use ceil
5277
- var colSpan = Math[ mathMethod ]( item.size.outerWidth / this.columnWidth );
5278
- colSpan = Math.min( colSpan, this.cols );
5279
- // use horizontal or top column position
5280
- var colPosMethod = this.options.horizontalOrder ?
5281
- '_getHorizontalColPosition' : '_getTopColPosition';
5282
- var colPosition = this[ colPosMethod ]( colSpan, item );
5283
- // position the brick
5284
- var position = {
5285
- x: this.columnWidth * colPosition.col,
5286
- y: colPosition.y
5287
- };
5288
- // apply setHeight to necessary columns
5289
- var setHeight = colPosition.y + item.size.outerHeight;
5290
- var setMax = colSpan + colPosition.col;
5291
- for ( var i = colPosition.col; i < setMax; i++ ) {
5292
- this.colYs[i] = setHeight;
5293
- }
5294
 
5295
- return position;
5296
- };
 
5297
 
5298
- proto._getTopColPosition = function( colSpan ) {
5299
- var colGroup = this._getTopColGroup( colSpan );
5300
- // get the minimum Y value from the columns
5301
- var minimumY = Math.min.apply( Math, colGroup );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5302
 
 
 
5303
  return {
5304
- col: colGroup.indexOf( minimumY ),
5305
- y: minimumY,
5306
  };
5307
- };
 
 
 
 
 
 
 
 
 
 
 
 
 
5308
 
5309
- /**
5310
- * @param {Number} colSpan - number of columns the element spans
5311
- * @returns {Array} colGroup
5312
- */
5313
- proto._getTopColGroup = function( colSpan ) {
5314
- if ( colSpan < 2 ) {
5315
- // if brick spans only one column, use all the column Ys
5316
- return this.colYs;
5317
- }
5318
 
5319
- var colGroup = [];
5320
- // how many different places could this brick fit horizontally
5321
- var groupCount = this.cols + 1 - colSpan;
5322
- // for each group potential horizontal position
5323
- for ( var i = 0; i < groupCount; i++ ) {
5324
- colGroup[i] = this._getColGroupY( i, colSpan );
5325
- }
5326
- return colGroup;
5327
- };
 
5328
 
5329
- proto._getColGroupY = function( col, colSpan ) {
5330
- if ( colSpan < 2 ) {
5331
- return this.colYs[ col ];
5332
- }
5333
- // make an array of colY values for that one group
5334
- var groupColYs = this.colYs.slice( col, col + colSpan );
5335
- // and get the max value of the array
5336
- return Math.max.apply( Math, groupColYs );
5337
- };
5338
 
5339
- // get column position based on horizontal index. #873
5340
- proto._getHorizontalColPosition = function( colSpan, item ) {
5341
- var col = this.horizontalColIndex % this.cols;
5342
- var isOver = colSpan > 1 && col + colSpan > this.cols;
5343
- // shift to next row if item can't fit on current row
5344
- col = isOver ? 0 : col;
5345
- // don't let zero-size items take up space
5346
- var hasSize = item.size.outerWidth && item.size.outerHeight;
5347
- this.horizontalColIndex = hasSize ? col + colSpan : this.horizontalColIndex;
5348
 
5349
- return {
5350
- col: col,
5351
- y: this._getColGroupY( col, colSpan ),
5352
- };
5353
- };
5354
 
5355
- proto._manageStamp = function( stamp ) {
5356
- var stampSize = getSize( stamp );
5357
- var offset = this._getElementOffset( stamp );
5358
- // get the columns that this stamp affects
5359
- var isOriginLeft = this._getOption('originLeft');
5360
- var firstX = isOriginLeft ? offset.left : offset.right;
5361
- var lastX = firstX + stampSize.outerWidth;
5362
- var firstCol = Math.floor( firstX / this.columnWidth );
5363
- firstCol = Math.max( 0, firstCol );
5364
- var lastCol = Math.floor( lastX / this.columnWidth );
5365
- // lastCol should not go over if multiple of columnWidth #425
5366
- lastCol -= lastX % this.columnWidth ? 0 : 1;
5367
- lastCol = Math.min( this.cols - 1, lastCol );
5368
- // set colYs to bottom of the stamp
5369
 
5370
- var isOriginTop = this._getOption('originTop');
5371
- var stampMaxY = ( isOriginTop ? offset.top : offset.bottom ) +
5372
- stampSize.outerHeight;
5373
- for ( var i = firstCol; i <= lastCol; i++ ) {
5374
- this.colYs[i] = Math.max( stampMaxY, this.colYs[i] );
5375
- }
5376
- };
5377
 
5378
- proto._getContainerSize = function() {
5379
- this.maxY = Math.max.apply( Math, this.colYs );
5380
- var size = {
5381
- height: this.maxY
5382
- };
5383
 
5384
- if ( this._getOption('fitWidth') ) {
5385
- size.width = this._getContainerFitWidth();
 
 
 
 
 
5386
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5387
 
5388
- return size;
5389
- };
5390
 
5391
- proto._getContainerFitWidth = function() {
5392
- var unusedCols = 0;
5393
- // count unused columns
5394
- var i = this.cols;
5395
- while ( --i ) {
5396
- if ( this.colYs[i] !== 0 ) {
5397
- break;
 
 
 
 
5398
  }
5399
- unusedCols++;
5400
- }
5401
- // fit container to columns that have been used
5402
- return ( this.cols - unusedCols ) * this.columnWidth - this.gutter;
5403
- };
5404
 
5405
- proto.needsResizeLayout = function() {
5406
- var previousWidth = this.containerWidth;
5407
- this.getContainerWidth();
5408
- return previousWidth != this.containerWidth;
5409
- };
5410
 
5411
- return Masonry;
 
 
 
 
 
 
5412
 
5413
- }));
 
 
5414
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5415
 
5416
- /***/ }),
5417
 
5418
- /***/ "./node_modules/object-assign/index.js":
5419
- /*!*********************************************!*\
5420
- !*** ./node_modules/object-assign/index.js ***!
5421
- \*********************************************/
5422
- /*! no static exports found */
5423
- /***/ (function(module, exports, __webpack_require__) {
5424
 
5425
- "use strict";
5426
- /*
5427
- object-assign
5428
- (c) Sindre Sorhus
5429
- @license MIT
5430
- */
5431
 
 
 
 
5432
 
5433
- /* eslint-disable no-unused-vars */
5434
- var getOwnPropertySymbols = Object.getOwnPropertySymbols;
5435
- var hasOwnProperty = Object.prototype.hasOwnProperty;
5436
- var propIsEnumerable = Object.prototype.propertyIsEnumerable;
5437
 
5438
- function toObject(val) {
5439
- if (val === null || val === undefined) {
5440
- throw new TypeError('Object.assign cannot be called with null or undefined');
5441
- }
 
 
 
 
5442
 
5443
- return Object(val);
5444
- }
5445
 
5446
- function shouldUseNative() {
5447
- try {
5448
- if (!Object.assign) {
5449
- return false;
5450
- }
5451
 
5452
- // Detect buggy property enumeration order in older V8 versions.
 
 
 
5453
 
5454
- // https://bugs.chromium.org/p/v8/issues/detail?id=4118
5455
- var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
5456
- test1[5] = 'de';
5457
- if (Object.getOwnPropertyNames(test1)[0] === '5') {
5458
- return false;
5459
- }
5460
 
5461
- // https://bugs.chromium.org/p/v8/issues/detail?id=3056
5462
- var test2 = {};
5463
- for (var i = 0; i < 10; i++) {
5464
- test2['_' + String.fromCharCode(i)] = i;
5465
- }
5466
- var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
5467
- return test2[n];
5468
- });
5469
- if (order2.join('') !== '0123456789') {
5470
- return false;
5471
- }
5472
 
5473
- // https://bugs.chromium.org/p/v8/issues/detail?id=3056
5474
- var test3 = {};
5475
- 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
5476
- test3[letter] = letter;
5477
- });
5478
- if (Object.keys(Object.assign({}, test3)).join('') !==
5479
- 'abcdefghijklmnopqrst') {
5480
- return false;
5481
- }
5482
 
5483
- return true;
5484
- } catch (err) {
5485
- // We don't expect any of the above to throw, but better to be safe.
5486
- return false;
5487
- }
5488
- }
5489
 
5490
- module.exports = shouldUseNative() ? Object.assign : function (target, source) {
5491
- var from;
5492
- var to = toObject(target);
5493
- var symbols;
 
5494
 
5495
- for (var s = 1; s < arguments.length; s++) {
5496
- from = Object(arguments[s]);
5497
 
5498
- for (var key in from) {
5499
- if (hasOwnProperty.call(from, key)) {
5500
- to[key] = from[key];
5501
- }
5502
- }
5503
 
5504
- if (getOwnPropertySymbols) {
5505
- symbols = getOwnPropertySymbols(from);
5506
- for (var i = 0; i < symbols.length; i++) {
5507
- if (propIsEnumerable.call(from, symbols[i])) {
5508
- to[symbols[i]] = from[symbols[i]];
5509
- }
5510
- }
5511
- }
5512
- }
 
5513
 
5514
- return to;
5515
- };
 
 
 
 
5516
 
 
 
 
 
 
5517
 
5518
- /***/ }),
 
 
5519
 
5520
- /***/ "./node_modules/outlayer/item.js":
5521
- /*!***************************************!*\
5522
- !*** ./node_modules/outlayer/item.js ***!
5523
- \***************************************/
5524
- /*! no static exports found */
5525
- /***/ (function(module, exports, __webpack_require__) {
5526
 
5527
- var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
5528
- * Outlayer Item
5529
- */
5530
 
5531
- ( function( window, factory ) {
5532
- // universal module definition
5533
- /* jshint strict: false */ /* globals define, module, require */
5534
- if ( true ) {
5535
- // AMD - RequireJS
5536
- !(__WEBPACK_AMD_DEFINE_ARRAY__ = [
5537
- __webpack_require__(/*! ev-emitter/ev-emitter */ "./node_modules/ev-emitter/ev-emitter.js"),
5538
- __webpack_require__(/*! get-size/get-size */ "./node_modules/get-size/get-size.js")
5539
- ], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
5540
- __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
5541
- (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
5542
- __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
5543
- } else {}
5544
 
5545
- }( window, function factory( EvEmitter, getSize ) {
5546
- 'use strict';
 
 
 
 
 
 
 
 
 
5547
 
5548
- // ----- helpers ----- //
5549
 
5550
- function isEmptyObj( obj ) {
5551
- for ( var prop in obj ) {
5552
- return false;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5553
  }
5554
- prop = null;
5555
- return true;
5556
  }
5557
 
5558
- // -------------------------- CSS3 support -------------------------- //
5559
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5560
 
5561
- var docElemStyle = document.documentElement.style;
 
5562
 
5563
- var transitionProperty = typeof docElemStyle.transition == 'string' ?
5564
- 'transition' : 'WebkitTransition';
5565
- var transformProperty = typeof docElemStyle.transform == 'string' ?
5566
- 'transform' : 'WebkitTransform';
 
 
5567
 
5568
- var transitionEndEvent = {
5569
- WebkitTransition: 'webkitTransitionEnd',
5570
- transition: 'transitionend'
5571
- }[ transitionProperty ];
5572
 
5573
- // cache all vendor properties that could have vendor prefix
5574
- var vendorProperties = {
5575
- transform: transformProperty,
5576
- transition: transitionProperty,
5577
- transitionDuration: transitionProperty + 'Duration',
5578
- transitionProperty: transitionProperty + 'Property',
5579
- transitionDelay: transitionProperty + 'Delay'
5580
- };
 
5581
 
5582
- // -------------------------- Item -------------------------- //
 
 
5583
 
5584
- function Item( element, layout ) {
5585
- if ( !element ) {
5586
- return;
5587
  }
5588
-
5589
- this.element = element;
5590
- // parent layout class, i.e. Masonry, Isotope, or Packery
5591
- this.layout = layout;
5592
- this.position = {
5593
- x: 0,
5594
- y: 0
5595
- };
5596
-
5597
- this._create();
5598
  }
5599
 
5600
- // inherit EvEmitter
5601
- var proto = Item.prototype = Object.create( EvEmitter.prototype );
5602
- proto.constructor = Item;
5603
 
5604
- proto._create = function() {
5605
- // transition objects
5606
- this._transn = {
5607
- ingProperties: {},
5608
- clean: {},
5609
- onEnd: {}
5610
- };
5611
 
5612
- this.css({
5613
- position: 'absolute'
5614
- });
5615
- };
5616
 
5617
- // trigger specified handler for event type
5618
- proto.handleEvent = function( event ) {
5619
- var method = 'on' + event.type;
5620
- if ( this[ method ] ) {
5621
- this[ method ]( event );
5622
- }
5623
- };
5624
 
5625
- proto.getSize = function() {
5626
- this.size = getSize( this.element );
5627
- };
 
 
 
5628
 
5629
- /**
5630
- * apply CSS styles to element
5631
- * @param {Object} style
5632
- */
5633
- proto.css = function( style ) {
5634
- var elemStyle = this.element.style;
5635
 
5636
- for ( var prop in style ) {
5637
- // use vendor property if available
5638
- var supportedProp = vendorProperties[ prop ] || prop;
5639
- elemStyle[ supportedProp ] = style[ prop ];
5640
  }
5641
- };
 
 
 
 
 
 
 
 
 
 
5642
 
5643
- // measure position, and sets it
5644
- proto.getPosition = function() {
5645
- var style = getComputedStyle( this.element );
5646
- var isOriginLeft = this.layout._getOption('originLeft');
5647
- var isOriginTop = this.layout._getOption('originTop');
5648
- var xValue = style[ isOriginLeft ? 'left' : 'right' ];
5649
- var yValue = style[ isOriginTop ? 'top' : 'bottom' ];
5650
- var x = parseFloat( xValue );
5651
- var y = parseFloat( yValue );
5652
- // convert percent to pixels
5653
- var layoutSize = this.layout.size;
5654
- if ( xValue.indexOf('%') != -1 ) {
5655
- x = ( x / 100 ) * layoutSize.width;
5656
  }
5657
- if ( yValue.indexOf('%') != -1 ) {
5658
- y = ( y / 100 ) * layoutSize.height;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5659
  }
5660
- // clean up 'auto' or other non-integer values
5661
- x = isNaN( x ) ? 0 : x;
5662
- y = isNaN( y ) ? 0 : y;
5663
- // remove padding from measurement
5664
- x -= isOriginLeft ? layoutSize.paddingLeft : layoutSize.paddingRight;
5665
- y -= isOriginTop ? layoutSize.paddingTop : layoutSize.paddingBottom;
5666
 
5667
- this.position.x = x;
5668
- this.position.y = y;
5669
- };
5670
 
5671
- // set settled position, apply padding
5672
- proto.layoutPosition = function() {
5673
- var layoutSize = this.layout.size;
5674
- var style = {};
5675
- var isOriginLeft = this.layout._getOption('originLeft');
5676
- var isOriginTop = this.layout._getOption('originTop');
5677
 
5678
- // x
5679
- var xPadding = isOriginLeft ? 'paddingLeft' : 'paddingRight';
5680
- var xProperty = isOriginLeft ? 'left' : 'right';
5681
- var xResetProperty = isOriginLeft ? 'right' : 'left';
5682
 
5683
- var x = this.position.x + layoutSize[ xPadding ];
5684
- // set in percentage or pixels
5685
- style[ xProperty ] = this.getXValue( x );
5686
- // reset other property
5687
- style[ xResetProperty ] = '';
5688
 
5689
- // y
5690
- var yPadding = isOriginTop ? 'paddingTop' : 'paddingBottom';
5691
- var yProperty = isOriginTop ? 'top' : 'bottom';
5692
- var yResetProperty = isOriginTop ? 'bottom' : 'top';
5693
 
5694
- var y = this.position.y + layoutSize[ yPadding ];
5695
- // set in percentage or pixels
5696
- style[ yProperty ] = this.getYValue( y );
5697
- // reset other property
5698
- style[ yResetProperty ] = '';
 
 
 
 
 
 
5699
 
5700
- this.css( style );
5701
- this.emitEvent( 'layout', [ this ] );
5702
- };
5703
 
5704
- proto.getXValue = function( x ) {
5705
- var isHorizontal = this.layout._getOption('horizontal');
5706
- return this.layout.options.percentPosition && !isHorizontal ?
5707
- ( ( x / this.layout.size.width ) * 100 ) + '%' : x + 'px';
5708
- };
5709
 
5710
- proto.getYValue = function( y ) {
5711
- var isHorizontal = this.layout._getOption('horizontal');
5712
- return this.layout.options.percentPosition && isHorizontal ?
5713
- ( ( y / this.layout.size.height ) * 100 ) + '%' : y + 'px';
5714
- };
 
 
 
 
 
 
 
 
 
5715
 
5716
- proto._transitionTo = function( x, y ) {
5717
- this.getPosition();
5718
- // get current x & y from top/left
5719
- var curX = this.position.x;
5720
- var curY = this.position.y;
5721
 
5722
- var didNotMove = x == this.position.x && y == this.position.y;
 
5723
 
5724
- // save end position
5725
- this.setPosition( x, y );
5726
 
5727
- // if did not move and not transitioning, just go to layout
5728
- if ( didNotMove && !this.isTransitioning ) {
5729
- this.layoutPosition();
5730
- return;
5731
- }
 
 
 
 
 
 
 
 
5732
 
5733
- var transX = x - curX;
5734
- var transY = y - curY;
5735
- var transitionStyle = {};
5736
- transitionStyle.transform = this.getTranslate( transX, transY );
5737
 
5738
- this.transition({
5739
- to: transitionStyle,
5740
- onTransitionEnd: {
5741
- transform: this.layoutPosition
5742
- },
5743
- isCleaning: true
5744
- });
5745
- };
5746
 
5747
- proto.getTranslate = function( x, y ) {
5748
- // flip cooridinates if origin on right or bottom
5749
- var isOriginLeft = this.layout._getOption('originLeft');
5750
- var isOriginTop = this.layout._getOption('originTop');
5751
- x = isOriginLeft ? x : -x;
5752
- y = isOriginTop ? y : -y;
5753
- return 'translate3d(' + x + 'px, ' + y + 'px, 0)';
5754
- };
5755
 
5756
- // non transition + transform support
5757
- proto.goTo = function( x, y ) {
5758
- this.setPosition( x, y );
5759
- this.layoutPosition();
5760
- };
5761
 
5762
- proto.moveTo = proto._transitionTo;
 
 
 
 
 
5763
 
5764
- proto.setPosition = function( x, y ) {
5765
- this.position.x = parseFloat( x );
5766
- this.position.y = parseFloat( y );
5767
- };
5768
 
5769
- // ----- transition ----- //
 
5770
 
5771
- /**
5772
- * @param {Object} style - CSS
5773
- * @param {Function} onTransitionEnd
5774
- */
 
 
 
5775
 
5776
- // non transition, just trigger callback
5777
- proto._nonTransition = function( args ) {
5778
- this.css( args.to );
5779
- if ( args.isCleaning ) {
5780
- this._removeStyles( args.to );
5781
- }
5782
- for ( var prop in args.onTransitionEnd ) {
5783
- args.onTransitionEnd[ prop ].call( this );
5784
- }
5785
- };
5786
 
5787
- /**
5788
- * proper transition
5789
- * @param {Object} args - arguments
5790
- * @param {Object} to - style to transition to
5791
- * @param {Object} from - style to start transition from
5792
- * @param {Boolean} isCleaning - removes transition styles after transition
5793
- * @param {Function} onTransitionEnd - callback
5794
- */
5795
- proto.transition = function( args ) {
5796
- // redirect to nonTransition if no transition duration
5797
- if ( !parseFloat( this.layout.options.transitionDuration ) ) {
5798
- this._nonTransition( args );
5799
- return;
5800
- }
5801
 
5802
- var _transition = this._transn;
5803
- // keep track of onTransitionEnd callback by css property
5804
- for ( var prop in args.onTransitionEnd ) {
5805
- _transition.onEnd[ prop ] = args.onTransitionEnd[ prop ];
5806
- }
5807
- // keep track of properties that are transitioning
5808
- for ( prop in args.to ) {
5809
- _transition.ingProperties[ prop ] = true;
5810
- // keep track of properties to clean up when transition is done
5811
- if ( args.isCleaning ) {
5812
- _transition.clean[ prop ] = true;
5813
- }
5814
- }
5815
 
5816
- // set from styles
5817
- if ( args.from ) {
5818
- this.css( args.from );
5819
- // force redraw. http://blog.alexmaccaw.com/css-transitions
5820
- var h = this.element.offsetHeight;
5821
- // hack for JSHint to hush about unused var
5822
- h = null;
5823
- }
5824
- // enable transition
5825
- this.enableTransition( args.to );
5826
- // set styles that are transitioning
5827
- this.css( args.to );
5828
 
5829
- this.isTransitioning = true;
5830
 
5831
- };
 
 
 
5832
 
5833
- // dash before all cap letters, including first for
5834
- // WebkitTransform => -webkit-transform
5835
- function toDashedAll( str ) {
5836
- return str.replace( /([A-Z])/g, function( $1 ) {
5837
- return '-' + $1.toLowerCase();
 
 
 
 
 
 
5838
  });
5839
  }
5840
 
5841
- var transitionProps = 'opacity,' + toDashedAll( transformProperty );
 
 
 
 
 
 
5842
 
5843
- proto.enableTransition = function(/* style */) {
5844
- // HACK changing transitionProperty during a transition
5845
- // will cause transition to jump
5846
- if ( this.isTransitioning ) {
5847
- return;
5848
- }
5849
 
5850
- // make `transition: foo, bar, baz` from style object
5851
- // HACK un-comment this when enableTransition can work
5852
- // while a transition is happening
5853
- // var transitionValues = [];
5854
- // for ( var prop in style ) {
5855
- // // dash-ify camelCased properties like WebkitTransition
5856
- // prop = vendorProperties[ prop ] || prop;
5857
- // transitionValues.push( toDashedAll( prop ) );
5858
- // }
5859
- // munge number to millisecond, to match stagger
5860
- var duration = this.layout.options.transitionDuration;
5861
- duration = typeof duration == 'number' ? duration + 'ms' : duration;
5862
- // enable transition styles
5863
- this.css({
5864
- transitionProperty: transitionProps,
5865
- transitionDuration: duration,
5866
- transitionDelay: this.staggerDelay || 0
5867
- });
5868
- // listen for transition end event
5869
- this.element.addEventListener( transitionEndEvent, this, false );
5870
- };
5871
 
5872
- // ----- events ----- //
 
5873
 
5874
- proto.onwebkitTransitionEnd = function( event ) {
5875
- this.ontransitionend( event );
5876
- };
5877
 
5878
- proto.onotransitionend = function( event ) {
5879
- this.ontransitionend( event );
5880
- };
5881
 
5882
- // properties that I munge to make my life easier
5883
- var dashedVendorProperties = {
5884
- '-webkit-transform': 'transform'
5885
- };
 
 
 
5886
 
5887
- proto.ontransitionend = function( event ) {
5888
- // disregard bubbled events from children
5889
- if ( event.target !== this.element ) {
5890
- return;
5891
- }
5892
- var _transition = this._transn;
5893
- // get property name of transitioned property, convert to prefix-free
5894
- var propertyName = dashedVendorProperties[ event.propertyName ] || event.propertyName;
5895
 
5896
- // remove property that has completed transitioning
5897
- delete _transition.ingProperties[ propertyName ];
5898
- // check if any properties are still transitioning
5899
- if ( isEmptyObj( _transition.ingProperties ) ) {
5900
- // all properties have completed transitioning
5901
- this.disableTransition();
5902
  }
5903
- // clean style
5904
- if ( propertyName in _transition.clean ) {
5905
- // clean up style
5906
- this.element.style[ event.propertyName ] = '';
5907
- delete _transition.clean[ propertyName ];
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5908
  }
5909
- // trigger onTransitionEnd callback
5910
- if ( propertyName in _transition.onEnd ) {
5911
- var onTransitionEnd = _transition.onEnd[ propertyName ];
5912
- onTransitionEnd.call( this );
5913
- delete _transition.onEnd[ propertyName ];
 
 
5914
  }
5915
 
5916
- this.emitEvent( 'transitionEnd', [ this ] );
5917
- };
 
 
 
 
 
5918
 
5919
- proto.disableTransition = function() {
5920
- this.removeTransitionStyles();
5921
- this.element.removeEventListener( transitionEndEvent, this, false );
5922
- this.isTransitioning = false;
5923
- };
5924
 
 
 
5925
  /**
5926
- * removes style property from element
5927
- * @param {Object} style
5928
- **/
5929
- proto._removeStyles = function( style ) {
5930
- // clean up transition styles
5931
- var cleanStyle = {};
5932
- for ( var prop in style ) {
5933
- cleanStyle[ prop ] = '';
 
 
 
 
5934
  }
5935
- this.css( cleanStyle );
5936
- };
5937
 
5938
- var cleanTransitionStyle = {
5939
- transitionProperty: '',
5940
- transitionDuration: '',
5941
- transitionDelay: ''
5942
- };
5943
 
5944
- proto.removeTransitionStyles = function() {
5945
- // remove transition
5946
- this.css( cleanTransitionStyle );
5947
- };
5948
 
5949
- // ----- stagger ----- //
5950
 
5951
- proto.stagger = function( delay ) {
5952
- delay = isNaN( delay ) ? 0 : delay;
5953
- this.staggerDelay = delay + 'ms';
5954
- };
5955
 
5956
- // ----- show/hide/remove ----- //
5957
 
5958
- // remove element from DOM
5959
- proto.removeElem = function() {
5960
- this.element.parentNode.removeChild( this.element );
5961
- // remove display: none
5962
- this.css({ display: '' });
5963
- this.emitEvent( 'remove', [ this ] );
5964
- };
5965
 
5966
- proto.remove = function() {
5967
- // just remove element if no transition support or no transition
5968
- if ( !transitionProperty || !parseFloat( this.layout.options.transitionDuration ) ) {
5969
- this.removeElem();
5970
- return;
 
 
 
 
 
5971
  }
5972
 
5973
- // start transition
5974
- this.once( 'transitionEnd', function() {
5975
- this.removeElem();
5976
- });
5977
- this.hide();
5978
- };
5979
 
5980
- proto.reveal = function() {
5981
- delete this.isHidden;
5982
- // remove display: none
5983
- this.css({ display: '' });
5984
 
5985
- var options = this.layout.options;
 
 
 
5986
 
5987
- var onTransitionEnd = {};
5988
- var transitionEndProperty = this.getHideRevealTransitionEndProperty('visibleStyle');
5989
- onTransitionEnd[ transitionEndProperty ] = this.onRevealTransitionEnd;
 
5990
 
5991
- this.transition({
5992
- from: options.hiddenStyle,
5993
- to: options.visibleStyle,
5994
- isCleaning: true,
5995
- onTransitionEnd: onTransitionEnd
5996
- });
5997
- };
5998
 
5999
- proto.onRevealTransitionEnd = function() {
6000
- // check if still visible
6001
- // during transition, item may have been hidden
6002
- if ( !this.isHidden ) {
6003
- this.emitEvent('reveal');
6004
- }
6005
- };
6006
 
6007
- /**
6008
- * get style property use for hide/reveal transition end
6009
- * @param {String} styleProperty - hiddenStyle/visibleStyle
6010
- * @returns {String}
6011
- */
6012
- proto.getHideRevealTransitionEndProperty = function( styleProperty ) {
6013
- var optionStyle = this.layout.options[ styleProperty ];
6014
- // use opacity
6015
- if ( optionStyle.opacity ) {
6016
- return 'opacity';
6017
- }
6018
- // get first property
6019
- for ( var prop in optionStyle ) {
6020
- return prop;
 
 
6021
  }
6022
- };
6023
 
6024
- proto.hide = function() {
6025
- // set flag
6026
- this.isHidden = true;
6027
- // remove display: none
6028
- this.css({ display: '' });
 
 
 
 
 
 
6029
 
6030
- var options = this.layout.options;
6031
 
6032
- var onTransitionEnd = {};
6033
- var transitionEndProperty = this.getHideRevealTransitionEndProperty('hiddenStyle');
6034
- onTransitionEnd[ transitionEndProperty ] = this.onHideTransitionEnd;
6035
 
6036
- this.transition({
6037
- from: options.visibleStyle,
6038
- to: options.hiddenStyle,
6039
- // keep hidden stuff hidden
6040
- isCleaning: true,
6041
- onTransitionEnd: onTransitionEnd
6042
- });
6043
- };
6044
 
6045
- proto.onHideTransitionEnd = function() {
6046
- // check if still hidden
6047
- // during transition, item may have been un-hidden
6048
- if ( this.isHidden ) {
6049
- this.css({ display: 'none' });
6050
- this.emitEvent('hide');
6051
  }
6052
- };
 
 
 
6053
 
6054
- proto.destroy = function() {
6055
- this.css({
6056
- position: '',
6057
- left: '',
6058
- right: '',
6059
- top: '',
6060
- bottom: '',
6061
- transition: '',
6062
- transform: ''
6063
- });
6064
- };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6065
 
6066
- return Item;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6067
 
6068
- }));
 
 
 
6069
 
 
 
6070
 
6071
- /***/ }),
 
 
6072
 
6073
- /***/ "./node_modules/outlayer/outlayer.js":
6074
- /*!*******************************************!*\
6075
- !*** ./node_modules/outlayer/outlayer.js ***!
6076
- \*******************************************/
6077
- /*! no static exports found */
6078
- /***/ (function(module, exports, __webpack_require__) {
6079
 
6080
- var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
6081
- * Outlayer v2.1.1
6082
- * the brains and guts of a layout library
6083
- * MIT license
6084
- */
6085
 
6086
- ( function( window, factory ) {
6087
- 'use strict';
6088
- // universal module definition
6089
- /* jshint strict: false */ /* globals define, module, require */
6090
- if ( true ) {
6091
- // AMD - RequireJS
6092
- !(__WEBPACK_AMD_DEFINE_ARRAY__ = [
6093
- __webpack_require__(/*! ev-emitter/ev-emitter */ "./node_modules/ev-emitter/ev-emitter.js"),
6094
- __webpack_require__(/*! get-size/get-size */ "./node_modules/get-size/get-size.js"),
6095
- __webpack_require__(/*! fizzy-ui-utils/utils */ "./node_modules/fizzy-ui-utils/utils.js"),
6096
- __webpack_require__(/*! ./item */ "./node_modules/outlayer/item.js")
6097
- ], __WEBPACK_AMD_DEFINE_RESULT__ = (function( EvEmitter, getSize, utils, Item ) {
6098
- return factory( window, EvEmitter, getSize, utils, Item);
6099
- }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
6100
- __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
6101
- } else {}
6102
 
6103
- }( window, function factory( window, EvEmitter, getSize, utils, Item ) {
6104
- 'use strict';
6105
 
6106
- // ----- vars ----- //
 
 
6107
 
6108
- var console = window.console;
6109
- var jQuery = window.jQuery;
6110
- var noop = function() {};
6111
 
6112
- // -------------------------- Outlayer -------------------------- //
 
6113
 
6114
- // globally unique identifiers
6115
- var GUID = 0;
6116
- // internal store of all Outlayer intances
6117
- var instances = {};
6118
 
 
 
 
 
 
6119
 
6120
- /**
6121
- * @param {Element, String} element
6122
- * @param {Object} options
6123
- * @constructor
6124
- */
6125
- function Outlayer( element, options ) {
6126
- var queryElement = utils.getQueryElement( element );
6127
- if ( !queryElement ) {
6128
- if ( console ) {
6129
- console.error( 'Bad element for ' + this.constructor.namespace +
6130
- ': ' + ( queryElement || element ) );
6131
  }
6132
- return;
6133
- }
6134
- this.element = queryElement;
6135
- // add jQuery
6136
- if ( jQuery ) {
6137
- this.$element = jQuery( this.element );
6138
- }
 
 
 
 
 
 
 
 
 
 
 
6139
 
6140
- // options
6141
- this.options = utils.extend( {}, this.constructor.defaults );
6142
- this.option( options );
6143
 
6144
- // add id for Outlayer.getFromElement
6145
- var id = ++GUID;
6146
- this.element.outlayerGUID = id; // expando
6147
- instances[ id ] = this; // associate via id
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6148
 
6149
- // kick it off
6150
- this._create();
6151
 
6152
- var isInitLayout = this._getOption('initLayout');
6153
- if ( isInitLayout ) {
6154
- this.layout();
6155
- }
6156
- }
 
 
 
6157
 
6158
- // settings are for internal use only
6159
- Outlayer.namespace = 'outlayer';
6160
- Outlayer.Item = Item;
6161
 
6162
- // default options
6163
- Outlayer.defaults = {
6164
- containerStyle: {
6165
- position: 'relative'
6166
- },
6167
- initLayout: true,
6168
- originLeft: true,
6169
- originTop: true,
6170
- resize: true,
6171
- resizeContainer: true,
6172
- // item options
6173
- transitionDuration: '0.4s',
6174
- hiddenStyle: {
6175
- opacity: 0,
6176
- transform: 'scale(0.001)'
6177
- },
6178
- visibleStyle: {
6179
- opacity: 1,
6180
- transform: 'scale(1)'
6181
- }
6182
- };
6183
 
6184
- var proto = Outlayer.prototype;
6185
- // inherit EvEmitter
6186
- utils.extend( proto, EvEmitter.prototype );
 
 
 
 
 
 
 
6187
 
6188
- /**
6189
- * set options
6190
- * @param {Object} opts
6191
- */
6192
- proto.option = function( opts ) {
6193
- utils.extend( this.options, opts );
6194
- };
 
 
 
 
6195
 
6196
- /**
6197
- * get backwards compatible option value, check old name
6198
- */
6199
- proto._getOption = function( option ) {
6200
- var oldOption = this.constructor.compatOptions[ option ];
6201
- return oldOption && this.options[ oldOption ] !== undefined ?
6202
- this.options[ oldOption ] : this.options[ option ];
6203
- };
 
6204
 
6205
- Outlayer.compatOptions = {
6206
- // currentName: oldName
6207
- initLayout: 'isInitLayout',
6208
- horizontal: 'isHorizontal',
6209
- layoutInstant: 'isLayoutInstant',
6210
- originLeft: 'isOriginLeft',
6211
- originTop: 'isOriginTop',
6212
- resize: 'isResizeBound',
6213
- resizeContainer: 'isResizingContainer'
6214
- };
6215
 
6216
- proto._create = function() {
6217
- // get items from children
6218
- this.reloadItems();
6219
- // elements that affect layout, but are not laid out
6220
- this.stamps = [];
6221
- this.stamp( this.options.stamp );
6222
- // set container style
6223
- utils.extend( this.element.style, this.options.containerStyle );
 
 
 
6224
 
6225
- // bind resize method
6226
- var canBindResize = this._getOption('resize');
6227
- if ( canBindResize ) {
6228
- this.bindResize();
 
 
 
 
 
 
6229
  }
6230
- };
6231
 
6232
- // goes through all children again and gets bricks in proper order
6233
- proto.reloadItems = function() {
6234
- // collection of item elements
6235
- this.items = this._itemize( this.element.children );
6236
- };
6237
 
 
 
 
 
6238
 
6239
- /**
6240
- * turn elements into Outlayer.Items to be used in layout
6241
- * @param {Array or NodeList or HTMLElement} elems
6242
- * @returns {Array} items - collection of new Outlayer Items
6243
- */
6244
- proto._itemize = function( elems ) {
6245
 
6246
- var itemElems = this._filterFindItemElements( elems );
6247
- var Item = this.constructor.Item;
6248
 
6249
- // create new Outlayer Items for collection
6250
- var items = [];
6251
- for ( var i=0; i < itemElems.length; i++ ) {
6252
- var elem = itemElems[i];
6253
- var item = new Item( elem, this );
6254
- items.push( item );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6255
  }
6256
 
6257
- return items;
6258
- };
 
 
6259
 
6260
- /**
6261
- * get item elements to be used in layout
6262
- * @param {Array or NodeList or HTMLElement} elems
6263
- * @returns {Array} items - item elements
6264
- */
6265
- proto._filterFindItemElements = function( elems ) {
6266
- return utils.filterFindElements( elems, this.options.itemSelector );
6267
- };
6268
 
6269
- /**
6270
- * getter method for getting item elements
6271
- * @returns {Array} elems - collection of item elements
6272
- */
6273
- proto.getItemElements = function() {
6274
- return this.items.map( function( item ) {
6275
- return item.element;
6276
- });
6277
- };
6278
 
6279
- // ----- init & layout ----- //
 
 
6280
 
6281
- /**
6282
- * lays out all items
6283
- */
6284
- proto.layout = function() {
6285
- this._resetLayout();
6286
- this._manageStamps();
6287
 
6288
- // don't animate first layout
6289
- var layoutInstant = this._getOption('layoutInstant');
6290
- var isInstant = layoutInstant !== undefined ?
6291
- layoutInstant : !this._isLayoutInited;
6292
- this.layoutItems( this.items, isInstant );
6293
 
6294
- // flag for initalized
6295
- this._isLayoutInited = true;
6296
- };
 
 
 
6297
 
6298
- // _init is alias for layout
6299
- proto._init = proto.layout;
 
 
 
 
 
 
6300
 
6301
- /**
6302
- * logic before any new layout
6303
- */
6304
- proto._resetLayout = function() {
6305
- this.getSize();
6306
- };
 
6307
 
 
 
6308
 
6309
- proto.getSize = function() {
6310
- this.size = getSize( this.element );
6311
- };
 
 
 
6312
 
6313
- /**
6314
- * get measurement from option, for columnWidth, rowHeight, gutter
6315
- * if option is String -> get element from selector string, & get size of element
6316
- * if option is Element -> get size of element
6317
- * else use option as a number
6318
- *
6319
- * @param {String} measurement
6320
- * @param {String} size - width or height
6321
- * @private
6322
- */
6323
- proto._getMeasurement = function( measurement, size ) {
6324
- var option = this.options[ measurement ];
6325
- var elem;
6326
- if ( !option ) {
6327
- // default to 0
6328
- this[ measurement ] = 0;
6329
- } else {
6330
- // use option as an element
6331
- if ( typeof option == 'string' ) {
6332
- elem = this.element.querySelector( option );
6333
- } else if ( option instanceof HTMLElement ) {
6334
- elem = option;
6335
- }
6336
- // use size of element, if element
6337
- this[ measurement ] = elem ? getSize( elem )[ size ] : option;
6338
- }
6339
- };
6340
 
6341
- /**
6342
- * layout a collection of item elements
6343
- * @api public
6344
- */
6345
- proto.layoutItems = function( items, isInstant ) {
6346
- items = this._getItemsForLayout( items );
6347
 
6348
- this._layoutItems( items, isInstant );
 
 
 
6349
 
6350
- this._postLayout();
6351
- };
6352
 
6353
- /**
6354
- * get the items to be laid out
6355
- * you may want to skip over some items
6356
- * @param {Array} items
6357
- * @returns {Array} items
6358
- */
6359
- proto._getItemsForLayout = function( items ) {
6360
- return items.filter( function( item ) {
6361
- return !item.isIgnored;
6362
- });
6363
- };
6364
 
6365
- /**
6366
- * layout items
6367
- * @param {Array} items
6368
- * @param {Boolean} isInstant
6369
- */
6370
- proto._layoutItems = function( items, isInstant ) {
6371
- this._emitCompleteOnItems( 'layout', items );
6372
 
6373
- if ( !items || !items.length ) {
6374
- // no items, emit event with empty array
6375
- return;
6376
- }
6377
 
6378
- var queue = [];
6379
 
6380
- items.forEach( function( item ) {
6381
- // get x/y object from method
6382
- var position = this._getItemLayoutPosition( item );
6383
- // enqueue
6384
- position.item = item;
6385
- position.isInstant = isInstant || item.isLayoutInstant;
6386
- queue.push( position );
6387
- }, this );
6388
 
6389
- this._processLayoutQueue( queue );
6390
- };
 
 
6391
 
6392
- /**
6393
- * get item layout position
6394
- * @param {Outlayer.Item} item
6395
- * @returns {Object} x and y position
6396
- */
6397
- proto._getItemLayoutPosition = function( /* item */ ) {
6398
- return {
6399
- x: 0,
6400
- y: 0
6401
- };
6402
- };
6403
 
6404
- /**
6405
- * iterate over array and position each item
6406
- * Reason being - separating this logic prevents 'layout invalidation'
6407
- * thx @paul_irish
6408
- * @param {Array} queue
6409
- */
6410
- proto._processLayoutQueue = function( queue ) {
6411
- this.updateStagger();
6412
- queue.forEach( function( obj, i ) {
6413
- this._positionItem( obj.item, obj.x, obj.y, obj.isInstant, i );
6414
- }, this );
6415
- };
6416
 
6417
- // set stagger from option in milliseconds number
6418
- proto.updateStagger = function() {
6419
- var stagger = this.options.stagger;
6420
- if ( stagger === null || stagger === undefined ) {
6421
- this.stagger = 0;
6422
- return;
6423
  }
6424
- this.stagger = getMilliseconds( stagger );
6425
- return this.stagger;
6426
- };
6427
 
6428
- /**
6429
- * Sets position of item in DOM
6430
- * @param {Outlayer.Item} item
6431
- * @param {Number} x - horizontal position
6432
- * @param {Number} y - vertical position
6433
- * @param {Boolean} isInstant - disables transitions
6434
- */
6435
- proto._positionItem = function( item, x, y, isInstant, i ) {
6436
- if ( isInstant ) {
6437
- // if not transition, just set CSS
6438
- item.goTo( x, y );
6439
- } else {
6440
- item.stagger( i * this.stagger );
6441
- item.moveTo( x, y );
6442
- }
6443
- };
6444
 
6445
- /**
6446
- * Any logic you want to do after each layout,
6447
- * i.e. size the container
6448
- */
6449
- proto._postLayout = function() {
6450
- this.resizeContainer();
6451
- };
6452
 
6453
- proto.resizeContainer = function() {
6454
- var isResizingContainer = this._getOption('resizeContainer');
6455
- if ( !isResizingContainer ) {
6456
- return;
6457
- }
6458
- var size = this._getContainerSize();
6459
- if ( size ) {
6460
- this._setContainerMeasure( size.width, true );
6461
- this._setContainerMeasure( size.height, false );
6462
- }
6463
- };
6464
 
6465
- /**
6466
- * Sets width or height of container if returned
6467
- * @returns {Object} size
6468
- * @param {Number} width
6469
- * @param {Number} height
6470
- */
6471
- proto._getContainerSize = noop;
6472
 
6473
- /**
6474
- * @param {Number} measure - size of width or height
6475
- * @param {Boolean} isWidth
6476
- */
6477
- proto._setContainerMeasure = function( measure, isWidth ) {
6478
- if ( measure === undefined ) {
6479
- return;
 
 
 
 
6480
  }
 
6481
 
6482
- var elemSize = this.size;
6483
- // add padding and border width if border box
6484
- if ( elemSize.isBorderBox ) {
6485
- measure += isWidth ? elemSize.paddingLeft + elemSize.paddingRight +
6486
- elemSize.borderLeftWidth + elemSize.borderRightWidth :
6487
- elemSize.paddingBottom + elemSize.paddingTop +
6488
- elemSize.borderTopWidth + elemSize.borderBottomWidth;
6489
  }
6490
 
6491
- measure = Math.max( measure, 0 );
6492
- this.element.style[ isWidth ? 'width' : 'height' ] = measure + 'px';
6493
- };
6494
 
6495
- /**
6496
- * emit eventComplete on a collection of items events
6497
- * @param {String} eventName
6498
- * @param {Array} items - Outlayer.Items
6499
- */
6500
- proto._emitCompleteOnItems = function( eventName, items ) {
6501
- var _this = this;
6502
- function onComplete() {
6503
- _this.dispatchEvent( eventName + 'Complete', null, [ items ] );
6504
- }
6505
 
6506
- var count = items.length;
6507
- if ( !items || !count ) {
6508
- onComplete();
6509
- return;
6510
- }
6511
 
6512
- var doneCount = 0;
6513
- function tick() {
6514
- doneCount++;
6515
- if ( doneCount == count ) {
6516
- onComplete();
6517
- }
6518
- }
6519
 
6520
- // bind callback
6521
- items.forEach( function( item ) {
6522
- item.once( eventName, tick );
6523
- });
6524
- };
6525
 
6526
- /**
6527
- * emits events via EvEmitter and jQuery events
6528
- * @param {String} type - name of event
6529
- * @param {Event} event - original event
6530
- * @param {Array} args - extra arguments
6531
- */
6532
- proto.dispatchEvent = function( type, event, args ) {
6533
- // add original event to arguments
6534
- var emitArgs = event ? [ event ].concat( args ) : args;
6535
- this.emitEvent( type, emitArgs );
6536
 
6537
- if ( jQuery ) {
6538
- // set this.$element
6539
- this.$element = this.$element || jQuery( this.element );
6540
- if ( event ) {
6541
- // create jQuery event
6542
- var $event = jQuery.Event( event );
6543
- $event.type = type;
6544
- this.$element.trigger( $event, args );
6545
- } else {
6546
- // just trigger with type if no event available
6547
- this.$element.trigger( type, args );
6548
- }
6549
  }
6550
- };
6551
 
6552
- // -------------------------- ignore & stamps -------------------------- //
 
 
 
6553
 
 
 
 
 
6554
 
6555
- /**
6556
- * keep item in collection, but do not lay it out
6557
- * ignored items do not get skipped in layout
6558
- * @param {Element} elem
6559
- */
6560
- proto.ignore = function( elem ) {
6561
- var item = this.getItem( elem );
6562
- if ( item ) {
6563
- item.isIgnored = true;
6564
- }
6565
- };
6566
 
6567
- /**
6568
- * return item to layout collection
6569
- * @param {Element} elem
6570
- */
6571
- proto.unignore = function( elem ) {
6572
- var item = this.getItem( elem );
6573
- if ( item ) {
6574
- delete item.isIgnored;
6575
- }
6576
- };
6577
 
6578
- /**
6579
- * adds elements to stamps
6580
- * @param {NodeList, Array, Element, or String} elems
6581
- */
6582
- proto.stamp = function( elems ) {
6583
- elems = this._find( elems );
6584
- if ( !elems ) {
6585
- return;
 
 
 
 
 
 
 
6586
  }
6587
 
6588
- this.stamps = this.stamps.concat( elems );
6589
- // ignore
6590
- elems.forEach( this.ignore, this );
6591
- };
6592
 
6593
- /**
6594
- * removes elements to stamps
6595
- * @param {NodeList, Array, or Element} elems
6596
- */
6597
- proto.unstamp = function( elems ) {
6598
- elems = this._find( elems );
6599
- if ( !elems ){
6600
- return;
6601
- }
6602
 
6603
- elems.forEach( function( elem ) {
6604
- // filter out removed stamp elements
6605
- utils.removeFrom( this.stamps, elem );
6606
- this.unignore( elem );
6607
- }, this );
6608
- };
 
 
6609
 
6610
- /**
6611
- * finds child elements
6612
- * @param {NodeList, Array, Element, or String} elems
6613
- * @returns {Array} elems
6614
- */
6615
- proto._find = function( elems ) {
6616
- if ( !elems ) {
6617
- return;
6618
- }
6619
- // if string, use argument as selector string
6620
- if ( typeof elems == 'string' ) {
6621
- elems = this.element.querySelectorAll( elems );
6622
- }
6623
- elems = utils.makeArray( elems );
6624
- return elems;
6625
- };
6626
 
6627
- proto._manageStamps = function() {
6628
- if ( !this.stamps || !this.stamps.length ) {
6629
- return;
6630
- }
6631
 
6632
- this._getBoundingRect();
6633
 
6634
- this.stamps.forEach( this._manageStamp, this );
6635
- };
 
 
 
6636
 
6637
- // update boundingLeft / Top
6638
- proto._getBoundingRect = function() {
6639
- // get bounding rect for container element
6640
- var boundingRect = this.element.getBoundingClientRect();
6641
- var size = this.size;
6642
- this._boundingRect = {
6643
- left: boundingRect.left + size.paddingLeft + size.borderLeftWidth,
6644
- top: boundingRect.top + size.paddingTop + size.borderTopWidth,
6645
- right: boundingRect.right - ( size.paddingRight + size.borderRightWidth ),
6646
- bottom: boundingRect.bottom - ( size.paddingBottom + size.borderBottomWidth )
6647
- };
6648
- };
6649
 
6650
- /**
6651
- * @param {Element} stamp
6652
- **/
6653
- proto._manageStamp = noop;
6654
 
6655
- /**
6656
- * get x/y position of element relative to container element
6657
- * @param {Element} elem
6658
- * @returns {Object} offset - has left, top, right, bottom
6659
- */
6660
- proto._getElementOffset = function( elem ) {
6661
- var boundingRect = elem.getBoundingClientRect();
6662
- var thisRect = this._boundingRect;
6663
- var size = getSize( elem );
6664
- var offset = {
6665
- left: boundingRect.left - thisRect.left - size.marginLeft,
6666
- top: boundingRect.top - thisRect.top - size.marginTop,
6667
- right: thisRect.right - boundingRect.right - size.marginRight,
6668
- bottom: thisRect.bottom - boundingRect.bottom - size.marginBottom
6669
- };
6670
- return offset;
6671
- };
6672
 
6673
- // -------------------------- resize -------------------------- //
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6674
 
6675
- // enable event handlers for listeners
6676
- // i.e. resize -> onresize
6677
- proto.handleEvent = utils.handleEvent;
 
6678
 
6679
- /**
6680
- * Bind layout to window resizing
6681
- */
6682
- proto.bindResize = function() {
6683
- window.addEventListener( 'resize', this );
6684
- this.isResizeBound = true;
6685
- };
 
 
 
 
 
 
 
 
 
 
6686
 
6687
- /**
6688
- * Unbind layout to window resizing
6689
- */
6690
- proto.unbindResize = function() {
6691
- window.removeEventListener( 'resize', this );
6692
- this.isResizeBound = false;
6693
- };
6694
 
6695
- proto.onresize = function() {
6696
- this.resize();
6697
- };
6698
 
6699
- utils.debounceMethod( Outlayer, 'onresize', 100 );
 
6700
 
6701
- proto.resize = function() {
6702
- // don't trigger if size did not change
6703
- // or if resize was unbound. See #9
6704
- if ( !this.isResizeBound || !this.needsResizeLayout() ) {
6705
- return;
 
6706
  }
6707
 
6708
- this.layout();
6709
- };
6710
 
6711
- /**
6712
- * check if layout is needed post layout
6713
- * @returns Boolean
6714
- */
6715
- proto.needsResizeLayout = function() {
6716
- var size = getSize( this.element );
6717
- // check that this.size and size are there
6718
- // IE8 triggers resize on body size change, so they might not be
6719
- var hasSizes = this.size && size;
6720
- return hasSizes && size.innerWidth !== this.size.innerWidth;
6721
- };
6722
 
6723
- // -------------------------- methods -------------------------- //
 
 
 
 
 
 
6724
 
6725
- /**
6726
- * add items to Outlayer instance
6727
- * @param {Array or NodeList or Element} elems
6728
- * @returns {Array} items - Outlayer.Items
6729
- **/
6730
- proto.addItems = function( elems ) {
6731
- var items = this._itemize( elems );
6732
- // add items to collection
6733
- if ( items.length ) {
6734
- this.items = this.items.concat( items );
6735
- }
6736
- return items;
6737
- };
6738
 
6739
- /**
6740
- * Layout newly-appended item elements
6741
- * @param {Array or NodeList or Element} elems
6742
- */
6743
- proto.appended = function( elems ) {
6744
- var items = this.addItems( elems );
6745
- if ( !items.length ) {
6746
- return;
6747
  }
6748
- // layout and reveal just the new items
6749
- this.layoutItems( items, true );
6750
- this.reveal( items );
6751
- };
6752
 
6753
- /**
6754
- * Layout prepended elements
6755
- * @param {Array or NodeList or Element} elems
6756
- */
6757
- proto.prepended = function( elems ) {
6758
- var items = this._itemize( elems );
6759
- if ( !items.length ) {
6760
- return;
6761
- }
6762
- // add items to beginning of collection
6763
- var previousItems = this.items.slice(0);
6764
- this.items = items.concat( previousItems );
6765
- // start new layout
6766
- this._resetLayout();
6767
- this._manageStamps();
6768
- // layout new stuff without transition
6769
- this.layoutItems( items, true );
6770
- this.reveal( items );
6771
- // layout previous items
6772
- this.layoutItems( previousItems );
6773
- };
6774
 
6775
- /**
6776
- * reveal a collection of items
6777
- * @param {Array of Outlayer.Items} items
6778
- */
6779
- proto.reveal = function( items ) {
6780
- this._emitCompleteOnItems( 'reveal', items );
6781
- if ( !items || !items.length ) {
6782
- return;
6783
- }
6784
- var stagger = this.updateStagger();
6785
- items.forEach( function( item, i ) {
6786
- item.stagger( i * stagger );
6787
- item.reveal();
6788
- });
6789
- };
6790
 
6791
- /**
6792
- * hide a collection of items
6793
- * @param {Array of Outlayer.Items} items
6794
- */
6795
- proto.hide = function( items ) {
6796
- this._emitCompleteOnItems( 'hide', items );
6797
- if ( !items || !items.length ) {
6798
- return;
6799
  }
6800
- var stagger = this.updateStagger();
6801
- items.forEach( function( item, i ) {
6802
- item.stagger( i * stagger );
6803
- item.hide();
6804
- });
6805
- };
6806
 
6807
- /**
6808
- * reveal item elements
6809
- * @param {Array}, {Element}, {NodeList} items
6810
- */
6811
- proto.revealItemElements = function( elems ) {
6812
- var items = this.getItems( elems );
6813
- this.reveal( items );
6814
- };
6815
 
6816
- /**
6817
- * hide item elements
6818
- * @param {Array}, {Element}, {NodeList} items
6819
- */
6820
- proto.hideItemElements = function( elems ) {
6821
- var items = this.getItems( elems );
6822
- this.hide( items );
6823
- };
6824
 
6825
- /**
6826
- * get Outlayer.Item, given an Element
6827
- * @param {Element} elem
6828
- * @param {Function} callback
6829
- * @returns {Outlayer.Item} item
6830
- */
6831
- proto.getItem = function( elem ) {
6832
- // loop through items to get the one that matches
6833
- for ( var i=0; i < this.items.length; i++ ) {
6834
- var item = this.items[i];
6835
- if ( item.element == elem ) {
6836
- // return item
6837
- return item;
6838
- }
6839
- }
6840
- };
6841
 
6842
- /**
6843
- * get collection of Outlayer.Items, given Elements
6844
- * @param {Array} elems
6845
- * @returns {Array} items - Outlayer.Items
6846
- */
6847
- proto.getItems = function( elems ) {
6848
- elems = utils.makeArray( elems );
6849
- var items = [];
6850
- elems.forEach( function( elem ) {
6851
- var item = this.getItem( elem );
6852
- if ( item ) {
6853
- items.push( item );
6854
- }
6855
- }, this );
6856
 
6857
- return items;
6858
- };
 
 
 
 
 
6859
 
6860
- /**
6861
- * remove element(s) from instance and DOM
6862
- * @param {Array or NodeList or Element} elems
6863
- */
6864
- proto.remove = function( elems ) {
6865
- var removeItems = this.getItems( elems );
 
 
 
 
 
 
 
 
 
6866
 
6867
- this._emitCompleteOnItems( 'remove', removeItems );
 
 
 
 
 
 
 
6868
 
6869
- // bail if no items to remove
6870
- if ( !removeItems || !removeItems.length ) {
6871
- return;
6872
- }
 
6873
 
6874
- removeItems.forEach( function( item ) {
6875
- item.remove();
6876
- // remove item from collection
6877
- utils.removeFrom( this.items, item );
6878
- }, this );
6879
- };
6880
 
6881
- // ----- destroy ----- //
6882
 
6883
- // remove and disable Outlayer instance
6884
- proto.destroy = function() {
6885
- // clean up dynamic styles
6886
- var style = this.element.style;
6887
- style.height = '';
6888
- style.position = '';
6889
- style.width = '';
6890
- // destroy items
6891
- this.items.forEach( function( item ) {
6892
- item.destroy();
6893
- });
6894
 
6895
- this.unbindResize();
 
 
6896
 
6897
- var id = this.element.outlayerGUID;
6898
- delete instances[ id ]; // remove reference to instance by id
6899
- delete this.element.outlayerGUID;
6900
- // remove data for jQuery
6901
- if ( jQuery ) {
6902
- jQuery.removeData( this.element, this.constructor.namespace );
6903
- }
6904
 
6905
- };
6906
 
6907
- // -------------------------- data -------------------------- //
6908
 
6909
- /**
6910
- * get Outlayer instance from element
6911
- * @param {Element} elem
6912
- * @returns {Outlayer}
6913
- */
6914
- Outlayer.data = function( elem ) {
6915
- elem = utils.getQueryElement( elem );
6916
- var id = elem && elem.outlayerGUID;
6917
- return id && instances[ id ];
6918
- };
6919
 
 
6920
 
6921
- // -------------------------- create Outlayer class -------------------------- //
 
6922
 
6923
- /**
6924
- * create a layout class
6925
- * @param {String} namespace
6926
- */
6927
- Outlayer.create = function( namespace, options ) {
6928
- // sub-class Outlayer
6929
- var Layout = subclass( Outlayer );
6930
- // apply new options and compatOptions
6931
- Layout.defaults = utils.extend( {}, Outlayer.defaults );
6932
- utils.extend( Layout.defaults, options );
6933
- Layout.compatOptions = utils.extend( {}, Outlayer.compatOptions );
6934
 
6935
- Layout.namespace = namespace;
 
 
6936
 
6937
- Layout.data = Outlayer.data;
 
6938
 
6939
- // sub-class Item
6940
- Layout.Item = subclass( Item );
 
 
 
 
6941
 
6942
- // -------------------------- declarative -------------------------- //
 
6943
 
6944
- utils.htmlInit( Layout, namespace );
 
6945
 
6946
- // -------------------------- jQuery bridge -------------------------- //
 
6947
 
6948
- // make into jQuery plugin
6949
- if ( jQuery && jQuery.bridget ) {
6950
- jQuery.bridget( namespace, Layout );
 
 
 
6951
  }
6952
 
6953
- return Layout;
6954
- };
6955
 
6956
- function subclass( Parent ) {
6957
- function SubClass() {
6958
- Parent.apply( this, arguments );
6959
- }
6960
 
6961
- SubClass.prototype = Object.create( Parent.prototype );
6962
- SubClass.prototype.constructor = SubClass;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6963
 
6964
- return SubClass;
6965
- }
 
 
 
 
 
6966
 
6967
- // ----- helpers ----- //
 
 
 
 
 
 
 
6968
 
6969
- // how many milliseconds are in each unit
6970
- var msUnits = {
6971
- ms: 1,
6972
- s: 1000
6973
- };
 
 
 
 
6974
 
6975
- // munge time-like parameter into millisecond number
6976
- // '0.4s' -> 40
6977
- function getMilliseconds( time ) {
6978
- if ( typeof time == 'number' ) {
6979
- return time;
6980
- }
6981
- var matches = time.match( /(^\d*\.?\d*)(\w*)/ );
6982
- var num = matches && matches[1];
6983
- var unit = matches && matches[2];
6984
- if ( !num.length ) {
6985
- return 0;
6986
- }
6987
- num = parseFloat( num );
6988
- var mult = msUnits[ unit ] || 1;
6989
- return num * mult;
6990
- }
6991
 
6992
- // ----- fin ----- //
 
6993
 
6994
- // back in global
6995
- Outlayer.Item = Item;
 
 
 
 
 
6996
 
6997
- return Outlayer;
 
 
6998
 
6999
- }));
 
 
 
 
 
 
 
7000
 
 
 
 
 
 
7001
 
7002
- /***/ }),
 
 
 
 
 
7003
 
7004
- /***/ "./node_modules/process/browser.js":
7005
- /*!*****************************************!*\
7006
- !*** ./node_modules/process/browser.js ***!
7007
- \*****************************************/
7008
- /*! no static exports found */
7009
- /***/ (function(module, exports) {
7010
 
7011
- // shim for using process in browser
7012
- var process = module.exports = {};
 
 
 
7013
 
7014
- // cached from whatever global is present so that test runners that stub it
7015
- // don't break things. But we need to wrap it in a try catch in case it is
7016
- // wrapped in strict mode code which doesn't define any globals. It's inside a
7017
- // function because try/catches deoptimize in certain engines.
 
 
 
7018
 
7019
- var cachedSetTimeout;
7020
- var cachedClearTimeout;
7021
 
7022
- function defaultSetTimout() {
7023
- throw new Error('setTimeout has not been defined');
7024
- }
7025
- function defaultClearTimeout () {
7026
- throw new Error('clearTimeout has not been defined');
7027
- }
7028
- (function () {
7029
- try {
7030
- if (typeof setTimeout === 'function') {
7031
- cachedSetTimeout = setTimeout;
7032
- } else {
7033
- cachedSetTimeout = defaultSetTimout;
7034
  }
7035
- } catch (e) {
7036
- cachedSetTimeout = defaultSetTimout;
7037
- }
7038
- try {
7039
- if (typeof clearTimeout === 'function') {
7040
- cachedClearTimeout = clearTimeout;
7041
- } else {
7042
- cachedClearTimeout = defaultClearTimeout;
7043
  }
7044
- } catch (e) {
7045
- cachedClearTimeout = defaultClearTimeout;
7046
- }
7047
- } ())
7048
- function runTimeout(fun) {
7049
- if (cachedSetTimeout === setTimeout) {
7050
- //normal enviroments in sane situations
7051
- return setTimeout(fun, 0);
7052
- }
7053
- // if setTimeout wasn't available but was latter defined
7054
- if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
7055
- cachedSetTimeout = setTimeout;
7056
- return setTimeout(fun, 0);
7057
  }
7058
- try {
7059
- // when when somebody has screwed with setTimeout but no I.E. maddness
7060
- return cachedSetTimeout(fun, 0);
7061
- } catch(e){
7062
- try {
7063
- // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
7064
- return cachedSetTimeout.call(null, fun, 0);
7065
- } catch(e){
7066
- // 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
7067
- return cachedSetTimeout.call(this, fun, 0);
7068
- }
7069
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7070
 
 
 
 
 
 
 
 
 
7071
 
 
7072
  }
7073
- function runClearTimeout(marker) {
7074
- if (cachedClearTimeout === clearTimeout) {
7075
- //normal enviroments in sane situations
7076
- return clearTimeout(marker);
 
 
 
 
 
 
 
 
 
7077
  }
7078
- // if clearTimeout wasn't available but was latter defined
7079
- if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
7080
- cachedClearTimeout = clearTimeout;
7081
- return clearTimeout(marker);
 
 
 
 
 
 
7082
  }
7083
- try {
7084
- // when when somebody has screwed with setTimeout but no I.E. maddness
7085
- return cachedClearTimeout(marker);
7086
- } catch (e){
7087
- try {
7088
- // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
7089
- return cachedClearTimeout.call(null, marker);
7090
- } catch (e){
7091
- // 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.
7092
- // Some versions of I.E. have different rules for clearTimeout vs setTimeout
7093
- return cachedClearTimeout.call(this, marker);
7094
- }
7095
  }
7096
 
 
7097
 
7098
-
 
7099
  }
7100
- var queue = [];
7101
- var draining = false;
7102
- var currentQueue;
7103
- var queueIndex = -1;
7104
-
7105
- function cleanUpNextTick() {
7106
- if (!draining || !currentQueue) {
7107
- return;
7108
- }
7109
- draining = false;
7110
- if (currentQueue.length) {
7111
- queue = currentQueue.concat(queue);
7112
- } else {
7113
- queueIndex = -1;
7114
- }
7115
- if (queue.length) {
7116
- drainQueue();
7117
  }
7118
- }
7119
 
7120
- function drainQueue() {
7121
- if (draining) {
7122
- return;
7123
  }
7124
- var timeout = runTimeout(cleanUpNextTick);
7125
- draining = true;
7126
 
7127
- var len = queue.length;
7128
- while(len) {
7129
- currentQueue = queue;
7130
- queue = [];
7131
- while (++queueIndex < len) {
7132
- if (currentQueue) {
7133
- currentQueue[queueIndex].run();
7134
- }
7135
- }
7136
- queueIndex = -1;
7137
- len = queue.length;
7138
- }
7139
- currentQueue = null;
7140
- draining = false;
7141
- runClearTimeout(timeout);
7142
  }
 
 
 
 
 
7143
 
7144
- process.nextTick = function (fun) {
7145
- var args = new Array(arguments.length - 1);
7146
- if (arguments.length > 1) {
7147
- for (var i = 1; i < arguments.length; i++) {
7148
- args[i - 1] = arguments[i];
7149
- }
7150
- }
7151
- queue.push(new Item(fun, args));
7152
- if (queue.length === 1 && !draining) {
7153
- runTimeout(drainQueue);
7154
- }
7155
- };
7156
 
7157
- // v8 likes predictible objects
7158
- function Item(fun, array) {
7159
- this.fun = fun;
7160
- this.array = array;
7161
  }
7162
- Item.prototype.run = function () {
7163
- this.fun.apply(null, this.array);
7164
- };
7165
- process.title = 'browser';
7166
- process.browser = true;
7167
- process.env = {};
7168
- process.argv = [];
7169
- process.version = ''; // empty string to avoid regexp issues
7170
- process.versions = {};
7171
 
7172
- function noop() {}
7173
 
7174
- process.on = noop;
7175
- process.addListener = noop;
7176
- process.once = noop;
7177
- process.off = noop;
7178
- process.removeListener = noop;
7179
- process.removeAllListeners = noop;
7180
- process.emit = noop;
7181
- process.prependListener = noop;
7182
- process.prependOnceListener = noop;
7183
 
7184
- process.listeners = function (name) { return [] }
 
 
 
 
 
 
 
 
 
 
 
 
7185
 
7186
- process.binding = function (name) {
7187
- throw new Error('process.binding is not supported');
7188
- };
 
7189
 
7190
- process.cwd = function () { return '/' };
7191
- process.chdir = function (dir) {
7192
- throw new Error('process.chdir is not supported');
7193
- };
7194
- process.umask = function() { return 0; };
7195
 
 
 
 
 
 
 
 
 
 
 
 
7196
 
7197
- /***/ }),
 
7198
 
7199
- /***/ "./node_modules/prop-types/checkPropTypes.js":
7200
- /*!***************************************************!*\
7201
- !*** ./node_modules/prop-types/checkPropTypes.js ***!
7202
- \***************************************************/
7203
- /*! no static exports found */
7204
- /***/ (function(module, exports, __webpack_require__) {
7205
 
7206
- "use strict";
7207
- /**
7208
- * Copyright (c) 2013-present, Facebook, Inc.
7209
- *
7210
- * This source code is licensed under the MIT license found in the
7211
- * LICENSE file in the root directory of this source tree.
7212
- */
7213
 
 
 
 
 
7214
 
7215
 
7216
- if (true) {
7217
- var invariant = __webpack_require__(/*! fbjs/lib/invariant */ "./node_modules/fbjs/lib/invariant.js");
7218
- var warning = __webpack_require__(/*! fbjs/lib/warning */ "./node_modules/fbjs/lib/warning.js");
7219
- var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ "./node_modules/prop-types/lib/ReactPropTypesSecret.js");
7220
- var loggedTypeFailures = {};
7221
- }
7222
 
7223
- /**
7224
- * Assert that the values match with the type specs.
7225
- * Error messages are memorized and will only be shown once.
7226
- *
7227
- * @param {object} typeSpecs Map of name to a ReactPropType
7228
- * @param {object} values Runtime values that need to be type-checked
7229
- * @param {string} location e.g. "prop", "context", "child context"
7230
- * @param {string} componentName Name of the component for error messages.
7231
- * @param {?Function} getStack Returns the component stack.
7232
- * @private
7233
- */
7234
- function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
7235
- if (true) {
7236
- for (var typeSpecName in typeSpecs) {
7237
- if (typeSpecs.hasOwnProperty(typeSpecName)) {
7238
- var error;
7239
- // Prop type validation may throw. In case they do, we don't want to
7240
- // fail the render phase where it didn't fail before. So we log it.
7241
- // After these have been cleaned up, we'll let them throw.
7242
- try {
7243
- // This is intentionally an invariant that gets caught. It's the same
7244
- // behavior as without this statement except with a better message.
7245
- invariant(typeof typeSpecs[typeSpecName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'the `prop-types` package, but received `%s`.', componentName || 'React class', location, typeSpecName, typeof typeSpecs[typeSpecName]);
7246
- error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
7247
- } catch (ex) {
7248
- error = ex;
7249
- }
7250
- 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', location, typeSpecName, typeof error);
7251
- if (error instanceof Error && !(error.message in loggedTypeFailures)) {
7252
- // Only monitor this failure once because there tends to be a lot of the
7253
- // same error.
7254
- loggedTypeFailures[error.message] = true;
7255
 
7256
- var stack = getStack ? getStack() : '';
 
 
7257
 
7258
- warning(false, 'Failed %s type: %s%s', location, error.message, stack != null ? stack : '');
7259
- }
7260
- }
7261
  }
7262
- }
7263
- }
7264
 
7265
- module.exports = checkPropTypes;
 
 
7266
 
 
 
 
7267
 
7268
- /***/ }),
 
 
7269
 
7270
- /***/ "./node_modules/prop-types/factory.js":
7271
- /*!********************************************!*\
7272
- !*** ./node_modules/prop-types/factory.js ***!
7273
- \********************************************/
7274
- /*! no static exports found */
7275
- /***/ (function(module, exports, __webpack_require__) {
7276
 
7277
- "use strict";
7278
- /**
7279
- * Copyright (c) 2013-present, Facebook, Inc.
7280
- *
7281
- * This source code is licensed under the MIT license found in the
7282
- * LICENSE file in the root directory of this source tree.
7283
- */
7284
 
 
 
 
 
 
7285
 
7286
 
7287
- // React 15.5 references this module, and assumes PropTypes are still callable in production.
7288
- // Therefore we re-export development-only version with all the PropTypes checks here.
7289
- // However if one is migrating to the `prop-types` npm library, they will go through the
7290
- // `index.js` entry point, and it will branch depending on the environment.
7291
- var factory = __webpack_require__(/*! ./factoryWithTypeCheckers */ "./node_modules/prop-types/factoryWithTypeCheckers.js");
7292
- module.exports = function(isValidElement) {
7293
- // It is still allowed in 15.5.
7294
- var throwOnDirectAccess = false;
7295
- return factory(isValidElement, throwOnDirectAccess);
7296
- };
7297
 
 
 
 
 
7298
 
7299
- /***/ }),
 
 
 
 
 
 
7300
 
7301
- /***/ "./node_modules/prop-types/factoryWithTypeCheckers.js":
7302
- /*!************************************************************!*\
7303
- !*** ./node_modules/prop-types/factoryWithTypeCheckers.js ***!
7304
- \************************************************************/
7305
- /*! no static exports found */
7306
- /***/ (function(module, exports, __webpack_require__) {
7307
 
7308
- "use strict";
7309
- /**
7310
- * Copyright (c) 2013-present, Facebook, Inc.
7311
- *
7312
- * This source code is licensed under the MIT license found in the
7313
- * LICENSE file in the root directory of this source tree.
7314
- */
 
 
 
 
 
 
 
 
 
 
 
 
 
7315
 
 
 
7316
 
 
 
 
 
 
7317
 
7318
- var emptyFunction = __webpack_require__(/*! fbjs/lib/emptyFunction */ "./node_modules/fbjs/lib/emptyFunction.js");
7319
- var invariant = __webpack_require__(/*! fbjs/lib/invariant */ "./node_modules/fbjs/lib/invariant.js");
7320
- var warning = __webpack_require__(/*! fbjs/lib/warning */ "./node_modules/fbjs/lib/warning.js");
7321
- var assign = __webpack_require__(/*! object-assign */ "./node_modules/object-assign/index.js");
7322
 
7323
- var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ "./node_modules/prop-types/lib/ReactPropTypesSecret.js");
7324
- var checkPropTypes = __webpack_require__(/*! ./checkPropTypes */ "./node_modules/prop-types/checkPropTypes.js");
 
 
 
 
 
 
7325
 
7326
- module.exports = function(isValidElement, throwOnDirectAccess) {
7327
- /* global Symbol */
7328
- var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
7329
- var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
7330
 
7331
- /**
7332
- * Returns the iterator method function contained on the iterable object.
7333
- *
7334
- * Be sure to invoke the function with the iterable as context:
7335
- *
7336
- * var iteratorFn = getIteratorFn(myIterable);
7337
- * if (iteratorFn) {
7338
- * var iterator = iteratorFn.call(myIterable);
7339
- * ...
7340
- * }
7341
- *
7342
- * @param {?object} maybeIterable
7343
- * @return {?function}
7344
- */
7345
- function getIteratorFn(maybeIterable) {
7346
- var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
7347
- if (typeof iteratorFn === 'function') {
7348
- return iteratorFn;
 
7349
  }
7350
- }
7351
 
 
 
7352
  /**
7353
- * Collection of methods that allow declaration and validation of props that are
7354
- * supplied to React components. Example usage:
7355
- *
7356
- * var Props = require('ReactPropTypes');
7357
- * var MyArticle = React.createClass({
7358
- * propTypes: {
7359
- * // An optional string prop named "description".
7360
- * description: Props.string,
7361
- *
7362
- * // A required enum prop named "category".
7363
- * category: Props.oneOf(['News','Photos']).isRequired,
7364
- *
7365
- * // A prop named "dialog" that requires an instance of Dialog.
7366
- * dialog: Props.instanceOf(Dialog).isRequired
7367
- * },
7368
- * render: function() { ... }
7369
- * });
7370
- *
7371
- * A more formal specification of how these methods are used:
7372
- *
7373
- * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
7374
- * decl := ReactPropTypes.{type}(.isRequired)?
7375
- *
7376
- * Each and every declaration produces a function with the same signature. This
7377
- * allows the creation of custom validation functions. For example:
7378
- *
7379
- * var MyLink = React.createClass({
7380
- * propTypes: {
7381
- * // An optional string or URI prop named "href".
7382
- * href: function(props, propName, componentName) {
7383
- * var propValue = props[propName];
7384
- * if (propValue != null && typeof propValue !== 'string' &&
7385
- * !(propValue instanceof URI)) {
7386
- * return new Error(
7387
- * 'Expected a string or an URI for ' + propName + ' in ' +
7388
- * componentName
7389
- * );
7390
- * }
7391
- * }
7392
- * },
7393
- * render: function() {...}
7394
- * });
7395
- *
7396
- * @internal
7397
  */
7398
 
7399
- var ANONYMOUS = '<<anonymous>>';
7400
-
7401
- // Important!
7402
- // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
7403
- var ReactPropTypes = {
7404
- array: createPrimitiveTypeChecker('array'),
7405
- bool: createPrimitiveTypeChecker('boolean'),
7406
- func: createPrimitiveTypeChecker('function'),
7407
- number: createPrimitiveTypeChecker('number'),
7408
- object: createPrimitiveTypeChecker('object'),
7409
- string: createPrimitiveTypeChecker('string'),
7410
- symbol: createPrimitiveTypeChecker('symbol'),
7411
-
7412
- any: createAnyTypeChecker(),
7413
- arrayOf: createArrayOfTypeChecker,
7414
- element: createElementTypeChecker(),
7415
- instanceOf: createInstanceTypeChecker,
7416
- node: createNodeChecker(),
7417
- objectOf: createObjectOfTypeChecker,
7418
- oneOf: createEnumTypeChecker,
7419
- oneOfType: createUnionTypeChecker,
7420
- shape: createShapeTypeChecker,
7421
- exact: createStrictShapeTypeChecker,
7422
- };
7423
 
7424
- /**
7425
- * inlined Object.is polyfill to avoid requiring consumers ship their own
7426
- * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
7427
- */
7428
- /*eslint-disable no-self-compare*/
7429
- function is(x, y) {
7430
- // SameValue algorithm
7431
- if (x === y) {
7432
- // Steps 1-5, 7-10
7433
- // Steps 6.b-6.e: +0 != -0
7434
- return x !== 0 || 1 / x === 1 / y;
7435
- } else {
7436
- // Step 6.a: NaN == NaN
7437
- return x !== x && y !== y;
7438
- }
7439
- }
7440
- /*eslint-enable no-self-compare*/
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7441
 
7442
- /**
7443
- * We use an Error-like object for backward compatibility as people may call
7444
- * PropTypes directly and inspect their output. However, we don't use real
7445
- * Errors anymore. We don't inspect their stack anyway, and creating them
7446
- * is prohibitively expensive if they are created too often, such as what
7447
- * happens in oneOfType() for any type before the one that matched.
7448
- */
7449
- function PropTypeError(message) {
7450
- this.message = message;
7451
- this.stack = '';
7452
- }
7453
- // Make `instanceof Error` still work for returned errors.
7454
- PropTypeError.prototype = Error.prototype;
7455
 
7456
- function createChainableTypeChecker(validate) {
7457
- if (true) {
7458
- var manualPropTypeCallCache = {};
7459
- var manualPropTypeWarningCount = 0;
7460
- }
7461
- function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
7462
- componentName = componentName || ANONYMOUS;
7463
- propFullName = propFullName || propName;
7464
-
7465
- if (secret !== ReactPropTypesSecret) {
7466
- if (throwOnDirectAccess) {
7467
- // New behavior only for users of `prop-types` package
7468
- invariant(
7469
- false,
7470
- 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
7471
- 'Use `PropTypes.checkPropTypes()` to call them. ' +
7472
- 'Read more at http://fb.me/use-check-prop-types'
7473
- );
7474
- } else if ( true && typeof console !== 'undefined') {
7475
- // Old behavior for people using React.PropTypes
7476
- var cacheKey = componentName + ':' + propName;
7477
- if (
7478
- !manualPropTypeCallCache[cacheKey] &&
7479
- // Avoid spamming the console because they are often not actionable except for lib authors
7480
- manualPropTypeWarningCount < 3
7481
- ) {
7482
- warning(
7483
- false,
7484
- 'You are manually calling a React.PropTypes validation ' +
7485
- 'function for the `%s` prop on `%s`. This is deprecated ' +
7486
- 'and will throw in the standalone `prop-types` package. ' +
7487
- 'You may be seeing this warning due to a third-party PropTypes ' +
7488
- 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.',
7489
- propFullName,
7490
- componentName
7491
- );
7492
- manualPropTypeCallCache[cacheKey] = true;
7493
- manualPropTypeWarningCount++;
7494
- }
7495
- }
7496
- }
7497
- if (props[propName] == null) {
7498
- if (isRequired) {
7499
- if (props[propName] === null) {
7500
- return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
7501
- }
7502
- return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
7503
- }
7504
- return null;
7505
- } else {
7506
- return validate(props, propName, componentName, location, propFullName);
7507
- }
7508
- }
7509
 
7510
- var chainedCheckType = checkType.bind(null, false);
7511
- chainedCheckType.isRequired = checkType.bind(null, true);
 
7512
 
7513
- return chainedCheckType;
7514
- }
7515
 
7516
- function createPrimitiveTypeChecker(expectedType) {
7517
- function validate(props, propName, componentName, location, propFullName, secret) {
7518
- var propValue = props[propName];
7519
- var propType = getPropType(propValue);
7520
- if (propType !== expectedType) {
7521
- // `propValue` being instance of, say, date/regexp, pass the 'object'
7522
- // check, but we can offer a more precise error message here rather than
7523
- // 'of type `object`'.
7524
- var preciseType = getPreciseType(propValue);
7525
 
7526
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));
7527
- }
7528
- return null;
7529
  }
7530
- return createChainableTypeChecker(validate);
7531
- }
7532
 
7533
- function createAnyTypeChecker() {
7534
- return createChainableTypeChecker(emptyFunction.thatReturnsNull);
7535
- }
7536
 
7537
- function createArrayOfTypeChecker(typeChecker) {
7538
- function validate(props, propName, componentName, location, propFullName) {
7539
- if (typeof typeChecker !== 'function') {
7540
- return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
7541
- }
7542
- var propValue = props[propName];
7543
- if (!Array.isArray(propValue)) {
7544
- var propType = getPropType(propValue);
7545
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
7546
- }
7547
- for (var i = 0; i < propValue.length; i++) {
7548
- var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);
7549
- if (error instanceof Error) {
7550
- return error;
7551
- }
7552
- }
7553
- return null;
7554
- }
7555
- return createChainableTypeChecker(validate);
7556
- }
7557
 
7558
- function createElementTypeChecker() {
7559
- function validate(props, propName, componentName, location, propFullName) {
7560
- var propValue = props[propName];
7561
- if (!isValidElement(propValue)) {
7562
- var propType = getPropType(propValue);
7563
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
7564
- }
7565
- return null;
7566
- }
7567
- return createChainableTypeChecker(validate);
7568
- }
7569
 
7570
- function createInstanceTypeChecker(expectedClass) {
7571
- function validate(props, propName, componentName, location, propFullName) {
7572
- if (!(props[propName] instanceof expectedClass)) {
7573
- var expectedClassName = expectedClass.name || ANONYMOUS;
7574
- var actualClassName = getClassName(props[propName]);
7575
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
7576
  }
7577
- return null;
7578
- }
7579
- return createChainableTypeChecker(validate);
7580
- }
7581
 
7582
- function createEnumTypeChecker(expectedValues) {
7583
- if (!Array.isArray(expectedValues)) {
7584
- true ? warning(false, 'Invalid argument supplied to oneOf, expected an instance of array.') : undefined;
7585
- return emptyFunction.thatReturnsNull;
7586
  }
7587
 
7588
- function validate(props, propName, componentName, location, propFullName) {
7589
- var propValue = props[propName];
7590
- for (var i = 0; i < expectedValues.length; i++) {
7591
- if (is(propValue, expectedValues[i])) {
7592
- return null;
7593
- }
7594
- }
7595
 
7596
- var valuesString = JSON.stringify(expectedValues);
7597
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
7598
  }
7599
- return createChainableTypeChecker(validate);
7600
- }
7601
 
7602
- function createObjectOfTypeChecker(typeChecker) {
7603
- function validate(props, propName, componentName, location, propFullName) {
7604
- if (typeof typeChecker !== 'function') {
7605
- return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
7606
- }
7607
- var propValue = props[propName];
7608
- var propType = getPropType(propValue);
7609
- if (propType !== 'object') {
7610
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
7611
- }
7612
- for (var key in propValue) {
7613
- if (propValue.hasOwnProperty(key)) {
7614
- var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
7615
- if (error instanceof Error) {
7616
- return error;
7617
- }
7618
- }
7619
- }
7620
- return null;
7621
- }
7622
- return createChainableTypeChecker(validate);
7623
- }
7624
 
7625
- function createUnionTypeChecker(arrayOfTypeCheckers) {
7626
- if (!Array.isArray(arrayOfTypeCheckers)) {
7627
- true ? warning(false, 'Invalid argument supplied to oneOfType, expected an instance of array.') : undefined;
7628
- return emptyFunction.thatReturnsNull;
7629
  }
7630
 
7631
- for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
7632
- var checker = arrayOfTypeCheckers[i];
7633
- if (typeof checker !== 'function') {
7634
- warning(
7635
- false,
7636
- 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +
7637
- 'received %s at index %s.',
7638
- getPostfixForTypeWarning(checker),
7639
- i
7640
- );
7641
- return emptyFunction.thatReturnsNull;
7642
- }
7643
- }
7644
 
7645
- function validate(props, propName, componentName, location, propFullName) {
7646
- for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
7647
- var checker = arrayOfTypeCheckers[i];
7648
- if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) {
7649
- return null;
7650
- }
7651
  }
7652
-
7653
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));
7654
  }
7655
- return createChainableTypeChecker(validate);
7656
- }
7657
 
7658
- function createNodeChecker() {
7659
- function validate(props, propName, componentName, location, propFullName) {
7660
- if (!isNode(props[propName])) {
7661
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
7662
- }
7663
- return null;
7664
- }
7665
- return createChainableTypeChecker(validate);
7666
- }
7667
 
7668
- function createShapeTypeChecker(shapeTypes) {
7669
- function validate(props, propName, componentName, location, propFullName) {
7670
- var propValue = props[propName];
7671
- var propType = getPropType(propValue);
7672
- if (propType !== 'object') {
7673
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
7674
- }
7675
- for (var key in shapeTypes) {
7676
- var checker = shapeTypes[key];
7677
- if (!checker) {
7678
- continue;
7679
- }
7680
- var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
7681
- if (error) {
7682
- return error;
7683
- }
7684
  }
7685
- return null;
7686
- }
7687
- return createChainableTypeChecker(validate);
7688
- }
7689
 
7690
- function createStrictShapeTypeChecker(shapeTypes) {
7691
- function validate(props, propName, componentName, location, propFullName) {
7692
- var propValue = props[propName];
7693
- var propType = getPropType(propValue);
7694
- if (propType !== 'object') {
7695
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
7696
- }
7697
- // We need to check all keys in case some are required but missing from
7698
- // props.
7699
- var allKeys = assign({}, props[propName], shapeTypes);
7700
- for (var key in allKeys) {
7701
- var checker = shapeTypes[key];
7702
- if (!checker) {
7703
- return new PropTypeError(
7704
- 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +
7705
- '\nBad object: ' + JSON.stringify(props[propName], null, ' ') +
7706
- '\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')
7707
- );
7708
- }
7709
- var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
7710
- if (error) {
7711
- return error;
7712
- }
7713
- }
7714
- return null;
7715
  }
 
 
7716
 
7717
- return createChainableTypeChecker(validate);
7718
- }
7719
 
7720
- function isNode(propValue) {
7721
- switch (typeof propValue) {
7722
- case 'number':
7723
- case 'string':
7724
- case 'undefined':
7725
- return true;
7726
- case 'boolean':
7727
- return !propValue;
7728
- case 'object':
7729
- if (Array.isArray(propValue)) {
7730
- return propValue.every(isNode);
7731
- }
7732
- if (propValue === null || isValidElement(propValue)) {
7733
- return true;
7734
- }
7735
 
7736
- var iteratorFn = getIteratorFn(propValue);
7737
- if (iteratorFn) {
7738
- var iterator = iteratorFn.call(propValue);
7739
- var step;
7740
- if (iteratorFn !== propValue.entries) {
7741
- while (!(step = iterator.next()).done) {
7742
- if (!isNode(step.value)) {
7743
- return false;
7744
- }
7745
- }
7746
- } else {
7747
- // Iterator will provide entry [k,v] tuples rather than values.
7748
- while (!(step = iterator.next()).done) {
7749
- var entry = step.value;
7750
- if (entry) {
7751
- if (!isNode(entry[1])) {
7752
- return false;
7753
- }
7754
- }
7755
- }
7756
- }
7757
- } else {
7758
- return false;
7759
- }
7760
 
7761
- return true;
7762
- default:
7763
- return false;
7764
- }
 
 
 
7765
  }
7766
 
7767
- function isSymbol(propType, propValue) {
7768
- // Native Symbol.
7769
- if (propType === 'symbol') {
7770
- return true;
7771
- }
7772
-
7773
- // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
7774
- if (propValue['@@toStringTag'] === 'Symbol') {
7775
- return true;
7776
- }
7777
-
7778
- // Fallback for non-spec compliant Symbols which are polyfilled.
7779
- if (typeof Symbol === 'function' && propValue instanceof Symbol) {
7780
- return true;
7781
- }
 
7782
 
7783
- return false;
 
 
 
 
 
 
 
7784
  }
7785
 
7786
- // Equivalent of `typeof` but with special handling for array and regexp.
7787
- function getPropType(propValue) {
7788
- var propType = typeof propValue;
7789
- if (Array.isArray(propValue)) {
7790
- return 'array';
7791
- }
7792
- if (propValue instanceof RegExp) {
7793
- // Old webkits (at least until Android 4.0) return 'function' rather than
7794
- // 'object' for typeof a RegExp. We'll normalize this here so that /bla/
7795
- // passes PropTypes.object.
7796
- return 'object';
7797
- }
7798
- if (isSymbol(propType, propValue)) {
7799
- return 'symbol';
7800
- }
7801
- return propType;
 
 
7802
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7803
 
7804
- // This handles more types than `getPropType`. Only used for error messages.
7805
- // See `createPrimitiveTypeChecker`.
7806
- function getPreciseType(propValue) {
7807
- if (typeof propValue === 'undefined' || propValue === null) {
7808
- return '' + propValue;
7809
- }
7810
- var propType = getPropType(propValue);
7811
- if (propType === 'object') {
7812
- if (propValue instanceof Date) {
7813
- return 'date';
7814
- } else if (propValue instanceof RegExp) {
7815
- return 'regexp';
7816
- }
7817
  }
7818
- return propType;
 
7819
  }
7820
 
7821
- // Returns a string that is postfixed to a warning about an invalid type.
7822
- // For example, "undefined" or "of type array"
7823
- function getPostfixForTypeWarning(value) {
7824
- var type = getPreciseType(value);
7825
- switch (type) {
7826
- case 'array':
7827
- case 'object':
7828
- return 'an ' + type;
7829
- case 'boolean':
7830
- case 'date':
7831
- case 'regexp':
7832
- return 'a ' + type;
7833
- default:
7834
- return type;
 
 
 
 
 
 
7835
  }
7836
  }
7837
 
7838
- // Returns class name of the object, if any.
7839
- function getClassName(propValue) {
7840
- if (!propValue.constructor || !propValue.constructor.name) {
7841
- return ANONYMOUS;
7842
- }
7843
- return propValue.constructor.name;
 
 
 
7844
  }
7845
 
7846
- ReactPropTypes.checkPropTypes = checkPropTypes;
7847
- ReactPropTypes.PropTypes = ReactPropTypes;
 
 
 
 
7848
 
7849
- return ReactPropTypes;
7850
- };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7851
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7852
 
7853
- /***/ }),
 
 
 
 
 
 
 
 
 
 
 
 
 
7854
 
7855
- /***/ "./node_modules/prop-types/lib/ReactPropTypesSecret.js":
7856
- /*!*************************************************************!*\
7857
- !*** ./node_modules/prop-types/lib/ReactPropTypesSecret.js ***!
7858
- \*************************************************************/
7859
- /*! no static exports found */
7860
- /***/ (function(module, exports, __webpack_require__) {
7861
 
7862
- "use strict";
7863
- /**
7864
- * Copyright (c) 2013-present, Facebook, Inc.
7865
- *
7866
- * This source code is licensed under the MIT license found in the
7867
- * LICENSE file in the root directory of this source tree.
7868
- */
7869
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7870
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7871
 
7872
- var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7873
 
7874
- module.exports = ReactPropTypesSecret;
 
 
 
 
 
 
 
 
7875
 
7876
 
7877
- /***/ }),
 
 
 
 
 
 
7878
 
7879
- /***/ "./node_modules/react-dom/index.js":
7880
- /*!*****************************************!*\
7881
- !*** ./node_modules/react-dom/index.js ***!
7882
- \*****************************************/
7883
- /*! no static exports found */
7884
- /***/ (function(module, exports, __webpack_require__) {
7885
 
7886
- "use strict";
 
 
 
 
 
 
 
7887
 
 
 
 
 
7888
 
7889
- module.exports = __webpack_require__(/*! ./lib/ReactDOM */ "./node_modules/react-dom/lib/ReactDOM.js");
 
 
 
7890
 
 
 
7891
 
7892
- /***/ }),
 
 
 
 
 
 
 
 
7893
 
7894
- /***/ "./node_modules/react-dom/lib/ARIADOMPropertyConfig.js":
7895
- /*!*************************************************************!*\
7896
- !*** ./node_modules/react-dom/lib/ARIADOMPropertyConfig.js ***!
7897
- \*************************************************************/
7898
- /*! no static exports found */
7899
- /***/ (function(module, exports, __webpack_require__) {
7900
 
7901
- "use strict";
7902
- /**
7903
- * Copyright (c) 2013-present, Facebook, Inc.
7904
- *
7905
- * This source code is licensed under the MIT license found in the
7906
- * LICENSE file in the root directory of this source tree.
7907
- *
7908
- */
7909
 
 
 
 
 
 
 
 
 
 
 
7910
 
 
7911
 
7912
- var ARIADOMPropertyConfig = {
7913
- Properties: {
7914
- // Global States and Properties
7915
- 'aria-current': 0, // state
7916
- 'aria-details': 0,
7917
- 'aria-disabled': 0, // state
7918
- 'aria-hidden': 0, // state
7919
- 'aria-invalid': 0, // state
7920
- 'aria-keyshortcuts': 0,
7921
- 'aria-label': 0,
7922
- 'aria-roledescription': 0,
7923
- // Widget Attributes
7924
- 'aria-autocomplete': 0,
7925
- 'aria-checked': 0,
7926
- 'aria-expanded': 0,
7927
- 'aria-haspopup': 0,
7928
- 'aria-level': 0,
7929
- 'aria-modal': 0,
7930
- 'aria-multiline': 0,
7931
- 'aria-multiselectable': 0,
7932
- 'aria-orientation': 0,
7933
- 'aria-placeholder': 0,
7934
- 'aria-pressed': 0,
7935
- 'aria-readonly': 0,
7936
- 'aria-required': 0,
7937
- 'aria-selected': 0,
7938
- 'aria-sort': 0,
7939
- 'aria-valuemax': 0,
7940
- 'aria-valuemin': 0,
7941
- 'aria-valuenow': 0,
7942
- 'aria-valuetext': 0,
7943
- // Live Region Attributes
7944
- 'aria-atomic': 0,
7945
- 'aria-busy': 0,
7946
- 'aria-live': 0,
7947
- 'aria-relevant': 0,
7948
- // Drag-and-Drop Attributes
7949
- 'aria-dropeffect': 0,
7950
- 'aria-grabbed': 0,
7951
- // Relationship Attributes
7952
- 'aria-activedescendant': 0,
7953
- 'aria-colcount': 0,
7954
- 'aria-colindex': 0,
7955
- 'aria-colspan': 0,
7956
- 'aria-controls': 0,
7957
- 'aria-describedby': 0,
7958
- 'aria-errormessage': 0,
7959
- 'aria-flowto': 0,
7960
- 'aria-labelledby': 0,
7961
- 'aria-owns': 0,
7962
- 'aria-posinset': 0,
7963
- 'aria-rowcount': 0,
7964
- 'aria-rowindex': 0,
7965
- 'aria-rowspan': 0,
7966
- 'aria-setsize': 0
7967
- },
7968
- DOMAttributeNames: {},
7969
- DOMPropertyNames: {}
7970
- };
7971
 
7972
- module.exports = ARIADOMPropertyConfig;
 
 
 
 
 
 
 
 
 
7973
 
7974
- /***/ }),
 
7975
 
7976
- /***/ "./node_modules/react-dom/lib/AutoFocusUtils.js":
7977
- /*!******************************************************!*\
7978
- !*** ./node_modules/react-dom/lib/AutoFocusUtils.js ***!
7979
- \******************************************************/
7980
- /*! no static exports found */
7981
- /***/ (function(module, exports, __webpack_require__) {
7982
 
7983
- "use strict";
7984
- /**
7985
- * Copyright (c) 2013-present, Facebook, Inc.
7986
- *
7987
- * This source code is licensed under the MIT license found in the
7988
- * LICENSE file in the root directory of this source tree.
7989
- *
7990
- */
7991
 
 
 
 
 
7992
 
 
7993
 
7994
- var ReactDOMComponentTree = __webpack_require__(/*! ./ReactDOMComponentTree */ "./node_modules/react-dom/lib/ReactDOMComponentTree.js");
 
 
7995
 
7996
- var focusNode = __webpack_require__(/*! fbjs/lib/focusNode */ "./node_modules/fbjs/lib/focusNode.js");
 
 
 
 
 
 
 
 
 
7997
 
7998
- var AutoFocusUtils = {
7999
- focusDOMComponent: function () {
8000
- focusNode(ReactDOMComponentTree.getNodeFromInstance(this));
8001
  }
8002
- };
8003
-
8004
- module.exports = AutoFocusUtils;
8005
-
8006
- /***/ }),
8007
-
8008
- /***/ "./node_modules/react-dom/lib/BeforeInputEventPlugin.js":
8009
- /*!**************************************************************!*\
8010
- !*** ./node_modules/react-dom/lib/BeforeInputEventPlugin.js ***!
8011
- \**************************************************************/
8012
- /*! no static exports found */
8013
- /***/ (function(module, exports, __webpack_require__) {
8014
-
8015
- "use strict";
8016
- /**
8017
- * Copyright (c) 2013-present, Facebook, Inc.
8018
- *
8019
- * This source code is licensed under the MIT license found in the
8020
- * LICENSE file in the root directory of this source tree.
8021
- *
8022
- */
8023
-
8024
-
8025
 
8026
- var EventPropagators = __webpack_require__(/*! ./EventPropagators */ "./node_modules/react-dom/lib/EventPropagators.js");
8027
- var ExecutionEnvironment = __webpack_require__(/*! fbjs/lib/ExecutionEnvironment */ "./node_modules/fbjs/lib/ExecutionEnvironment.js");
8028
- var FallbackCompositionState = __webpack_require__(/*! ./FallbackCompositionState */ "./node_modules/react-dom/lib/FallbackCompositionState.js");
8029
- var SyntheticCompositionEvent = __webpack_require__(/*! ./SyntheticCompositionEvent */ "./node_modules/react-dom/lib/SyntheticCompositionEvent.js");
8030
- var SyntheticInputEvent = __webpack_require__(/*! ./SyntheticInputEvent */ "./node_modules/react-dom/lib/SyntheticInputEvent.js");
8031
-
8032
- var END_KEYCODES = [9, 13, 27, 32]; // Tab, Return, Esc, Space
8033
- var START_KEYCODE = 229;
8034
-
8035
- var canUseCompositionEvent = ExecutionEnvironment.canUseDOM && 'CompositionEvent' in window;
8036
-
8037
- var documentMode = null;
8038
- if (ExecutionEnvironment.canUseDOM && 'documentMode' in document) {
8039
- documentMode = document.documentMode;
8040
  }
8041
-
8042
- // Webkit offers a very useful `textInput` event that can be used to
8043
- // directly represent `beforeInput`. The IE `textinput` event is not as
8044
- // useful, so we don't use it.
8045
- var canUseTextInputEvent = ExecutionEnvironment.canUseDOM && 'TextEvent' in window && !documentMode && !isPresto();
8046
-
8047
- // In IE9+, we have access to composition events, but the data supplied
8048
- // by the native compositionend event may be incorrect. Japanese ideographic
8049
- // spaces, for instance (\u3000) are not recorded correctly.
8050
- var useFallbackCompositionData = ExecutionEnvironment.canUseDOM && (!canUseCompositionEvent || documentMode && documentMode > 8 && documentMode <= 11);
8051
-
8052
- /**
8053
- * Opera <= 12 includes TextEvent in window, but does not fire
8054
- * text input events. Rely on keypress instead.
8055
- */
8056
- function isPresto() {
8057
- var opera = window.opera;
8058
- return typeof opera === 'object' && typeof opera.version === 'function' && parseInt(opera.version(), 10) <= 12;
8059
  }
8060
-
8061
- var SPACEBAR_CODE = 32;
8062
- var SPACEBAR_CHAR = String.fromCharCode(SPACEBAR_CODE);
8063
-
8064
- // Events and their corresponding property names.
8065
- var eventTypes = {
8066
- beforeInput: {
8067
- phasedRegistrationNames: {
8068
- bubbled: 'onBeforeInput',
8069
- captured: 'onBeforeInputCapture'
8070
- },
8071
- dependencies: ['topCompositionEnd', 'topKeyPress', 'topTextInput', 'topPaste']
8072
- },
8073
- compositionEnd: {
8074
- phasedRegistrationNames: {
8075
- bubbled: 'onCompositionEnd',
8076
- captured: 'onCompositionEndCapture'
8077
- },
8078
- dependencies: ['topBlur', 'topCompositionEnd', 'topKeyDown', 'topKeyPress', 'topKeyUp', 'topMouseDown']
8079
- },
8080
- compositionStart: {
8081
- phasedRegistrationNames: {
8082
- bubbled: 'onCompositionStart',
8083
- captured: 'onCompositionStartCapture'
8084
- },
8085
- dependencies: ['topBlur', 'topCompositionStart', 'topKeyDown', 'topKeyPress', 'topKeyUp', 'topMouseDown']
8086
- },
8087
- compositionUpdate: {
8088
- phasedRegistrationNames: {
8089
- bubbled: 'onCompositionUpdate',
8090
- captured: 'onCompositionUpdateCapture'
8091
- },
8092
- dependencies: ['topBlur', 'topCompositionUpdate', 'topKeyDown', 'topKeyPress', 'topKeyUp', 'topMouseDown']
8093
  }
8094
- };
8095
-
8096
- // Track whether we've ever handled a keypress on the space key.
8097
- var hasSpaceKeypress = false;
8098
-
8099
- /**
8100
- * Return whether a native keypress event is assumed to be a command.
8101
- * This is required because Firefox fires `keypress` events for key commands
8102
- * (cut, copy, select-all, etc.) even though no character is inserted.
8103
- */
8104
- function isKeypressCommand(nativeEvent) {
8105
- return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&
8106
- // ctrlKey && altKey is equivalent to AltGr, and is not a command.
8107
- !(nativeEvent.ctrlKey && nativeEvent.altKey);
8108
  }
8109
-
8110
- /**
8111
- * Translate native top level events into event types.
8112
- *
8113
- * @param {string} topLevelType
8114
- * @return {object}
8115
- */
8116
- function getCompositionEventType(topLevelType) {
8117
- switch (topLevelType) {
8118
- case 'topCompositionStart':
8119
- return eventTypes.compositionStart;
8120
- case 'topCompositionEnd':
8121
- return eventTypes.compositionEnd;
8122
- case 'topCompositionUpdate':
8123
- return eventTypes.compositionUpdate;
8124
  }
8125
  }
8126
-
8127
- /**
8128
- * Does our fallback best-guess model think this event signifies that
8129
- * composition has begun?
8130
- *
8131
- * @param {string} topLevelType
8132
- * @param {object} nativeEvent
8133
- * @return {boolean}
8134
- */
8135
- function isFallbackCompositionStart(topLevelType, nativeEvent) {
8136
- return topLevelType === 'topKeyDown' && nativeEvent.keyCode === START_KEYCODE;
8137
  }
8138
-
8139
- /**
8140
- * Does our fallback mode think that this event is the end of composition?
8141
- *
8142
- * @param {string} topLevelType
8143
- * @param {object} nativeEvent
8144
- * @return {boolean}
8145
- */
8146
- function isFallbackCompositionEnd(topLevelType, nativeEvent) {
8147
- switch (topLevelType) {
8148
- case 'topKeyUp':
8149
- // Command keys insert or clear IME input.
8150
- return END_KEYCODES.indexOf(nativeEvent.keyCode) !== -1;
8151
- case 'topKeyDown':
8152
- // Expect IME keyCode on each keydown. If we get any other
8153
- // code we must have exited earlier.
8154
- return nativeEvent.keyCode !== START_KEYCODE;
8155
- case 'topKeyPress':
8156
- case 'topMouseDown':
8157
- case 'topBlur':
8158
- // Events are not possible without cancelling IME.
8159
- return true;
8160
- default:
8161
- return false;
8162
  }
8163
  }
8164
-
8165
- /**
8166
- * Google Input Tools provides composition data via a CustomEvent,
8167
- * with the `data` property populated in the `detail` object. If this
8168
- * is available on the event object, use it. If not, this is a plain
8169
- * composition event and we have nothing special to extract.
8170
- *
8171
- * @param {object} nativeEvent
8172
- * @return {?string}
8173
- */
8174
- function getDataFromCustomEvent(nativeEvent) {
8175
- var detail = nativeEvent.detail;
8176
- if (typeof detail === 'object' && 'data' in detail) {
8177
- return detail.data;
8178
  }
8179
- return null;
8180
  }
8181
-
8182
- // Track the current IME composition fallback object, if any.
8183
- var currentComposition = null;
8184
-
8185
- /**
8186
- * @return {?object} A SyntheticCompositionEvent.
8187
- */
8188
- function extractCompositionEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget) {
8189
- var eventType;
8190
- var fallbackData;
8191
-
8192
- if (canUseCompositionEvent) {
8193
- eventType = getCompositionEventType(topLevelType);
8194
- } else if (!currentComposition) {
8195
- if (isFallbackCompositionStart(topLevelType, nativeEvent)) {
8196
- eventType = eventTypes.compositionStart;
8197
- }
8198
- } else if (isFallbackCompositionEnd(topLevelType, nativeEvent)) {
8199
- eventType = eventTypes.compositionEnd;
8200
  }
8201
-
8202
- if (!eventType) {
8203
- return null;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8204
  }
 
8205
 
8206
- if (useFallbackCompositionData) {
8207
- // The current composition is stored statically and must not be
8208
- // overwritten while composition continues.
8209
- if (!currentComposition && eventType === eventTypes.compositionStart) {
8210
- currentComposition = FallbackCompositionState.getPooled(nativeEventTarget);
8211
- } else if (eventType === eventTypes.compositionEnd) {
8212
- if (currentComposition) {
8213
- fallbackData = currentComposition.getData();
8214
- }
8215
- }
8216
- }
 
 
 
 
 
 
 
 
 
 
 
 
8217
 
8218
- var event = SyntheticCompositionEvent.getPooled(eventType, targetInst, nativeEvent, nativeEventTarget);
 
8219
 
8220
- if (fallbackData) {
8221
- // Inject data generated from fallback path into the synthetic event.
8222
- // This matches the property of native CompositionEventInterface.
8223
- event.data = fallbackData;
8224
- } else {
8225
- var customData = getDataFromCustomEvent(nativeEvent);
8226
- if (customData !== null) {
8227
- event.data = customData;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8228
  }
 
 
 
8229
  }
8230
 
8231
- EventPropagators.accumulateTwoPhaseDispatches(event);
8232
- return event;
8233
  }
8234
-
8235
  /**
8236
- * @param {string} topLevelType Record from `EventConstants`.
8237
- * @param {object} nativeEvent Native browser event.
8238
- * @return {?string} The string corresponding to this `beforeInput` event.
8239
  */
8240
- function getNativeBeforeInputChars(topLevelType, nativeEvent) {
8241
- switch (topLevelType) {
8242
- case 'topCompositionEnd':
8243
- return getDataFromCustomEvent(nativeEvent);
8244
- case 'topKeyPress':
8245
- /**
8246
- * If native `textInput` events are available, our goal is to make
8247
- * use of them. However, there is a special case: the spacebar key.
8248
- * In Webkit, preventing default on a spacebar `textInput` event
8249
- * cancels character insertion, but it *also* causes the browser
8250
- * to fall back to its default spacebar behavior of scrolling the
8251
- * page.
8252
- *
8253
- * Tracking at:
8254
- * https://code.google.com/p/chromium/issues/detail?id=355103
8255
- *
8256
- * To avoid this issue, use the keypress event as if no `textInput`
8257
- * event is available.
8258
- */
8259
- var which = nativeEvent.which;
8260
- if (which !== SPACEBAR_CODE) {
8261
- return null;
8262
- }
8263
-
8264
- hasSpaceKeypress = true;
8265
- return SPACEBAR_CHAR;
8266
-
8267
- case 'topTextInput':
8268
- // Record the characters to be added to the DOM.
8269
- var chars = nativeEvent.data;
8270
-
8271
- // If it's a spacebar character, assume that we have already handled
8272
- // it at the keypress level and bail immediately. Android Chrome
8273
- // doesn't give us keycodes, so we need to blacklist it.
8274
- if (chars === SPACEBAR_CHAR && hasSpaceKeypress) {
8275
- return null;
8276
- }
8277
 
8278
- return chars;
 
8279
 
8280
- default:
8281
- // For other native event types, do nothing.
 
 
8282
  return null;
 
8283
  }
8284
- }
8285
 
 
 
8286
  /**
8287
- * For browsers that do not provide the `textInput` event, extract the
8288
- * appropriate string to use for SyntheticInputEvent.
8289
- *
8290
- * @param {string} topLevelType Record from `EventConstants`.
8291
- * @param {object} nativeEvent Native browser event.
8292
- * @return {?string} The fallback string for this `beforeInput` event.
8293
  */
8294
- function getFallbackBeforeInputChars(topLevelType, nativeEvent) {
8295
- // If we are currently composing (IME) and using a fallback to do so,
8296
- // try to extract the composed characters from the fallback object.
8297
- // If composition event is available, we extract a string only at
8298
- // compositionevent, otherwise extract it at fallback events.
8299
- if (currentComposition) {
8300
- if (topLevelType === 'topCompositionEnd' || !canUseCompositionEvent && isFallbackCompositionEnd(topLevelType, nativeEvent)) {
8301
- var chars = currentComposition.getData();
8302
- FallbackCompositionState.release(currentComposition);
8303
- currentComposition = null;
8304
- return chars;
 
 
8305
  }
8306
- return null;
8307
  }
 
 
 
 
 
 
 
 
 
8308
 
8309
- switch (topLevelType) {
8310
- case 'topPaste':
8311
- // If a paste event occurs after a keypress, throw out the input
8312
- // chars. Paste events should not lead to BeforeInput events.
8313
- return null;
8314
- case 'topKeyPress':
8315
- /**
8316
- * As of v27, Firefox may fire keypress events even when no character
8317
- * will be inserted. A few possibilities:
8318
- *
8319
- * - `which` is `0`. Arrow keys, Esc key, etc.
8320
- *
8321
- * - `which` is the pressed key code, but no char is available.
8322
- * Ex: 'AltGr + d` in Polish. There is no modified character for
8323
- * this key combination and no character is inserted into the
8324
- * document, but FF fires the keypress for char code `100` anyway.
8325
- * No `input` event will occur.
8326
- *
8327
- * - `which` is the pressed key code, but a command combination is
8328
- * being used. Ex: `Cmd+C`. No character is inserted, and no
8329
- * `input` event will occur.
8330
- */
8331
- if (nativeEvent.which && !isKeypressCommand(nativeEvent)) {
8332
- return String.fromCharCode(nativeEvent.which);
8333
- }
8334
- return null;
8335
- case 'topCompositionEnd':
8336
- return useFallbackCompositionData ? null : nativeEvent.data;
8337
- default:
8338
- return null;
8339
  }
8340
- }
8341
 
8342
- /**
8343
- * Extract a SyntheticInputEvent for `beforeInput`, based on either native
8344
- * `textInput` or fallback behavior.
8345
- *
8346
- * @return {?object} A SyntheticInputEvent.
8347
- */
8348
- function extractBeforeInputEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget) {
8349
- var chars;
8350
 
8351
- if (canUseTextInputEvent) {
8352
- chars = getNativeBeforeInputChars(topLevelType, nativeEvent);
8353
- } else {
8354
- chars = getFallbackBeforeInputChars(topLevelType, nativeEvent);
8355
- }
8356
 
8357
- // If no characters are being inserted, no BeforeInput event should
8358
- // be fired.
8359
- if (!chars) {
8360
- return null;
 
 
 
 
 
8361
  }
 
8362
 
8363
- var event = SyntheticInputEvent.getPooled(eventTypes.beforeInput, targetInst, nativeEvent, nativeEventTarget);
 
 
 
8364
 
8365
- event.data = chars;
8366
- EventPropagators.accumulateTwoPhaseDispatches(event);
8367
- return event;
8368
- }
 
8369
 
8370
- /**
8371
- * Create an `onBeforeInput` event to match
8372
- * http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105/#events-inputevents.
8373
- *
8374
- * This event plugin is based on the native `textInput` event
8375
- * available in Chrome, Safari, Opera, and IE. This event fires after
8376
- * `onKeyPress` and `onCompositionEnd`, but before `onInput`.
8377
- *
8378
- * `beforeInput` is spec'd but not implemented in any browsers, and
8379
- * the `input` event does not provide any useful information about what has
8380
- * actually been added, contrary to the spec. Thus, `textInput` is the best
8381
- * available event to identify the characters that have actually been inserted
8382
- * into the target node.
8383
- *
8384
- * This plugin is also responsible for emitting `composition` events, thus
8385
- * allowing us to share composition fallback code for both `beforeInput` and
8386
- * `composition` event types.
8387
- */
8388
- var BeforeInputEventPlugin = {
8389
- eventTypes: eventTypes,
8390
 
8391
- extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
8392
- return [extractCompositionEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget), extractBeforeInputEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget)];
8393
- }
8394
- };
8395
 
8396
- module.exports = BeforeInputEventPlugin;
 
8397
 
8398
- /***/ }),
8399
 
8400
- /***/ "./node_modules/react-dom/lib/CSSProperty.js":
8401
- /*!***************************************************!*\
8402
- !*** ./node_modules/react-dom/lib/CSSProperty.js ***!
8403
- \***************************************************/
8404
- /*! no static exports found */
8405
- /***/ (function(module, exports, __webpack_require__) {
8406
 
8407
- "use strict";
8408
- /**
8409
- * Copyright (c) 2013-present, Facebook, Inc.
8410
- *
8411
- * This source code is licensed under the MIT license found in the
8412
- * LICENSE file in the root directory of this source tree.
8413
- *
8414
- */
8415
 
 
8416
 
 
 
 
 
 
 
8417
 
8418
- /**
8419
- * CSS properties which accept numbers but are not in units of "px".
8420
- */
8421
 
8422
- var isUnitlessNumber = {
8423
- animationIterationCount: true,
8424
- borderImageOutset: true,
8425
- borderImageSlice: true,
8426
- borderImageWidth: true,
8427
- boxFlex: true,
8428
- boxFlexGroup: true,
8429
- boxOrdinalGroup: true,
8430
- columnCount: true,
8431
- columns: true,
8432
- flex: true,
8433
- flexGrow: true,
8434
- flexPositive: true,
8435
- flexShrink: true,
8436
- flexNegative: true,
8437
- flexOrder: true,
8438
- gridRow: true,
8439
- gridRowEnd: true,
8440
- gridRowSpan: true,
8441
- gridRowStart: true,
8442
- gridColumn: true,
8443
- gridColumnEnd: true,
8444
- gridColumnSpan: true,
8445
- gridColumnStart: true,
8446
- fontWeight: true,
8447
- lineClamp: true,
8448
- lineHeight: true,
8449
- opacity: true,
8450
- order: true,
8451
- orphans: true,
8452
- tabSize: true,
8453
- widows: true,
8454
- zIndex: true,
8455
- zoom: true,
8456
 
8457
- // SVG-related properties
8458
- fillOpacity: true,
8459
- floodOpacity: true,
8460
- stopOpacity: true,
8461
- strokeDasharray: true,
8462
- strokeDashoffset: true,
8463
- strokeMiterlimit: true,
8464
- strokeOpacity: true,
8465
- strokeWidth: true
8466
- };
8467
 
8468
- /**
8469
- * @param {string} prefix vendor-specific prefix, eg: Webkit
8470
- * @param {string} key style name, eg: transitionDuration
8471
- * @return {string} style name prefixed with `prefix`, properly camelCased, eg:
8472
- * WebkitTransitionDuration
8473
- */
8474
- function prefixKey(prefix, key) {
8475
- return prefix + key.charAt(0).toUpperCase() + key.substring(1);
8476
  }
8477
 
8478
- /**
8479
- * Support style names that may come passed in prefixed by adding permutations
8480
- * of vendor prefixes.
8481
- */
8482
- var prefixes = ['Webkit', 'ms', 'Moz', 'O'];
8483
 
8484
- // Using Object.keys here, or else the vanilla for-in loop makes IE8 go into an
8485
- // infinite loop, because it iterates over the newly added props too.
8486
- Object.keys(isUnitlessNumber).forEach(function (prop) {
8487
- prefixes.forEach(function (prefix) {
8488
- isUnitlessNumber[prefixKey(prefix, prop)] = isUnitlessNumber[prop];
8489
- });
8490
- });
 
 
 
 
 
 
 
 
8491
 
8492
- /**
8493
- * Most style properties can be unset by doing .style[prop] = '' but IE8
8494
- * doesn't like doing that with shorthand properties so for the properties that
8495
- * IE8 breaks on, which are listed here, we instead unset each of the
8496
- * individual properties. See http://bugs.jquery.com/ticket/12385.
8497
- * The 4-value 'clock' properties like margin, padding, border-width seem to
8498
- * behave without any problems. Curiously, list-style works too without any
8499
- * special prodding.
8500
- */
8501
- var shorthandPropertyExpansions = {
8502
- background: {
8503
- backgroundAttachment: true,
8504
- backgroundColor: true,
8505
- backgroundImage: true,
8506
- backgroundPositionX: true,
8507
- backgroundPositionY: true,
8508
- backgroundRepeat: true
8509
- },
8510
- backgroundPosition: {
8511
- backgroundPositionX: true,
8512
- backgroundPositionY: true
8513
- },
8514
- border: {
8515
- borderWidth: true,
8516
- borderStyle: true,
8517
- borderColor: true
8518
- },
8519
- borderBottom: {
8520
- borderBottomWidth: true,
8521
- borderBottomStyle: true,
8522
- borderBottomColor: true
8523
- },
8524
- borderLeft: {
8525
- borderLeftWidth: true,
8526
- borderLeftStyle: true,
8527
- borderLeftColor: true
8528
- },
8529
- borderRight: {
8530
- borderRightWidth: true,
8531
- borderRightStyle: true,
8532
- borderRightColor: true
8533
- },
8534
- borderTop: {
8535
- borderTopWidth: true,
8536
- borderTopStyle: true,
8537
- borderTopColor: true
8538
- },
8539
- font: {
8540
- fontStyle: true,
8541
- fontVariant: true,
8542
- fontWeight: true,
8543
- fontSize: true,
8544
- lineHeight: true,
8545
- fontFamily: true
8546
- },
8547
- outline: {
8548
- outlineWidth: true,
8549
- outlineStyle: true,
8550
- outlineColor: true
8551
  }
8552
- };
8553
 
8554
- var CSSProperty = {
8555
- isUnitlessNumber: isUnitlessNumber,
8556
- shorthandPropertyExpansions: shorthandPropertyExpansions
8557
- };
8558
 
8559
- module.exports = CSSProperty;
8560
 
8561
- /***/ }),
 
 
8562
 
8563
- /***/ "./node_modules/react-dom/lib/CSSPropertyOperations.js":
8564
- /*!*************************************************************!*\
8565
- !*** ./node_modules/react-dom/lib/CSSPropertyOperations.js ***!
8566
- \*************************************************************/
8567
- /*! no static exports found */
8568
- /***/ (function(module, exports, __webpack_require__) {
8569
 
8570
- "use strict";
8571
- /**
8572
- * Copyright (c) 2013-present, Facebook, Inc.
8573
- *
8574
- * This source code is licensed under the MIT license found in the
8575
- * LICENSE file in the root directory of this source tree.
8576
- *
8577
- */
8578
 
8579
 
 
8580
 
8581
- var CSSProperty = __webpack_require__(/*! ./CSSProperty */ "./node_modules/react-dom/lib/CSSProperty.js");
8582
- var ExecutionEnvironment = __webpack_require__(/*! fbjs/lib/ExecutionEnvironment */ "./node_modules/fbjs/lib/ExecutionEnvironment.js");
8583
- var ReactInstrumentation = __webpack_require__(/*! ./ReactInstrumentation */ "./node_modules/react-dom/lib/ReactInstrumentation.js");
8584
 
8585
- var camelizeStyleName = __webpack_require__(/*! fbjs/lib/camelizeStyleName */ "./node_modules/fbjs/lib/camelizeStyleName.js");
8586
- var dangerousStyleValue = __webpack_require__(/*! ./dangerousStyleValue */ "./node_modules/react-dom/lib/dangerousStyleValue.js");
8587
- var hyphenateStyleName = __webpack_require__(/*! fbjs/lib/hyphenateStyleName */ "./node_modules/fbjs/lib/hyphenateStyleName.js");
8588
- var memoizeStringOnly = __webpack_require__(/*! fbjs/lib/memoizeStringOnly */ "./node_modules/fbjs/lib/memoizeStringOnly.js");
8589
- var warning = __webpack_require__(/*! fbjs/lib/warning */ "./node_modules/fbjs/lib/warning.js");
8590
 
8591
- var processStyleName = memoizeStringOnly(function (styleName) {
8592
- return hyphenateStyleName(styleName);
8593
- });
 
 
 
 
 
 
8594
 
8595
- var hasShorthandPropertyBug = false;
8596
- var styleFloatAccessor = 'cssFloat';
8597
- if (ExecutionEnvironment.canUseDOM) {
8598
- var tempStyle = document.createElement('div').style;
8599
- try {
8600
- // IE8 throws "Invalid argument." if resetting shorthand style properties.
8601
- tempStyle.font = '';
8602
- } catch (e) {
8603
- hasShorthandPropertyBug = true;
8604
  }
8605
- // IE8 only supports accessing cssFloat (standard) as styleFloat
8606
- if (document.documentElement.style.cssFloat === undefined) {
8607
- styleFloatAccessor = 'styleFloat';
 
 
 
 
8608
  }
8609
  }
8610
 
8611
- if (true) {
8612
- // 'msTransform' is correct, but the other prefixes should be capitalized
8613
- var badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/;
 
8614
 
8615
- // style values shouldn't contain a semicolon
8616
- var badStyleValueWithSemicolonPattern = /;\s*$/;
 
 
 
8617
 
8618
- var warnedStyleNames = {};
8619
- var warnedStyleValues = {};
8620
- var warnedForNaNValue = false;
8621
 
8622
- var warnHyphenatedStyleName = function (name, owner) {
8623
- if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {
8624
- return;
 
8625
  }
8626
 
8627
- warnedStyleNames[name] = true;
8628
- true ? warning(false, 'Unsupported style property %s. Did you mean %s?%s', name, camelizeStyleName(name), checkRenderMessage(owner)) : undefined;
8629
- };
8630
 
8631
- var warnBadVendoredStyleName = function (name, owner) {
8632
- if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {
8633
- return;
8634
  }
8635
 
8636
- warnedStyleNames[name] = true;
8637
- true ? warning(false, 'Unsupported vendor-prefixed style property %s. Did you mean %s?%s', name, name.charAt(0).toUpperCase() + name.slice(1), checkRenderMessage(owner)) : undefined;
8638
- };
 
 
8639
 
8640
- var warnStyleValueWithSemicolon = function (name, value, owner) {
8641
- if (warnedStyleValues.hasOwnProperty(value) && warnedStyleValues[value]) {
8642
- return;
8643
  }
8644
 
8645
- warnedStyleValues[value] = true;
8646
- true ? warning(false, "Style property values shouldn't contain a semicolon.%s " + 'Try "%s: %s" instead.', checkRenderMessage(owner), name, value.replace(badStyleValueWithSemicolonPattern, '')) : undefined;
8647
- };
8648
 
8649
- var warnStyleValueIsNaN = function (name, value, owner) {
8650
- if (warnedForNaNValue) {
8651
- return;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8652
  }
8653
 
8654
- warnedForNaNValue = true;
8655
- true ? warning(false, '`NaN` is an invalid value for the `%s` css style property.%s', name, checkRenderMessage(owner)) : undefined;
8656
- };
 
8657
 
8658
- var checkRenderMessage = function (owner) {
8659
- if (owner) {
8660
- var name = owner.getName();
8661
- if (name) {
8662
- return ' Check the render method of `' + name + '`.';
 
 
 
 
 
 
 
 
 
 
8663
  }
 
 
8664
  }
8665
- return '';
8666
- };
8667
 
8668
- /**
8669
- * @param {string} name
8670
- * @param {*} value
8671
- * @param {ReactDOMComponent} component
8672
- */
8673
- var warnValidStyle = function (name, value, component) {
8674
- var owner;
8675
- if (component) {
8676
- owner = component._currentElement._owner;
8677
  }
8678
- if (name.indexOf('-') > -1) {
8679
- warnHyphenatedStyleName(name, owner);
8680
- } else if (badVendoredStyleNamePattern.test(name)) {
8681
- warnBadVendoredStyleName(name, owner);
8682
- } else if (badStyleValueWithSemicolonPattern.test(value)) {
8683
- warnStyleValueWithSemicolon(name, value, owner);
8684
  }
8685
 
8686
- if (typeof value === 'number' && isNaN(value)) {
8687
- warnStyleValueIsNaN(name, value, owner);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8688
  }
8689
- };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8690
  }
8691
 
8692
- /**
8693
- * Operations for dealing with CSS properties.
8694
- */
8695
- var CSSPropertyOperations = {
8696
- /**
8697
- * Serializes a mapping of style properties for use as inline styles:
8698
- *
8699
- * > createMarkupForStyles({width: '200px', height: 0})
8700
- * "width:200px;height:0;"
8701
- *
8702
- * Undefined values are ignored so that declarative programming is easier.
8703
- * The result should be HTML-escaped before insertion into the DOM.
8704
- *
8705
- * @param {object} styles
8706
- * @param {ReactDOMComponent} component
8707
- * @return {?string}
8708
- */
8709
- createMarkupForStyles: function (styles, component) {
8710
- var serialized = '';
8711
- for (var styleName in styles) {
8712
- if (!styles.hasOwnProperty(styleName)) {
8713
- continue;
8714
  }
8715
- var isCustomProperty = styleName.indexOf('--') === 0;
8716
- var styleValue = styles[styleName];
8717
- if (true) {
8718
- if (!isCustomProperty) {
8719
- warnValidStyle(styleName, styleValue, component);
8720
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
8721
  }
8722
- if (styleValue != null) {
8723
- serialized += processStyleName(styleName) + ':';
8724
- serialized += dangerousStyleValue(styleName, styleValue, component, isCustomProperty) + ';';
 
 
 
 
8725
  }
8726
  }
8727
- return serialized || null;
8728
- },
8729
 
8730
- /**
8731
- * Sets the value for multiple styles on a node. If a value is specified as
8732
- * '' (empty string), the corresponding style property will be unset.
8733
- *
8734
- * @param {DOMElement} node
8735
- * @param {object} styles
8736
- * @param {ReactDOMComponent} component
8737
- */
8738
- setValueForStyles: function (node, styles, component) {
8739
- if (true) {
8740
- ReactInstrumentation.debugTool.onHostOperation({
8741
- instanceID: component._debugID,
8742
- type: 'update styles',
8743
- payload: styles
8744
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8745
  }
 
8746
 
8747
- var style = node.style;
8748
- for (var styleName in styles) {
8749
- if (!styles.hasOwnProperty(styleName)) {
8750
- continue;
8751
- }
8752
- var isCustomProperty = styleName.indexOf('--') === 0;
8753
- if (true) {
8754
- if (!isCustomProperty) {
8755
- warnValidStyle(styleName, styles[styleName], component);
 
 
 
 
8756
  }
8757
  }
8758
- var styleValue = dangerousStyleValue(styleName, styles[styleName], component, isCustomProperty);
8759
- if (styleName === 'float' || styleName === 'cssFloat') {
8760
- styleName = styleFloatAccessor;
8761
- }
8762
- if (isCustomProperty) {
8763
- style.setProperty(styleName, styleValue);
8764
- } else if (styleValue) {
8765
- style[styleName] = styleValue;
 
 
8766
  } else {
8767
- var expansion = hasShorthandPropertyBug && CSSProperty.shorthandPropertyExpansions[styleName];
8768
- if (expansion) {
8769
- // Shorthand property that IE8 won't like unsetting, so unset each
8770
- // component to placate it
8771
- for (var individualStyleName in expansion) {
8772
- style[individualStyleName] = '';
8773
- }
8774
- } else {
8775
- style[styleName] = '';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8776
  }
8777
  }
8778
  }
8779
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8780
  };
 
 
 
 
8781
 
8782
- module.exports = CSSPropertyOperations;
 
8783
 
8784
- /***/ }),
 
8785
 
8786
- /***/ "./node_modules/react-dom/lib/CallbackQueue.js":
8787
- /*!*****************************************************!*\
8788
- !*** ./node_modules/react-dom/lib/CallbackQueue.js ***!
8789
- \*****************************************************/
8790
- /*! no static exports found */
8791
- /***/ (function(module, exports, __webpack_require__) {
8792
 
8793
- "use strict";
8794
- /**
8795
- * Copyright (c) 2013-present, Facebook, Inc.
8796
- *
8797
- * This source code is licensed under the MIT license found in the
8798
- * LICENSE file in the root directory of this source tree.
8799
- *
8800
- *
8801
- */
8802
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8803
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8804
 
8805
- var _prodInvariant = __webpack_require__(/*! ./reactProdInvariant */ "./node_modules/react-dom/lib/reactProdInvariant.js");
 
 
 
 
 
8806
 
8807
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
 
 
 
 
 
 
 
 
 
 
 
8808
 
8809
- var PooledClass = __webpack_require__(/*! ./PooledClass */ "./node_modules/react-dom/lib/PooledClass.js");
 
8810
 
8811
- var invariant = __webpack_require__(/*! fbjs/lib/invariant */ "./node_modules/fbjs/lib/invariant.js");
 
 
 
 
8812
 
8813
- /**
8814
- * A specialized pseudo-event module to help keep track of components waiting to
8815
- * be notified when their DOM representations are available for use.
8816
- *
8817
- * This implements `PooledClass`, so you should never need to instantiate this.
8818
- * Instead, use `CallbackQueue.getPooled()`.
8819
- *
8820
- * @class ReactMountReady
8821
- * @implements PooledClass
8822
- * @internal
8823
- */
 
 
 
 
 
 
 
 
8824
 
8825
- var CallbackQueue = function () {
8826
- function CallbackQueue(arg) {
8827
- _classCallCheck(this, CallbackQueue);
8828
 
8829
- this._callbacks = null;
8830
- this._contexts = null;
8831
- this._arg = arg;
 
 
 
8832
  }
 
8833
 
8834
- /**
8835
- * Enqueues a callback to be invoked when `notifyAll` is invoked.
8836
- *
8837
- * @param {function} callback Invoked when `notifyAll` is invoked.
8838
- * @param {?object} context Context to call `callback` with.
8839
- * @internal
8840
- */
8841
 
 
 
 
8842
 
8843
- CallbackQueue.prototype.enqueue = function enqueue(callback, context) {
8844
- this._callbacks = this._callbacks || [];
8845
- this._callbacks.push(callback);
8846
- this._contexts = this._contexts || [];
8847
- this._contexts.push(context);
8848
- };
8849
 
8850
- /**
8851
- * Invokes all enqueued callbacks and clears the queue. This is invoked after
8852
- * the DOM representation of a component has been created or updated.
8853
- *
8854
- * @internal
8855
- */
 
 
 
 
 
 
 
8856
 
 
 
 
 
8857
 
8858
- CallbackQueue.prototype.notifyAll = function notifyAll() {
8859
- var callbacks = this._callbacks;
8860
- var contexts = this._contexts;
8861
- var arg = this._arg;
8862
- if (callbacks && contexts) {
8863
- !(callbacks.length === contexts.length) ? true ? invariant(false, 'Mismatched list of contexts in callback queue') : undefined : void 0;
8864
- this._callbacks = null;
8865
- this._contexts = null;
8866
- for (var i = 0; i < callbacks.length; i++) {
8867
- callbacks[i].call(contexts[i], arg);
8868
  }
8869
- callbacks.length = 0;
8870
- contexts.length = 0;
8871
- }
8872
- };
8873
-
8874
- CallbackQueue.prototype.checkpoint = function checkpoint() {
8875
- return this._callbacks ? this._callbacks.length : 0;
8876
- };
8877
 
8878
- CallbackQueue.prototype.rollback = function rollback(len) {
8879
- if (this._callbacks && this._contexts) {
8880
- this._callbacks.length = len;
8881
- this._contexts.length = len;
8882
  }
8883
- };
8884
-
8885
- /**
8886
- * Resets the internal queue.
8887
- *
8888
- * @internal
8889
- */
8890
-
8891
 
8892
- CallbackQueue.prototype.reset = function reset() {
8893
- this._callbacks = null;
8894
- this._contexts = null;
8895
  };
8896
 
8897
- /**
8898
- * `PooledClass` looks for this.
8899
- */
 
 
 
 
8900
 
 
 
 
 
 
 
8901
 
8902
- CallbackQueue.prototype.destructor = function destructor() {
8903
- this.reset();
8904
- };
8905
 
8906
- return CallbackQueue;
8907
- }();
 
 
 
8908
 
8909
- module.exports = PooledClass.addPoolingTo(CallbackQueue);
 
 
 
8910
 
8911
- /***/ }),
 
 
8912
 
8913
- /***/ "./node_modules/react-dom/lib/ChangeEventPlugin.js":
8914
- /*!*********************************************************!*\
8915
- !*** ./node_modules/react-dom/lib/ChangeEventPlugin.js ***!
8916
- \*********************************************************/
8917
- /*! no static exports found */
8918
- /***/ (function(module, exports, __webpack_require__) {
8919
 
8920
- "use strict";
8921
- /**
8922
- * Copyright (c) 2013-present, Facebook, Inc.
8923
- *
8924
- * This source code is licensed under the MIT license found in the
8925
- * LICENSE file in the root directory of this source tree.
8926
- *
8927
- */
8928
 
 
 
 
8929
 
 
 
 
 
8930
 
8931
- var EventPluginHub = __webpack_require__(/*! ./EventPluginHub */ "./node_modules/react-dom/lib/EventPluginHub.js");
8932
- var EventPropagators = __webpack_require__(/*! ./EventPropagators */ "./node_modules/react-dom/lib/EventPropagators.js");
8933
- var ExecutionEnvironment = __webpack_require__(/*! fbjs/lib/ExecutionEnvironment */ "./node_modules/fbjs/lib/ExecutionEnvironment.js");
8934
- var ReactDOMComponentTree = __webpack_require__(/*! ./ReactDOMComponentTree */ "./node_modules/react-dom/lib/ReactDOMComponentTree.js");
8935
- var ReactUpdates = __webpack_require__(/*! ./ReactUpdates */ "./node_modules/react-dom/lib/ReactUpdates.js");
8936
- var SyntheticEvent = __webpack_require__(/*! ./SyntheticEvent */ "./node_modules/react-dom/lib/SyntheticEvent.js");
8937
 
8938
- var inputValueTracking = __webpack_require__(/*! ./inputValueTracking */ "./node_modules/react-dom/lib/inputValueTracking.js");
8939
- var getEventTarget = __webpack_require__(/*! ./getEventTarget */ "./node_modules/react-dom/lib/getEventTarget.js");
8940
- var isEventSupported = __webpack_require__(/*! ./isEventSupported */ "./node_modules/react-dom/lib/isEventSupported.js");
8941
- var isTextInputElement = __webpack_require__(/*! ./isTextInputElement */ "./node_modules/react-dom/lib/isTextInputElement.js");
 
 
 
8942
 
8943
- var eventTypes = {
8944
- change: {
8945
- phasedRegistrationNames: {
8946
- bubbled: 'onChange',
8947
- captured: 'onChangeCapture'
8948
- },
8949
- dependencies: ['topBlur', 'topChange', 'topClick', 'topFocus', 'topInput', 'topKeyDown', 'topKeyUp', 'topSelectionChange']
8950
- }
8951
- };
8952
 
8953
- function createAndAccumulateChangeEvent(inst, nativeEvent, target) {
8954
- var event = SyntheticEvent.getPooled(eventTypes.change, inst, nativeEvent, target);
8955
- event.type = 'change';
8956
- EventPropagators.accumulateTwoPhaseDispatches(event);
8957
- return event;
8958
- }
8959
- /**
8960
- * For IE shims
8961
- */
8962
- var activeElement = null;
8963
- var activeElementInst = null;
8964
 
8965
- /**
8966
- * SECTION: handle `change` event
8967
- */
8968
- function shouldUseChangeEvent(elem) {
8969
- var nodeName = elem.nodeName && elem.nodeName.toLowerCase();
8970
- return nodeName === 'select' || nodeName === 'input' && elem.type === 'file';
8971
- }
8972
 
8973
- var doesChangeEventBubble = false;
8974
- if (ExecutionEnvironment.canUseDOM) {
8975
- // See `handleChange` comment below
8976
- doesChangeEventBubble = isEventSupported('change') && (!document.documentMode || document.documentMode > 8);
8977
- }
 
 
8978
 
8979
- function manualDispatchChangeEvent(nativeEvent) {
8980
- var event = createAndAccumulateChangeEvent(activeElementInst, nativeEvent, getEventTarget(nativeEvent));
8981
 
8982
- // If change and propertychange bubbled, we'd just bind to it like all the
8983
- // other events and have it go through ReactBrowserEventEmitter. Since it
8984
- // doesn't, we manually listen for the events and so we have to enqueue and
8985
- // process the abstract event manually.
8986
- //
8987
- // Batching is necessary here in order to ensure that all event handlers run
8988
- // before the next rerender (including event handlers attached to ancestor
8989
- // elements instead of directly on the input). Without this, controlled
8990
- // components don't work properly in conjunction with event bubbling because
8991
- // the component is rerendered and the value reverted before all the event
8992
- // handlers can run. See https://github.com/facebook/react/issues/708.
8993
- ReactUpdates.batchedUpdates(runEventInBatch, event);
8994
- }
8995
 
8996
- function runEventInBatch(event) {
8997
- EventPluginHub.enqueueEvents(event);
8998
- EventPluginHub.processEventQueue(false);
8999
- }
9000
 
9001
- function startWatchingForChangeEventIE8(target, targetInst) {
9002
- activeElement = target;
9003
- activeElementInst = targetInst;
9004
- activeElement.attachEvent('onchange', manualDispatchChangeEvent);
9005
- }
 
 
9006
 
9007
- function stopWatchingForChangeEventIE8() {
9008
- if (!activeElement) {
9009
- return;
9010
- }
9011
- activeElement.detachEvent('onchange', manualDispatchChangeEvent);
9012
- activeElement = null;
9013
- activeElementInst = null;
9014
- }
9015
 
9016
- function getInstIfValueChanged(targetInst, nativeEvent) {
9017
- var updated = inputValueTracking.updateValueIfChanged(targetInst);
9018
- var simulated = nativeEvent.simulated === true && ChangeEventPlugin._allowSimulatedPassThrough;
 
 
 
 
 
9019
 
9020
- if (updated || simulated) {
9021
- return targetInst;
9022
- }
9023
- }
9024
 
9025
- function getTargetInstForChangeEvent(topLevelType, targetInst) {
9026
- if (topLevelType === 'topChange') {
9027
- return targetInst;
9028
- }
9029
- }
9030
 
9031
- function handleEventsForChangeEventIE8(topLevelType, target, targetInst) {
9032
- if (topLevelType === 'topFocus') {
9033
- // stopWatching() should be a noop here but we call it just in case we
9034
- // missed a blur event somehow.
9035
- stopWatchingForChangeEventIE8();
9036
- startWatchingForChangeEventIE8(target, targetInst);
9037
- } else if (topLevelType === 'topBlur') {
9038
- stopWatchingForChangeEventIE8();
9039
- }
9040
- }
9041
 
9042
- /**
9043
- * SECTION: handle `input` event
9044
- */
9045
- var isInputEventSupported = false;
9046
- if (ExecutionEnvironment.canUseDOM) {
9047
- // IE9 claims to support the input event but fails to trigger it when
9048
- // deleting text, so we ignore its input events.
9049
 
9050
- isInputEventSupported = isEventSupported('input') && (!document.documentMode || document.documentMode > 9);
9051
- }
9052
 
9053
- /**
9054
- * (For IE <=9) Starts tracking propertychange events on the passed-in element
9055
- * and override the value property so that we can distinguish user events from
9056
- * value changes in JS.
9057
- */
9058
- function startWatchingForValueChange(target, targetInst) {
9059
- activeElement = target;
9060
- activeElementInst = targetInst;
9061
- activeElement.attachEvent('onpropertychange', handlePropertyChange);
9062
- }
9063
 
9064
- /**
9065
- * (For IE <=9) Removes the event listeners from the currently-tracked element,
9066
- * if any exists.
9067
- */
9068
- function stopWatchingForValueChange() {
9069
- if (!activeElement) {
9070
- return;
9071
- }
9072
- activeElement.detachEvent('onpropertychange', handlePropertyChange);
9073
 
9074
- activeElement = null;
9075
- activeElementInst = null;
9076
- }
9077
 
9078
- /**
9079
- * (For IE <=9) Handles a propertychange event, sending a `change` event if
9080
- * the value of the active element has changed.
9081
- */
9082
- function handlePropertyChange(nativeEvent) {
9083
- if (nativeEvent.propertyName !== 'value') {
9084
- return;
9085
- }
9086
- if (getInstIfValueChanged(activeElementInst, nativeEvent)) {
9087
- manualDispatchChangeEvent(nativeEvent);
9088
- }
9089
- }
9090
 
9091
- function handleEventsForInputEventPolyfill(topLevelType, target, targetInst) {
9092
- if (topLevelType === 'topFocus') {
9093
- // In IE8, we can capture almost all .value changes by adding a
9094
- // propertychange handler and looking for events with propertyName
9095
- // equal to 'value'
9096
- // In IE9, propertychange fires for most input events but is buggy and
9097
- // doesn't fire when text is deleted, but conveniently, selectionchange
9098
- // appears to fire in all of the remaining cases so we catch those and
9099
- // forward the event if the value has changed
9100
- // In either case, we don't want to call the event handler if the value
9101
- // is changed from JS so we redefine a setter for `.value` that updates
9102
- // our activeElementValue variable, allowing us to ignore those changes
9103
- //
9104
- // stopWatching() should be a noop here but we call it just in case we
9105
- // missed a blur event somehow.
9106
- stopWatchingForValueChange();
9107
- startWatchingForValueChange(target, targetInst);
9108
- } else if (topLevelType === 'topBlur') {
9109
- stopWatchingForValueChange();
9110
- }
9111
- }
9112
 
9113
- // For IE8 and IE9.
9114
- function getTargetInstForInputEventPolyfill(topLevelType, targetInst, nativeEvent) {
9115
- if (topLevelType === 'topSelectionChange' || topLevelType === 'topKeyUp' || topLevelType === 'topKeyDown') {
9116
- // On the selectionchange event, the target is just document which isn't
9117
- // helpful for us so just check activeElement instead.
9118
- //
9119
- // 99% of the time, keydown and keyup aren't necessary. IE8 fails to fire
9120
- // propertychange on the first input event after setting `value` from a
9121
- // script and fires only keydown, keypress, keyup. Catching keyup usually
9122
- // gets it and catching keydown lets us fire an event for the first
9123
- // keystroke if user does a key repeat (it'll be a little delayed: right
9124
- // before the second keystroke). Other input methods (e.g., paste) seem to
9125
- // fire selectionchange normally.
9126
- return getInstIfValueChanged(activeElementInst, nativeEvent);
9127
- }
9128
- }
9129
 
9130
- /**
9131
- * SECTION: handle `click` event
9132
- */
9133
- function shouldUseClickEvent(elem) {
9134
- // Use the `click` event to detect changes to checkbox and radio inputs.
9135
- // This approach works across all browsers, whereas `change` does not fire
9136
- // until `blur` in IE8.
9137
- var nodeName = elem.nodeName;
9138
- return nodeName && nodeName.toLowerCase() === 'input' && (elem.type === 'checkbox' || elem.type === 'radio');
9139
- }
9140
 
9141
- function getTargetInstForClickEvent(topLevelType, targetInst, nativeEvent) {
9142
- if (topLevelType === 'topClick') {
9143
- return getInstIfValueChanged(targetInst, nativeEvent);
9144
- }
9145
- }
9146
 
9147
- function getTargetInstForInputOrChangeEvent(topLevelType, targetInst, nativeEvent) {
9148
- if (topLevelType === 'topInput' || topLevelType === 'topChange') {
9149
- return getInstIfValueChanged(targetInst, nativeEvent);
9150
- }
9151
- }
9152
 
9153
- function handleControlledInputBlur(inst, node) {
9154
- // TODO: In IE, inst is occasionally null. Why?
9155
- if (inst == null) {
9156
- return;
9157
- }
9158
 
9159
- // Fiber and ReactDOM keep wrapper state in separate places
9160
- var state = inst._wrapperState || node._wrapperState;
9161
 
9162
- if (!state || !state.controlled || node.type !== 'number') {
9163
- return;
9164
- }
9165
 
9166
- // If controlled, assign the value attribute to the current value on blur
9167
- var value = '' + node.value;
9168
- if (node.getAttribute('value') !== value) {
9169
- node.setAttribute('value', value);
9170
- }
9171
- }
9172
 
9173
- /**
9174
- * This plugin creates an `onChange` event that normalizes change events
9175
- * across form elements. This event fires at a time when it's possible to
9176
- * change the element's value without seeing a flicker.
9177
- *
9178
- * Supported elements are:
9179
- * - input (see `isTextInputElement`)
9180
- * - textarea
9181
- * - select
9182
- */
9183
- var ChangeEventPlugin = {
9184
- eventTypes: eventTypes,
9185
 
9186
- _allowSimulatedPassThrough: true,
9187
- _isInputEventSupported: isInputEventSupported,
 
9188
 
9189
- extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
9190
- var targetNode = targetInst ? ReactDOMComponentTree.getNodeFromInstance(targetInst) : window;
9191
 
9192
- var getTargetInstFunc, handleEventFunc;
9193
- if (shouldUseChangeEvent(targetNode)) {
9194
- if (doesChangeEventBubble) {
9195
- getTargetInstFunc = getTargetInstForChangeEvent;
9196
- } else {
9197
- handleEventFunc = handleEventsForChangeEventIE8;
9198
- }
9199
- } else if (isTextInputElement(targetNode)) {
9200
- if (isInputEventSupported) {
9201
- getTargetInstFunc = getTargetInstForInputOrChangeEvent;
9202
- } else {
9203
- getTargetInstFunc = getTargetInstForInputEventPolyfill;
9204
- handleEventFunc = handleEventsForInputEventPolyfill;
9205
  }
9206
- } else if (shouldUseClickEvent(targetNode)) {
9207
- getTargetInstFunc = getTargetInstForClickEvent;
9208
  }
 
9209
 
9210
- if (getTargetInstFunc) {
9211
- var inst = getTargetInstFunc(topLevelType, targetInst, nativeEvent);
9212
- if (inst) {
9213
- var event = createAndAccumulateChangeEvent(inst, nativeEvent, nativeEventTarget);
9214
- return event;
9215
  }
9216
- }
9217
 
9218
- if (handleEventFunc) {
9219
- handleEventFunc(topLevelType, targetNode, targetInst);
9220
- }
 
 
 
 
9221
 
9222
- // When blurring, set the value attribute for number inputs
9223
- if (topLevelType === 'topBlur') {
9224
- handleControlledInputBlur(targetInst, targetNode);
9225
- }
9226
- }
9227
- };
 
 
 
9228
 
9229
- module.exports = ChangeEventPlugin;
 
 
 
 
 
 
 
 
 
9230
 
9231
- /***/ }),
 
 
 
9232
 
9233
- /***/ "./node_modules/react-dom/lib/DOMChildrenOperations.js":
9234
- /*!*************************************************************!*\
9235
- !*** ./node_modules/react-dom/lib/DOMChildrenOperations.js ***!
9236
- \*************************************************************/
9237
- /*! no static exports found */
9238
- /***/ (function(module, exports, __webpack_require__) {
9239
 
9240
- "use strict";
9241
- /**
9242
- * Copyright (c) 2013-present, Facebook, Inc.
9243
- *
9244
- * This source code is licensed under the MIT license found in the
9245
- * LICENSE file in the root directory of this source tree.
9246
- *
9247
- */
9248
 
 
 
9249
 
 
 
9250
 
9251
- var DOMLazyTree = __webpack_require__(/*! ./DOMLazyTree */ "./node_modules/react-dom/lib/DOMLazyTree.js");
9252
- var Danger = __webpack_require__(/*! ./Danger */ "./node_modules/react-dom/lib/Danger.js");
9253
- var ReactDOMComponentTree = __webpack_require__(/*! ./ReactDOMComponentTree */ "./node_modules/react-dom/lib/ReactDOMComponentTree.js");
9254
- var ReactInstrumentation = __webpack_require__(/*! ./ReactInstrumentation */ "./node_modules/react-dom/lib/ReactInstrumentation.js");
9255
 
9256
- var createMicrosoftUnsafeLocalFunction = __webpack_require__(/*! ./createMicrosoftUnsafeLocalFunction */ "./node_modules/react-dom/lib/createMicrosoftUnsafeLocalFunction.js");
9257
- var setInnerHTML = __webpack_require__(/*! ./setInnerHTML */ "./node_modules/react-dom/lib/setInnerHTML.js");
9258
- var setTextContent = __webpack_require__(/*! ./setTextContent */ "./node_modules/react-dom/lib/setTextContent.js");
9259
 
9260
- function getNodeAfter(parentNode, node) {
9261
- // Special case for text components, which return [open, close] comments
9262
- // from getHostNode.
9263
- if (Array.isArray(node)) {
9264
- node = node[1];
9265
- }
9266
- return node ? node.nextSibling : parentNode.firstChild;
9267
  }
9268
 
9269
- /**
9270
- * Inserts `childNode` as a child of `parentNode` at the `index`.
9271
- *
9272
- * @param {DOMElement} parentNode Parent node in which to insert.
9273
- * @param {DOMElement} childNode Child node to insert.
9274
- * @param {number} index Index at which to insert the child.
9275
- * @internal
9276
- */
9277
- var insertChildAt = createMicrosoftUnsafeLocalFunction(function (parentNode, childNode, referenceNode) {
9278
- // We rely exclusively on `insertBefore(node, null)` instead of also using
9279
- // `appendChild(node)`. (Using `undefined` is not allowed by all browsers so
9280
- // we are careful to use `null`.)
9281
- parentNode.insertBefore(childNode, referenceNode);
9282
- });
9283
 
9284
- function insertLazyTreeChildAt(parentNode, childTree, referenceNode) {
9285
- DOMLazyTree.insertTreeBefore(parentNode, childTree, referenceNode);
 
9286
  }
9287
-
9288
- function moveChild(parentNode, childNode, referenceNode) {
9289
- if (Array.isArray(childNode)) {
9290
- moveDelimitedText(parentNode, childNode[0], childNode[1], referenceNode);
9291
- } else {
9292
- insertChildAt(parentNode, childNode, referenceNode);
9293
  }
9294
  }
9295
-
9296
- function removeChild(parentNode, childNode) {
9297
- if (Array.isArray(childNode)) {
9298
- var closingComment = childNode[1];
9299
- childNode = childNode[0];
9300
- removeDelimitedText(parentNode, childNode, closingComment);
9301
- parentNode.removeChild(closingComment);
9302
  }
9303
- parentNode.removeChild(childNode);
9304
  }
 
 
9305
 
9306
- function moveDelimitedText(parentNode, openingComment, closingComment, referenceNode) {
9307
- var node = openingComment;
9308
- while (true) {
9309
- var nextNode = node.nextSibling;
9310
- insertChildAt(parentNode, node, referenceNode);
9311
- if (node === closingComment) {
9312
- break;
 
 
 
9313
  }
9314
- node = nextNode;
9315
  }
9316
  }
 
 
 
 
9317
 
9318
- function removeDelimitedText(parentNode, startNode, closingComment) {
9319
- while (true) {
9320
- var node = startNode.nextSibling;
9321
- if (node === closingComment) {
9322
- // The closing comment is removed by ReactMultiChild.
9323
- break;
9324
- } else {
9325
- parentNode.removeChild(node);
9326
- }
9327
  }
9328
  }
9329
-
9330
- function replaceDelimitedText(openingComment, closingComment, stringText) {
9331
- var parentNode = openingComment.parentNode;
9332
- var nodeAfterComment = openingComment.nextSibling;
9333
- if (nodeAfterComment === closingComment) {
9334
- // There are no text nodes between the opening and closing comments; insert
9335
- // a new one if stringText isn't empty.
9336
- if (stringText) {
9337
- insertChildAt(parentNode, document.createTextNode(stringText), nodeAfterComment);
9338
- }
9339
  } else {
9340
- if (stringText) {
9341
- // Set the text content of the first node after the opening comment, and
9342
- // remove all following nodes up until the closing comment.
9343
- setTextContent(nodeAfterComment, stringText);
9344
- removeDelimitedText(parentNode, nodeAfterComment, closingComment);
9345
- } else {
9346
- removeDelimitedText(parentNode, openingComment, closingComment);
9347
  }
9348
- }
9349
 
9350
- if (true) {
9351
- ReactInstrumentation.debugTool.onHostOperation({
9352
- instanceID: ReactDOMComponentTree.getInstanceFromNode(openingComment)._debugID,
9353
- type: 'replace text',
9354
- payload: stringText
9355
- });
9356
  }
9357
  }
 
 
 
9358
 
9359
- var dangerouslyReplaceNodeWithMarkup = Danger.dangerouslyReplaceNodeWithMarkup;
9360
- if (true) {
9361
- dangerouslyReplaceNodeWithMarkup = function (oldChild, markup, prevInstance) {
9362
- Danger.dangerouslyReplaceNodeWithMarkup(oldChild, markup);
9363
- if (prevInstance._debugID !== 0) {
9364
- ReactInstrumentation.debugTool.onHostOperation({
9365
- instanceID: prevInstance._debugID,
9366
- type: 'replace with',
9367
- payload: markup.toString()
9368
- });
9369
- } else {
9370
- var nextInstance = ReactDOMComponentTree.getInstanceFromNode(markup.node);
9371
- if (nextInstance._debugID !== 0) {
9372
- ReactInstrumentation.debugTool.onHostOperation({
9373
- instanceID: nextInstance._debugID,
9374
- type: 'mount',
9375
- payload: markup.toString()
9376
- });
9377
  }
 
 
 
 
 
 
9378
  }
9379
- };
 
 
9380
  }
 
 
9381
 
9382
- /**
9383
- * Operations for updating with DOM children.
9384
- */
9385
- var DOMChildrenOperations = {
9386
- dangerouslyReplaceNodeWithMarkup: dangerouslyReplaceNodeWithMarkup,
9387
 
9388
- replaceDelimitedText: replaceDelimitedText,
 
9389
 
9390
- /**
9391
- * Updates a component's children by processing a series of updates. The
9392
- * update configurations are each expected to have a `parentNode` property.
9393
- *
9394
- * @param {array<object>} updates List of update configurations.
9395
- * @internal
9396
- */
9397
- processUpdates: function (parentNode, updates) {
9398
- if (true) {
9399
- var parentNodeDebugID = ReactDOMComponentTree.getInstanceFromNode(parentNode)._debugID;
9400
- }
9401
 
9402
- for (var k = 0; k < updates.length; k++) {
9403
- var update = updates[k];
9404
- switch (update.type) {
9405
- case 'INSERT_MARKUP':
9406
- insertLazyTreeChildAt(parentNode, update.content, getNodeAfter(parentNode, update.afterNode));
9407
- if (true) {
9408
- ReactInstrumentation.debugTool.onHostOperation({
9409
- instanceID: parentNodeDebugID,
9410
- type: 'insert child',
9411
- payload: {
9412
- toIndex: update.toIndex,
9413
- content: update.content.toString()
9414
- }
9415
- });
9416
- }
9417
- break;
9418
- case 'MOVE_EXISTING':
9419
- moveChild(parentNode, update.fromNode, getNodeAfter(parentNode, update.afterNode));
9420
- if (true) {
9421
- ReactInstrumentation.debugTool.onHostOperation({
9422
- instanceID: parentNodeDebugID,
9423
- type: 'move child',
9424
- payload: { fromIndex: update.fromIndex, toIndex: update.toIndex }
9425
- });
9426
  }
9427
- break;
9428
- case 'SET_MARKUP':
9429
- setInnerHTML(parentNode, update.content);
9430
- if (true) {
9431
- ReactInstrumentation.debugTool.onHostOperation({
9432
- instanceID: parentNodeDebugID,
9433
- type: 'replace children',
9434
- payload: update.content.toString()
9435
- });
9436
  }
 
 
 
 
 
 
9437
  break;
9438
- case 'TEXT_CONTENT':
9439
- setTextContent(parentNode, update.content);
9440
- if (true) {
9441
- ReactInstrumentation.debugTool.onHostOperation({
9442
- instanceID: parentNodeDebugID,
9443
- type: 'replace text',
9444
- payload: update.content.toString()
9445
- });
9446
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9447
  break;
9448
- case 'REMOVE_NODE':
9449
- removeChild(parentNode, update.fromNode);
9450
- if (true) {
9451
- ReactInstrumentation.debugTool.onHostOperation({
9452
- instanceID: parentNodeDebugID,
9453
- type: 'remove child',
9454
- payload: { fromIndex: update.fromIndex }
9455
- });
9456
- }
9457
  break;
 
 
 
 
9458
  }
9459
  }
9460
- }
9461
- };
9462
 
9463
- module.exports = DOMChildrenOperations;
 
 
 
 
 
 
 
9464
 
9465
- /***/ }),
 
9466
 
9467
- /***/ "./node_modules/react-dom/lib/DOMLazyTree.js":
9468
- /*!***************************************************!*\
9469
- !*** ./node_modules/react-dom/lib/DOMLazyTree.js ***!
9470
- \***************************************************/
9471
- /*! no static exports found */
9472
- /***/ (function(module, exports, __webpack_require__) {
9473
 
9474
- "use strict";
9475
- /**
9476
- * Copyright (c) 2015-present, Facebook, Inc.
9477
- *
9478
- * This source code is licensed under the MIT license found in the
9479
- * LICENSE file in the root directory of this source tree.
9480
- *
9481
- */
9482
 
 
 
 
 
 
 
 
 
 
 
 
 
9483
 
 
 
9484
 
9485
- var DOMNamespaces = __webpack_require__(/*! ./DOMNamespaces */ "./node_modules/react-dom/lib/DOMNamespaces.js");
9486
- var setInnerHTML = __webpack_require__(/*! ./setInnerHTML */ "./node_modules/react-dom/lib/setInnerHTML.js");
 
 
 
 
 
9487
 
9488
- var createMicrosoftUnsafeLocalFunction = __webpack_require__(/*! ./createMicrosoftUnsafeLocalFunction */ "./node_modules/react-dom/lib/createMicrosoftUnsafeLocalFunction.js");
9489
- var setTextContent = __webpack_require__(/*! ./setTextContent */ "./node_modules/react-dom/lib/setTextContent.js");
 
 
 
9490
 
9491
- var ELEMENT_NODE_TYPE = 1;
9492
- var DOCUMENT_FRAGMENT_NODE_TYPE = 11;
 
 
 
 
9493
 
9494
- /**
9495
- * In IE (8-11) and Edge, appending nodes with no children is dramatically
9496
- * faster than appending a full subtree, so we essentially queue up the
9497
- * .appendChild calls here and apply them so each node is added to its parent
9498
- * before any children are added.
9499
- *
9500
- * In other browsers, doing so is slower or neutral compared to the other order
9501
- * (in Firefox, twice as slow) so we only do this inversion in IE.
9502
- *
9503
- * See https://github.com/spicyj/innerhtml-vs-createelement-vs-clonenode.
9504
- */
9505
- var enableLazy = typeof document !== 'undefined' && typeof document.documentMode === 'number' || typeof navigator !== 'undefined' && typeof navigator.userAgent === 'string' && /\bEdge\/\d/.test(navigator.userAgent);
9506
 
9507
- function insertTreeChildren(tree) {
9508
- if (!enableLazy) {
9509
- return;
9510
- }
9511
- var node = tree.node;
9512
- var children = tree.children;
9513
- if (children.length) {
9514
- for (var i = 0; i < children.length; i++) {
9515
- insertTreeBefore(node, children[i], null);
9516
  }
9517
- } else if (tree.html != null) {
9518
- setInnerHTML(node, tree.html);
9519
- } else if (tree.text != null) {
9520
- setTextContent(node, tree.text);
9521
  }
 
 
9522
  }
9523
 
9524
- var insertTreeBefore = createMicrosoftUnsafeLocalFunction(function (parentNode, tree, referenceNode) {
9525
- // DocumentFragments aren't actually part of the DOM after insertion so
9526
- // appending children won't update the DOM. We need to ensure the fragment
9527
- // is properly populated first, breaking out of our lazy approach for just
9528
- // this level. Also, some <object> plugins (like Flash Player) will read
9529
- // <param> nodes immediately upon insertion into the DOM, so <object>
9530
- // must also be populated prior to insertion into the DOM.
9531
- 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)) {
9532
- insertTreeChildren(tree);
9533
- parentNode.insertBefore(tree.node, referenceNode);
9534
- } else {
9535
- parentNode.insertBefore(tree.node, referenceNode);
9536
- insertTreeChildren(tree);
9537
- }
9538
- });
9539
 
9540
- function replaceChildWithTree(oldNode, newTree) {
9541
- oldNode.parentNode.replaceChild(newTree.node, oldNode);
9542
- insertTreeChildren(newTree);
9543
  }
9544
 
9545
- function queueChild(parentTree, childTree) {
9546
- if (enableLazy) {
9547
- parentTree.children.push(childTree);
9548
- } else {
9549
- parentTree.node.appendChild(childTree.node);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9550
  }
9551
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
9552
 
9553
- function queueHTML(tree, html) {
9554
- if (enableLazy) {
9555
- tree.html = html;
9556
- } else {
9557
- setInnerHTML(tree.node, html);
9558
  }
9559
- }
9560
 
9561
- function queueText(tree, text) {
9562
- if (enableLazy) {
9563
- tree.text = text;
 
 
 
9564
  } else {
9565
- setTextContent(tree.node, text);
 
9566
  }
9567
- }
9568
 
9569
- function toString() {
9570
- return this.node.nodeName;
9571
- }
9572
 
9573
- function DOMLazyTree(node) {
9574
- return {
9575
- node: node,
9576
- children: [],
9577
- html: null,
9578
- text: null,
9579
- toString: toString
9580
- };
9581
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9582
 
9583
- DOMLazyTree.insertTreeBefore = insertTreeBefore;
9584
- DOMLazyTree.replaceChildWithTree = replaceChildWithTree;
9585
- DOMLazyTree.queueChild = queueChild;
9586
- DOMLazyTree.queueHTML = queueHTML;
9587
- DOMLazyTree.queueText = queueText;
9588
 
9589
- module.exports = DOMLazyTree;
9590
 
9591
- /***/ }),
 
 
 
 
 
 
 
 
 
9592
 
9593
- /***/ "./node_modules/react-dom/lib/DOMNamespaces.js":
9594
- /*!*****************************************************!*\
9595
- !*** ./node_modules/react-dom/lib/DOMNamespaces.js ***!
9596
- \*****************************************************/
9597
- /*! no static exports found */
9598
- /***/ (function(module, exports, __webpack_require__) {
 
 
 
 
 
9599
 
9600
- "use strict";
9601
- /**
9602
- * Copyright (c) 2013-present, Facebook, Inc.
9603
- *
9604
- * This source code is licensed under the MIT license found in the
9605
- * LICENSE file in the root directory of this source tree.
9606
- *
9607
- */
9608
 
 
 
 
 
 
 
 
9609
 
 
 
9610
 
9611
- var DOMNamespaces = {
9612
- html: 'http://www.w3.org/1999/xhtml',
9613
- mathml: 'http://www.w3.org/1998/Math/MathML',
9614
- svg: 'http://www.w3.org/2000/svg'
9615
- };
9616
 
9617
- module.exports = DOMNamespaces;
 
 
 
 
9618
 
9619
- /***/ }),
9620
 
9621
- /***/ "./node_modules/react-dom/lib/DOMProperty.js":
9622
- /*!***************************************************!*\
9623
- !*** ./node_modules/react-dom/lib/DOMProperty.js ***!
9624
- \***************************************************/
9625
- /*! no static exports found */
9626
- /***/ (function(module, exports, __webpack_require__) {
9627
 
9628
- "use strict";
9629
- /**
9630
- * Copyright (c) 2013-present, Facebook, Inc.
9631
- *
9632
- * This source code is licensed under the MIT license found in the
9633
- * LICENSE file in the root directory of this source tree.
9634
- *
9635
- */
9636
 
 
 
9637
 
 
 
9638
 
9639
- var _prodInvariant = __webpack_require__(/*! ./reactProdInvariant */ "./node_modules/react-dom/lib/reactProdInvariant.js");
9640
 
9641
- var invariant = __webpack_require__(/*! fbjs/lib/invariant */ "./node_modules/fbjs/lib/invariant.js");
 
9642
 
9643
- function checkMask(value, bitmask) {
9644
- return (value & bitmask) === bitmask;
9645
- }
 
 
9646
 
9647
- var DOMPropertyInjection = {
9648
- /**
9649
- * Mapping from normalized, camelcased property names to a configuration that
9650
- * specifies how the associated DOM property should be accessed or rendered.
9651
- */
9652
- MUST_USE_PROPERTY: 0x1,
9653
- HAS_BOOLEAN_VALUE: 0x4,
9654
- HAS_NUMERIC_VALUE: 0x8,
9655
- HAS_POSITIVE_NUMERIC_VALUE: 0x10 | 0x8,
9656
- HAS_OVERLOADED_BOOLEAN_VALUE: 0x20,
9657
 
9658
- /**
9659
- * Inject some specialized knowledge about the DOM. This takes a config object
9660
- * with the following properties:
9661
- *
9662
- * isCustomAttribute: function that given an attribute name will return true
9663
- * if it can be inserted into the DOM verbatim. Useful for data-* or aria-*
9664
- * attributes where it's impossible to enumerate all of the possible
9665
- * attribute names,
9666
- *
9667
- * Properties: object mapping DOM property name to one of the
9668
- * DOMPropertyInjection constants or null. If your attribute isn't in here,
9669
- * it won't get written to the DOM.
9670
- *
9671
- * DOMAttributeNames: object mapping React attribute name to the DOM
9672
- * attribute name. Attribute names not specified use the **lowercase**
9673
- * normalized name.
9674
- *
9675
- * DOMAttributeNamespaces: object mapping React attribute name to the DOM
9676
- * attribute namespace URL. (Attribute names not specified use no namespace.)
9677
- *
9678
- * DOMPropertyNames: similar to DOMAttributeNames but for DOM properties.
9679
- * Property names not specified use the normalized name.
9680
- *
9681
- * DOMMutationMethods: Properties that require special mutation methods. If
9682
- * `value` is undefined, the mutation method should unset the property.
9683
- *
9684
- * @param {object} domPropertyConfig the config as described above.
9685
- */
9686
- injectDOMPropertyConfig: function (domPropertyConfig) {
9687
- var Injection = DOMPropertyInjection;
9688
- var Properties = domPropertyConfig.Properties || {};
9689
- var DOMAttributeNamespaces = domPropertyConfig.DOMAttributeNamespaces || {};
9690
- var DOMAttributeNames = domPropertyConfig.DOMAttributeNames || {};
9691
- var DOMPropertyNames = domPropertyConfig.DOMPropertyNames || {};
9692
- var DOMMutationMethods = domPropertyConfig.DOMMutationMethods || {};
9693
-
9694
- if (domPropertyConfig.isCustomAttribute) {
9695
- DOMProperty._isCustomAttributeFunctions.push(domPropertyConfig.isCustomAttribute);
9696
- }
9697
-
9698
- for (var propName in Properties) {
9699
- !!DOMProperty.properties.hasOwnProperty(propName) ? true ? 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) : undefined : void 0;
9700
-
9701
- var lowerCased = propName.toLowerCase();
9702
- var propConfig = Properties[propName];
9703
-
9704
- var propertyInfo = {
9705
- attributeName: lowerCased,
9706
- attributeNamespace: null,
9707
- propertyName: propName,
9708
- mutationMethod: null,
9709
-
9710
- mustUseProperty: checkMask(propConfig, Injection.MUST_USE_PROPERTY),
9711
- hasBooleanValue: checkMask(propConfig, Injection.HAS_BOOLEAN_VALUE),
9712
- hasNumericValue: checkMask(propConfig, Injection.HAS_NUMERIC_VALUE),
9713
- hasPositiveNumericValue: checkMask(propConfig, Injection.HAS_POSITIVE_NUMERIC_VALUE),
9714
- hasOverloadedBooleanValue: checkMask(propConfig, Injection.HAS_OVERLOADED_BOOLEAN_VALUE)
9715
- };
9716
- !(propertyInfo.hasBooleanValue + propertyInfo.hasNumericValue + propertyInfo.hasOverloadedBooleanValue <= 1) ? true ? invariant(false, 'DOMProperty: Value can be one of boolean, overloaded boolean, or numeric value, but not a combination: %s', propName) : undefined : void 0;
9717
 
9718
- if (true) {
9719
- DOMProperty.getPossibleStandardName[lowerCased] = propName;
9720
- }
9721
 
9722
- if (DOMAttributeNames.hasOwnProperty(propName)) {
9723
- var attributeName = DOMAttributeNames[propName];
9724
- propertyInfo.attributeName = attributeName;
9725
- if (true) {
9726
- DOMProperty.getPossibleStandardName[attributeName] = propName;
 
 
 
 
 
 
 
 
 
 
 
9727
  }
9728
- }
9729
 
9730
- if (DOMAttributeNamespaces.hasOwnProperty(propName)) {
9731
- propertyInfo.attributeNamespace = DOMAttributeNamespaces[propName];
9732
- }
 
9733
 
9734
- if (DOMPropertyNames.hasOwnProperty(propName)) {
9735
- propertyInfo.propertyName = DOMPropertyNames[propName];
9736
  }
9737
 
9738
- if (DOMMutationMethods.hasOwnProperty(propName)) {
9739
- propertyInfo.mutationMethod = DOMMutationMethods[propName];
 
 
9740
  }
 
9741
 
9742
- DOMProperty.properties[propName] = propertyInfo;
9743
- }
 
 
 
 
 
 
 
 
9744
  }
9745
- };
9746
 
9747
- /* eslint-disable max-len */
9748
- 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';
9749
- /* eslint-enable max-len */
9750
 
9751
- /**
9752
- * DOMProperty exports lookup objects that can be used like functions:
9753
- *
9754
- * > DOMProperty.isValid['id']
9755
- * true
9756
- * > DOMProperty.isValid['foobar']
9757
- * undefined
9758
- *
9759
- * Although this may be confusing, it performs better in general.
9760
- *
9761
- * @see http://jsperf.com/key-exists
9762
- * @see http://jsperf.com/key-missing
9763
- */
9764
- var DOMProperty = {
9765
- ID_ATTRIBUTE_NAME: 'data-reactid',
9766
- ROOT_ATTRIBUTE_NAME: 'data-reactroot',
9767
 
9768
- ATTRIBUTE_NAME_START_CHAR: ATTRIBUTE_NAME_START_CHAR,
9769
- ATTRIBUTE_NAME_CHAR: ATTRIBUTE_NAME_START_CHAR + '\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040',
 
 
 
9770
 
9771
- /**
9772
- * Map from property "standard name" to an object with info about how to set
9773
- * the property in the DOM. Each object contains:
9774
- *
9775
- * attributeName:
9776
- * Used when rendering markup or with `*Attribute()`.
9777
- * attributeNamespace
9778
- * propertyName:
9779
- * Used on DOM node instances. (This includes properties that mutate due to
9780
- * external factors.)
9781
- * mutationMethod:
9782
- * If non-null, used instead of the property or `setAttribute()` after
9783
- * initial render.
9784
- * mustUseProperty:
9785
- * Whether the property must be accessed and mutated as an object property.
9786
- * hasBooleanValue:
9787
- * Whether the property should be removed when set to a falsey value.
9788
- * hasNumericValue:
9789
- * Whether the property must be numeric or parse as a numeric and should be
9790
- * removed when set to a falsey value.
9791
- * hasPositiveNumericValue:
9792
- * Whether the property must be positive numeric or parse as a positive
9793
- * numeric and should be removed when set to a falsey value.
9794
- * hasOverloadedBooleanValue:
9795
- * Whether the property can be used as a flag as well as with a value.
9796
- * Removed when strictly equal to false; present without a value when
9797
- * strictly equal to true; present with a value otherwise.
9798
- */
9799
- properties: {},
9800
 
9801
- /**
9802
- * Mapping from lowercase property names to the properly cased version, used
9803
- * to warn in the case of missing properties. Available only in __DEV__.
9804
- *
9805
- * autofocus is predefined, because adding it to the property whitelist
9806
- * causes unintended side effects.
9807
- *
9808
- * @type {Object}
9809
- */
9810
- getPossibleStandardName: true ? { autofocus: 'autoFocus' } : undefined,
9811
 
9812
- /**
9813
- * All of the isCustomAttribute() functions that have been injected.
9814
- */
9815
- _isCustomAttributeFunctions: [],
 
 
9816
 
9817
- /**
9818
- * Checks whether a property name is a custom attribute.
9819
- * @method
9820
- */
9821
- isCustomAttribute: function (attributeName) {
9822
- for (var i = 0; i < DOMProperty._isCustomAttributeFunctions.length; i++) {
9823
- var isCustomAttributeFn = DOMProperty._isCustomAttributeFunctions[i];
9824
- if (isCustomAttributeFn(attributeName)) {
9825
- return true;
9826
  }
9827
  }
9828
- return false;
9829
- },
9830
 
9831
- injection: DOMPropertyInjection
9832
- };
9833
 
9834
- module.exports = DOMProperty;
 
 
 
9835
 
9836
- /***/ }),
 
 
 
 
9837
 
9838
- /***/ "./node_modules/react-dom/lib/DOMPropertyOperations.js":
9839
- /*!*************************************************************!*\
9840
- !*** ./node_modules/react-dom/lib/DOMPropertyOperations.js ***!
9841
- \*************************************************************/
9842
- /*! no static exports found */
9843
- /***/ (function(module, exports, __webpack_require__) {
 
 
 
 
 
 
 
 
 
 
9844
 
9845
- "use strict";
9846
- /**
9847
- * Copyright (c) 2013-present, Facebook, Inc.
9848
- *
9849
- * This source code is licensed under the MIT license found in the
9850
- * LICENSE file in the root directory of this source tree.
9851
- *
9852
- */
9853
 
9854
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9855
 
9856
- var DOMProperty = __webpack_require__(/*! ./DOMProperty */ "./node_modules/react-dom/lib/DOMProperty.js");
9857
- var ReactDOMComponentTree = __webpack_require__(/*! ./ReactDOMComponentTree */ "./node_modules/react-dom/lib/ReactDOMComponentTree.js");
9858
- var ReactInstrumentation = __webpack_require__(/*! ./ReactInstrumentation */ "./node_modules/react-dom/lib/ReactInstrumentation.js");
9859
 
9860
- var quoteAttributeValueForBrowser = __webpack_require__(/*! ./quoteAttributeValueForBrowser */ "./node_modules/react-dom/lib/quoteAttributeValueForBrowser.js");
9861
- var warning = __webpack_require__(/*! fbjs/lib/warning */ "./node_modules/fbjs/lib/warning.js");
9862
 
9863
- var VALID_ATTRIBUTE_NAME_REGEX = new RegExp('^[' + DOMProperty.ATTRIBUTE_NAME_START_CHAR + '][' + DOMProperty.ATTRIBUTE_NAME_CHAR + ']*$');
9864
- var illegalAttributeNameCache = {};
9865
- var validatedAttributeNameCache = {};
 
 
 
 
 
 
 
 
 
 
 
 
 
9866
 
9867
- function isAttributeNameSafe(attributeName) {
9868
- if (validatedAttributeNameCache.hasOwnProperty(attributeName)) {
9869
- return true;
9870
- }
9871
- if (illegalAttributeNameCache.hasOwnProperty(attributeName)) {
9872
- return false;
9873
- }
9874
- if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) {
9875
- validatedAttributeNameCache[attributeName] = true;
9876
- return true;
 
 
 
 
 
 
 
9877
  }
9878
- illegalAttributeNameCache[attributeName] = true;
9879
- true ? warning(false, 'Invalid attribute name: `%s`', attributeName) : undefined;
9880
- return false;
9881
- }
9882
 
9883
- function shouldIgnoreValue(propertyInfo, value) {
9884
- return value == null || propertyInfo.hasBooleanValue && !value || propertyInfo.hasNumericValue && isNaN(value) || propertyInfo.hasPositiveNumericValue && value < 1 || propertyInfo.hasOverloadedBooleanValue && value === false;
 
9885
  }
9886
 
9887
- /**
9888
- * Operations for dealing with DOM properties.
9889
- */
9890
- var DOMPropertyOperations = {
9891
- /**
9892
- * Creates markup for the ID property.
9893
- *
9894
- * @param {string} id Unescaped ID.
9895
- * @return {string} Markup string.
9896
- */
9897
- createMarkupForID: function (id) {
9898
- return DOMProperty.ID_ATTRIBUTE_NAME + '=' + quoteAttributeValueForBrowser(id);
9899
- },
9900
 
9901
- setAttributeForID: function (node, id) {
9902
- node.setAttribute(DOMProperty.ID_ATTRIBUTE_NAME, id);
9903
- },
9904
 
9905
- createMarkupForRoot: function () {
9906
- return DOMProperty.ROOT_ATTRIBUTE_NAME + '=""';
9907
- },
 
 
 
 
 
 
 
9908
 
9909
- setAttributeForRoot: function (node) {
9910
- node.setAttribute(DOMProperty.ROOT_ATTRIBUTE_NAME, '');
9911
- },
 
9912
 
9913
- /**
9914
- * Creates markup for a property.
9915
- *
9916
- * @param {string} name
9917
- * @param {*} value
9918
- * @return {?string} Markup string, or null if the property was invalid.
9919
- */
9920
- createMarkupForProperty: function (name, value) {
9921
- var propertyInfo = DOMProperty.properties.hasOwnProperty(name) ? DOMProperty.properties[name] : null;
9922
- if (propertyInfo) {
9923
- if (shouldIgnoreValue(propertyInfo, value)) {
9924
- return '';
9925
  }
9926
- var attributeName = propertyInfo.attributeName;
9927
- if (propertyInfo.hasBooleanValue || propertyInfo.hasOverloadedBooleanValue && value === true) {
9928
- return attributeName + '=""';
9929
- }
9930
- return attributeName + '=' + quoteAttributeValueForBrowser(value);
9931
- } else if (DOMProperty.isCustomAttribute(name)) {
9932
- if (value == null) {
9933
- return '';
9934
- }
9935
- return name + '=' + quoteAttributeValueForBrowser(value);
9936
  }
9937
- return null;
9938
- },
9939
 
9940
- /**
9941
- * Creates markup for a custom property.
9942
- *
9943
- * @param {string} name
9944
- * @param {*} value
9945
- * @return {string} Markup string, or empty string if the property was invalid.
9946
- */
9947
- createMarkupForCustomAttribute: function (name, value) {
9948
- if (!isAttributeNameSafe(name) || value == null) {
9949
- return '';
9950
- }
9951
- return name + '=' + quoteAttributeValueForBrowser(value);
9952
- },
9953
 
9954
- /**
9955
- * Sets the value for a property on a node.
9956
- *
9957
- * @param {DOMElement} node
9958
- * @param {string} name
9959
- * @param {*} value
9960
- */
9961
- setValueForProperty: function (node, name, value) {
9962
- var propertyInfo = DOMProperty.properties.hasOwnProperty(name) ? DOMProperty.properties[name] : null;
9963
- if (propertyInfo) {
9964
- var mutationMethod = propertyInfo.mutationMethod;
9965
- if (mutationMethod) {
9966
- mutationMethod(node, value);
9967
- } else if (shouldIgnoreValue(propertyInfo, value)) {
9968
- this.deleteValueForProperty(node, name);
9969
- return;
9970
- } else if (propertyInfo.mustUseProperty) {
9971
- // Contrary to `setAttribute`, object properties are properly
9972
- // `toString`ed by IE8/9.
9973
- node[propertyInfo.propertyName] = value;
9974
- } else {
9975
- var attributeName = propertyInfo.attributeName;
9976
- var namespace = propertyInfo.attributeNamespace;
9977
- // `setAttribute` with objects becomes only `[object]` in IE8/9,
9978
- // ('' + value) makes it output the correct toString()-value.
9979
- if (namespace) {
9980
- node.setAttributeNS(namespace, attributeName, '' + value);
9981
- } else if (propertyInfo.hasBooleanValue || propertyInfo.hasOverloadedBooleanValue && value === true) {
9982
- node.setAttribute(attributeName, '');
9983
- } else {
9984
- node.setAttribute(attributeName, '' + value);
9985
- }
9986
- }
9987
- } else if (DOMProperty.isCustomAttribute(name)) {
9988
- DOMPropertyOperations.setValueForAttribute(node, name, value);
9989
- return;
9990
- }
9991
 
9992
- if (true) {
9993
- var payload = {};
9994
- payload[name] = value;
9995
- ReactInstrumentation.debugTool.onHostOperation({
9996
- instanceID: ReactDOMComponentTree.getInstanceFromNode(node)._debugID,
9997
- type: 'update attribute',
9998
- payload: payload
9999
- });
10000
- }
10001
- },
10002
 
10003
- setValueForAttribute: function (node, name, value) {
10004
- if (!isAttributeNameSafe(name)) {
10005
  return;
10006
  }
10007
- if (value == null) {
10008
- node.removeAttribute(name);
10009
- } else {
10010
- node.setAttribute(name, '' + value);
10011
- }
10012
 
10013
- if (true) {
10014
- var payload = {};
10015
- payload[name] = value;
10016
- ReactInstrumentation.debugTool.onHostOperation({
10017
- instanceID: ReactDOMComponentTree.getInstanceFromNode(node)._debugID,
10018
- type: 'update attribute',
10019
- payload: payload
10020
- });
10021
- }
10022
- },
10023
 
10024
- /**
10025
- * Deletes an attributes from a node.
10026
- *
10027
- * @param {DOMElement} node
10028
- * @param {string} name
10029
- */
10030
- deleteValueForAttribute: function (node, name) {
10031
- node.removeAttribute(name);
10032
- if (true) {
10033
- ReactInstrumentation.debugTool.onHostOperation({
10034
- instanceID: ReactDOMComponentTree.getInstanceFromNode(node)._debugID,
10035
- type: 'remove attribute',
10036
- payload: name
10037
- });
10038
  }
10039
- },
10040
 
10041
- /**
10042
- * Deletes the value for a property on a node.
10043
- *
10044
- * @param {DOMElement} node
10045
- * @param {string} name
10046
- */
10047
- deleteValueForProperty: function (node, name) {
10048
- var propertyInfo = DOMProperty.properties.hasOwnProperty(name) ? DOMProperty.properties[name] : null;
10049
- if (propertyInfo) {
10050
- var mutationMethod = propertyInfo.mutationMethod;
10051
- if (mutationMethod) {
10052
- mutationMethod(node, undefined);
10053
- } else if (propertyInfo.mustUseProperty) {
10054
- var propName = propertyInfo.propertyName;
10055
- if (propertyInfo.hasBooleanValue) {
10056
- node[propName] = false;
10057
- } else {
10058
- node[propName] = '';
10059
- }
10060
- } else {
10061
- node.removeAttribute(propertyInfo.attributeName);
10062
  }
10063
- } else if (DOMProperty.isCustomAttribute(name)) {
10064
- node.removeAttribute(name);
10065
  }
 
 
 
 
 
10066
 
10067
- if (true) {
10068
- ReactInstrumentation.debugTool.onHostOperation({
10069
- instanceID: ReactDOMComponentTree.getInstanceFromNode(node)._debugID,
10070
- type: 'remove attribute',
10071
- payload: name
10072
- });
 
 
 
10073
  }
10074
- }
10075
- };
 
10076
 
10077
- module.exports = DOMPropertyOperations;
 
10078
 
10079
- /***/ }),
 
 
10080
 
10081
- /***/ "./node_modules/react-dom/lib/Danger.js":
10082
- /*!**********************************************!*\
10083
- !*** ./node_modules/react-dom/lib/Danger.js ***!
10084
- \**********************************************/
10085
- /*! no static exports found */
10086
- /***/ (function(module, exports, __webpack_require__) {
 
 
10087
 
10088
- "use strict";
10089
- /**
10090
- * Copyright (c) 2013-present, Facebook, Inc.
10091
- *
10092
- * This source code is licensed under the MIT license found in the
10093
- * LICENSE file in the root directory of this source tree.
10094
- *
10095
- */
10096
 
 
 
 
10097
 
10098
 
10099
- var _prodInvariant = __webpack_require__(/*! ./reactProdInvariant */ "./node_modules/react-dom/lib/reactProdInvariant.js");
 
 
10100
 
10101
- var DOMLazyTree = __webpack_require__(/*! ./DOMLazyTree */ "./node_modules/react-dom/lib/DOMLazyTree.js");
10102
- var ExecutionEnvironment = __webpack_require__(/*! fbjs/lib/ExecutionEnvironment */ "./node_modules/fbjs/lib/ExecutionEnvironment.js");
 
 
 
 
 
 
 
 
 
 
 
 
10103
 
10104
- var createNodesFromMarkup = __webpack_require__(/*! fbjs/lib/createNodesFromMarkup */ "./node_modules/fbjs/lib/createNodesFromMarkup.js");
10105
- var emptyFunction = __webpack_require__(/*! fbjs/lib/emptyFunction */ "./node_modules/fbjs/lib/emptyFunction.js");
10106
- var invariant = __webpack_require__(/*! fbjs/lib/invariant */ "./node_modules/fbjs/lib/invariant.js");
 
10107
 
10108
- var Danger = {
10109
- /**
10110
- * Replaces a node with a string of markup at its current position within its
10111
- * parent. The markup must render into a single root node.
10112
- *
10113
- * @param {DOMElement} oldChild Child node to replace.
10114
- * @param {string} markup Markup to render in place of the child node.
10115
- * @internal
10116
- */
10117
- dangerouslyReplaceNodeWithMarkup: function (oldChild, markup) {
10118
- !ExecutionEnvironment.canUseDOM ? true ? 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.') : undefined : void 0;
10119
- !markup ? true ? invariant(false, 'dangerouslyReplaceNodeWithMarkup(...): Missing markup.') : undefined : void 0;
10120
- !(oldChild.nodeName !== 'HTML') ? true ? 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().') : undefined : void 0;
10121
-
10122
- if (typeof markup === 'string') {
10123
- var newChild = createNodesFromMarkup(markup, emptyFunction)[0];
10124
- oldChild.parentNode.replaceChild(newChild, oldChild);
10125
- } else {
10126
- DOMLazyTree.replaceChildWithTree(oldChild, markup);
10127
  }
10128
- }
10129
- };
10130
 
10131
- module.exports = Danger;
 
 
 
 
 
 
 
 
 
10132
 
10133
- /***/ }),
 
 
 
10134
 
10135
- /***/ "./node_modules/react-dom/lib/DefaultEventPluginOrder.js":
10136
- /*!***************************************************************!*\
10137
- !*** ./node_modules/react-dom/lib/DefaultEventPluginOrder.js ***!
10138
- \***************************************************************/
10139
- /*! no static exports found */
10140
- /***/ (function(module, exports, __webpack_require__) {
10141
 
10142
- "use strict";
10143
- /**
10144
- * Copyright (c) 2013-present, Facebook, Inc.
10145
- *
10146
- * This source code is licensed under the MIT license found in the
10147
- * LICENSE file in the root directory of this source tree.
10148
- *
10149
- */
 
10150
 
 
 
 
 
10151
 
 
 
10152
 
10153
- /**
10154
- * Module that is injectable into `EventPluginHub`, that specifies a
10155
- * deterministic ordering of `EventPlugin`s. A convenient way to reason about
10156
- * plugins, without having to package every one of them. This is better than
10157
- * having plugins be ordered in the same order that they are injected because
10158
- * that ordering would be influenced by the packaging order.
10159
- * `ResponderEventPlugin` must occur before `SimpleEventPlugin` so that
10160
- * preventing default on events is convenient in `SimpleEventPlugin` handlers.
10161
- */
10162
 
10163
- var DefaultEventPluginOrder = ['ResponderEventPlugin', 'SimpleEventPlugin', 'TapEventPlugin', 'EnterLeaveEventPlugin', 'ChangeEventPlugin', 'SelectEventPlugin', 'BeforeInputEventPlugin'];
 
10164
 
10165
- module.exports = DefaultEventPluginOrder;
 
 
 
10166
 
10167
- /***/ }),
 
 
 
 
 
 
 
10168
 
10169
- /***/ "./node_modules/react-dom/lib/EnterLeaveEventPlugin.js":
10170
- /*!*************************************************************!*\
10171
- !*** ./node_modules/react-dom/lib/EnterLeaveEventPlugin.js ***!
10172
- \*************************************************************/
10173
- /*! no static exports found */
10174
- /***/ (function(module, exports, __webpack_require__) {
10175
 
10176
- "use strict";
10177
- /**
10178
- * Copyright (c) 2013-present, Facebook, Inc.
10179
- *
10180
- * This source code is licensed under the MIT license found in the
10181
- * LICENSE file in the root directory of this source tree.
10182
- *
10183
- */
10184
 
 
 
10185
 
 
 
 
10186
 
10187
- var EventPropagators = __webpack_require__(/*! ./EventPropagators */ "./node_modules/react-dom/lib/EventPropagators.js");
10188
- var ReactDOMComponentTree = __webpack_require__(/*! ./ReactDOMComponentTree */ "./node_modules/react-dom/lib/ReactDOMComponentTree.js");
10189
- var SyntheticMouseEvent = __webpack_require__(/*! ./SyntheticMouseEvent */ "./node_modules/react-dom/lib/SyntheticMouseEvent.js");
10190
 
10191
- var eventTypes = {
10192
- mouseEnter: {
10193
- registrationName: 'onMouseEnter',
10194
- dependencies: ['topMouseOut', 'topMouseOver']
10195
- },
10196
- mouseLeave: {
10197
- registrationName: 'onMouseLeave',
10198
- dependencies: ['topMouseOut', 'topMouseOver']
10199
- }
10200
- };
10201
 
10202
- var EnterLeaveEventPlugin = {
10203
- eventTypes: eventTypes,
 
10204
 
10205
- /**
10206
- * For almost every interaction we care about, there will be both a top-level
10207
- * `mouseover` and `mouseout` event that occurs. Only use `mouseout` so that
10208
- * we do not extract duplicate events. However, moving the mouse into the
10209
- * browser from outside will not fire a `mouseout` event. In this case, we use
10210
- * the `mouseover` top-level event.
10211
- */
10212
- extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
10213
- if (topLevelType === 'topMouseOver' && (nativeEvent.relatedTarget || nativeEvent.fromElement)) {
10214
- return null;
10215
  }
10216
- if (topLevelType !== 'topMouseOut' && topLevelType !== 'topMouseOver') {
10217
- // Must not be a mouse in or mouse out - ignoring.
10218
- return null;
10219
  }
10220
 
10221
- var win;
10222
- if (nativeEventTarget.window === nativeEventTarget) {
10223
- // `nativeEventTarget` is probably a window object.
10224
- win = nativeEventTarget;
10225
- } else {
10226
- // TODO: Figure out why `ownerDocument` is sometimes undefined in IE8.
10227
- var doc = nativeEventTarget.ownerDocument;
10228
- if (doc) {
10229
- win = doc.defaultView || doc.parentWindow;
10230
- } else {
10231
- win = window;
10232
- }
10233
  }
10234
 
10235
- var from;
10236
- var to;
10237
- if (topLevelType === 'topMouseOut') {
10238
- from = targetInst;
10239
- var related = nativeEvent.relatedTarget || nativeEvent.toElement;
10240
- to = related ? ReactDOMComponentTree.getClosestInstanceFromNode(related) : null;
10241
- } else {
10242
- // Moving to a node from outside the window.
10243
- from = null;
10244
- to = targetInst;
10245
  }
10246
 
10247
- if (from === to) {
10248
- // Nothing pertains to our managed components.
10249
- return null;
10250
  }
10251
 
10252
- var fromNode = from == null ? win : ReactDOMComponentTree.getNodeFromInstance(from);
10253
- var toNode = to == null ? win : ReactDOMComponentTree.getNodeFromInstance(to);
 
 
 
 
 
10254
 
10255
- var leave = SyntheticMouseEvent.getPooled(eventTypes.mouseLeave, from, nativeEvent, nativeEventTarget);
10256
- leave.type = 'mouseleave';
10257
- leave.target = fromNode;
10258
- leave.relatedTarget = toNode;
10259
 
10260
- var enter = SyntheticMouseEvent.getPooled(eventTypes.mouseEnter, to, nativeEvent, nativeEventTarget);
10261
- enter.type = 'mouseenter';
10262
- enter.target = toNode;
10263
- enter.relatedTarget = fromNode;
10264
 
10265
- EventPropagators.accumulateEnterLeaveDispatches(leave, enter, from, to);
 
 
10266
 
10267
- return [leave, enter];
10268
- }
10269
- };
10270
 
10271
- module.exports = EnterLeaveEventPlugin;
 
 
10272
 
10273
- /***/ }),
 
 
10274
 
10275
- /***/ "./node_modules/react-dom/lib/EventPluginHub.js":
10276
- /*!******************************************************!*\
10277
- !*** ./node_modules/react-dom/lib/EventPluginHub.js ***!
10278
- \******************************************************/
10279
- /*! no static exports found */
10280
- /***/ (function(module, exports, __webpack_require__) {
10281
 
10282
- "use strict";
10283
- /**
10284
- * Copyright (c) 2013-present, Facebook, Inc.
10285
- *
10286
- * This source code is licensed under the MIT license found in the
10287
- * LICENSE file in the root directory of this source tree.
10288
- *
10289
- */
10290
 
 
 
 
10291
 
 
 
 
10292
 
10293
- var _prodInvariant = __webpack_require__(/*! ./reactProdInvariant */ "./node_modules/react-dom/lib/reactProdInvariant.js");
 
10294
 
10295
- var EventPluginRegistry = __webpack_require__(/*! ./EventPluginRegistry */ "./node_modules/react-dom/lib/EventPluginRegistry.js");
10296
- var EventPluginUtils = __webpack_require__(/*! ./EventPluginUtils */ "./node_modules/react-dom/lib/EventPluginUtils.js");
10297
- var ReactErrorUtils = __webpack_require__(/*! ./ReactErrorUtils */ "./node_modules/react-dom/lib/ReactErrorUtils.js");
10298
 
10299
- var accumulateInto = __webpack_require__(/*! ./accumulateInto */ "./node_modules/react-dom/lib/accumulateInto.js");
10300
- var forEachAccumulated = __webpack_require__(/*! ./forEachAccumulated */ "./node_modules/react-dom/lib/forEachAccumulated.js");
10301
- var invariant = __webpack_require__(/*! fbjs/lib/invariant */ "./node_modules/fbjs/lib/invariant.js");
10302
 
10303
- /**
10304
- * Internal store for event listeners
10305
- */
10306
- var listenerBank = {};
10307
 
10308
- /**
10309
- * Internal queue of events that have accumulated their dispatches and are
10310
- * waiting to have their dispatches executed.
10311
- */
10312
- var eventQueue = null;
10313
 
10314
- /**
10315
- * Dispatches an event and releases it back into the pool, unless persistent.
10316
- *
10317
- * @param {?object} event Synthetic event to be dispatched.
10318
- * @param {boolean} simulated If the event is simulated (changes exn behavior)
10319
- * @private
10320
- */
10321
- var executeDispatchesAndRelease = function (event, simulated) {
10322
- if (event) {
10323
- EventPluginUtils.executeDispatchesInOrder(event, simulated);
10324
 
10325
- if (!event.isPersistent()) {
10326
- event.constructor.release(event);
10327
  }
10328
  }
10329
- };
10330
- var executeDispatchesAndReleaseSimulated = function (e) {
10331
- return executeDispatchesAndRelease(e, true);
10332
- };
10333
- var executeDispatchesAndReleaseTopLevel = function (e) {
10334
- return executeDispatchesAndRelease(e, false);
10335
- };
10336
 
10337
- var getDictionaryKey = function (inst) {
10338
- // Prevents V8 performance issue:
10339
- // https://github.com/facebook/react/pull/7232
10340
- return '.' + inst._rootNodeID;
10341
- };
10342
 
10343
- function isInteractive(tag) {
10344
- return tag === 'button' || tag === 'input' || tag === 'select' || tag === 'textarea';
10345
- }
10346
 
10347
- function shouldPreventMouseEvent(name, type, props) {
10348
- switch (name) {
10349
- case 'onClick':
10350
- case 'onClickCapture':
10351
- case 'onDoubleClick':
10352
- case 'onDoubleClickCapture':
10353
- case 'onMouseDown':
10354
- case 'onMouseDownCapture':
10355
- case 'onMouseMove':
10356
- case 'onMouseMoveCapture':
10357
- case 'onMouseUp':
10358
- case 'onMouseUpCapture':
10359
- return !!(props.disabled && isInteractive(type));
10360
- default:
10361
- return false;
10362
  }
10363
  }
10364
 
10365
- /**
10366
- * This is a unified interface for event plugins to be installed and configured.
10367
- *
10368
- * Event plugins can implement the following properties:
10369
- *
10370
- * `extractEvents` {function(string, DOMEventTarget, string, object): *}
10371
- * Required. When a top-level event is fired, this method is expected to
10372
- * extract synthetic events that will in turn be queued and dispatched.
10373
- *
10374
- * `eventTypes` {object}
10375
- * Optional, plugins that fire events must publish a mapping of registration
10376
- * names that are used to register listeners. Values of this mapping must
10377
- * be objects that contain `registrationName` or `phasedRegistrationNames`.
10378
- *
10379
- * `executeDispatch` {function(object, function, string)}
10380
- * Optional, allows plugins to override how an event gets dispatched. By
10381
- * default, the listener is simply invoked.
10382
- *
10383
- * Each plugin that is injected into `EventsPluginHub` is immediately operable.
10384
- *
10385
- * @public
10386
- */
10387
- var EventPluginHub = {
10388
- /**
10389
- * Methods for injecting dependencies.
10390
- */
10391
- injection: {
10392
- /**
10393
- * @param {array} InjectedEventPluginOrder
10394
- * @public
10395
- */
10396
- injectEventPluginOrder: EventPluginRegistry.injectEventPluginOrder,
10397
 
10398
- /**
10399
- * @param {object} injectedNamesToPlugins Map from names to plugin modules.
10400
- */
10401
- injectEventPluginsByName: EventPluginRegistry.injectEventPluginsByName
10402
- },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10403
 
10404
- /**
10405
- * Stores `listener` at `listenerBank[registrationName][key]`. Is idempotent.
10406
- *
10407
- * @param {object} inst The instance, which is the source of events.
10408
- * @param {string} registrationName Name of listener (e.g. `onClick`).
10409
- * @param {function} listener The callback to store.
10410
- */
10411
- putListener: function (inst, registrationName, listener) {
10412
- !(typeof listener === 'function') ? true ? invariant(false, 'Expected %s listener to be a function, instead got type %s', registrationName, typeof listener) : undefined : void 0;
10413
 
10414
- var key = getDictionaryKey(inst);
10415
- var bankForRegistrationName = listenerBank[registrationName] || (listenerBank[registrationName] = {});
10416
- bankForRegistrationName[key] = listener;
 
 
 
 
 
10417
 
10418
- var PluginModule = EventPluginRegistry.registrationNameModules[registrationName];
10419
- if (PluginModule && PluginModule.didPutListener) {
10420
- PluginModule.didPutListener(inst, registrationName, listener);
10421
- }
10422
- },
10423
 
10424
- /**
10425
- * @param {object} inst The instance, which is the source of events.
10426
- * @param {string} registrationName Name of listener (e.g. `onClick`).
10427
- * @return {?function} The stored callback.
10428
- */
10429
- getListener: function (inst, registrationName) {
10430
- // TODO: shouldPreventMouseEvent is DOM-specific and definitely should not
10431
- // live here; needs to be moved to a better place soon
10432
- var bankForRegistrationName = listenerBank[registrationName];
10433
- if (shouldPreventMouseEvent(registrationName, inst._currentElement.type, inst._currentElement.props)) {
10434
- return null;
10435
- }
10436
- var key = getDictionaryKey(inst);
10437
- return bankForRegistrationName && bankForRegistrationName[key];
10438
- },
10439
 
10440
- /**
10441
- * Deletes a listener from the registration bank.
10442
- *
10443
- * @param {object} inst The instance, which is the source of events.
10444
- * @param {string} registrationName Name of listener (e.g. `onClick`).
10445
- */
10446
- deleteListener: function (inst, registrationName) {
10447
- var PluginModule = EventPluginRegistry.registrationNameModules[registrationName];
10448
- if (PluginModule && PluginModule.willDeleteListener) {
10449
- PluginModule.willDeleteListener(inst, registrationName);
10450
  }
 
10451
 
10452
- var bankForRegistrationName = listenerBank[registrationName];
10453
- // TODO: This should never be null -- when is it?
10454
- if (bankForRegistrationName) {
10455
- var key = getDictionaryKey(inst);
10456
- delete bankForRegistrationName[key];
10457
- }
10458
- },
10459
 
10460
- /**
10461
- * Deletes all listeners for the DOM element with the supplied ID.
10462
- *
10463
- * @param {object} inst The instance, which is the source of events.
10464
- */
10465
- deleteAllListeners: function (inst) {
10466
- var key = getDictionaryKey(inst);
10467
- for (var registrationName in listenerBank) {
10468
- if (!listenerBank.hasOwnProperty(registrationName)) {
10469
- continue;
10470
  }
 
 
 
10471
 
10472
- if (!listenerBank[registrationName][key]) {
10473
- continue;
 
 
 
 
 
 
 
 
10474
  }
10475
 
10476
- var PluginModule = EventPluginRegistry.registrationNameModules[registrationName];
10477
- if (PluginModule && PluginModule.willDeleteListener) {
10478
- PluginModule.willDeleteListener(inst, registrationName);
 
10479
  }
10480
 
10481
- delete listenerBank[registrationName][key];
10482
- }
10483
- },
 
 
10484
 
10485
- /**
10486
- * Allows registered plugins an opportunity to extract events from top-level
10487
- * native browser events.
10488
- *
10489
- * @return {*} An accumulation of synthetic events.
10490
- * @internal
10491
- */
10492
- extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
10493
- var events;
10494
- var plugins = EventPluginRegistry.plugins;
10495
- for (var i = 0; i < plugins.length; i++) {
10496
- // Not every plugin in the ordering may be loaded at runtime.
10497
- var possiblePlugin = plugins[i];
10498
- if (possiblePlugin) {
10499
- var extractedEvents = possiblePlugin.extractEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget);
10500
- if (extractedEvents) {
10501
- events = accumulateInto(events, extractedEvents);
10502
  }
10503
  }
10504
  }
10505
- return events;
10506
- },
10507
 
10508
- /**
10509
- * Enqueues a synthetic event that should be dispatched when
10510
- * `processEventQueue` is invoked.
10511
- *
10512
- * @param {*} events An accumulation of synthetic events.
10513
- * @internal
10514
- */
10515
- enqueueEvents: function (events) {
10516
- if (events) {
10517
- eventQueue = accumulateInto(eventQueue, events);
10518
- }
10519
- },
10520
 
10521
- /**
10522
- * Dispatches all synthetic events on the event queue.
10523
- *
10524
- * @internal
10525
- */
10526
- processEventQueue: function (simulated) {
10527
- // Set `eventQueue` to null before processing it so that we can tell if more
10528
- // events get enqueued while processing.
10529
- var processingEventQueue = eventQueue;
10530
- eventQueue = null;
10531
- if (simulated) {
10532
- forEachAccumulated(processingEventQueue, executeDispatchesAndReleaseSimulated);
10533
- } else {
10534
- forEachAccumulated(processingEventQueue, executeDispatchesAndReleaseTopLevel);
10535
- }
10536
- !!eventQueue ? true ? invariant(false, 'processEventQueue(): Additional events were enqueued while processing an event queue. Support for this has not yet been implemented.') : undefined : void 0;
10537
- // This would be a good time to rethrow if any of the event handlers threw.
10538
- ReactErrorUtils.rethrowCaughtError();
10539
- },
10540
 
10541
- /**
10542
- * These are needed for tests only. Do not use!
10543
- */
10544
- __purge: function () {
10545
- listenerBank = {};
10546
- },
10547
 
10548
- __getListenerBank: function () {
10549
- return listenerBank;
 
 
 
10550
  }
10551
- };
10552
 
10553
- module.exports = EventPluginHub;
 
 
10554
 
10555
- /***/ }),
 
 
 
10556
 
10557
- /***/ "./node_modules/react-dom/lib/EventPluginRegistry.js":
10558
- /*!***********************************************************!*\
10559
- !*** ./node_modules/react-dom/lib/EventPluginRegistry.js ***!
10560
- \***********************************************************/
10561
- /*! no static exports found */
10562
- /***/ (function(module, exports, __webpack_require__) {
10563
 
10564
- "use strict";
10565
- /**
10566
- * Copyright (c) 2013-present, Facebook, Inc.
10567
- *
10568
- * This source code is licensed under the MIT license found in the
10569
- * LICENSE file in the root directory of this source tree.
10570
- *
10571
- *
10572
- */
10573
 
 
 
 
10574
 
 
 
 
10575
 
10576
- var _prodInvariant = __webpack_require__(/*! ./reactProdInvariant */ "./node_modules/react-dom/lib/reactProdInvariant.js");
 
 
10577
 
10578
- var invariant = __webpack_require__(/*! fbjs/lib/invariant */ "./node_modules/fbjs/lib/invariant.js");
 
10579
 
10580
- /**
10581
- * Injectable ordering of event plugins.
10582
- */
10583
- var eventPluginOrder = null;
10584
 
10585
- /**
10586
- * Injectable mapping from names to event plugin modules.
10587
- */
10588
- var namesToPlugins = {};
10589
 
10590
- /**
10591
- * Recomputes the plugin list using the injected plugins and plugin ordering.
10592
- *
10593
- * @private
10594
- */
10595
- function recomputePluginOrdering() {
10596
- if (!eventPluginOrder) {
10597
- // Wait until an `eventPluginOrder` is injected.
10598
- return;
10599
  }
10600
- for (var pluginName in namesToPlugins) {
10601
- var pluginModule = namesToPlugins[pluginName];
10602
- var pluginIndex = eventPluginOrder.indexOf(pluginName);
10603
- !(pluginIndex > -1) ? true ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : undefined : void 0;
10604
- if (EventPluginRegistry.plugins[pluginIndex]) {
10605
- continue;
10606
- }
10607
- !pluginModule.extractEvents ? true ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : undefined : void 0;
10608
- EventPluginRegistry.plugins[pluginIndex] = pluginModule;
10609
- var publishedEvents = pluginModule.eventTypes;
10610
- for (var eventName in publishedEvents) {
10611
- !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? true ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : undefined : void 0;
10612
- }
10613
  }
10614
- }
10615
 
10616
- /**
10617
- * Publishes an event so that it can be dispatched by the supplied plugin.
10618
- *
10619
- * @param {object} dispatchConfig Dispatch configuration for the event.
10620
- * @param {object} PluginModule Plugin publishing the event.
10621
- * @return {boolean} True if the event was successfully published.
10622
- * @private
10623
- */
10624
- function publishEventForPlugin(dispatchConfig, pluginModule, eventName) {
10625
- !!EventPluginRegistry.eventNameDispatchConfigs.hasOwnProperty(eventName) ? true ? invariant(false, 'EventPluginHub: More than one plugin attempted to publish the same event name, `%s`.', eventName) : undefined : void 0;
10626
- EventPluginRegistry.eventNameDispatchConfigs[eventName] = dispatchConfig;
10627
 
10628
- var phasedRegistrationNames = dispatchConfig.phasedRegistrationNames;
10629
- if (phasedRegistrationNames) {
10630
- for (var phaseName in phasedRegistrationNames) {
10631
- if (phasedRegistrationNames.hasOwnProperty(phaseName)) {
10632
- var phasedRegistrationName = phasedRegistrationNames[phaseName];
10633
- publishRegistrationName(phasedRegistrationName, pluginModule, eventName);
10634
  }
10635
  }
10636
- return true;
10637
- } else if (dispatchConfig.registrationName) {
10638
- publishRegistrationName(dispatchConfig.registrationName, pluginModule, eventName);
10639
- return true;
 
 
 
 
10640
  }
10641
- return false;
10642
- }
10643
 
10644
- /**
10645
- * Publishes a registration name that is used to identify dispatched events and
10646
- * can be used with `EventPluginHub.putListener` to register listeners.
10647
- *
10648
- * @param {string} registrationName Registration name to add.
10649
- * @param {object} PluginModule Plugin publishing the event.
10650
- * @private
10651
- */
10652
- function publishRegistrationName(registrationName, pluginModule, eventName) {
10653
- !!EventPluginRegistry.registrationNameModules[registrationName] ? true ? invariant(false, 'EventPluginHub: More than one plugin attempted to publish the same registration name, `%s`.', registrationName) : undefined : void 0;
10654
- EventPluginRegistry.registrationNameModules[registrationName] = pluginModule;
10655
- EventPluginRegistry.registrationNameDependencies[registrationName] = pluginModule.eventTypes[eventName].dependencies;
10656
 
10657
- if (true) {
10658
- var lowerCasedName = registrationName.toLowerCase();
10659
- EventPluginRegistry.possibleRegistrationNames[lowerCasedName] = registrationName;
 
 
10660
 
10661
- if (registrationName === 'onDoubleClick') {
10662
- EventPluginRegistry.possibleRegistrationNames.ondblclick = registrationName;
10663
- }
 
 
 
 
 
 
 
 
10664
  }
10665
  }
10666
 
10667
- /**
10668
- * Registers plugins so that they can extract and dispatch events.
10669
- *
10670
- * @see {EventPluginHub}
10671
- */
10672
- var EventPluginRegistry = {
10673
- /**
10674
- * Ordered list of injected plugins.
10675
- */
10676
- plugins: [],
10677
 
10678
- /**
10679
- * Mapping from event name to dispatch config
10680
- */
10681
- eventNameDispatchConfigs: {},
 
 
10682
 
10683
- /**
10684
- * Mapping from registration name to plugin module
10685
- */
10686
- registrationNameModules: {},
 
 
10687
 
10688
- /**
10689
- * Mapping from registration name to event name
10690
- */
10691
- registrationNameDependencies: {},
 
10692
 
10693
- /**
10694
- * Mapping from lowercase registration names to the properly cased version,
10695
- * used to warn in the case of missing event handlers. Available
10696
- * only in __DEV__.
10697
- * @type {Object}
10698
- */
10699
- possibleRegistrationNames: true ? {} : undefined,
10700
- // Trust the developer to only use possibleRegistrationNames in __DEV__
10701
 
10702
- /**
10703
- * Injects an ordering of plugins (by plugin name). This allows the ordering
10704
- * to be decoupled from injection of the actual plugins so that ordering is
10705
- * always deterministic regardless of packaging, on-the-fly injection, etc.
10706
- *
10707
- * @param {array} InjectedEventPluginOrder
10708
- * @internal
10709
- * @see {EventPluginHub.injection.injectEventPluginOrder}
10710
- */
10711
- injectEventPluginOrder: function (injectedEventPluginOrder) {
10712
- !!eventPluginOrder ? true ? invariant(false, 'EventPluginRegistry: Cannot inject event plugin ordering more than once. You are likely trying to load more than one copy of React.') : undefined : void 0;
10713
- // Clone the ordering so it cannot be dynamically mutated.
10714
- eventPluginOrder = Array.prototype.slice.call(injectedEventPluginOrder);
10715
- recomputePluginOrdering();
10716
- },
10717
 
10718
- /**
10719
- * Injects plugins to be used by `EventPluginHub`. The plugin names must be
10720
- * in the ordering injected by `injectEventPluginOrder`.
10721
- *
10722
- * Plugins can be injected as part of page initialization or on-the-fly.
10723
- *
10724
- * @param {object} injectedNamesToPlugins Map from names to plugin modules.
10725
- * @internal
10726
- * @see {EventPluginHub.injection.injectEventPluginsByName}
10727
- */
10728
- injectEventPluginsByName: function (injectedNamesToPlugins) {
10729
- var isOrderingDirty = false;
10730
- for (var pluginName in injectedNamesToPlugins) {
10731
- if (!injectedNamesToPlugins.hasOwnProperty(pluginName)) {
10732
- continue;
 
10733
  }
10734
- var pluginModule = injectedNamesToPlugins[pluginName];
10735
- if (!namesToPlugins.hasOwnProperty(pluginName) || namesToPlugins[pluginName] !== pluginModule) {
10736
- !!namesToPlugins[pluginName] ? true ? invariant(false, 'EventPluginRegistry: Cannot inject two different event plugins using the same name, `%s`.', pluginName) : undefined : void 0;
10737
- namesToPlugins[pluginName] = pluginModule;
10738
- isOrderingDirty = true;
10739
  }
10740
  }
10741
- if (isOrderingDirty) {
10742
- recomputePluginOrdering();
 
10743
  }
10744
- },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10745
 
10746
- /**
10747
- * Looks up the plugin for the supplied event.
10748
- *
10749
- * @param {object} event A synthetic event.
10750
- * @return {?object} The plugin that created the supplied event.
10751
- * @internal
10752
- */
10753
- getPluginModuleForEvent: function (event) {
10754
- var dispatchConfig = event.dispatchConfig;
10755
- if (dispatchConfig.registrationName) {
10756
- return EventPluginRegistry.registrationNameModules[dispatchConfig.registrationName] || null;
10757
- }
10758
- if (dispatchConfig.phasedRegistrationNames !== undefined) {
10759
- // pulling phasedRegistrationNames out of dispatchConfig helps Flow see
10760
- // that it is not undefined.
10761
- var phasedRegistrationNames = dispatchConfig.phasedRegistrationNames;
10762
-
10763
- for (var phase in phasedRegistrationNames) {
10764
- if (!phasedRegistrationNames.hasOwnProperty(phase)) {
10765
- continue;
10766
- }
10767
- var pluginModule = EventPluginRegistry.registrationNameModules[phasedRegistrationNames[phase]];
10768
- if (pluginModule) {
10769
- return pluginModule;
10770
- }
10771
- }
10772
  }
10773
- return null;
10774
- },
10775
 
10776
- /**
10777
- * Exposed for unit testing.
10778
- * @private
10779
- */
10780
- _resetEventPlugins: function () {
10781
- eventPluginOrder = null;
10782
- for (var pluginName in namesToPlugins) {
10783
- if (namesToPlugins.hasOwnProperty(pluginName)) {
10784
- delete namesToPlugins[pluginName];
 
 
 
10785
  }
10786
  }
10787
- EventPluginRegistry.plugins.length = 0;
10788
 
10789
- var eventNameDispatchConfigs = EventPluginRegistry.eventNameDispatchConfigs;
10790
- for (var eventName in eventNameDispatchConfigs) {
10791
- if (eventNameDispatchConfigs.hasOwnProperty(eventName)) {
10792
- delete eventNameDispatchConfigs[eventName];
10793
  }
10794
  }
10795
 
10796
- var registrationNameModules = EventPluginRegistry.registrationNameModules;
10797
- for (var registrationName in registrationNameModules) {
10798
- if (registrationNameModules.hasOwnProperty(registrationName)) {
10799
- delete registrationNameModules[registrationName];
 
 
 
 
 
 
 
 
 
 
 
 
10800
  }
10801
- }
10802
 
10803
- if (true) {
10804
- var possibleRegistrationNames = EventPluginRegistry.possibleRegistrationNames;
10805
- for (var lowerCasedName in possibleRegistrationNames) {
10806
- if (possibleRegistrationNames.hasOwnProperty(lowerCasedName)) {
10807
- delete possibleRegistrationNames[lowerCasedName];
10808
- }
10809
  }
10810
  }
10811
- }
10812
- };
10813
 
10814
- module.exports = EventPluginRegistry;
 
 
10815
 
10816
- /***/ }),
 
 
 
 
 
 
 
 
 
 
10817
 
10818
- /***/ "./node_modules/react-dom/lib/EventPluginUtils.js":
10819
- /*!********************************************************!*\
10820
- !*** ./node_modules/react-dom/lib/EventPluginUtils.js ***!
10821
- \********************************************************/
10822
- /*! no static exports found */
10823
- /***/ (function(module, exports, __webpack_require__) {
10824
 
10825
- "use strict";
10826
- /**
10827
- * Copyright (c) 2013-present, Facebook, Inc.
10828
- *
10829
- * This source code is licensed under the MIT license found in the
10830
- * LICENSE file in the root directory of this source tree.
10831
- *
10832
- */
10833
 
 
 
 
 
10834
 
10835
 
10836
- var _prodInvariant = __webpack_require__(/*! ./reactProdInvariant */ "./node_modules/react-dom/lib/reactProdInvariant.js");
 
 
 
 
10837
 
10838
- var ReactErrorUtils = __webpack_require__(/*! ./ReactErrorUtils */ "./node_modules/react-dom/lib/ReactErrorUtils.js");
 
 
 
 
10839
 
10840
- var invariant = __webpack_require__(/*! fbjs/lib/invariant */ "./node_modules/fbjs/lib/invariant.js");
10841
- var warning = __webpack_require__(/*! fbjs/lib/warning */ "./node_modules/fbjs/lib/warning.js");
10842
 
10843
- /**
10844
- * Injected dependencies:
10845
- */
 
 
 
 
 
 
10846
 
10847
- /**
10848
- * - `ComponentTree`: [required] Module that can convert between React instances
10849
- * and actual node references.
10850
- */
10851
- var ComponentTree;
10852
- var TreeTraversal;
10853
- var injection = {
10854
- injectComponentTree: function (Injected) {
10855
- ComponentTree = Injected;
10856
- if (true) {
10857
- true ? warning(Injected && Injected.getNodeFromInstance && Injected.getInstanceFromNode, 'EventPluginUtils.injection.injectComponentTree(...): Injected ' + 'module is missing getNodeFromInstance or getInstanceFromNode.') : undefined;
10858
- }
10859
- },
10860
- injectTreeTraversal: function (Injected) {
10861
- TreeTraversal = Injected;
10862
- if (true) {
10863
- true ? warning(Injected && Injected.isAncestor && Injected.getLowestCommonAncestor, 'EventPluginUtils.injection.injectTreeTraversal(...): Injected ' + 'module is missing isAncestor or getLowestCommonAncestor.') : undefined;
10864
  }
10865
- }
10866
- };
10867
 
10868
- function isEndish(topLevelType) {
10869
- return topLevelType === 'topMouseUp' || topLevelType === 'topTouchEnd' || topLevelType === 'topTouchCancel';
10870
- }
10871
 
10872
- function isMoveish(topLevelType) {
10873
- return topLevelType === 'topMouseMove' || topLevelType === 'topTouchMove';
10874
- }
10875
- function isStartish(topLevelType) {
10876
- return topLevelType === 'topMouseDown' || topLevelType === 'topTouchStart';
10877
- }
10878
 
10879
- var validateEventDispatches;
10880
- if (true) {
10881
- validateEventDispatches = function (event) {
10882
- var dispatchListeners = event._dispatchListeners;
10883
- var dispatchInstances = event._dispatchInstances;
10884
 
10885
- var listenersIsArr = Array.isArray(dispatchListeners);
10886
- var listenersLen = listenersIsArr ? dispatchListeners.length : dispatchListeners ? 1 : 0;
 
10887
 
10888
- var instancesIsArr = Array.isArray(dispatchInstances);
10889
- var instancesLen = instancesIsArr ? dispatchInstances.length : dispatchInstances ? 1 : 0;
10890
 
10891
- true ? warning(instancesIsArr === listenersIsArr && instancesLen === listenersLen, 'EventPluginUtils: Invalid `event`.') : undefined;
10892
  };
10893
  }
10894
 
10895
- /**
10896
- * Dispatch the event to the listener.
10897
- * @param {SyntheticEvent} event SyntheticEvent to handle
10898
- * @param {boolean} simulated If the event is simulated (changes exn behavior)
10899
- * @param {function} listener Application-level callback
10900
- * @param {*} inst Internal component instance
10901
- */
10902
- function executeDispatch(event, simulated, listener, inst) {
10903
- var type = event.type || 'unknown-event';
10904
- event.currentTarget = EventPluginUtils.getNodeFromInstance(inst);
10905
- if (simulated) {
10906
- ReactErrorUtils.invokeGuardedCallbackWithCatch(type, listener, event);
10907
- } else {
10908
- ReactErrorUtils.invokeGuardedCallback(type, listener, event);
10909
- }
10910
- event.currentTarget = null;
10911
- }
10912
 
10913
- /**
10914
- * Standard/simple iteration through an event's collected dispatches.
10915
- */
10916
- function executeDispatchesInOrder(event, simulated) {
10917
- var dispatchListeners = event._dispatchListeners;
10918
- var dispatchInstances = event._dispatchInstances;
10919
- if (true) {
10920
- validateEventDispatches(event);
10921
- }
10922
- if (Array.isArray(dispatchListeners)) {
10923
- for (var i = 0; i < dispatchListeners.length; i++) {
10924
- if (event.isPropagationStopped()) {
10925
- break;
 
 
 
 
 
 
 
10926
  }
10927
- // Listeners and Instances are two parallel arrays that are always in sync.
10928
- executeDispatch(event, simulated, dispatchListeners[i], dispatchInstances[i]);
10929
  }
10930
- } else if (dispatchListeners) {
10931
- executeDispatch(event, simulated, dispatchListeners, dispatchInstances);
10932
- }
10933
- event._dispatchListeners = null;
10934
- event._dispatchInstances = null;
10935
- }
10936
 
10937
- /**
10938
- * Standard/simple iteration through an event's collected dispatches, but stops
10939
- * at the first dispatch execution returning true, and returns that id.
10940
- *
10941
- * @return {?string} id of the first dispatch execution who's listener returns
10942
- * true, or null if no listener returned true.
10943
- */
10944
- function executeDispatchesInOrderStopAtTrueImpl(event) {
10945
- var dispatchListeners = event._dispatchListeners;
10946
- var dispatchInstances = event._dispatchInstances;
10947
- if (true) {
10948
- validateEventDispatches(event);
10949
- }
10950
- if (Array.isArray(dispatchListeners)) {
10951
- for (var i = 0; i < dispatchListeners.length; i++) {
10952
- if (event.isPropagationStopped()) {
10953
- break;
10954
  }
10955
- // Listeners and Instances are two parallel arrays that are always in sync.
10956
- if (dispatchListeners[i](event, dispatchInstances[i])) {
10957
- return dispatchInstances[i];
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10958
  }
10959
- }
10960
- } else if (dispatchListeners) {
10961
- if (dispatchListeners(event, dispatchInstances)) {
10962
- return dispatchInstances;
10963
  }
10964
  }
10965
- return null;
10966
- }
10967
 
10968
- /**
10969
- * @see executeDispatchesInOrderStopAtTrueImpl
10970
- */
10971
- function executeDispatchesInOrderStopAtTrue(event) {
10972
- var ret = executeDispatchesInOrderStopAtTrueImpl(event);
10973
- event._dispatchInstances = null;
10974
- event._dispatchListeners = null;
10975
- return ret;
10976
  }
10977
 
10978
- /**
10979
- * Execution of a "direct" dispatch - there must be at most one dispatch
10980
- * accumulated on the event or it is considered an error. It doesn't really make
10981
- * sense for an event with multiple dispatches (bubbled) to keep track of the
10982
- * return values at each dispatch execution, but it does tend to make sense when
10983
- * dealing with "direct" dispatches.
10984
- *
10985
- * @return {*} The return value of executing the single dispatch.
10986
- */
10987
- function executeDirectDispatch(event) {
10988
- if (true) {
10989
- validateEventDispatches(event);
10990
  }
10991
- var dispatchListener = event._dispatchListeners;
10992
- var dispatchInstance = event._dispatchInstances;
10993
- !!Array.isArray(dispatchListener) ? true ? invariant(false, 'executeDirectDispatch(...): Invalid `event`.') : undefined : void 0;
10994
- event.currentTarget = dispatchListener ? EventPluginUtils.getNodeFromInstance(dispatchInstance) : null;
10995
- var res = dispatchListener ? dispatchListener(event) : null;
10996
- event.currentTarget = null;
10997
- event._dispatchListeners = null;
10998
- event._dispatchInstances = null;
10999
- return res;
11000
  }
11001
 
11002
- /**
11003
- * @param {SyntheticEvent} event
11004
- * @return {boolean} True iff number of dispatches accumulated is greater than 0.
11005
- */
11006
- function hasDispatches(event) {
11007
- return !!event._dispatchListeners;
11008
- }
11009
 
11010
- /**
11011
- * General utilities that are useful in creating custom Event Plugins.
11012
- */
11013
- var EventPluginUtils = {
11014
- isEndish: isEndish,
11015
- isMoveish: isMoveish,
11016
- isStartish: isStartish,
11017
-
11018
- executeDirectDispatch: executeDirectDispatch,
11019
- executeDispatchesInOrder: executeDispatchesInOrder,
11020
- executeDispatchesInOrderStopAtTrue: executeDispatchesInOrderStopAtTrue,
11021
- hasDispatches: hasDispatches,
11022
-
11023
- getInstanceFromNode: function (node) {
11024
- return ComponentTree.getInstanceFromNode(node);
11025
- },
11026
- getNodeFromInstance: function (node) {
11027
- return ComponentTree.getNodeFromInstance(node);
11028
- },
11029
- isAncestor: function (a, b) {
11030
- return TreeTraversal.isAncestor(a, b);
11031
- },
11032
- getLowestCommonAncestor: function (a, b) {
11033
- return TreeTraversal.getLowestCommonAncestor(a, b);
11034
- },
11035
- getParentInstance: function (inst) {
11036
- return TreeTraversal.getParentInstance(inst);
11037
- },
11038
- traverseTwoPhase: function (target, fn, arg) {
11039
- return TreeTraversal.traverseTwoPhase(target, fn, arg);
11040
- },
11041
- traverseEnterLeave: function (from, to, fn, argFrom, argTo) {
11042
- return TreeTraversal.traverseEnterLeave(from, to, fn, argFrom, argTo);
11043
- },
11044
 
11045
- injection: injection
11046
- };
11047
 
11048
- module.exports = EventPluginUtils;
 
 
 
 
 
11049
 
11050
- /***/ }),
11051
 
11052
- /***/ "./node_modules/react-dom/lib/EventPropagators.js":
11053
- /*!********************************************************!*\
11054
- !*** ./node_modules/react-dom/lib/EventPropagators.js ***!
11055
- \********************************************************/
11056
- /*! no static exports found */
11057
- /***/ (function(module, exports, __webpack_require__) {
 
 
 
 
11058
 
11059
- "use strict";
11060
- /**
11061
- * Copyright (c) 2013-present, Facebook, Inc.
11062
- *
11063
- * This source code is licensed under the MIT license found in the
11064
- * LICENSE file in the root directory of this source tree.
11065
- *
11066
- */
11067
 
 
11068
 
 
 
 
 
 
 
11069
 
11070
- var EventPluginHub = __webpack_require__(/*! ./EventPluginHub */ "./node_modules/react-dom/lib/EventPluginHub.js");
11071
- var EventPluginUtils = __webpack_require__(/*! ./EventPluginUtils */ "./node_modules/react-dom/lib/EventPluginUtils.js");
 
11072
 
11073
- var accumulateInto = __webpack_require__(/*! ./accumulateInto */ "./node_modules/react-dom/lib/accumulateInto.js");
11074
- var forEachAccumulated = __webpack_require__(/*! ./forEachAccumulated */ "./node_modules/react-dom/lib/forEachAccumulated.js");
11075
- var warning = __webpack_require__(/*! fbjs/lib/warning */ "./node_modules/fbjs/lib/warning.js");
 
 
 
11076
 
11077
- var getListener = EventPluginHub.getListener;
11078
 
11079
- /**
11080
- * Some event types have a notion of different registration names for different
11081
- * "phases" of propagation. This finds listeners by a given phase.
11082
- */
11083
- function listenerAtPhase(inst, event, propagationPhase) {
11084
- var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];
11085
- return getListener(inst, registrationName);
11086
- }
11087
 
11088
- /**
11089
- * Tags a `SyntheticEvent` with dispatched listeners. Creating this function
11090
- * here, allows us to not have to bind or create functions for each event.
11091
- * Mutating the event's members allows us to not have to create a wrapping
11092
- * "dispatch" object that pairs the event with the listener.
11093
- */
11094
- function accumulateDirectionalDispatches(inst, phase, event) {
11095
- if (true) {
11096
- true ? warning(inst, 'Dispatching inst must not be null') : undefined;
11097
  }
11098
- var listener = listenerAtPhase(inst, event, phase);
11099
- if (listener) {
11100
- event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);
11101
- event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11102
  }
11103
- }
11104
 
11105
- /**
11106
- * Collect dispatches (must be entirely collected before dispatching - see unit
11107
- * tests). Lazily allocate the array to conserve memory. We must loop through
11108
- * each event and perform the traversal for each one. We cannot perform a
11109
- * single traversal for the entire collection of events because each event may
11110
- * have a different target.
11111
- */
11112
- function accumulateTwoPhaseDispatchesSingle(event) {
11113
- if (event && event.dispatchConfig.phasedRegistrationNames) {
11114
- EventPluginUtils.traverseTwoPhase(event._targetInst, accumulateDirectionalDispatches, event);
11115
  }
11116
- }
11117
 
11118
- /**
11119
- * Same as `accumulateTwoPhaseDispatchesSingle`, but skips over the targetID.
11120
- */
11121
- function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {
11122
- if (event && event.dispatchConfig.phasedRegistrationNames) {
11123
- var targetInst = event._targetInst;
11124
- var parentInst = targetInst ? EventPluginUtils.getParentInstance(targetInst) : null;
11125
- EventPluginUtils.traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11126
  }
11127
- }
11128
 
11129
- /**
11130
- * Accumulates without regard to direction, does not look for phased
11131
- * registration names. Same as `accumulateDirectDispatchesSingle` but without
11132
- * requiring that the `dispatchMarker` be the same as the dispatched ID.
11133
- */
11134
- function accumulateDispatches(inst, ignoredDirection, event) {
11135
- if (event && event.dispatchConfig.registrationName) {
11136
- var registrationName = event.dispatchConfig.registrationName;
11137
- var listener = getListener(inst, registrationName);
11138
- if (listener) {
11139
- event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);
11140
- event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);
11141
  }
 
 
11142
  }
11143
- }
11144
 
11145
- /**
11146
- * Accumulates dispatches on an `SyntheticEvent`, but only for the
11147
- * `dispatchMarker`.
11148
- * @param {SyntheticEvent} event
11149
- */
11150
- function accumulateDirectDispatchesSingle(event) {
11151
- if (event && event.dispatchConfig.registrationName) {
11152
- accumulateDispatches(event._targetInst, null, event);
 
 
 
 
11153
  }
11154
- }
11155
 
11156
- function accumulateTwoPhaseDispatches(events) {
11157
- forEachAccumulated(events, accumulateTwoPhaseDispatchesSingle);
11158
- }
 
 
 
 
 
11159
 
11160
- function accumulateTwoPhaseDispatchesSkipTarget(events) {
11161
- forEachAccumulated(events, accumulateTwoPhaseDispatchesSingleSkipTarget);
11162
- }
 
11163
 
11164
- function accumulateEnterLeaveDispatches(leave, enter, from, to) {
11165
- EventPluginUtils.traverseEnterLeave(from, to, accumulateDispatches, leave, enter);
11166
- }
11167
 
11168
- function accumulateDirectDispatches(events) {
11169
- forEachAccumulated(events, accumulateDirectDispatchesSingle);
11170
- }
11171
 
11172
- /**
11173
- * A small set of propagation patterns, each of which will accept a small amount
11174
- * of information, and generate a set of "dispatch ready event objects" - which
11175
- * are sets of events that have already been annotated with a set of dispatched
11176
- * listener functions/ids. The API is designed this way to discourage these
11177
- * propagation strategies from actually executing the dispatches, since we
11178
- * always want to collect the entire set of dispatches before executing event a
11179
- * single one.
11180
- *
11181
- * @constructor EventPropagators
11182
- */
11183
- var EventPropagators = {
11184
- accumulateTwoPhaseDispatches: accumulateTwoPhaseDispatches,
11185
- accumulateTwoPhaseDispatchesSkipTarget: accumulateTwoPhaseDispatchesSkipTarget,
11186
- accumulateDirectDispatches: accumulateDirectDispatches,
11187
- accumulateEnterLeaveDispatches: accumulateEnterLeaveDispatches
11188
- };
11189
 
11190
- module.exports = EventPropagators;
 
 
 
 
 
 
 
 
 
 
 
 
11191
 
11192
- /***/ }),
 
 
 
 
 
 
 
 
 
 
 
 
11193
 
11194
- /***/ "./node_modules/react-dom/lib/FallbackCompositionState.js":
11195
- /*!****************************************************************!*\
11196
- !*** ./node_modules/react-dom/lib/FallbackCompositionState.js ***!
11197
- \****************************************************************/
11198
- /*! no static exports found */
11199
- /***/ (function(module, exports, __webpack_require__) {
 
 
 
11200
 
11201
- "use strict";
11202
- /**
11203
- * Copyright (c) 2013-present, Facebook, Inc.
11204
- *
11205
- * This source code is licensed under the MIT license found in the
11206
- * LICENSE file in the root directory of this source tree.
11207
- *
11208
- */
11209
 
 
 
 
 
11210
 
 
 
 
11211
 
11212
- var _assign = __webpack_require__(/*! object-assign */ "./node_modules/object-assign/index.js");
 
 
 
11213
 
11214
- var PooledClass = __webpack_require__(/*! ./PooledClass */ "./node_modules/react-dom/lib/PooledClass.js");
 
11215
 
11216
- var getTextContentAccessor = __webpack_require__(/*! ./getTextContentAccessor */ "./node_modules/react-dom/lib/getTextContentAccessor.js");
 
 
11217
 
11218
- /**
11219
- * This helper class stores information about text content of a target node,
11220
- * allowing comparison of content before and after a given event.
11221
- *
11222
- * Identify the node where selection currently begins, then observe
11223
- * both its text content and its current position in the DOM. Since the
11224
- * browser may natively replace the target node during composition, we can
11225
- * use its position to find its replacement.
11226
- *
11227
- * @param {DOMEventTarget} root
11228
- */
11229
- function FallbackCompositionState(root) {
11230
- this._root = root;
11231
- this._startText = this.getText();
11232
- this._fallbackText = null;
11233
- }
11234
 
11235
- _assign(FallbackCompositionState.prototype, {
11236
- destructor: function () {
11237
- this._root = null;
11238
- this._startText = null;
11239
- this._fallbackText = null;
11240
- },
11241
 
11242
- /**
11243
- * Get current text of input.
11244
- *
11245
- * @return {string}
11246
- */
11247
- getText: function () {
11248
- if ('value' in this._root) {
11249
- return this._root.value;
 
 
 
 
 
 
 
 
11250
  }
11251
- return this._root[getTextContentAccessor()];
11252
- },
11253
 
11254
- /**
11255
- * Determine the differing substring between the initially stored
11256
- * text content and the current content.
11257
- *
11258
- * @return {string}
11259
- */
11260
- getData: function () {
11261
- if (this._fallbackText) {
11262
- return this._fallbackText;
11263
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11264
 
11265
- var start;
11266
- var startValue = this._startText;
11267
- var startLength = startValue.length;
11268
- var end;
11269
- var endValue = this.getText();
11270
- var endLength = endValue.length;
11271
 
11272
- for (start = 0; start < startLength; start++) {
11273
- if (startValue[start] !== endValue[start]) {
11274
- break;
11275
  }
 
 
11276
  }
11277
 
11278
- var minEnd = startLength - start;
11279
- for (end = 1; end <= minEnd; end++) {
11280
- if (startValue[startLength - end] !== endValue[endLength - end]) {
11281
- break;
11282
  }
11283
  }
11284
 
11285
- var sliceTail = end > 1 ? 1 - end : undefined;
11286
- this._fallbackText = endValue.slice(start, sliceTail);
11287
- return this._fallbackText;
11288
  }
11289
- });
11290
-
11291
- PooledClass.addPoolingTo(FallbackCompositionState);
11292
 
11293
- module.exports = FallbackCompositionState;
 
 
 
 
 
 
11294
 
11295
- /***/ }),
 
 
 
 
11296
 
11297
- /***/ "./node_modules/react-dom/lib/HTMLDOMPropertyConfig.js":
11298
- /*!*************************************************************!*\
11299
- !*** ./node_modules/react-dom/lib/HTMLDOMPropertyConfig.js ***!
11300
- \*************************************************************/
11301
- /*! no static exports found */
11302
- /***/ (function(module, exports, __webpack_require__) {
11303
 
11304
- "use strict";
11305
- /**
11306
- * Copyright (c) 2013-present, Facebook, Inc.
11307
- *
11308
- * This source code is licensed under the MIT license found in the
11309
- * LICENSE file in the root directory of this source tree.
11310
- *
11311
- */
11312
 
 
 
 
11313
 
 
 
11314
 
11315
- var DOMProperty = __webpack_require__(/*! ./DOMProperty */ "./node_modules/react-dom/lib/DOMProperty.js");
11316
 
11317
- var MUST_USE_PROPERTY = DOMProperty.injection.MUST_USE_PROPERTY;
11318
- var HAS_BOOLEAN_VALUE = DOMProperty.injection.HAS_BOOLEAN_VALUE;
11319
- var HAS_NUMERIC_VALUE = DOMProperty.injection.HAS_NUMERIC_VALUE;
11320
- var HAS_POSITIVE_NUMERIC_VALUE = DOMProperty.injection.HAS_POSITIVE_NUMERIC_VALUE;
11321
- var HAS_OVERLOADED_BOOLEAN_VALUE = DOMProperty.injection.HAS_OVERLOADED_BOOLEAN_VALUE;
11322
 
11323
- var HTMLDOMPropertyConfig = {
11324
- isCustomAttribute: RegExp.prototype.test.bind(new RegExp('^(data|aria)-[' + DOMProperty.ATTRIBUTE_NAME_CHAR + ']*$')),
11325
- Properties: {
11326
- /**
11327
- * Standard Properties
11328
- */
11329
- accept: 0,
11330
- acceptCharset: 0,
11331
- accessKey: 0,
11332
- action: 0,
11333
- allowFullScreen: HAS_BOOLEAN_VALUE,
11334
- allowTransparency: 0,
11335
- alt: 0,
11336
- // specifies target context for links with `preload` type
11337
- as: 0,
11338
- async: HAS_BOOLEAN_VALUE,
11339
- autoComplete: 0,
11340
- // autoFocus is polyfilled/normalized by AutoFocusUtils
11341
- // autoFocus: HAS_BOOLEAN_VALUE,
11342
- autoPlay: HAS_BOOLEAN_VALUE,
11343
- capture: HAS_BOOLEAN_VALUE,
11344
- cellPadding: 0,
11345
- cellSpacing: 0,
11346
- charSet: 0,
11347
- challenge: 0,
11348
- checked: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
11349
- cite: 0,
11350
- classID: 0,
11351
- className: 0,
11352
- cols: HAS_POSITIVE_NUMERIC_VALUE,
11353
- colSpan: 0,
11354
- content: 0,
11355
- contentEditable: 0,
11356
- contextMenu: 0,
11357
- controls: HAS_BOOLEAN_VALUE,
11358
- controlsList: 0,
11359
- coords: 0,
11360
- crossOrigin: 0,
11361
- data: 0, // For `<object />` acts as `src`.
11362
- dateTime: 0,
11363
- 'default': HAS_BOOLEAN_VALUE,
11364
- defer: HAS_BOOLEAN_VALUE,
11365
- dir: 0,
11366
- disabled: HAS_BOOLEAN_VALUE,
11367
- download: HAS_OVERLOADED_BOOLEAN_VALUE,
11368
- draggable: 0,
11369
- encType: 0,
11370
- form: 0,
11371
- formAction: 0,
11372
- formEncType: 0,
11373
- formMethod: 0,
11374
- formNoValidate: HAS_BOOLEAN_VALUE,
11375
- formTarget: 0,
11376
- frameBorder: 0,
11377
- headers: 0,
11378
- height: 0,
11379
- hidden: HAS_BOOLEAN_VALUE,
11380
- high: 0,
11381
- href: 0,
11382
- hrefLang: 0,
11383
- htmlFor: 0,
11384
- httpEquiv: 0,
11385
- icon: 0,
11386
- id: 0,
11387
- inputMode: 0,
11388
- integrity: 0,
11389
- is: 0,
11390
- keyParams: 0,
11391
- keyType: 0,
11392
- kind: 0,
11393
- label: 0,
11394
- lang: 0,
11395
- list: 0,
11396
- loop: HAS_BOOLEAN_VALUE,
11397
- low: 0,
11398
- manifest: 0,
11399
- marginHeight: 0,
11400
- marginWidth: 0,
11401
- max: 0,
11402
- maxLength: 0,
11403
- media: 0,
11404
- mediaGroup: 0,
11405
- method: 0,
11406
- min: 0,
11407
- minLength: 0,
11408
- // Caution; `option.selected` is not updated if `select.multiple` is
11409
- // disabled with `removeAttribute`.
11410
- multiple: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
11411
- muted: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
11412
- name: 0,
11413
- nonce: 0,
11414
- noValidate: HAS_BOOLEAN_VALUE,
11415
- open: HAS_BOOLEAN_VALUE,
11416
- optimum: 0,
11417
- pattern: 0,
11418
- placeholder: 0,
11419
- playsInline: HAS_BOOLEAN_VALUE,
11420
- poster: 0,
11421
- preload: 0,
11422
- profile: 0,
11423
- radioGroup: 0,
11424
- readOnly: HAS_BOOLEAN_VALUE,
11425
- referrerPolicy: 0,
11426
- rel: 0,
11427
- required: HAS_BOOLEAN_VALUE,
11428
- reversed: HAS_BOOLEAN_VALUE,
11429
- role: 0,
11430
- rows: HAS_POSITIVE_NUMERIC_VALUE,
11431
- rowSpan: HAS_NUMERIC_VALUE,
11432
- sandbox: 0,
11433
- scope: 0,
11434
- scoped: HAS_BOOLEAN_VALUE,
11435
- scrolling: 0,
11436
- seamless: HAS_BOOLEAN_VALUE,
11437
- selected: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
11438
- shape: 0,
11439
- size: HAS_POSITIVE_NUMERIC_VALUE,
11440
- sizes: 0,
11441
- span: HAS_POSITIVE_NUMERIC_VALUE,
11442
- spellCheck: 0,
11443
- src: 0,
11444
- srcDoc: 0,
11445
- srcLang: 0,
11446
- srcSet: 0,
11447
- start: HAS_NUMERIC_VALUE,
11448
- step: 0,
11449
- style: 0,
11450
- summary: 0,
11451
- tabIndex: 0,
11452
- target: 0,
11453
- title: 0,
11454
- // Setting .type throws on non-<input> tags
11455
- type: 0,
11456
- useMap: 0,
11457
- value: 0,
11458
- width: 0,
11459
- wmode: 0,
11460
- wrap: 0,
11461
 
11462
- /**
11463
- * RDFa Properties
11464
- */
11465
- about: 0,
11466
- datatype: 0,
11467
- inlist: 0,
11468
- prefix: 0,
11469
- // property is also supported for OpenGraph in meta tags.
11470
- property: 0,
11471
- resource: 0,
11472
- 'typeof': 0,
11473
- vocab: 0,
11474
 
11475
- /**
11476
- * Non-standard Properties
11477
- */
11478
- // autoCapitalize and autoCorrect are supported in Mobile Safari for
11479
- // keyboard hints.
11480
- autoCapitalize: 0,
11481
- autoCorrect: 0,
11482
- // autoSave allows WebKit/Blink to persist values of input fields on page reloads
11483
- autoSave: 0,
11484
- // color is for Safari mask-icon link
11485
- color: 0,
11486
- // itemProp, itemScope, itemType are for
11487
- // Microdata support. See http://schema.org/docs/gs.html
11488
- itemProp: 0,
11489
- itemScope: HAS_BOOLEAN_VALUE,
11490
- itemType: 0,
11491
- // itemID and itemRef are for Microdata support as well but
11492
- // only specified in the WHATWG spec document. See
11493
- // https://html.spec.whatwg.org/multipage/microdata.html#microdata-dom-api
11494
- itemID: 0,
11495
- itemRef: 0,
11496
- // results show looking glass icon and recent searches on input
11497
- // search fields in WebKit/Blink
11498
- results: 0,
11499
- // IE-only attribute that specifies security restrictions on an iframe
11500
- // as an alternative to the sandbox attribute on IE<10
11501
- security: 0,
11502
- // IE-only attribute that controls focus behavior
11503
- unselectable: 0
11504
- },
11505
- DOMAttributeNames: {
11506
- acceptCharset: 'accept-charset',
11507
- className: 'class',
11508
- htmlFor: 'for',
11509
- httpEquiv: 'http-equiv'
11510
- },
11511
- DOMPropertyNames: {},
11512
- DOMMutationMethods: {
11513
- value: function (node, value) {
11514
- if (value == null) {
11515
- return node.removeAttribute('value');
11516
- }
11517
-
11518
- // Number inputs get special treatment due to some edge cases in
11519
- // Chrome. Let everything else assign the value attribute as normal.
11520
- // https://github.com/facebook/react/issues/7253#issuecomment-236074326
11521
- if (node.type !== 'number' || node.hasAttribute('value') === false) {
11522
- node.setAttribute('value', '' + value);
11523
- } else if (node.validity && !node.validity.badInput && node.ownerDocument.activeElement !== node) {
11524
- // Don't assign an attribute if validation reports bad
11525
- // input. Chrome will clear the value. Additionally, don't
11526
- // operate on inputs that have focus, otherwise Chrome might
11527
- // strip off trailing decimal places and cause the user's
11528
- // cursor position to jump to the beginning of the input.
11529
- //
11530
- // In ReactDOMInput, we have an onBlur event that will trigger
11531
- // this function again when focus is lost.
11532
- node.setAttribute('value', '' + value);
11533
  }
11534
  }
 
 
11535
  }
11536
- };
 
 
11537
 
11538
- module.exports = HTMLDOMPropertyConfig;
11539
 
11540
- /***/ }),
 
 
 
 
11541
 
11542
- /***/ "./node_modules/react-dom/lib/KeyEscapeUtils.js":
11543
- /*!******************************************************!*\
11544
- !*** ./node_modules/react-dom/lib/KeyEscapeUtils.js ***!
11545
- \******************************************************/
11546
- /*! no static exports found */
11547
- /***/ (function(module, exports, __webpack_require__) {
11548
 
11549
- "use strict";
11550
- /**
11551
- * Copyright (c) 2013-present, Facebook, Inc.
11552
- *
11553
- * This source code is licensed under the MIT license found in the
11554
- * LICENSE file in the root directory of this source tree.
11555
- *
11556
- *
11557
- */
11558
 
 
 
 
 
 
11559
 
 
 
 
 
11560
 
11561
- /**
11562
- * Escape and wrap key so it is safe to use as a reactid
11563
- *
11564
- * @param {string} key to be escaped.
11565
- * @return {string} the escaped key.
11566
- */
11567
 
11568
- function escape(key) {
11569
- var escapeRegex = /[=:]/g;
11570
- var escaperLookup = {
11571
- '=': '=0',
11572
- ':': '=2'
11573
- };
11574
- var escapedString = ('' + key).replace(escapeRegex, function (match) {
11575
- return escaperLookup[match];
11576
- });
11577
 
11578
- return '$' + escapedString;
11579
- }
11580
 
11581
- /**
11582
- * Unescape and unwrap key for human-readable display
11583
- *
11584
- * @param {string} key to unescape.
11585
- * @return {string} the unescaped key.
11586
- */
11587
- function unescape(key) {
11588
- var unescapeRegex = /(=0|=2)/g;
11589
- var unescaperLookup = {
11590
- '=0': '=',
11591
- '=2': ':'
11592
- };
11593
- var keySubstring = key[0] === '.' && key[1] === '$' ? key.substring(2) : key.substring(1);
 
 
 
 
 
 
11594
 
11595
- return ('' + keySubstring).replace(unescapeRegex, function (match) {
11596
- return unescaperLookup[match];
11597
- });
11598
- }
 
11599
 
11600
- var KeyEscapeUtils = {
11601
- escape: escape,
11602
- unescape: unescape
11603
- };
 
 
11604
 
11605
- module.exports = KeyEscapeUtils;
 
 
 
 
 
 
11606
 
11607
- /***/ }),
11608
 
11609
- /***/ "./node_modules/react-dom/lib/LinkedValueUtils.js":
11610
- /*!********************************************************!*\
11611
- !*** ./node_modules/react-dom/lib/LinkedValueUtils.js ***!
11612
- \********************************************************/
11613
- /*! no static exports found */
11614
- /***/ (function(module, exports, __webpack_require__) {
 
 
11615
 
11616
- "use strict";
11617
- /**
11618
- * Copyright (c) 2013-present, Facebook, Inc.
11619
- *
11620
- * This source code is licensed under the MIT license found in the
11621
- * LICENSE file in the root directory of this source tree.
11622
- *
11623
- */
11624
 
 
 
 
 
 
 
 
11625
 
 
11626
 
11627
- var _prodInvariant = __webpack_require__(/*! ./reactProdInvariant */ "./node_modules/react-dom/lib/reactProdInvariant.js");
 
 
 
 
 
 
 
 
 
11628
 
11629
- var ReactPropTypesSecret = __webpack_require__(/*! ./ReactPropTypesSecret */ "./node_modules/react-dom/lib/ReactPropTypesSecret.js");
11630
- var propTypesFactory = __webpack_require__(/*! prop-types/factory */ "./node_modules/prop-types/factory.js");
 
11631
 
11632
- var React = __webpack_require__(/*! react/lib/React */ "./node_modules/react/lib/React.js");
11633
- var PropTypes = propTypesFactory(React.isValidElement);
 
 
 
11634
 
11635
- var invariant = __webpack_require__(/*! fbjs/lib/invariant */ "./node_modules/fbjs/lib/invariant.js");
11636
- var warning = __webpack_require__(/*! fbjs/lib/warning */ "./node_modules/fbjs/lib/warning.js");
 
 
 
11637
 
11638
- var hasReadOnlyValue = {
11639
- button: true,
11640
- checkbox: true,
11641
- image: true,
11642
- hidden: true,
11643
- radio: true,
11644
- reset: true,
11645
- submit: true
11646
- };
11647
 
11648
- function _assertSingleLink(inputProps) {
11649
- !(inputProps.checkedLink == null || inputProps.valueLink == null) ? true ? 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.') : undefined : void 0;
11650
- }
11651
- function _assertValueLink(inputProps) {
11652
- _assertSingleLink(inputProps);
11653
- !(inputProps.value == null && inputProps.onChange == null) ? true ? 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.') : undefined : void 0;
11654
- }
11655
 
11656
- function _assertCheckedLink(inputProps) {
11657
- _assertSingleLink(inputProps);
11658
- !(inputProps.checked == null && inputProps.onChange == null) ? true ? 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') : undefined : void 0;
11659
- }
 
 
11660
 
11661
- var propTypes = {
11662
- value: function (props, propName, componentName) {
11663
- if (!props[propName] || hasReadOnlyValue[props.type] || props.onChange || props.readOnly || props.disabled) {
11664
- return null;
11665
- }
11666
- 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`.');
11667
- },
11668
- checked: function (props, propName, componentName) {
11669
- if (!props[propName] || props.onChange || props.readOnly || props.disabled) {
11670
- return null;
11671
- }
11672
- 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`.');
11673
- },
11674
- onChange: PropTypes.func
11675
- };
11676
 
11677
- var loggedTypeFailures = {};
11678
- function getDeclarationErrorAddendum(owner) {
11679
- if (owner) {
11680
- var name = owner.getName();
11681
- if (name) {
11682
- return ' Check the render method of `' + name + '`.';
11683
- }
11684
- }
11685
- return '';
11686
- }
11687
 
11688
- /**
11689
- * Provide a linked `value` attribute for controlled forms. You should not use
11690
- * this outside of the ReactDOM controlled form components.
11691
- */
11692
- var LinkedValueUtils = {
11693
- checkPropTypes: function (tagName, props, owner) {
11694
- for (var propName in propTypes) {
11695
- if (propTypes.hasOwnProperty(propName)) {
11696
- var error = propTypes[propName](props, propName, tagName, 'prop', null, ReactPropTypesSecret);
11697
- }
11698
- if (error instanceof Error && !(error.message in loggedTypeFailures)) {
11699
- // Only monitor this failure once because there tends to be a lot of the
11700
- // same error.
11701
- loggedTypeFailures[error.message] = true;
11702
 
11703
- var addendum = getDeclarationErrorAddendum(owner);
11704
- true ? warning(false, 'Failed form propType: %s%s', error.message, addendum) : undefined;
11705
- }
11706
- }
11707
- },
11708
 
11709
- /**
11710
- * @param {object} inputProps Props for form component
11711
- * @return {*} current value of the input either from value prop or link.
11712
- */
11713
- getValue: function (inputProps) {
11714
- if (inputProps.valueLink) {
11715
- _assertValueLink(inputProps);
11716
- return inputProps.valueLink.value;
11717
- }
11718
- return inputProps.value;
11719
- },
11720
 
11721
- /**
11722
- * @param {object} inputProps Props for form component
11723
- * @return {*} current checked status of the input either from checked prop
11724
- * or link.
11725
- */
11726
- getChecked: function (inputProps) {
11727
- if (inputProps.checkedLink) {
11728
- _assertCheckedLink(inputProps);
11729
- return inputProps.checkedLink.value;
 
 
 
 
 
 
 
 
 
 
 
 
11730
  }
11731
- return inputProps.checked;
11732
- },
11733
 
11734
- /**
11735
- * @param {object} inputProps Props for form component
11736
- * @param {SyntheticEvent} event change event to handle
11737
- */
11738
- executeOnChange: function (inputProps, event) {
11739
- if (inputProps.valueLink) {
11740
- _assertValueLink(inputProps);
11741
- return inputProps.valueLink.requestChange(event.target.value);
11742
- } else if (inputProps.checkedLink) {
11743
- _assertCheckedLink(inputProps);
11744
- return inputProps.checkedLink.requestChange(event.target.checked);
11745
- } else if (inputProps.onChange) {
11746
- return inputProps.onChange.call(undefined, event);
11747
  }
11748
- }
11749
- };
11750
 
11751
- module.exports = LinkedValueUtils;
 
11752
 
11753
- /***/ }),
 
 
 
11754
 
11755
- /***/ "./node_modules/react-dom/lib/PooledClass.js":
11756
- /*!***************************************************!*\
11757
- !*** ./node_modules/react-dom/lib/PooledClass.js ***!
11758
- \***************************************************/
11759
- /*! no static exports found */
11760
- /***/ (function(module, exports, __webpack_require__) {
11761
 
11762
- "use strict";
11763
- /**
11764
- * Copyright (c) 2013-present, Facebook, Inc.
11765
- *
11766
- * This source code is licensed under the MIT license found in the
11767
- * LICENSE file in the root directory of this source tree.
11768
- *
11769
- *
11770
- */
11771
 
 
 
11772
 
11773
 
11774
- var _prodInvariant = __webpack_require__(/*! ./reactProdInvariant */ "./node_modules/react-dom/lib/reactProdInvariant.js");
 
 
 
11775
 
11776
- var invariant = __webpack_require__(/*! fbjs/lib/invariant */ "./node_modules/fbjs/lib/invariant.js");
 
 
11777
 
11778
- /**
11779
- * Static poolers. Several custom versions for each potential number of
11780
- * arguments. A completely generic pooler is easy to implement, but would
11781
- * require accessing the `arguments` object. In each of these, `this` refers to
11782
- * the Class itself, not an instance. If any others are needed, simply add them
11783
- * here, or in their own files.
11784
- */
11785
- var oneArgumentPooler = function (copyFieldsFrom) {
11786
- var Klass = this;
11787
- if (Klass.instancePool.length) {
11788
- var instance = Klass.instancePool.pop();
11789
- Klass.call(instance, copyFieldsFrom);
11790
- return instance;
11791
- } else {
11792
- return new Klass(copyFieldsFrom);
11793
- }
11794
- };
11795
 
11796
- var twoArgumentPooler = function (a1, a2) {
11797
- var Klass = this;
11798
- if (Klass.instancePool.length) {
11799
- var instance = Klass.instancePool.pop();
11800
- Klass.call(instance, a1, a2);
11801
- return instance;
11802
- } else {
11803
- return new Klass(a1, a2);
11804
- }
11805
- };
11806
 
11807
- var threeArgumentPooler = function (a1, a2, a3) {
11808
- var Klass = this;
11809
- if (Klass.instancePool.length) {
11810
- var instance = Klass.instancePool.pop();
11811
- Klass.call(instance, a1, a2, a3);
11812
- return instance;
11813
- } else {
11814
- return new Klass(a1, a2, a3);
11815
- }
11816
- };
11817
 
11818
- var fourArgumentPooler = function (a1, a2, a3, a4) {
11819
- var Klass = this;
11820
- if (Klass.instancePool.length) {
11821
- var instance = Klass.instancePool.pop();
11822
- Klass.call(instance, a1, a2, a3, a4);
11823
- return instance;
11824
- } else {
11825
- return new Klass(a1, a2, a3, a4);
11826
- }
11827
- };
11828
 
11829
- var standardReleaser = function (instance) {
11830
- var Klass = this;
11831
- !(instance instanceof Klass) ? true ? invariant(false, 'Trying to release an instance into a pool of a different type.') : undefined : void 0;
11832
- instance.destructor();
11833
- if (Klass.instancePool.length < Klass.poolSize) {
11834
- Klass.instancePool.push(instance);
11835
- }
11836
- };
11837
 
11838
- var DEFAULT_POOL_SIZE = 10;
11839
- var DEFAULT_POOLER = oneArgumentPooler;
11840
 
11841
- /**
11842
- * Augments `CopyConstructor` to be a poolable class, augmenting only the class
11843
- * itself (statically) not adding any prototypical fields. Any CopyConstructor
11844
- * you give this may have a `poolSize` property, and will look for a
11845
- * prototypical `destructor` on instances.
11846
- *
11847
- * @param {Function} CopyConstructor Constructor that can be used to reset.
11848
- * @param {Function} pooler Customizable pooler.
11849
- */
11850
- var addPoolingTo = function (CopyConstructor, pooler) {
11851
- // Casting as any so that flow ignores the actual implementation and trusts
11852
- // it to match the type we declared
11853
- var NewKlass = CopyConstructor;
11854
- NewKlass.instancePool = [];
11855
- NewKlass.getPooled = pooler || DEFAULT_POOLER;
11856
- if (!NewKlass.poolSize) {
11857
- NewKlass.poolSize = DEFAULT_POOL_SIZE;
11858
- }
11859
- NewKlass.release = standardReleaser;
11860
- return NewKlass;
11861
- };
11862
 
11863
- var PooledClass = {
11864
- addPoolingTo: addPoolingTo,
11865
- oneArgumentPooler: oneArgumentPooler,
11866
- twoArgumentPooler: twoArgumentPooler,
11867
- threeArgumentPooler: threeArgumentPooler,
11868
- fourArgumentPooler: fourArgumentPooler
11869
- };
11870
 
11871
- module.exports = PooledClass;
 
 
 
 
 
 
11872
 
11873
- /***/ }),
11874
 
11875
- /***/ "./node_modules/react-dom/lib/ReactBrowserEventEmitter.js":
11876
- /*!****************************************************************!*\
11877
- !*** ./node_modules/react-dom/lib/ReactBrowserEventEmitter.js ***!
11878
- \****************************************************************/
11879
- /*! no static exports found */
11880
- /***/ (function(module, exports, __webpack_require__) {
 
 
11881
 
11882
- "use strict";
11883
- /**
11884
- * Copyright (c) 2013-present, Facebook, Inc.
11885
- *
11886
- * This source code is licensed under the MIT license found in the
11887
- * LICENSE file in the root directory of this source tree.
11888
- *
11889
- */
11890
 
 
 
 
 
 
 
 
11891
 
 
11892
 
11893
- var _assign = __webpack_require__(/*! object-assign */ "./node_modules/object-assign/index.js");
 
 
 
 
 
 
 
 
 
11894
 
11895
- var EventPluginRegistry = __webpack_require__(/*! ./EventPluginRegistry */ "./node_modules/react-dom/lib/EventPluginRegistry.js");
11896
- var ReactEventEmitterMixin = __webpack_require__(/*! ./ReactEventEmitterMixin */ "./node_modules/react-dom/lib/ReactEventEmitterMixin.js");
11897
- var ViewportMetrics = __webpack_require__(/*! ./ViewportMetrics */ "./node_modules/react-dom/lib/ViewportMetrics.js");
11898
 
11899
- var getVendorPrefixedEventName = __webpack_require__(/*! ./getVendorPrefixedEventName */ "./node_modules/react-dom/lib/getVendorPrefixedEventName.js");
11900
- var isEventSupported = __webpack_require__(/*! ./isEventSupported */ "./node_modules/react-dom/lib/isEventSupported.js");
 
 
 
11901
 
11902
- /**
11903
- * Summary of `ReactBrowserEventEmitter` event handling:
11904
- *
11905
- * - Top-level delegation is used to trap most native browser events. This
11906
- * may only occur in the main thread and is the responsibility of
11907
- * ReactEventListener, which is injected and can therefore support pluggable
11908
- * event sources. This is the only work that occurs in the main thread.
11909
- *
11910
- * - We normalize and de-duplicate events to account for browser quirks. This
11911
- * may be done in the worker thread.
11912
- *
11913
- * - Forward these native events (with the associated top-level type used to
11914
- * trap it) to `EventPluginHub`, which in turn will ask plugins if they want
11915
- * to extract any synthetic events.
11916
- *
11917
- * - The `EventPluginHub` will then process each event by annotating them with
11918
- * "dispatches", a sequence of listeners and IDs that care about that event.
11919
- *
11920
- * - The `EventPluginHub` then dispatches the events.
11921
- *
11922
- * Overview of React and the event system:
11923
- *
11924
- * +------------+ .
11925
- * | DOM | .
11926
- * +------------+ .
11927
- * | .
11928
- * v .
11929
- * +------------+ .
11930
- * | ReactEvent | .
11931
- * | Listener | .
11932
- * +------------+ . +-----------+
11933
- * | . +--------+|SimpleEvent|
11934
- * | . | |Plugin |
11935
- * +-----|------+ . v +-----------+
11936
- * | | | . +--------------+ +------------+
11937
- * | +-----------.--->|EventPluginHub| | Event |
11938
- * | | . | | +-----------+ | Propagators|
11939
- * | ReactEvent | . | | |TapEvent | |------------|
11940
- * | Emitter | . | |<---+|Plugin | |other plugin|
11941
- * | | . | | +-----------+ | utilities |
11942
- * | +-----------.--->| | +------------+
11943
- * | | | . +--------------+
11944
- * +-----|------+ . ^ +-----------+
11945
- * | . | |Enter/Leave|
11946
- * + . +-------+|Plugin |
11947
- * +-------------+ . +-----------+
11948
- * | application | .
11949
- * |-------------| .
11950
- * | | .
11951
- * | | .
11952
- * +-------------+ .
11953
- * .
11954
- * React Core . General Purpose Event Plugin System
11955
- */
11956
 
11957
- var hasEventPageXY;
11958
- var alreadyListeningTo = {};
11959
- var isMonitoringScrollValue = false;
11960
- var reactTopListenersCounter = 0;
11961
-
11962
- // For events like 'submit' which don't consistently bubble (which we trap at a
11963
- // lower node than `document`), binding at `document` would cause duplicate
11964
- // events so we don't include them here
11965
- var topEventMapping = {
11966
- topAbort: 'abort',
11967
- topAnimationEnd: getVendorPrefixedEventName('animationend') || 'animationend',
11968
- topAnimationIteration: getVendorPrefixedEventName('animationiteration') || 'animationiteration',
11969
- topAnimationStart: getVendorPrefixedEventName('animationstart') || 'animationstart',
11970
- topBlur: 'blur',
11971
- topCanPlay: 'canplay',
11972
- topCanPlayThrough: 'canplaythrough',
11973
- topChange: 'change',
11974
- topClick: 'click',
11975
- topCompositionEnd: 'compositionend',
11976
- topCompositionStart: 'compositionstart',
11977
- topCompositionUpdate: 'compositionupdate',
11978
- topContextMenu: 'contextmenu',
11979
- topCopy: 'copy',
11980
- topCut: 'cut',
11981
- topDoubleClick: 'dblclick',
11982
- topDrag: 'drag',
11983
- topDragEnd: 'dragend',
11984
- topDragEnter: 'dragenter',
11985
- topDragExit: 'dragexit',
11986
- topDragLeave: 'dragleave',
11987
- topDragOver: 'dragover',
11988
- topDragStart: 'dragstart',
11989
- topDrop: 'drop',
11990
- topDurationChange: 'durationchange',
11991
- topEmptied: 'emptied',
11992
- topEncrypted: 'encrypted',
11993
- topEnded: 'ended',
11994
- topError: 'error',
11995
- topFocus: 'focus',
11996
- topInput: 'input',
11997
- topKeyDown: 'keydown',
11998
- topKeyPress: 'keypress',
11999
- topKeyUp: 'keyup',
12000
- topLoadedData: 'loadeddata',
12001
- topLoadedMetadata: 'loadedmetadata',
12002
- topLoadStart: 'loadstart',
12003
- topMouseDown: 'mousedown',
12004
- topMouseMove: 'mousemove',
12005
- topMouseOut: 'mouseout',
12006
- topMouseOver: 'mouseover',
12007
- topMouseUp: 'mouseup',
12008
- topPaste: 'paste',
12009
- topPause: 'pause',
12010
- topPlay: 'play',
12011
- topPlaying: 'playing',
12012
- topProgress: 'progress',
12013
- topRateChange: 'ratechange',
12014
- topScroll: 'scroll',
12015
- topSeeked: 'seeked',
12016
- topSeeking: 'seeking',
12017
- topSelectionChange: 'selectionchange',
12018
- topStalled: 'stalled',
12019
- topSuspend: 'suspend',
12020
- topTextInput: 'textInput',
12021
- topTimeUpdate: 'timeupdate',
12022
- topTouchCancel: 'touchcancel',
12023
- topTouchEnd: 'touchend',
12024
- topTouchMove: 'touchmove',
12025
- topTouchStart: 'touchstart',
12026
- topTransitionEnd: getVendorPrefixedEventName('transitionend') || 'transitionend',
12027
- topVolumeChange: 'volumechange',
12028
- topWaiting: 'waiting',
12029
- topWheel: 'wheel'
12030
- };
12031
 
12032
- /**
12033
- * To ensure no conflicts with other potential React instances on the page
12034
- */
12035
- var topListenersIDKey = '_reactListenersID' + String(Math.random()).slice(2);
12036
 
12037
- function getListeningForDocument(mountAt) {
12038
- // In IE8, `mountAt` is a host object and doesn't have `hasOwnProperty`
12039
- // directly.
12040
- if (!Object.prototype.hasOwnProperty.call(mountAt, topListenersIDKey)) {
12041
- mountAt[topListenersIDKey] = reactTopListenersCounter++;
12042
- alreadyListeningTo[mountAt[topListenersIDKey]] = {};
12043
- }
12044
- return alreadyListeningTo[mountAt[topListenersIDKey]];
12045
- }
12046
 
12047
- /**
12048
- * `ReactBrowserEventEmitter` is used to attach top-level event listeners. For
12049
- * example:
12050
- *
12051
- * EventPluginHub.putListener('myID', 'onClick', myFunction);
12052
- *
12053
- * This would allocate a "registration" of `('onClick', myFunction)` on 'myID'.
12054
- *
12055
- * @internal
12056
- */
12057
- var ReactBrowserEventEmitter = _assign({}, ReactEventEmitterMixin, {
12058
- /**
12059
- * Injectable event backend
12060
- */
12061
- ReactEventListener: null,
12062
 
12063
- injection: {
12064
- /**
12065
- * @param {object} ReactEventListener
12066
- */
12067
- injectReactEventListener: function (ReactEventListener) {
12068
- ReactEventListener.setHandleTopLevel(ReactBrowserEventEmitter.handleTopLevel);
12069
- ReactBrowserEventEmitter.ReactEventListener = ReactEventListener;
12070
- }
12071
- },
12072
 
12073
- /**
12074
- * Sets whether or not any created callbacks should be enabled.
12075
- *
12076
- * @param {boolean} enabled True if callbacks should be enabled.
12077
- */
12078
- setEnabled: function (enabled) {
12079
- if (ReactBrowserEventEmitter.ReactEventListener) {
12080
- ReactBrowserEventEmitter.ReactEventListener.setEnabled(enabled);
12081
- }
12082
- },
12083
 
12084
- /**
12085
- * @return {boolean} True if callbacks are enabled.
12086
- */
12087
- isEnabled: function () {
12088
- return !!(ReactBrowserEventEmitter.ReactEventListener && ReactBrowserEventEmitter.ReactEventListener.isEnabled());
12089
- },
12090
 
12091
- /**
12092
- * We listen for bubbled touch events on the document object.
12093
- *
12094
- * Firefox v8.01 (and possibly others) exhibited strange behavior when
12095
- * mounting `onmousemove` events at some node that was not the document
12096
- * element. The symptoms were that if your mouse is not moving over something
12097
- * contained within that mount point (for example on the background) the
12098
- * top-level listeners for `onmousemove` won't be called. However, if you
12099
- * register the `mousemove` on the document object, then it will of course
12100
- * catch all `mousemove`s. This along with iOS quirks, justifies restricting
12101
- * top-level listeners to the document object only, at least for these
12102
- * movement types of events and possibly all events.
12103
- *
12104
- * @see http://www.quirksmode.org/blog/archives/2010/09/click_event_del.html
12105
- *
12106
- * Also, `keyup`/`keypress`/`keydown` do not bubble to the window on IE, but
12107
- * they bubble to document.
12108
- *
12109
- * @param {string} registrationName Name of listener (e.g. `onClick`).
12110
- * @param {object} contentDocumentHandle Document which owns the container
12111
- */
12112
- listenTo: function (registrationName, contentDocumentHandle) {
12113
- var mountAt = contentDocumentHandle;
12114
- var isListening = getListeningForDocument(mountAt);
12115
- var dependencies = EventPluginRegistry.registrationNameDependencies[registrationName];
12116
-
12117
- for (var i = 0; i < dependencies.length; i++) {
12118
- var dependency = dependencies[i];
12119
- if (!(isListening.hasOwnProperty(dependency) && isListening[dependency])) {
12120
- if (dependency === 'topWheel') {
12121
- if (isEventSupported('wheel')) {
12122
- ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topWheel', 'wheel', mountAt);
12123
- } else if (isEventSupported('mousewheel')) {
12124
- ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topWheel', 'mousewheel', mountAt);
12125
- } else {
12126
- // Firefox needs to capture a different mouse scroll event.
12127
- // @see http://www.quirksmode.org/dom/events/tests/scroll.html
12128
- ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topWheel', 'DOMMouseScroll', mountAt);
12129
- }
12130
- } else if (dependency === 'topScroll') {
12131
- if (isEventSupported('scroll', true)) {
12132
- ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent('topScroll', 'scroll', mountAt);
12133
- } else {
12134
- ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topScroll', 'scroll', ReactBrowserEventEmitter.ReactEventListener.WINDOW_HANDLE);
12135
- }
12136
- } else if (dependency === 'topFocus' || dependency === 'topBlur') {
12137
- if (isEventSupported('focus', true)) {
12138
- ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent('topFocus', 'focus', mountAt);
12139
- ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent('topBlur', 'blur', mountAt);
12140
- } else if (isEventSupported('focusin')) {
12141
- // IE has `focusin` and `focusout` events which bubble.
12142
- // @see http://www.quirksmode.org/blog/archives/2008/04/delegating_the.html
12143
- ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topFocus', 'focusin', mountAt);
12144
- ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topBlur', 'focusout', mountAt);
12145
  }
 
12146
 
12147
- // to make sure blur and focus event listeners are only attached once
12148
- isListening.topBlur = true;
12149
- isListening.topFocus = true;
12150
- } else if (topEventMapping.hasOwnProperty(dependency)) {
12151
- ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(dependency, topEventMapping[dependency], mountAt);
 
12152
  }
12153
 
12154
- isListening[dependency] = true;
12155
  }
12156
  }
12157
- },
12158
 
12159
- trapBubbledEvent: function (topLevelType, handlerBaseName, handle) {
12160
- return ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelType, handlerBaseName, handle);
12161
- },
 
 
 
 
12162
 
12163
- trapCapturedEvent: function (topLevelType, handlerBaseName, handle) {
12164
- return ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent(topLevelType, handlerBaseName, handle);
12165
- },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12166
 
12167
- /**
12168
- * Protect against document.createEvent() returning null
12169
- * Some popup blocker extensions appear to do this:
12170
- * https://github.com/facebook/react/issues/6887
12171
- */
12172
- supportsEventPageXY: function () {
12173
- if (!document.createEvent) {
12174
- return false;
12175
- }
12176
- var ev = document.createEvent('MouseEvent');
12177
- return ev != null && 'pageX' in ev;
12178
- },
12179
 
12180
- /**
12181
- * Listens to window scroll and resize events. We cache scroll values so that
12182
- * application code can access them without triggering reflows.
12183
- *
12184
- * ViewportMetrics is only used by SyntheticMouse/TouchEvent and only when
12185
- * pageX/pageY isn't supported (legacy browsers).
12186
- *
12187
- * NOTE: Scroll events do not bubble.
12188
- *
12189
- * @see http://www.quirksmode.org/dom/events/scroll.html
12190
- */
12191
- ensureScrollValueMonitoring: function () {
12192
- if (hasEventPageXY === undefined) {
12193
- hasEventPageXY = ReactBrowserEventEmitter.supportsEventPageXY();
12194
- }
12195
- if (!hasEventPageXY && !isMonitoringScrollValue) {
12196
- var refresh = ViewportMetrics.refreshScrollValues;
12197
- ReactBrowserEventEmitter.ReactEventListener.monitorScrollValue(refresh);
12198
- isMonitoringScrollValue = true;
12199
- }
12200
- }
12201
- });
12202
 
12203
- module.exports = ReactBrowserEventEmitter;
12204
 
12205
- /***/ }),
 
12206
 
12207
- /***/ "./node_modules/react-dom/lib/ReactChildReconciler.js":
12208
- /*!************************************************************!*\
12209
- !*** ./node_modules/react-dom/lib/ReactChildReconciler.js ***!
12210
- \************************************************************/
12211
- /*! no static exports found */
12212
- /***/ (function(module, exports, __webpack_require__) {
12213
 
12214
- "use strict";
12215
- /* WEBPACK VAR INJECTION */(function(process) {/**
12216
- * Copyright (c) 2014-present, Facebook, Inc.
12217
- *
12218
- * This source code is licensed under the MIT license found in the
12219
- * LICENSE file in the root directory of this source tree.
12220
- *
12221
- */
12222
 
 
 
12223
 
 
 
 
 
12224
 
12225
- var ReactReconciler = __webpack_require__(/*! ./ReactReconciler */ "./node_modules/react-dom/lib/ReactReconciler.js");
 
12226
 
12227
- var instantiateReactComponent = __webpack_require__(/*! ./instantiateReactComponent */ "./node_modules/react-dom/lib/instantiateReactComponent.js");
12228
- var KeyEscapeUtils = __webpack_require__(/*! ./KeyEscapeUtils */ "./node_modules/react-dom/lib/KeyEscapeUtils.js");
12229
- var shouldUpdateReactComponent = __webpack_require__(/*! ./shouldUpdateReactComponent */ "./node_modules/react-dom/lib/shouldUpdateReactComponent.js");
12230
- var traverseAllChildren = __webpack_require__(/*! ./traverseAllChildren */ "./node_modules/react-dom/lib/traverseAllChildren.js");
12231
- var warning = __webpack_require__(/*! fbjs/lib/warning */ "./node_modules/fbjs/lib/warning.js");
12232
 
12233
- var ReactComponentTreeHook;
12234
 
12235
- if (typeof process !== 'undefined' && Object({"NODE_ENV":"development"}) && "development" === 'test') {
12236
- // Temporary hack.
12237
- // Inline requires don't work well with Jest:
12238
- // https://github.com/facebook/react/issues/7240
12239
- // Remove the inline requires when we don't need them anymore:
12240
- // https://github.com/facebook/react/pull/7178
12241
- ReactComponentTreeHook = __webpack_require__(/*! react/lib/ReactComponentTreeHook */ "./node_modules/react/lib/ReactComponentTreeHook.js");
12242
- }
12243
 
12244
- function instantiateChild(childInstances, child, name, selfDebugID) {
12245
- // We found a component instance.
12246
- var keyUnique = childInstances[name] === undefined;
12247
- if (true) {
12248
- if (!ReactComponentTreeHook) {
12249
- ReactComponentTreeHook = __webpack_require__(/*! react/lib/ReactComponentTreeHook */ "./node_modules/react/lib/ReactComponentTreeHook.js");
12250
- }
12251
- if (!keyUnique) {
12252
- true ? 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)) : undefined;
12253
  }
12254
- }
12255
- if (child != null && keyUnique) {
12256
- childInstances[name] = instantiateReactComponent(child, true);
12257
- }
12258
- }
12259
 
12260
- /**
12261
- * ReactChildReconciler provides helpers for initializing or updating a set of
12262
- * children. Its output is suitable for passing it onto ReactMultiChild which
12263
- * does diffed reordering and insertion.
12264
- */
12265
- var ReactChildReconciler = {
12266
- /**
12267
- * Generates a "mount image" for each of the supplied children. In the case
12268
- * of `ReactDOMComponent`, a mount image is a string of markup.
12269
- *
12270
- * @param {?object} nestedChildNodes Nested child maps.
12271
- * @return {?object} A set of child instances.
12272
- * @internal
12273
- */
12274
- instantiateChildren: function (nestedChildNodes, transaction, context, selfDebugID) // 0 in production and for roots
12275
- {
12276
- if (nestedChildNodes == null) {
12277
- return null;
12278
  }
12279
- var childInstances = {};
12280
 
12281
- if (true) {
12282
- traverseAllChildren(nestedChildNodes, function (childInsts, child, name) {
12283
- return instantiateChild(childInsts, child, name, selfDebugID);
12284
- }, childInstances);
12285
- } else {}
12286
- return childInstances;
12287
- },
12288
 
12289
- /**
12290
- * Updates the rendered children and returns a new set of children.
12291
- *
12292
- * @param {?object} prevChildren Previously initialized set of children.
12293
- * @param {?object} nextChildren Flat child element maps.
12294
- * @param {ReactReconcileTransaction} transaction
12295
- * @param {object} context
12296
- * @return {?object} A new set of child instances.
12297
- * @internal
12298
- */
12299
- updateChildren: function (prevChildren, nextChildren, mountImages, removedNodes, transaction, hostParent, hostContainerInfo, context, selfDebugID) // 0 in production and for roots
12300
- {
12301
- // We currently don't have a way to track moves here but if we use iterators
12302
- // instead of for..in we can zip the iterators and check if an item has
12303
- // moved.
12304
- // TODO: If nothing has changed, return the prevChildren object so that we
12305
- // can quickly bailout if nothing has changed.
12306
- if (!nextChildren && !prevChildren) {
12307
- return;
12308
- }
12309
- var name;
12310
- var prevChild;
12311
- for (name in nextChildren) {
12312
- if (!nextChildren.hasOwnProperty(name)) {
12313
- continue;
12314
- }
12315
- prevChild = prevChildren && prevChildren[name];
12316
- var prevElement = prevChild && prevChild._currentElement;
12317
- var nextElement = nextChildren[name];
12318
- if (prevChild != null && shouldUpdateReactComponent(prevElement, nextElement)) {
12319
- ReactReconciler.receiveComponent(prevChild, nextElement, transaction, context);
12320
- nextChildren[name] = prevChild;
12321
- } else {
12322
- if (prevChild) {
12323
- removedNodes[name] = ReactReconciler.getHostNode(prevChild);
12324
- ReactReconciler.unmountComponent(prevChild, false);
12325
  }
12326
- // The child must be instantiated before it's mounted.
12327
- var nextChildInstance = instantiateReactComponent(nextElement, true);
12328
- nextChildren[name] = nextChildInstance;
12329
- // Creating mount image now ensures refs are resolved in right order
12330
- // (see https://github.com/facebook/react/pull/7101 for explanation).
12331
- var nextChildMountImage = ReactReconciler.mountComponent(nextChildInstance, transaction, hostParent, hostContainerInfo, context, selfDebugID);
12332
- mountImages.push(nextChildMountImage);
12333
- }
12334
- }
12335
- // Unmount children that are no longer present.
12336
- for (name in prevChildren) {
12337
- if (prevChildren.hasOwnProperty(name) && !(nextChildren && nextChildren.hasOwnProperty(name))) {
12338
- prevChild = prevChildren[name];
12339
- removedNodes[name] = ReactReconciler.getHostNode(prevChild);
12340
- ReactReconciler.unmountComponent(prevChild, false);
12341
  }
12342
- }
12343
- },
12344
 
12345
- /**
12346
- * Unmounts all rendered children. This should be used to clean up children
12347
- * when this component is unmounted.
12348
- *
12349
- * @param {?object} renderedChildren Previously initialized set of children.
12350
- * @internal
12351
- */
12352
- unmountChildren: function (renderedChildren, safely) {
12353
- for (var name in renderedChildren) {
12354
- if (renderedChildren.hasOwnProperty(name)) {
12355
- var renderedChild = renderedChildren[name];
12356
- ReactReconciler.unmountComponent(renderedChild, safely);
12357
- }
12358
  }
12359
- }
12360
- };
12361
 
12362
- module.exports = ReactChildReconciler;
12363
- /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../process/browser.js */ "./node_modules/process/browser.js")))
12364
-
12365
- /***/ }),
 
 
12366
 
12367
- /***/ "./node_modules/react-dom/lib/ReactComponentBrowserEnvironment.js":
12368
- /*!************************************************************************!*\
12369
- !*** ./node_modules/react-dom/lib/ReactComponentBrowserEnvironment.js ***!
12370
- \************************************************************************/
12371
- /*! no static exports found */
12372
- /***/ (function(module, exports, __webpack_require__) {
12373
 
12374
- "use strict";
12375
- /**
12376
- * Copyright (c) 2013-present, Facebook, Inc.
12377
- *
12378
- * This source code is licensed under the MIT license found in the
12379
- * LICENSE file in the root directory of this source tree.
12380
- *
12381
- */
 
12382
 
 
 
 
12383
 
12384
 
12385
- var DOMChildrenOperations = __webpack_require__(/*! ./DOMChildrenOperations */ "./node_modules/react-dom/lib/DOMChildrenOperations.js");
12386
- var ReactDOMIDOperations = __webpack_require__(/*! ./ReactDOMIDOperations */ "./node_modules/react-dom/lib/ReactDOMIDOperations.js");
12387
 
12388
- /**
12389
- * Abstracts away all functionality of the reconciler that requires knowledge of
12390
- * the browser context. TODO: These callers should be refactored to avoid the
12391
- * need for this injection.
12392
- */
12393
- var ReactComponentBrowserEnvironment = {
12394
- processChildrenUpdates: ReactDOMIDOperations.dangerouslyProcessChildrenUpdates,
12395
 
12396
- replaceNodeWithMarkup: DOMChildrenOperations.dangerouslyReplaceNodeWithMarkup
12397
- };
12398
 
12399
- module.exports = ReactComponentBrowserEnvironment;
 
12400
 
12401
- /***/ }),
 
 
12402
 
12403
- /***/ "./node_modules/react-dom/lib/ReactComponentEnvironment.js":
12404
- /*!*****************************************************************!*\
12405
- !*** ./node_modules/react-dom/lib/ReactComponentEnvironment.js ***!
12406
- \*****************************************************************/
12407
- /*! no static exports found */
12408
- /***/ (function(module, exports, __webpack_require__) {
12409
 
12410
- "use strict";
12411
- /**
12412
- * Copyright (c) 2014-present, Facebook, Inc.
12413
- *
12414
- * This source code is licensed under the MIT license found in the
12415
- * LICENSE file in the root directory of this source tree.
12416
- *
12417
- *
12418
- */
12419
 
 
 
 
12420
 
 
 
 
 
 
12421
 
12422
- var _prodInvariant = __webpack_require__(/*! ./reactProdInvariant */ "./node_modules/react-dom/lib/reactProdInvariant.js");
 
 
 
 
 
 
 
 
12423
 
12424
- var invariant = __webpack_require__(/*! fbjs/lib/invariant */ "./node_modules/f
1954
  /***/ (function(module, exports, __webpack_require__) {
1955
 
1956
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
1957
+ Copyright (c) 2018 Jed Watson.
1958
  Licensed under the MIT License (MIT), see
1959
  http://jedwatson.github.io/classnames
1960
  */
1965
 
1966
  var hasOwn = {}.hasOwnProperty;
1967
 
1968
+ function classNames() {
1969
  var classes = [];
1970
 
1971
  for (var i = 0; i < arguments.length; i++) {
1976
 
1977
  if (argType === 'string' || argType === 'number') {
1978
  classes.push(arg);
1979
+ } else if (Array.isArray(arg)) {
1980
+ if (arg.length) {
1981
+ var inner = classNames.apply(null, arg);
1982
+ if (inner) {
1983
+ classes.push(inner);
1984
+ }
1985
  }
1986
  } else if (argType === 'object') {
1987
+ if (arg.toString === Object.prototype.toString) {
1988
+ for (var key in arg) {
1989
+ if (hasOwn.call(arg, key) && arg[key]) {
1990
+ classes.push(key);
1991
+ }
1992
  }
1993
+ } else {
1994
+ classes.push(arg.toString());
1995
  }
1996
  }
1997
  }
2014
 
2015
  /***/ }),
2016
 
2017
+ /***/ "./node_modules/desandro-matches-selector/matches-selector.js":
2018
+ /*!********************************************************************!*\
2019
+ !*** ./node_modules/desandro-matches-selector/matches-selector.js ***!
2020
+ \********************************************************************/
2021
  /*! no static exports found */
2022
  /***/ (function(module, exports, __webpack_require__) {
2023
 
2024
+ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
2025
+ * matchesSelector v2.0.2
2026
+ * matchesSelector( element, '.selector' )
2027
+ * MIT license
 
 
 
2028
  */
2029
 
2030
+ /*jshint browser: true, strict: true, undef: true, unused: true */
2031
 
2032
+ ( function( window, factory ) {
2033
+ /*global define: false, module: false */
2034
+ 'use strict';
2035
+ // universal module definition
2036
+ if ( true ) {
2037
+ // AMD
2038
+ !(__WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
2039
+ __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
2040
+ (__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) :
2041
+ __WEBPACK_AMD_DEFINE_FACTORY__),
2042
+ __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
2043
+ } else {}
2044
 
2045
+ }( window, function factory() {
2046
+ 'use strict';
2047
 
2048
+ var matchesMethod = ( function() {
2049
+ var ElemProto = window.Element.prototype;
2050
+ // check for the standard method name first
2051
+ if ( ElemProto.matches ) {
2052
+ return 'matches';
2053
+ }
2054
+ // check un-prefixed
2055
+ if ( ElemProto.matchesSelector ) {
2056
+ return 'matchesSelector';
2057
+ }
2058
+ // check vendor prefixes
2059
+ var prefixes = [ 'webkit', 'moz', 'ms', 'o' ];
2060
 
2061
+ for ( var i=0; i < prefixes.length; i++ ) {
2062
+ var prefix = prefixes[i];
2063
+ var method = prefix + 'MatchesSelector';
2064
+ if ( ElemProto[ method ] ) {
2065
+ return method;
2066
+ }
2067
+ }
2068
+ })();
2069
 
2070
+ return function matchesSelector( elem, selector ) {
2071
+ return elem[ matchesMethod ]( selector );
2072
+ };
2073
 
2074
+ }));
 
 
 
 
2075
 
 
 
 
 
 
 
 
 
2076
 
2077
+ /***/ }),
 
 
 
2078
 
2079
+ /***/ "./node_modules/ev-emitter/ev-emitter.js":
2080
+ /*!***********************************************!*\
2081
+ !*** ./node_modules/ev-emitter/ev-emitter.js ***!
2082
+ \***********************************************/
2083
+ /*! no static exports found */
2084
+ /***/ (function(module, exports, __webpack_require__) {
2085
 
2086
+ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
2087
+ * EvEmitter v1.1.0
2088
+ * Lil' event emitter
2089
+ * MIT License
2090
+ */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2091
 
2092
+ /* jshint unused: true, undef: true, strict: true */
 
 
 
 
 
 
 
2093
 
2094
+ ( function( global, factory ) {
2095
+ // universal module definition
2096
+ /* jshint strict: false */ /* globals define, module, window */
2097
+ if ( true ) {
2098
+ // AMD - RequireJS
2099
+ !(__WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
2100
+ __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
2101
+ (__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) :
2102
+ __WEBPACK_AMD_DEFINE_FACTORY__),
2103
+ __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
2104
+ } else {}
2105
 
2106
+ }( typeof window != 'undefined' ? window : this, function() {
 
 
 
 
 
 
2107
 
2108
+ "use strict";
 
 
 
 
 
 
2109
 
2110
+ function EvEmitter() {}
2111
 
2112
+ var proto = EvEmitter.prototype;
 
 
 
 
 
 
 
 
 
 
2113
 
2114
+ proto.on = function( eventName, listener ) {
2115
+ if ( !eventName || !listener ) {
2116
+ return;
2117
+ }
2118
+ // set events hash
2119
+ var events = this._events = this._events || {};
2120
+ // set listeners array
2121
+ var listeners = events[ eventName ] = events[ eventName ] || [];
2122
+ // only add once
2123
+ if ( listeners.indexOf( listener ) == -1 ) {
2124
+ listeners.push( listener );
2125
+ }
 
 
 
2126
 
2127
+ return this;
2128
+ };
 
 
 
2129
 
2130
+ proto.once = function( eventName, listener ) {
2131
+ if ( !eventName || !listener ) {
2132
+ return;
2133
+ }
2134
+ // add event
2135
+ this.on( eventName, listener );
2136
+ // set once flag
2137
+ // set onceEvents hash
2138
+ var onceEvents = this._onceEvents = this._onceEvents || {};
2139
+ // set onceListeners object
2140
+ var onceListeners = onceEvents[ eventName ] = onceEvents[ eventName ] || {};
2141
+ // set flag
2142
+ onceListeners[ listener ] = true;
 
 
 
2143
 
2144
+ return this;
2145
+ };
2146
 
2147
+ proto.off = function( eventName, listener ) {
2148
+ var listeners = this._events && this._events[ eventName ];
2149
+ if ( !listeners || !listeners.length ) {
2150
+ return;
2151
+ }
2152
+ var index = listeners.indexOf( listener );
2153
+ if ( index != -1 ) {
2154
+ listeners.splice( index, 1 );
2155
+ }
2156
 
2157
+ return this;
2158
+ };
 
 
 
 
 
 
 
 
 
2159
 
2160
+ proto.emitEvent = function( eventName, args ) {
2161
+ var listeners = this._events && this._events[ eventName ];
2162
+ if ( !listeners || !listeners.length ) {
2163
+ return;
2164
+ }
2165
+ // copy over to avoid interference if .off() in listener
2166
+ listeners = listeners.slice(0);
2167
+ args = args || [];
2168
+ // once stuff
2169
+ var onceListeners = this._onceEvents && this._onceEvents[ eventName ];
 
 
 
 
 
 
 
 
 
 
2170
 
2171
+ for ( var i=0; i < listeners.length; i++ ) {
2172
+ var listener = listeners[i]
2173
+ var isOnce = onceListeners && onceListeners[ listener ];
2174
+ if ( isOnce ) {
2175
+ // remove listener
2176
+ // remove before trigger to prevent recursion
2177
+ this.off( eventName, listener );
2178
+ // unset once flag
2179
+ delete onceListeners[ listener ];
2180
+ }
2181
+ // trigger listener
2182
+ listener.apply( this, args );
2183
+ }
 
 
 
 
 
 
 
 
2184
 
2185
+ return this;
2186
+ };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2187
 
2188
+ proto.allOff = function() {
2189
+ delete this._events;
2190
+ delete this._onceEvents;
2191
+ };
 
 
 
 
 
 
 
 
 
2192
 
2193
+ return EvEmitter;
 
 
 
 
 
 
 
 
 
 
 
2194
 
2195
+ }));
2196
 
 
 
 
 
 
 
 
 
 
 
 
 
2197
 
2198
+ /***/ }),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2199
 
2200
+ /***/ "./node_modules/fizzy-ui-utils/utils.js":
2201
+ /*!**********************************************!*\
2202
+ !*** ./node_modules/fizzy-ui-utils/utils.js ***!
2203
+ \**********************************************/
2204
+ /*! no static exports found */
2205
+ /***/ (function(module, exports, __webpack_require__) {
 
 
 
2206
 
2207
+ var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
2208
+ * Fizzy UI utils v2.0.7
2209
+ * MIT license
2210
+ */
 
 
 
 
 
 
 
 
2211
 
2212
+ /*jshint browser: true, undef: true, unused: true, strict: true */
 
2213
 
2214
+ ( function( window, factory ) {
2215
+ // universal module definition
2216
+ /*jshint strict: false */ /*globals define, module, require */
 
 
 
 
 
 
 
 
2217
 
2218
+ if ( true ) {
2219
+ // AMD
2220
+ !(__WEBPACK_AMD_DEFINE_ARRAY__ = [
2221
+ __webpack_require__(/*! desandro-matches-selector/matches-selector */ "./node_modules/desandro-matches-selector/matches-selector.js")
2222
+ ], __WEBPACK_AMD_DEFINE_RESULT__ = (function( matchesSelector ) {
2223
+ return factory( window, matchesSelector );
2224
+ }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
2225
+ __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
2226
+ } else {}
2227
 
2228
+ }( window, function factory( window, matchesSelector ) {
 
 
 
 
 
2229
 
2230
+ 'use strict';
 
 
 
2231
 
2232
+ var utils = {};
 
 
 
2233
 
2234
+ // ----- extend ----- //
 
 
2235
 
2236
+ // extends objects
2237
+ utils.extend = function( a, b ) {
2238
+ for ( var prop in b ) {
2239
+ a[ prop ] = b[ prop ];
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2240
  }
2241
+ return a;
2242
+ };
2243
 
2244
+ // ----- modulo ----- //
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2245
 
2246
+ utils.modulo = function( num, div ) {
2247
+ return ( ( num % div ) + div ) % div;
2248
+ };
 
 
 
 
 
 
 
 
2249
 
2250
+ // ----- makeArray ----- //
 
 
 
 
 
 
 
 
 
 
 
2251
 
2252
+ var arraySlice = Array.prototype.slice;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2253
 
2254
+ // turn element or nodeList into an array
2255
+ utils.makeArray = function( obj ) {
2256
+ if ( Array.isArray( obj ) ) {
2257
+ // use object if already an array
2258
+ return obj;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2259
  }
2260
+ // return empty array if undefined or null. #6
2261
+ if ( obj === null || obj === undefined ) {
2262
+ return [];
 
 
 
 
 
 
 
 
 
 
 
2263
  }
2264
 
2265
+ var isArrayLike = typeof obj == 'object' && typeof obj.length == 'number';
2266
+ if ( isArrayLike ) {
2267
+ // convert nodeList to array
2268
+ return arraySlice.call( obj );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2269
  }
2270
 
2271
+ // array of single index
2272
+ return [ obj ];
2273
+ };
 
 
 
 
 
 
 
 
 
 
2274
 
2275
+ // ----- removeFrom ----- //
 
 
 
 
2276
 
2277
+ utils.removeFrom = function( ary, obj ) {
2278
+ var index = ary.indexOf( obj );
2279
+ if ( index != -1 ) {
2280
+ ary.splice( index, 1 );
2281
+ }
2282
+ };
2283
 
2284
+ // ----- getParent ----- //
 
 
 
 
 
 
 
 
 
 
 
2285
 
2286
+ utils.getParent = function( elem, selector ) {
2287
+ while ( elem.parentNode && elem != document.body ) {
2288
+ elem = elem.parentNode;
2289
+ if ( matchesSelector( elem, selector ) ) {
2290
+ return elem;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2291
  }
2292
+ }
2293
+ };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2294
 
2295
+ // ----- getQueryElement ----- //
2296
 
2297
+ // use element as selector string
2298
+ utils.getQueryElement = function( elem ) {
2299
+ if ( typeof elem == 'string' ) {
2300
+ return document.querySelector( elem );
2301
+ }
2302
+ return elem;
2303
+ };
2304
 
2305
+ // ----- handleEvent ----- //
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2306
 
2307
+ // enable .ontype to trigger from .addEventListener( elem, 'type' )
2308
+ utils.handleEvent = function( event ) {
2309
+ var method = 'on' + event.type;
2310
+ if ( this[ method ] ) {
2311
+ this[ method ]( event );
2312
+ }
2313
+ };
2314
 
2315
+ // ----- filterFindElements ----- //
2316
 
2317
+ utils.filterFindElements = function( elems, selector ) {
2318
+ // make array of elems
2319
+ elems = utils.makeArray( elems );
2320
+ var ffElems = [];
2321
 
2322
+ elems.forEach( function( elem ) {
2323
+ // check that elem is an actual element
2324
+ if ( !( elem instanceof HTMLElement ) ) {
2325
+ return;
2326
  }
2327
+ // add elem if no selector
2328
+ if ( !selector ) {
2329
+ ffElems.push( elem );
2330
+ return;
 
 
 
 
 
 
 
 
2331
  }
2332
+ // filter & find items if we have a selector
2333
+ // filter
2334
+ if ( matchesSelector( elem, selector ) ) {
2335
+ ffElems.push( elem );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2336
  }
2337
+ // find children
2338
+ var childElems = elem.querySelectorAll( selector );
2339
+ // concat childElems to filterFound array
2340
+ for ( var i=0; i < childElems.length; i++ ) {
2341
+ ffElems.push( childElems[i] );
 
2342
  }
2343
+ });
2344
 
2345
+ return ffElems;
2346
+ };
2347
 
2348
+ // ----- debounceMethod ----- //
 
2349
 
2350
+ utils.debounceMethod = function( _class, methodName, threshold ) {
2351
+ threshold = threshold || 100;
2352
+ // original method
2353
+ var method = _class.prototype[ methodName ];
2354
+ var timeoutName = methodName + 'Timeout';
2355
 
2356
+ _class.prototype[ methodName ] = function() {
2357
+ var timeout = this[ timeoutName ];
2358
+ clearTimeout( timeout );
2359
 
2360
+ var args = arguments;
2361
+ var _this = this;
2362
+ this[ timeoutName ] = setTimeout( function() {
2363
+ method.apply( _this, args );
2364
+ delete _this[ timeoutName ];
2365
+ }, threshold );
2366
+ };
2367
+ };
2368
 
2369
+ // ----- docReady ----- //
 
 
 
 
 
2370
 
2371
+ utils.docReady = function( callback ) {
2372
+ var readyState = document.readyState;
2373
+ if ( readyState == 'complete' || readyState == 'interactive' ) {
2374
+ // do async to allow for other scripts to run. metafizzy/flickity#441
2375
+ setTimeout( callback );
2376
+ } else {
2377
+ document.addEventListener( 'DOMContentLoaded', callback );
2378
+ }
2379
+ };
2380
 
2381
+ // ----- htmlInit ----- //
 
 
 
 
 
 
 
 
 
 
 
2382
 
2383
+ // http://jamesroberts.name/blog/2010/02/22/string-functions-for-javascript-trim-to-camel-case-to-dashed-and-to-underscore/
2384
+ utils.toDashed = function( str ) {
2385
+ return str.replace( /(.)([A-Z])/g, function( match, $1, $2 ) {
2386
+ return $1 + '-' + $2;
2387
+ }).toLowerCase();
2388
+ };
2389
 
2390
+ var console = window.console;
2391
+ /**
2392
+ * allow user to initialize classes via [data-namespace] or .js-namespace class
2393
+ * htmlInit( Widget, 'widgetName' )
2394
+ * options are parsed from data-namespace-options
2395
+ */
2396
+ utils.htmlInit = function( WidgetClass, namespace ) {
2397
+ utils.docReady( function() {
2398
+ var dashedNamespace = utils.toDashed( namespace );
2399
+ var dataAttr = 'data-' + dashedNamespace;
2400
+ var dataAttrElems = document.querySelectorAll( '[' + dataAttr + ']' );
2401
+ var jsDashElems = document.querySelectorAll( '.js-' + dashedNamespace );
2402
+ var elems = utils.makeArray( dataAttrElems )
2403
+ .concat( utils.makeArray( jsDashElems ) );
2404
+ var dataOptionsAttr = dataAttr + '-options';
2405
+ var jQuery = window.jQuery;
2406
 
2407
+ elems.forEach( function( elem ) {
2408
+ var attr = elem.getAttribute( dataAttr ) ||
2409
+ elem.getAttribute( dataOptionsAttr );
2410
+ var options;
2411
+ try {
2412
+ options = attr && JSON.parse( attr );
2413
+ } catch ( error ) {
2414
+ // log error, do not initialize
2415
+ if ( console ) {
2416
+ console.error( 'Error parsing ' + dataAttr + ' on ' + elem.className +
2417
+ ': ' + error );
2418
+ }
2419
+ return;
2420
  }
2421
+ // initialize
2422
+ var instance = new WidgetClass( elem, options );
2423
+ // make available via $().data('namespace')
2424
+ if ( jQuery ) {
2425
+ jQuery.data( elem, namespace, instance );
2426
+ }
2427
+ });
2428
 
2429
+ });
2430
+ };
2431
+
2432
+ // ----- ----- //
2433
+
2434
+ return utils;
2435
 
2436
  }));
2437
 
2438
 
2439
  /***/ }),
2440
 
2441
+ /***/ "./node_modules/get-size/get-size.js":
2442
+ /*!*******************************************!*\
2443
+ !*** ./node_modules/get-size/get-size.js ***!
2444
+ \*******************************************/
2445
  /*! no static exports found */
2446
  /***/ (function(module, exports, __webpack_require__) {
2447
 
2448
+ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
2449
+ * getSize v2.0.3
2450
+ * measure size of elements
2451
+ * MIT license
2452
  */
2453
 
2454
+ /* jshint browser: true, strict: true, undef: true, unused: true */
2455
+ /* globals console: false */
2456
 
2457
+ ( function( window, factory ) {
2458
+ /* jshint strict: false */ /* globals define, module */
 
2459
  if ( true ) {
2460
+ // AMD
2461
  !(__WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
2462
  __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
2463
  (__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) :
2465
  __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
2466
  } else {}
2467
 
2468
+ })( window, function factory() {
2469
+ 'use strict';
2470
 
2471
+ // -------------------------- helpers -------------------------- //
2472
 
2473
+ // get a number from a string, not a percentage
2474
+ function getStyleSize( value ) {
2475
+ var num = parseFloat( value );
2476
+ // not a percent like '100%', and a number
2477
+ var isValid = value.indexOf('%') == -1 && !isNaN( num );
2478
+ return isValid && num;
2479
+ }
2480
 
2481
+ function noop() {}
2482
 
2483
+ var logError = typeof console == 'undefined' ? noop :
2484
+ function( message ) {
2485
+ console.error( message );
2486
+ };
 
 
 
 
 
 
 
 
2487
 
2488
+ // -------------------------- measurements -------------------------- //
 
2489
 
2490
+ var measurements = [
2491
+ 'paddingLeft',
2492
+ 'paddingRight',
2493
+ 'paddingTop',
2494
+ 'paddingBottom',
2495
+ 'marginLeft',
2496
+ 'marginRight',
2497
+ 'marginTop',
2498
+ 'marginBottom',
2499
+ 'borderLeftWidth',
2500
+ 'borderRightWidth',
2501
+ 'borderTopWidth',
2502
+ 'borderBottomWidth'
2503
+ ];
2504
 
2505
+ var measurementsLength = measurements.length;
 
2506
 
2507
+ function getZeroSize() {
2508
+ var size = {
2509
+ width: 0,
2510
+ height: 0,
2511
+ innerWidth: 0,
2512
+ innerHeight: 0,
2513
+ outerWidth: 0,
2514
+ outerHeight: 0
2515
+ };
2516
+ for ( var i=0; i < measurementsLength; i++ ) {
2517
+ var measurement = measurements[i];
2518
+ size[ measurement ] = 0;
2519
  }
2520
+ return size;
2521
+ }
2522
 
2523
+ // -------------------------- getStyle -------------------------- //
 
2524
 
2525
+ /**
2526
+ * getStyle, get style of element, check for Firefox bug
2527
+ * https://bugzilla.mozilla.org/show_bug.cgi?id=548397
2528
+ */
2529
+ function getStyle( elem ) {
2530
+ var style = getComputedStyle( elem );
2531
+ if ( !style ) {
2532
+ logError( 'Style returned ' + style +
2533
+ '. Are you running this code in a hidden iframe on Firefox? ' +
2534
+ 'See https://bit.ly/getsizebug1' );
2535
  }
2536
+ return style;
2537
+ }
 
 
 
2538
 
2539
+ // -------------------------- setup -------------------------- //
 
 
 
 
 
 
 
 
 
 
 
 
2540
 
2541
+ var isSetup = false;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2542
 
2543
+ var isBoxSizeOuter;
2544
 
2545
  /**
2546
+ * setup
2547
+ * check isBoxSizerOuter
2548
+ * do on first getSize() rather than on page load for Firefox bug
 
 
 
2549
  */
2550
+ function setup() {
2551
+ // setup once
2552
+ if ( isSetup ) {
2553
+ return;
2554
+ }
2555
+ isSetup = true;
2556
 
2557
+ // -------------------------- box sizing -------------------------- //
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2558
 
2559
  /**
2560
+ * Chrome & Safari measure the outer-width on style.width on border-box elems
2561
+ * IE11 & Firefox<29 measures the inner-width
 
 
 
 
2562
  */
2563
+ var div = document.createElement('div');
2564
+ div.style.width = '200px';
2565
+ div.style.padding = '1px 2px 3px 4px';
2566
+ div.style.borderStyle = 'solid';
2567
+ div.style.borderWidth = '1px 2px 3px 4px';
2568
+ div.style.boxSizing = 'border-box';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2569
 
2570
+ var body = document.body || document.documentElement;
2571
+ body.appendChild( div );
2572
+ var style = getStyle( div );
2573
+ // round value for browser zoom. desandro/masonry#928
2574
+ isBoxSizeOuter = Math.round( getStyleSize( style.width ) ) == 200;
2575
+ getSize.isBoxSizeOuter = isBoxSizeOuter;
2576
 
2577
+ body.removeChild( div );
2578
+ }
 
 
 
 
 
 
2579
 
2580
+ // -------------------------- getSize -------------------------- //
2581
 
2582
+ function getSize( elem ) {
2583
+ setup();
2584
 
2585
+ // use querySeletor if elem is string
2586
+ if ( typeof elem == 'string' ) {
2587
+ elem = document.querySelector( elem );
2588
+ }
2589
 
2590
+ // do not proceed on non-objects
2591
+ if ( !elem || typeof elem != 'object' || !elem.nodeType ) {
2592
+ return;
2593
+ }
 
 
 
2594
 
2595
+ var style = getStyle( elem );
2596
 
2597
+ // if hidden, everything is 0
2598
+ if ( style.display == 'none' ) {
2599
+ return getZeroSize();
2600
+ }
2601
 
2602
+ var size = {};
2603
+ size.width = elem.offsetWidth;
2604
+ size.height = elem.offsetHeight;
2605
 
2606
+ var isBorderBox = size.isBorderBox = style.boxSizing == 'border-box';
2607
 
2608
+ // get all measurements
2609
+ for ( var i=0; i < measurementsLength; i++ ) {
2610
+ var measurement = measurements[i];
2611
+ var value = style[ measurement ];
2612
+ var num = parseFloat( value );
2613
+ // any 'auto', 'medium' value will be 0
2614
+ size[ measurement ] = !isNaN( num ) ? num : 0;
2615
+ }
2616
 
2617
+ var paddingWidth = size.paddingLeft + size.paddingRight;
2618
+ var paddingHeight = size.paddingTop + size.paddingBottom;
2619
+ var marginWidth = size.marginLeft + size.marginRight;
2620
+ var marginHeight = size.marginTop + size.marginBottom;
2621
+ var borderWidth = size.borderLeftWidth + size.borderRightWidth;
2622
+ var borderHeight = size.borderTopWidth + size.borderBottomWidth;
2623
 
2624
+ var isBorderBoxSizeOuter = isBorderBox && isBoxSizeOuter;
2625
 
2626
+ // overwrite width and height if we can get it from style
2627
+ var styleWidth = getStyleSize( style.width );
2628
+ if ( styleWidth !== false ) {
2629
+ size.width = styleWidth +
2630
+ // add padding and border unless it's already including it
2631
+ ( isBorderBoxSizeOuter ? 0 : paddingWidth + borderWidth );
2632
+ }
2633
 
2634
+ var styleHeight = getStyleSize( style.height );
2635
+ if ( styleHeight !== false ) {
2636
+ size.height = styleHeight +
2637
+ // add padding and border unless it's already including it
2638
+ ( isBorderBoxSizeOuter ? 0 : paddingHeight + borderHeight );
2639
+ }
2640
 
2641
+ size.innerWidth = size.width - ( paddingWidth + borderWidth );
2642
+ size.innerHeight = size.height - ( paddingHeight + borderHeight );
2643
 
2644
+ size.outerWidth = size.width + marginWidth;
2645
+ size.outerHeight = size.height + marginHeight;
2646
 
2647
+ return size;
2648
+ }
 
 
 
 
 
 
2649
 
2650
+ return getSize;
2651
 
2652
+ });
 
 
 
 
 
 
 
 
 
 
 
 
 
2653
 
 
2654
 
2655
  /***/ }),
2656
 
2657
+ /***/ "./node_modules/imagesloaded/imagesloaded.js":
2658
+ /*!***************************************************!*\
2659
+ !*** ./node_modules/imagesloaded/imagesloaded.js ***!
2660
+ \***************************************************/
2661
  /*! no static exports found */
2662
  /***/ (function(module, exports, __webpack_require__) {
2663
 
2664
+ var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
2665
+ * imagesLoaded v4.1.4
2666
+ * JavaScript is all like "You images are done yet or what?"
2667
+ * MIT License
 
 
 
 
2668
  */
2669
 
2670
+ ( function( window, factory ) { 'use strict';
2671
+ // universal module definition
2672
 
2673
+ /*global define: false, module: false, require: false */
2674
 
2675
+ if ( true ) {
2676
+ // AMD
2677
+ !(__WEBPACK_AMD_DEFINE_ARRAY__ = [
2678
+ __webpack_require__(/*! ev-emitter/ev-emitter */ "./node_modules/ev-emitter/ev-emitter.js")
2679
+ ], __WEBPACK_AMD_DEFINE_RESULT__ = (function( EvEmitter ) {
2680
+ return factory( window, EvEmitter );
2681
+ }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
2682
+ __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
2683
+ } else {}
2684
 
2685
+ })( typeof window !== 'undefined' ? window : this,
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2686
 
2687
+ // -------------------------- factory -------------------------- //
2688
 
2689
+ function factory( window, EvEmitter ) {
2690
 
2691
+ 'use strict';
 
 
 
 
 
2692
 
2693
+ var $ = window.jQuery;
2694
+ var console = window.console;
2695
 
2696
+ // -------------------------- helpers -------------------------- //
2697
 
2698
+ // extend objects
2699
+ function extend( a, b ) {
2700
+ for ( var prop in b ) {
2701
+ a[ prop ] = b[ prop ];
2702
+ }
2703
+ return a;
2704
+ }
 
2705
 
2706
+ var arraySlice = Array.prototype.slice;
2707
 
2708
+ // turn element or nodeList into an array
2709
+ function makeArray( obj ) {
2710
+ if ( Array.isArray( obj ) ) {
2711
+ // use object if already an array
2712
+ return obj;
2713
+ }
2714
 
2715
+ var isArrayLike = typeof obj == 'object' && typeof obj.length == 'number';
2716
+ if ( isArrayLike ) {
2717
+ // convert nodeList to array
2718
+ return arraySlice.call( obj );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2719
  }
2720
+
2721
+ // array of single index
2722
+ return [ obj ];
2723
  }
2724
 
2725
+ // -------------------------- imagesLoaded -------------------------- //
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2726
 
2727
  /**
2728
+ * @param {Array, Element, NodeList, String} elem
2729
+ * @param {Object or Function} options - if function, use as callback
2730
+ * @param {Function} onAlways - callback function
 
 
 
 
2731
  */
2732
+ function ImagesLoaded( elem, options, onAlways ) {
2733
+ // coerce ImagesLoaded() without new, to be new ImagesLoaded()
2734
+ if ( !( this instanceof ImagesLoaded ) ) {
2735
+ return new ImagesLoaded( elem, options, onAlways );
2736
+ }
2737
+ // use elem as selector string
2738
+ var queryElem = elem;
2739
+ if ( typeof elem == 'string' ) {
2740
+ queryElem = document.querySelectorAll( elem );
2741
+ }
2742
+ // bail if bad element
2743
+ if ( !queryElem ) {
2744
+ console.error( 'Bad element for imagesLoaded ' + ( queryElem || elem ) );
2745
+ return;
2746
+ }
2747
 
2748
+ this.elements = makeArray( queryElem );
2749
+ this.options = extend( {}, this.options );
2750
+ // shift arguments if no options set
2751
+ if ( typeof options == 'function' ) {
2752
+ onAlways = options;
2753
+ } else {
2754
+ extend( this.options, options );
 
 
2755
  }
2756
 
2757
+ if ( onAlways ) {
2758
+ this.on( 'always', onAlways );
 
 
 
2759
  }
 
 
2760
 
2761
+ this.getImages();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2762
 
2763
+ if ( $ ) {
2764
+ // add jQuery Deferred object
2765
+ this.jqDeferred = new $.Deferred();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2766
  }
 
2767
 
2768
+ // HACK check async to allow time to bind listeners
2769
+ setTimeout( this.check.bind( this ) );
2770
+ }
2771
 
2772
+ ImagesLoaded.prototype = Object.create( EvEmitter.prototype );
2773
 
2774
+ ImagesLoaded.prototype.options = {};
 
 
 
 
 
2775
 
2776
+ ImagesLoaded.prototype.getImages = function() {
2777
+ this.images = [];
2778
 
2779
+ // filter & find items if we have an item selector
2780
+ this.elements.forEach( this.addElementImages, this );
2781
+ };
2782
 
2783
  /**
2784
+ * @param {Node} element
 
 
 
 
 
2785
  */
2786
+ ImagesLoaded.prototype.addElementImages = function( elem ) {
2787
+ // filter siblings
2788
+ if ( elem.nodeName == 'IMG' ) {
2789
+ this.addImage( elem );
2790
+ }
2791
+ // get background image on element
2792
+ if ( this.options.background === true ) {
2793
+ this.addElementBackgroundImages( elem );
2794
+ }
2795
+
2796
+ // find children
2797
+ // no non-element nodes, #143
2798
+ var nodeType = elem.nodeType;
2799
+ if ( !nodeType || !elementNodeTypes[ nodeType ] ) {
2800
+ return;
2801
+ }
2802
+ var childImgs = elem.querySelectorAll('img');
2803
+ // concat childElems to filterFound array
2804
+ for ( var i=0; i < childImgs.length; i++ ) {
2805
+ var img = childImgs[i];
2806
+ this.addImage( img );
2807
+ }
2808
 
2809
+ // get child background images
2810
+ if ( typeof this.options.background == 'string' ) {
2811
+ var children = elem.querySelectorAll( this.options.background );
2812
+ for ( i=0; i < children.length; i++ ) {
2813
+ var child = children[i];
2814
+ this.addElementBackgroundImages( child );
2815
+ }
2816
+ }
2817
+ };
2818
 
2819
+ var elementNodeTypes = {
2820
+ 1: true,
2821
+ 9: true,
2822
+ 11: true
2823
+ };
2824
 
2825
+ ImagesLoaded.prototype.addElementBackgroundImages = function( elem ) {
2826
+ var style = getComputedStyle( elem );
2827
+ if ( !style ) {
2828
+ // Firefox returns null if in a hidden iframe https://bugzil.la/548397
2829
+ return;
2830
+ }
2831
+ // get url inside url("...")
2832
+ var reURL = /url\((['"])?(.*?)\1\)/gi;
2833
+ var matches = reURL.exec( style.backgroundImage );
2834
+ while ( matches !== null ) {
2835
+ var url = matches && matches[2];
2836
+ if ( url ) {
2837
+ this.addBackground( url, elem );
2838
+ }
2839
+ matches = reURL.exec( style.backgroundImage );
2840
+ }
2841
+ };
2842
 
2843
  /**
2844
+ * @param {Image} img
2845
  */
2846
+ ImagesLoaded.prototype.addImage = function( img ) {
2847
+ var loadingImage = new LoadingImage( img );
2848
+ this.images.push( loadingImage );
2849
+ };
2850
 
2851
+ ImagesLoaded.prototype.addBackground = function( url, elem ) {
2852
+ var background = new Background( url, elem );
2853
+ this.images.push( background );
2854
+ };
2855
 
2856
+ ImagesLoaded.prototype.check = function() {
2857
+ var _this = this;
2858
+ this.progressedCount = 0;
2859
+ this.hasAnyBroken = false;
2860
+ // complete if no images
2861
+ if ( !this.images.length ) {
2862
+ this.complete();
2863
+ return;
2864
+ }
 
2865
 
2866
+ function onProgress( image, elem, message ) {
2867
+ // HACK - Chrome triggers event before object properties have changed. #83
2868
+ setTimeout( function() {
2869
+ _this.progress( image, elem, message );
2870
+ });
2871
+ }
 
 
 
 
 
 
 
 
2872
 
2873
+ this.images.forEach( function( loadingImage ) {
2874
+ loadingImage.once( 'progress', onProgress );
2875
+ loadingImage.check();
2876
+ });
2877
+ };
2878
 
2879
+ ImagesLoaded.prototype.progress = function( image, elem, message ) {
2880
+ this.progressedCount++;
2881
+ this.hasAnyBroken = this.hasAnyBroken || !image.isLoaded;
2882
+ // progress event
2883
+ this.emitEvent( 'progress', [ this, image, elem ] );
2884
+ if ( this.jqDeferred && this.jqDeferred.notify ) {
2885
+ this.jqDeferred.notify( this, image );
2886
+ }
2887
+ // check if completed
2888
+ if ( this.progressedCount == this.images.length ) {
2889
+ this.complete();
2890
  }
2891
 
2892
+ if ( this.options.debug && console ) {
2893
+ console.log( 'progress: ' + message, image, elem );
 
 
2894
  }
2895
+ };
2896
 
2897
+ ImagesLoaded.prototype.complete = function() {
2898
+ var eventName = this.hasAnyBroken ? 'fail' : 'done';
2899
+ this.isComplete = true;
2900
+ this.emitEvent( eventName, [ this ] );
2901
+ this.emitEvent( 'always', [ this ] );
2902
+ if ( this.jqDeferred ) {
2903
+ var jqMethod = this.hasAnyBroken ? 'reject' : 'resolve';
2904
+ this.jqDeferred[ jqMethod ]( this );
2905
  }
2906
+ };
 
2907
 
2908
+ // -------------------------- -------------------------- //
2909
 
2910
+ function LoadingImage( img ) {
2911
+ this.img = img;
2912
+ }
2913
 
2914
+ LoadingImage.prototype = Object.create( EvEmitter.prototype );
 
 
 
 
 
2915
 
2916
+ LoadingImage.prototype.check = function() {
2917
+ // If complete is true and browser supports natural sizes,
2918
+ // try to check for image status manually.
2919
+ var isComplete = this.getIsImageComplete();
2920
+ if ( isComplete ) {
2921
+ // report based on naturalWidth
2922
+ this.confirm( this.img.naturalWidth !== 0, 'naturalWidth' );
2923
+ return;
2924
+ }
2925
 
2926
+ // If none of the checks above matched, simulate loading on detached element.
2927
+ this.proxyImage = new Image();
2928
+ this.proxyImage.addEventListener( 'load', this );
2929
+ this.proxyImage.addEventListener( 'error', this );
2930
+ // bind to image as well for Firefox. #191
2931
+ this.img.addEventListener( 'load', this );
2932
+ this.img.addEventListener( 'error', this );
2933
+ this.proxyImage.src = this.img.src;
2934
+ };
2935
 
2936
+ LoadingImage.prototype.getIsImageComplete = function() {
2937
+ // check for non-zero, non-undefined naturalWidth
2938
+ // fixes Safari+InfiniteScroll+Masonry bug infinite-scroll#671
2939
+ return this.img.complete && this.img.naturalWidth;
2940
+ };
 
 
 
2941
 
2942
+ LoadingImage.prototype.confirm = function( isLoaded, message ) {
2943
+ this.isLoaded = isLoaded;
2944
+ this.emitEvent( 'progress', [ this, this.img, message ] );
2945
+ };
 
2946
 
2947
+ // ----- events ----- //
 
 
 
 
 
2948
 
2949
+ // trigger specified handler for event type
2950
+ LoadingImage.prototype.handleEvent = function( event ) {
2951
+ var method = 'on' + event.type;
2952
+ if ( this[ method ] ) {
2953
+ this[ method ]( event );
2954
+ }
 
 
 
2955
  };
2956
 
2957
+ LoadingImage.prototype.onload = function() {
2958
+ this.confirm( true, 'onload' );
2959
+ this.unbindEvents();
2960
+ };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2961
 
2962
+ LoadingImage.prototype.onerror = function() {
2963
+ this.confirm( false, 'onerror' );
2964
+ this.unbindEvents();
2965
+ };
2966
 
2967
+ LoadingImage.prototype.unbindEvents = function() {
2968
+ this.proxyImage.removeEventListener( 'load', this );
2969
+ this.proxyImage.removeEventListener( 'error', this );
2970
+ this.img.removeEventListener( 'load', this );
2971
+ this.img.removeEventListener( 'error', this );
2972
+ };
2973
 
2974
+ // -------------------------- Background -------------------------- //
2975
 
2976
+ function Background( url, element ) {
2977
+ this.url = url;
2978
+ this.element = element;
2979
+ this.img = new Image();
2980
  }
2981
 
2982
+ // inherit LoadingImage prototype
2983
+ Background.prototype = Object.create( LoadingImage.prototype );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2984
 
2985
+ Background.prototype.check = function() {
2986
+ this.img.addEventListener( 'load', this );
2987
+ this.img.addEventListener( 'error', this );
2988
+ this.img.src = this.url;
2989
+ // check if image is already complete
2990
+ var isComplete = this.getIsImageComplete();
2991
+ if ( isComplete ) {
2992
+ this.confirm( this.img.naturalWidth !== 0, 'naturalWidth' );
2993
+ this.unbindEvents();
2994
+ }
2995
+ };
2996
 
2997
+ Background.prototype.unbindEvents = function() {
2998
+ this.img.removeEventListener( 'load', this );
2999
+ this.img.removeEventListener( 'error', this );
3000
+ };
3001
 
3002
+ Background.prototype.confirm = function( isLoaded, message ) {
3003
+ this.isLoaded = isLoaded;
3004
+ this.emitEvent( 'progress', [ this, this.element, message ] );
3005
+ };
 
 
3006
 
3007
+ // -------------------------- jQuery -------------------------- //
3008
 
3009
+ ImagesLoaded.makeJQueryPlugin = function( jQuery ) {
3010
+ jQuery = jQuery || window.jQuery;
3011
+ if ( !jQuery ) {
3012
+ return;
3013
+ }
3014
+ // set local variable
3015
+ $ = jQuery;
3016
+ // $().imagesLoaded()
3017
+ $.fn.imagesLoaded = function( options, callback ) {
3018
+ var instance = new ImagesLoaded( this, options, callback );
3019
+ return instance.jqDeferred.promise( $(this) );
3020
+ };
3021
+ };
3022
+ // try making plugin
3023
+ ImagesLoaded.makeJQueryPlugin();
3024
 
3025
+ // -------------------------- -------------------------- //
 
 
 
 
 
 
 
3026
 
3027
+ return ImagesLoaded;
3028
 
3029
+ });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3030
 
 
3031
 
3032
  /***/ }),
3033
 
3034
+ /***/ "./node_modules/masonry-layout/masonry.js":
3035
  /*!************************************************!*\
3036
+ !*** ./node_modules/masonry-layout/masonry.js ***!
3037
  \************************************************/
3038
  /*! no static exports found */
3039
  /***/ (function(module, exports, __webpack_require__) {
3040
 
3041
+ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
3042
+ * Masonry v4.2.2
3043
+ * Cascading grid layout library
3044
+ * https://masonry.desandro.com
3045
+ * MIT License
3046
+ * by David DeSandro
 
 
 
3047
  */
3048
 
3049
+ ( function( window, factory ) {
3050
+ // universal module definition
3051
+ /* jshint strict: false */ /*globals define, module, require */
3052
+ if ( true ) {
3053
+ // AMD
3054
+ !(__WEBPACK_AMD_DEFINE_ARRAY__ = [
3055
+ __webpack_require__(/*! outlayer/outlayer */ "./node_modules/outlayer/outlayer.js"),
3056
+ __webpack_require__(/*! get-size/get-size */ "./node_modules/get-size/get-size.js")
3057
+ ], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
3058
+ __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
3059
+ (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
3060
+ __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
3061
+ } else {}
3062
 
3063
+ }( window, function factory( Outlayer, getSize ) {
3064
 
3065
+ 'use strict';
 
 
 
3066
 
3067
+ // -------------------------- masonryDefinition -------------------------- //
 
 
 
 
 
3068
 
3069
+ // create an Outlayer layout class
3070
+ var Masonry = Outlayer.create('masonry');
3071
+ // isFitWidth -> fitWidth
3072
+ Masonry.compatOptions.fitWidth = 'isFitWidth';
3073
 
3074
+ var proto = Masonry.prototype;
 
 
3075
 
3076
+ proto._resetLayout = function() {
3077
+ this.getSize();
3078
+ this._getMeasurement( 'columnWidth', 'outerWidth' );
3079
+ this._getMeasurement( 'gutter', 'outerWidth' );
3080
+ this.measureColumns();
3081
 
3082
+ // reset column Y
3083
+ this.colYs = [];
3084
+ for ( var i=0; i < this.cols; i++ ) {
3085
+ this.colYs.push( 0 );
3086
+ }
3087
 
3088
+ this.maxY = 0;
3089
+ this.horizontalColIndex = 0;
3090
+ };
 
 
3091
 
3092
+ proto.measureColumns = function() {
3093
+ this.getContainerWidth();
3094
+ // if columnWidth is 0, default to outerWidth of first item
3095
+ if ( !this.columnWidth ) {
3096
+ var firstItem = this.items[0];
3097
+ var firstItemElem = firstItem && firstItem.element;
3098
+ // columnWidth fall back to item of first element
3099
+ this.columnWidth = firstItemElem && getSize( firstItemElem ).outerWidth ||
3100
+ // if first elem has no width, default to size of container
3101
+ this.containerWidth;
3102
+ }
3103
 
3104
+ var columnWidth = this.columnWidth += this.gutter;
 
 
 
 
3105
 
3106
+ // calculate columns
3107
+ var containerWidth = this.containerWidth + this.gutter;
3108
+ var cols = containerWidth / columnWidth;
3109
+ // fix rounding errors, typically with gutters
3110
+ var excess = columnWidth - containerWidth % columnWidth;
3111
+ // if overshoot is less than a pixel, round up, otherwise floor it
3112
+ var mathMethod = excess && excess < 1 ? 'round' : 'floor';
3113
+ cols = Math[ mathMethod ]( cols );
3114
+ this.cols = Math.max( cols, 1 );
3115
+ };
3116
 
3117
+ proto.getContainerWidth = function() {
3118
+ // container is parent if fit width
3119
+ var isFitWidth = this._getOption('fitWidth');
3120
+ var container = isFitWidth ? this.element.parentNode : this.element;
3121
+ // check that this.size and size are there
3122
+ // IE8 triggers resize on body size change, so they might not be
3123
+ var size = getSize( container );
3124
+ this.containerWidth = size && size.innerWidth;
3125
+ };
3126
 
3127
+ proto._getItemLayoutPosition = function( item ) {
3128
+ item.getSize();
3129
+ // how many columns does this brick span
3130
+ var remainder = item.size.outerWidth % this.columnWidth;
3131
+ var mathMethod = remainder && remainder < 1 ? 'round' : 'ceil';
3132
+ // round if off by 1 pixel, otherwise use ceil
3133
+ var colSpan = Math[ mathMethod ]( item.size.outerWidth / this.columnWidth );
3134
+ colSpan = Math.min( colSpan, this.cols );
3135
+ // use horizontal or top column position
3136
+ var colPosMethod = this.options.horizontalOrder ?
3137
+ '_getHorizontalColPosition' : '_getTopColPosition';
3138
+ var colPosition = this[ colPosMethod ]( colSpan, item );
3139
+ // position the brick
3140
+ var position = {
3141
+ x: this.columnWidth * colPosition.col,
3142
+ y: colPosition.y
3143
+ };
3144
+ // apply setHeight to necessary columns
3145
+ var setHeight = colPosition.y + item.size.outerHeight;
3146
+ var setMax = colSpan + colPosition.col;
3147
+ for ( var i = colPosition.col; i < setMax; i++ ) {
3148
+ this.colYs[i] = setHeight;
3149
  }
 
 
 
 
3150
 
3151
+ return position;
3152
+ };
3153
 
3154
+ proto._getTopColPosition = function( colSpan ) {
3155
+ var colGroup = this._getTopColGroup( colSpan );
3156
+ // get the minimum Y value from the columns
3157
+ var minimumY = Math.min.apply( Math, colGroup );
3158
 
3159
+ return {
3160
+ col: colGroup.indexOf( minimumY ),
3161
+ y: minimumY,
3162
+ };
3163
+ };
 
3164
 
3165
+ /**
3166
+ * @param {Number} colSpan - number of columns the element spans
3167
+ * @returns {Array} colGroup
3168
+ */
3169
+ proto._getTopColGroup = function( colSpan ) {
3170
+ if ( colSpan < 2 ) {
3171
+ // if brick spans only one column, use all the column Ys
3172
+ return this.colYs;
3173
+ }
3174
 
3175
+ var colGroup = [];
3176
+ // how many different places could this brick fit horizontally
3177
+ var groupCount = this.cols + 1 - colSpan;
3178
+ // for each group potential horizontal position
3179
+ for ( var i = 0; i < groupCount; i++ ) {
3180
+ colGroup[i] = this._getColGroupY( i, colSpan );
3181
+ }
3182
+ return colGroup;
3183
+ };
3184
 
3185
+ proto._getColGroupY = function( col, colSpan ) {
3186
+ if ( colSpan < 2 ) {
3187
+ return this.colYs[ col ];
3188
+ }
3189
+ // make an array of colY values for that one group
3190
+ var groupColYs = this.colYs.slice( col, col + colSpan );
3191
+ // and get the max value of the array
3192
+ return Math.max.apply( Math, groupColYs );
3193
+ };
3194
 
3195
+ // get column position based on horizontal index. #873
3196
+ proto._getHorizontalColPosition = function( colSpan, item ) {
3197
+ var col = this.horizontalColIndex % this.cols;
3198
+ var isOver = colSpan > 1 && col + colSpan > this.cols;
3199
+ // shift to next row if item can't fit on current row
3200
+ col = isOver ? 0 : col;
3201
+ // don't let zero-size items take up space
3202
+ var hasSize = item.size.outerWidth && item.size.outerHeight;
3203
+ this.horizontalColIndex = hasSize ? col + colSpan : this.horizontalColIndex;
 
3204
 
 
 
3205
  return {
3206
+ col: col,
3207
+ y: this._getColGroupY( col, colSpan ),
3208
  };
 
 
 
 
3209
  };
 
3210
 
3211
+ proto._manageStamp = function( stamp ) {
3212
+ var stampSize = getSize( stamp );
3213
+ var offset = this._getElementOffset( stamp );
3214
+ // get the columns that this stamp affects
3215
+ var isOriginLeft = this._getOption('originLeft');
3216
+ var firstX = isOriginLeft ? offset.left : offset.right;
3217
+ var lastX = firstX + stampSize.outerWidth;
3218
+ var firstCol = Math.floor( firstX / this.columnWidth );
3219
+ firstCol = Math.max( 0, firstCol );
3220
+ var lastCol = Math.floor( lastX / this.columnWidth );
3221
+ // lastCol should not go over if multiple of columnWidth #425
3222
+ lastCol -= lastX % this.columnWidth ? 0 : 1;
3223
+ lastCol = Math.min( this.cols - 1, lastCol );
3224
+ // set colYs to bottom of the stamp
3225
 
3226
+ var isOriginTop = this._getOption('originTop');
3227
+ var stampMaxY = ( isOriginTop ? offset.top : offset.bottom ) +
3228
+ stampSize.outerHeight;
3229
+ for ( var i = firstCol; i <= lastCol; i++ ) {
3230
+ this.colYs[i] = Math.max( stampMaxY, this.colYs[i] );
3231
+ }
3232
+ };
3233
 
3234
+ proto._getContainerSize = function() {
3235
+ this.maxY = Math.max.apply( Math, this.colYs );
3236
+ var size = {
3237
+ height: this.maxY
3238
+ };
 
3239
 
3240
+ if ( this._getOption('fitWidth') ) {
3241
+ size.width = this._getContainerFitWidth();
3242
+ }
3243
 
3244
+ return size;
3245
+ };
3246
 
3247
+ proto._getContainerFitWidth = function() {
3248
+ var unusedCols = 0;
3249
+ // count unused columns
3250
+ var i = this.cols;
3251
+ while ( --i ) {
3252
+ if ( this.colYs[i] !== 0 ) {
3253
+ break;
3254
+ }
3255
+ unusedCols++;
3256
+ }
3257
+ // fit container to columns that have been used
3258
+ return ( this.cols - unusedCols ) * this.columnWidth - this.gutter;
3259
+ };
3260
 
3261
+ proto.needsResizeLayout = function() {
3262
+ var previousWidth = this.containerWidth;
3263
+ this.getContainerWidth();
3264
+ return previousWidth != this.containerWidth;
3265
+ };
3266
 
3267
+ return Masonry;
3268
+
3269
+ }));
 
 
 
 
 
 
 
 
 
 
 
 
3270
 
 
3271
 
3272
  /***/ }),
3273
 
3274
+ /***/ "./node_modules/object-assign/index.js":
3275
+ /*!*********************************************!*\
3276
+ !*** ./node_modules/object-assign/index.js ***!
3277
+ \*********************************************/
3278
  /*! no static exports found */
3279
  /***/ (function(module, exports, __webpack_require__) {
3280
 
3281
  "use strict";
3282
+ /*
3283
+ object-assign
3284
+ (c) Sindre Sorhus
3285
+ @license MIT
3286
+ */
 
 
 
 
3287
 
3288
 
3289
+ /* eslint-disable no-unused-vars */
3290
+ var getOwnPropertySymbols = Object.getOwnPropertySymbols;
3291
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
3292
+ var propIsEnumerable = Object.prototype.propertyIsEnumerable;
3293
 
3294
+ function toObject(val) {
3295
+ if (val === null || val === undefined) {
3296
+ throw new TypeError('Object.assign cannot be called with null or undefined');
3297
+ }
3298
 
3299
+ return Object(val);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3300
  }
3301
 
3302
+ function shouldUseNative() {
3303
+ try {
3304
+ if (!Object.assign) {
3305
+ return false;
3306
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3307
 
3308
+ // Detect buggy property enumeration order in older V8 versions.
3309
 
3310
+ // https://bugs.chromium.org/p/v8/issues/detail?id=4118
3311
+ var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
3312
+ test1[5] = 'de';
3313
+ if (Object.getOwnPropertyNames(test1)[0] === '5') {
3314
+ return false;
3315
+ }
3316
 
3317
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3056
3318
+ var test2 = {};
3319
+ for (var i = 0; i < 10; i++) {
3320
+ test2['_' + String.fromCharCode(i)] = i;
3321
+ }
3322
+ var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
3323
+ return test2[n];
3324
+ });
3325
+ if (order2.join('') !== '0123456789') {
3326
+ return false;
3327
+ }
3328
 
3329
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3056
3330
+ var test3 = {};
3331
+ 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
3332
+ test3[letter] = letter;
3333
+ });
3334
+ if (Object.keys(Object.assign({}, test3)).join('') !==
3335
+ 'abcdefghijklmnopqrst') {
3336
+ return false;
3337
+ }
3338
 
3339
+ return true;
3340
+ } catch (err) {
3341
+ // We don't expect any of the above to throw, but better to be safe.
3342
+ return false;
3343
+ }
 
3344
  }
3345
 
3346
+ module.exports = shouldUseNative() ? Object.assign : function (target, source) {
3347
+ var from;
3348
+ var to = toObject(target);
3349
+ var symbols;
3350
 
3351
+ for (var s = 1; s < arguments.length; s++) {
3352
+ from = Object(arguments[s]);
 
 
 
 
 
 
 
 
 
 
3353
 
3354
+ for (var key in from) {
3355
+ if (hasOwnProperty.call(from, key)) {
3356
+ to[key] = from[key];
3357
+ }
3358
+ }
3359
+
3360
+ if (getOwnPropertySymbols) {
3361
+ symbols = getOwnPropertySymbols(from);
3362
+ for (var i = 0; i < symbols.length; i++) {
3363
+ if (propIsEnumerable.call(from, symbols[i])) {
3364
+ to[symbols[i]] = from[symbols[i]];
3365
+ }
3366
+ }
3367
+ }
3368
+ }
3369
+
3370
+ return to;
3371
+ };
3372
 
 
3373
 
3374
  /***/ }),
3375
 
3376
+ /***/ "./node_modules/outlayer/item.js":
3377
+ /*!***************************************!*\
3378
+ !*** ./node_modules/outlayer/item.js ***!
3379
+ \***************************************/
3380
  /*! no static exports found */
3381
  /***/ (function(module, exports, __webpack_require__) {
3382
 
3383
+ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
3384
+ * Outlayer Item
 
 
 
 
 
 
 
 
 
 
 
 
 
3385
  */
 
 
 
 
 
3386
 
3387
+ ( function( window, factory ) {
3388
+ // universal module definition
3389
+ /* jshint strict: false */ /* globals define, module, require */
3390
+ if ( true ) {
3391
+ // AMD - RequireJS
3392
+ !(__WEBPACK_AMD_DEFINE_ARRAY__ = [
3393
+ __webpack_require__(/*! ev-emitter/ev-emitter */ "./node_modules/ev-emitter/ev-emitter.js"),
3394
+ __webpack_require__(/*! get-size/get-size */ "./node_modules/get-size/get-size.js")
3395
+ ], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
3396
+ __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
3397
+ (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
3398
+ __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
3399
+ } else {}
3400
 
3401
+ }( window, function factory( EvEmitter, getSize ) {
3402
+ 'use strict';
3403
 
3404
+ // ----- helpers ----- //
 
 
 
 
 
3405
 
3406
+ function isEmptyObj( obj ) {
3407
+ for ( var prop in obj ) {
3408
+ return false;
3409
+ }
3410
+ prop = null;
3411
+ return true;
3412
+ }
3413
 
3414
+ // -------------------------- CSS3 support -------------------------- //
3415
 
 
 
 
 
 
 
 
 
3416
 
3417
+ var docElemStyle = document.documentElement.style;
3418
 
3419
+ var transitionProperty = typeof docElemStyle.transition == 'string' ?
3420
+ 'transition' : 'WebkitTransition';
3421
+ var transformProperty = typeof docElemStyle.transform == 'string' ?
3422
+ 'transform' : 'WebkitTransform';
 
 
 
3423
 
3424
+ var transitionEndEvent = {
3425
+ WebkitTransition: 'webkitTransitionEnd',
3426
+ transition: 'transitionend'
3427
+ }[ transitionProperty ];
3428
 
3429
+ // cache all vendor properties that could have vendor prefix
3430
+ var vendorProperties = {
3431
+ transform: transformProperty,
3432
+ transition: transitionProperty,
3433
+ transitionDuration: transitionProperty + 'Duration',
3434
+ transitionProperty: transitionProperty + 'Property',
3435
+ transitionDelay: transitionProperty + 'Delay'
3436
+ };
3437
 
3438
+ // -------------------------- Item -------------------------- //
 
 
 
 
 
3439
 
3440
+ function Item( element, layout ) {
3441
+ if ( !element ) {
3442
+ return;
3443
+ }
 
 
 
 
 
 
3444
 
3445
+ this.element = element;
3446
+ // parent layout class, i.e. Masonry, Isotope, or Packery
3447
+ this.layout = layout;
3448
+ this.position = {
3449
+ x: 0,
3450
+ y: 0
3451
+ };
3452
 
3453
+ this._create();
3454
+ }
3455
 
3456
+ // inherit EvEmitter
3457
+ var proto = Item.prototype = Object.create( EvEmitter.prototype );
3458
+ proto.constructor = Item;
3459
 
3460
+ proto._create = function() {
3461
+ // transition objects
3462
+ this._transn = {
3463
+ ingProperties: {},
3464
+ clean: {},
3465
+ onEnd: {}
 
3466
  };
 
3467
 
3468
+ this.css({
3469
+ position: 'absolute'
3470
+ });
3471
+ };
3472
 
3473
+ // trigger specified handler for event type
3474
+ proto.handleEvent = function( event ) {
3475
+ var method = 'on' + event.type;
3476
+ if ( this[ method ] ) {
3477
+ this[ method ]( event );
3478
+ }
3479
+ };
3480
 
3481
+ proto.getSize = function() {
3482
+ this.size = getSize( this.element );
3483
+ };
 
 
 
3484
 
 
3485
  /**
3486
+ * apply CSS styles to element
3487
+ * @param {Object} style
 
 
 
 
3488
  */
3489
+ proto.css = function( style ) {
3490
+ var elemStyle = this.element.style;
3491
 
3492
+ for ( var prop in style ) {
3493
+ // use vendor property if available
3494
+ var supportedProp = vendorProperties[ prop ] || prop;
3495
+ elemStyle[ supportedProp ] = style[ prop ];
3496
+ }
3497
+ };
3498
 
3499
+ // measure position, and sets it
3500
+ proto.getPosition = function() {
3501
+ var style = getComputedStyle( this.element );
3502
+ var isOriginLeft = this.layout._getOption('originLeft');
3503
+ var isOriginTop = this.layout._getOption('originTop');
3504
+ var xValue = style[ isOriginLeft ? 'left' : 'right' ];
3505
+ var yValue = style[ isOriginTop ? 'top' : 'bottom' ];
3506
+ var x = parseFloat( xValue );
3507
+ var y = parseFloat( yValue );
3508
+ // convert percent to pixels
3509
+ var layoutSize = this.layout.size;
3510
+ if ( xValue.indexOf('%') != -1 ) {
3511
+ x = ( x / 100 ) * layoutSize.width;
3512
+ }
3513
+ if ( yValue.indexOf('%') != -1 ) {
3514
+ y = ( y / 100 ) * layoutSize.height;
3515
+ }
3516
+ // clean up 'auto' or other non-integer values
3517
+ x = isNaN( x ) ? 0 : x;
3518
+ y = isNaN( y ) ? 0 : y;
3519
+ // remove padding from measurement
3520
+ x -= isOriginLeft ? layoutSize.paddingLeft : layoutSize.paddingRight;
3521
+ y -= isOriginTop ? layoutSize.paddingTop : layoutSize.paddingBottom;
3522
 
3523
+ this.position.x = x;
3524
+ this.position.y = y;
3525
+ };
 
 
 
 
3526
 
3527
+ // set settled position, apply padding
3528
+ proto.layoutPosition = function() {
3529
+ var layoutSize = this.layout.size;
3530
+ var style = {};
3531
+ var isOriginLeft = this.layout._getOption('originLeft');
3532
+ var isOriginTop = this.layout._getOption('originTop');
3533
 
3534
+ // x
3535
+ var xPadding = isOriginLeft ? 'paddingLeft' : 'paddingRight';
3536
+ var xProperty = isOriginLeft ? 'left' : 'right';
3537
+ var xResetProperty = isOriginLeft ? 'right' : 'left';
3538
 
3539
+ var x = this.position.x + layoutSize[ xPadding ];
3540
+ // set in percentage or pixels
3541
+ style[ xProperty ] = this.getXValue( x );
3542
+ // reset other property
3543
+ style[ xResetProperty ] = '';
 
3544
 
3545
+ // y
3546
+ var yPadding = isOriginTop ? 'paddingTop' : 'paddingBottom';
3547
+ var yProperty = isOriginTop ? 'top' : 'bottom';
3548
+ var yResetProperty = isOriginTop ? 'bottom' : 'top';
3549
 
3550
+ var y = this.position.y + layoutSize[ yPadding ];
3551
+ // set in percentage or pixels
3552
+ style[ yProperty ] = this.getYValue( y );
3553
+ // reset other property
3554
+ style[ yResetProperty ] = '';
3555
 
3556
+ this.css( style );
3557
+ this.emitEvent( 'layout', [ this ] );
3558
+ };
 
 
 
 
 
3559
 
3560
+ proto.getXValue = function( x ) {
3561
+ var isHorizontal = this.layout._getOption('horizontal');
3562
+ return this.layout.options.percentPosition && !isHorizontal ?
3563
+ ( ( x / this.layout.size.width ) * 100 ) + '%' : x + 'px';
3564
+ };
3565
 
3566
+ proto.getYValue = function( y ) {
3567
+ var isHorizontal = this.layout._getOption('horizontal');
3568
+ return this.layout.options.percentPosition && isHorizontal ?
3569
+ ( ( y / this.layout.size.height ) * 100 ) + '%' : y + 'px';
3570
+ };
3571
 
3572
+ proto._transitionTo = function( x, y ) {
3573
+ this.getPosition();
3574
+ // get current x & y from top/left
3575
+ var curX = this.position.x;
3576
+ var curY = this.position.y;
 
 
 
 
 
 
 
 
 
3577
 
3578
+ var didNotMove = x == this.position.x && y == this.position.y;
3579
 
3580
+ // save end position
3581
+ this.setPosition( x, y );
3582
 
3583
+ // if did not move and not transitioning, just go to layout
3584
+ if ( didNotMove && !this.isTransitioning ) {
3585
+ this.layoutPosition();
3586
+ return;
3587
+ }
 
3588
 
3589
+ var transX = x - curX;
3590
+ var transY = y - curY;
3591
+ var transitionStyle = {};
3592
+ transitionStyle.transform = this.getTranslate( transX, transY );
3593
+
3594
+ this.transition({
3595
+ to: transitionStyle,
3596
+ onTransitionEnd: {
3597
+ transform: this.layoutPosition
3598
+ },
3599
+ isCleaning: true
3600
+ });
3601
+ };
3602
+
3603
+ proto.getTranslate = function( x, y ) {
3604
+ // flip cooridinates if origin on right or bottom
3605
+ var isOriginLeft = this.layout._getOption('originLeft');
3606
+ var isOriginTop = this.layout._getOption('originTop');
3607
+ x = isOriginLeft ? x : -x;
3608
+ y = isOriginTop ? y : -y;
3609
+ return 'translate3d(' + x + 'px, ' + y + 'px, 0)';
3610
+ };
3611
 
3612
+ // non transition + transform support
3613
+ proto.goTo = function( x, y ) {
3614
+ this.setPosition( x, y );
3615
+ this.layoutPosition();
3616
+ };
3617
 
3618
+ proto.moveTo = proto._transitionTo;
3619
 
3620
+ proto.setPosition = function( x, y ) {
3621
+ this.position.x = parseFloat( x );
3622
+ this.position.y = parseFloat( y );
3623
+ };
3624
 
3625
+ // ----- transition ----- //
3626
 
3627
  /**
3628
+ * @param {Object} style - CSS
3629
+ * @param {Function} onTransitionEnd
3630
  */
3631
+
3632
+ // non transition, just trigger callback
3633
+ proto._nonTransition = function( args ) {
3634
+ this.css( args.to );
3635
+ if ( args.isCleaning ) {
3636
+ this._removeStyles( args.to );
 
 
 
 
3637
  }
3638
+ for ( var prop in args.onTransitionEnd ) {
3639
+ args.onTransitionEnd[ prop ].call( this );
3640
+ }
3641
+ };
3642
 
3643
  /**
3644
+ * proper transition
3645
+ * @param {Object} args - arguments
3646
+ * @param {Object} to - style to transition to
3647
+ * @param {Object} from - style to start transition from
3648
+ * @param {Boolean} isCleaning - removes transition styles after transition
3649
+ * @param {Function} onTransitionEnd - callback
3650
  */
3651
+ proto.transition = function( args ) {
3652
+ // redirect to nonTransition if no transition duration
3653
+ if ( !parseFloat( this.layout.options.transitionDuration ) ) {
3654
+ this._nonTransition( args );
3655
+ return;
3656
  }
3657
 
3658
+ var _transition = this._transn;
3659
+ // keep track of onTransitionEnd callback by css property
3660
+ for ( var prop in args.onTransitionEnd ) {
3661
+ _transition.onEnd[ prop ] = args.onTransitionEnd[ prop ];
3662
  }
3663
+ // keep track of properties that are transitioning
3664
+ for ( prop in args.to ) {
3665
+ _transition.ingProperties[ prop ] = true;
3666
+ // keep track of properties to clean up when transition is done
3667
+ if ( args.isCleaning ) {
3668
+ _transition.clean[ prop ] = true;
3669
+ }
3670
  }
3671
 
3672
+ // set from styles
3673
+ if ( args.from ) {
3674
+ this.css( args.from );
3675
+ // force redraw. http://blog.alexmaccaw.com/css-transitions
3676
+ var h = this.element.offsetHeight;
3677
+ // hack for JSHint to hush about unused var
3678
+ h = null;
3679
  }
3680
+ // enable transition
3681
+ this.enableTransition( args.to );
3682
+ // set styles that are transitioning
3683
+ this.css( args.to );
3684
 
3685
+ this.isTransitioning = true;
3686
+
3687
+ };
3688
+
3689
+ // dash before all cap letters, including first for
3690
+ // WebkitTransform => -webkit-transform
3691
+ function toDashedAll( str ) {
3692
+ return str.replace( /([A-Z])/g, function( $1 ) {
3693
+ return '-' + $1.toLowerCase();
3694
+ });
3695
  }
3696
 
3697
+ var transitionProps = 'opacity,' + toDashedAll( transformProperty );
3698
 
3699
+ proto.enableTransition = function(/* style */) {
3700
+ // HACK changing transitionProperty during a transition
3701
+ // will cause transition to jump
3702
+ if ( this.isTransitioning ) {
3703
+ return;
3704
+ }
3705
 
3706
+ // make `transition: foo, bar, baz` from style object
3707
+ // HACK un-comment this when enableTransition can work
3708
+ // while a transition is happening
3709
+ // var transitionValues = [];
3710
+ // for ( var prop in style ) {
3711
+ // // dash-ify camelCased properties like WebkitTransition
3712
+ // prop = vendorProperties[ prop ] || prop;
3713
+ // transitionValues.push( toDashedAll( prop ) );
3714
+ // }
3715
+ // munge number to millisecond, to match stagger
3716
+ var duration = this.layout.options.transitionDuration;
3717
+ duration = typeof duration == 'number' ? duration + 'ms' : duration;
3718
+ // enable transition styles
3719
+ this.css({
3720
+ transitionProperty: transitionProps,
3721
+ transitionDuration: duration,
3722
+ transitionDelay: this.staggerDelay || 0
3723
+ });
3724
+ // listen for transition end event
3725
+ this.element.addEventListener( transitionEndEvent, this, false );
3726
+ };
3727
 
3728
+ // ----- events ----- //
 
 
 
 
 
 
 
3729
 
3730
+ proto.onwebkitTransitionEnd = function( event ) {
3731
+ this.ontransitionend( event );
3732
+ };
3733
 
3734
+ proto.onotransitionend = function( event ) {
3735
+ this.ontransitionend( event );
3736
+ };
3737
 
3738
+ // properties that I munge to make my life easier
3739
+ var dashedVendorProperties = {
3740
+ '-webkit-transform': 'transform'
3741
+ };
3742
 
3743
+ proto.ontransitionend = function( event ) {
3744
+ // disregard bubbled events from children
3745
+ if ( event.target !== this.element ) {
3746
+ return;
3747
+ }
3748
+ var _transition = this._transn;
3749
+ // get property name of transitioned property, convert to prefix-free
3750
+ var propertyName = dashedVendorProperties[ event.propertyName ] || event.propertyName;
3751
 
3752
+ // remove property that has completed transitioning
3753
+ delete _transition.ingProperties[ propertyName ];
3754
+ // check if any properties are still transitioning
3755
+ if ( isEmptyObj( _transition.ingProperties ) ) {
3756
+ // all properties have completed transitioning
3757
+ this.disableTransition();
3758
+ }
3759
+ // clean style
3760
+ if ( propertyName in _transition.clean ) {
3761
+ // clean up style
3762
+ this.element.style[ event.propertyName ] = '';
3763
+ delete _transition.clean[ propertyName ];
3764
+ }
3765
+ // trigger onTransitionEnd callback
3766
+ if ( propertyName in _transition.onEnd ) {
3767
+ var onTransitionEnd = _transition.onEnd[ propertyName ];
3768
+ onTransitionEnd.call( this );
3769
+ delete _transition.onEnd[ propertyName ];
3770
+ }
3771
 
3772
+ this.emitEvent( 'transitionEnd', [ this ] );
3773
+ };
 
 
 
3774
 
3775
+ proto.disableTransition = function() {
3776
+ this.removeTransitionStyles();
3777
+ this.element.removeEventListener( transitionEndEvent, this, false );
3778
+ this.isTransitioning = false;
3779
+ };
 
 
 
 
 
 
 
 
 
3780
 
3781
+ /**
3782
+ * removes style property from element
3783
+ * @param {Object} style
3784
+ **/
3785
+ proto._removeStyles = function( style ) {
3786
+ // clean up transition styles
3787
+ var cleanStyle = {};
3788
+ for ( var prop in style ) {
3789
+ cleanStyle[ prop ] = '';
3790
+ }
3791
+ this.css( cleanStyle );
3792
+ };
3793
 
3794
+ var cleanTransitionStyle = {
3795
+ transitionProperty: '',
3796
+ transitionDuration: '',
3797
+ transitionDelay: ''
3798
+ };
3799
 
3800
+ proto.removeTransitionStyles = function() {
3801
+ // remove transition
3802
+ this.css( cleanTransitionStyle );
3803
+ };
3804
 
3805
+ // ----- stagger ----- //
 
 
 
3806
 
3807
+ proto.stagger = function( delay ) {
3808
+ delay = isNaN( delay ) ? 0 : delay;
3809
+ this.staggerDelay = delay + 'ms';
3810
+ };
3811
 
3812
+ // ----- show/hide/remove ----- //
3813
 
3814
+ // remove element from DOM
3815
+ proto.removeElem = function() {
3816
+ this.element.parentNode.removeChild( this.element );
3817
+ // remove display: none
3818
+ this.css({ display: '' });
3819
+ this.emitEvent( 'remove', [ this ] );
3820
+ };
 
 
 
 
 
 
 
 
 
 
3821
 
3822
+ proto.remove = function() {
3823
+ // just remove element if no transition support or no transition
3824
+ if ( !transitionProperty || !parseFloat( this.layout.options.transitionDuration ) ) {
3825
+ this.removeElem();
3826
+ return;
3827
+ }
 
 
 
3828
 
3829
+ // start transition
3830
+ this.once( 'transitionEnd', function() {
3831
+ this.removeElem();
3832
+ });
3833
+ this.hide();
3834
+ };
3835
 
3836
+ proto.reveal = function() {
3837
+ delete this.isHidden;
3838
+ // remove display: none
3839
+ this.css({ display: '' });
3840
 
3841
+ var options = this.layout.options;
3842
 
3843
+ var onTransitionEnd = {};
3844
+ var transitionEndProperty = this.getHideRevealTransitionEndProperty('visibleStyle');
3845
+ onTransitionEnd[ transitionEndProperty ] = this.onRevealTransitionEnd;
3846
 
3847
+ this.transition({
3848
+ from: options.hiddenStyle,
3849
+ to: options.visibleStyle,
3850
+ isCleaning: true,
3851
+ onTransitionEnd: onTransitionEnd
3852
+ });
3853
  };
3854
 
3855
+ proto.onRevealTransitionEnd = function() {
3856
+ // check if still visible
3857
+ // during transition, item may have been hidden
3858
+ if ( !this.isHidden ) {
3859
+ this.emitEvent('reveal');
3860
+ }
3861
  };
3862
 
3863
+ /**
3864
+ * get style property use for hide/reveal transition end
3865
+ * @param {String} styleProperty - hiddenStyle/visibleStyle
3866
+ * @returns {String}
3867
+ */
3868
+ proto.getHideRevealTransitionEndProperty = function( styleProperty ) {
3869
+ var optionStyle = this.layout.options[ styleProperty ];
3870
+ // use opacity
3871
+ if ( optionStyle.opacity ) {
3872
+ return 'opacity';
 
 
 
3873
  }
3874
+ // get first property
3875
+ for ( var prop in optionStyle ) {
3876
+ return prop;
 
 
3877
  }
 
 
 
3878
  };
3879
 
3880
+ proto.hide = function() {
3881
+ // set flag
3882
+ this.isHidden = true;
3883
+ // remove display: none
3884
+ this.css({ display: '' });
3885
 
3886
+ var options = this.layout.options;
 
 
 
 
 
3887
 
3888
+ var onTransitionEnd = {};
3889
+ var transitionEndProperty = this.getHideRevealTransitionEndProperty('hiddenStyle');
3890
+ onTransitionEnd[ transitionEndProperty ] = this.onHideTransitionEnd;
3891
 
3892
+ this.transition({
3893
+ from: options.visibleStyle,
3894
+ to: options.hiddenStyle,
3895
+ // keep hidden stuff hidden
3896
+ isCleaning: true,
3897
+ onTransitionEnd: onTransitionEnd
3898
+ });
3899
  };
3900
 
3901
+ proto.onHideTransitionEnd = function() {
3902
+ // check if still hidden
3903
+ // during transition, item may have been un-hidden
3904
+ if ( this.isHidden ) {
3905
+ this.css({ display: 'none' });
3906
+ this.emitEvent('hide');
3907
  }
 
3908
  };
3909
 
3910
+ proto.destroy = function() {
3911
+ this.css({
3912
+ position: '',
3913
+ left: '',
3914
+ right: '',
3915
+ top: '',
3916
+ bottom: '',
3917
+ transition: '',
3918
+ transform: ''
3919
+ });
3920
  };
3921
 
3922
+ return Item;
3923
 
3924
+ }));
 
 
 
3925
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3926
 
3927
+ /***/ }),
 
3928
 
3929
+ /***/ "./node_modules/outlayer/outlayer.js":
3930
+ /*!*******************************************!*\
3931
+ !*** ./node_modules/outlayer/outlayer.js ***!
3932
+ \*******************************************/
3933
+ /*! no static exports found */
3934
+ /***/ (function(module, exports, __webpack_require__) {
3935
 
3936
+ var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
3937
+ * Outlayer v2.1.1
3938
+ * the brains and guts of a layout library
3939
+ * MIT license
3940
+ */
3941
 
3942
+ ( function( window, factory ) {
3943
+ 'use strict';
3944
+ // universal module definition
3945
+ /* jshint strict: false */ /* globals define, module, require */
3946
+ if ( true ) {
3947
+ // AMD - RequireJS
3948
+ !(__WEBPACK_AMD_DEFINE_ARRAY__ = [
3949
+ __webpack_require__(/*! ev-emitter/ev-emitter */ "./node_modules/ev-emitter/ev-emitter.js"),
3950
+ __webpack_require__(/*! get-size/get-size */ "./node_modules/get-size/get-size.js"),
3951
+ __webpack_require__(/*! fizzy-ui-utils/utils */ "./node_modules/fizzy-ui-utils/utils.js"),
3952
+ __webpack_require__(/*! ./item */ "./node_modules/outlayer/item.js")
3953
+ ], __WEBPACK_AMD_DEFINE_RESULT__ = (function( EvEmitter, getSize, utils, Item ) {
3954
+ return factory( window, EvEmitter, getSize, utils, Item);
3955
+ }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
3956
+ __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
3957
+ } else {}
3958
 
3959
+ }( window, function factory( window, EvEmitter, getSize, utils, Item ) {
3960
+ 'use strict';
 
 
 
 
 
 
3961
 
3962
+ // ----- vars ----- //
3963
 
3964
+ var console = window.console;
3965
+ var jQuery = window.jQuery;
3966
+ var noop = function() {};
3967
+
3968
+ // -------------------------- Outlayer -------------------------- //
3969
+
3970
+ // globally unique identifiers
3971
+ var GUID = 0;
3972
+ // internal store of all Outlayer intances
3973
+ var instances = {};
3974
+
3975
+
3976
+ /**
3977
+ * @param {Element, String} element
3978
+ * @param {Object} options
3979
+ * @constructor
3980
+ */
3981
+ function Outlayer( element, options ) {
3982
+ var queryElement = utils.getQueryElement( element );
3983
+ if ( !queryElement ) {
3984
+ if ( console ) {
3985
+ console.error( 'Bad element for ' + this.constructor.namespace +
3986
+ ': ' + ( queryElement || element ) );
3987
+ }
3988
+ return;
3989
+ }
3990
+ this.element = queryElement;
3991
+ // add jQuery
3992
+ if ( jQuery ) {
3993
+ this.$element = jQuery( this.element );
3994
+ }
3995
+
3996
+ // options
3997
+ this.options = utils.extend( {}, this.constructor.defaults );
3998
+ this.option( options );
3999
+
4000
+ // add id for Outlayer.getFromElement
4001
+ var id = ++GUID;
4002
+ this.element.outlayerGUID = id; // expando
4003
+ instances[ id ] = this; // associate via id
4004
+
4005
+ // kick it off
4006
+ this._create();
4007
+
4008
+ var isInitLayout = this._getOption('initLayout');
4009
+ if ( isInitLayout ) {
4010
+ this.layout();
4011
+ }
4012
+ }
4013
+
4014
+ // settings are for internal use only
4015
+ Outlayer.namespace = 'outlayer';
4016
+ Outlayer.Item = Item;
4017
+
4018
+ // default options
4019
+ Outlayer.defaults = {
4020
+ containerStyle: {
4021
+ position: 'relative'
4022
+ },
4023
+ initLayout: true,
4024
+ originLeft: true,
4025
+ originTop: true,
4026
+ resize: true,
4027
+ resizeContainer: true,
4028
+ // item options
4029
+ transitionDuration: '0.4s',
4030
+ hiddenStyle: {
4031
+ opacity: 0,
4032
+ transform: 'scale(0.001)'
4033
+ },
4034
+ visibleStyle: {
4035
+ opacity: 1,
4036
+ transform: 'scale(1)'
4037
+ }
4038
+ };
4039
+
4040
+ var proto = Outlayer.prototype;
4041
+ // inherit EvEmitter
4042
+ utils.extend( proto, EvEmitter.prototype );
4043
+
4044
+ /**
4045
+ * set options
4046
+ * @param {Object} opts
4047
+ */
4048
+ proto.option = function( opts ) {
4049
+ utils.extend( this.options, opts );
4050
+ };
4051
+
4052
+ /**
4053
+ * get backwards compatible option value, check old name
4054
+ */
4055
+ proto._getOption = function( option ) {
4056
+ var oldOption = this.constructor.compatOptions[ option ];
4057
+ return oldOption && this.options[ oldOption ] !== undefined ?
4058
+ this.options[ oldOption ] : this.options[ option ];
4059
+ };
4060
+
4061
+ Outlayer.compatOptions = {
4062
+ // currentName: oldName
4063
+ initLayout: 'isInitLayout',
4064
+ horizontal: 'isHorizontal',
4065
+ layoutInstant: 'isLayoutInstant',
4066
+ originLeft: 'isOriginLeft',
4067
+ originTop: 'isOriginTop',
4068
+ resize: 'isResizeBound',
4069
+ resizeContainer: 'isResizingContainer'
4070
+ };
4071
+
4072
+ proto._create = function() {
4073
+ // get items from children
4074
+ this.reloadItems();
4075
+ // elements that affect layout, but are not laid out
4076
+ this.stamps = [];
4077
+ this.stamp( this.options.stamp );
4078
+ // set container style
4079
+ utils.extend( this.element.style, this.options.containerStyle );
4080
+
4081
+ // bind resize method
4082
+ var canBindResize = this._getOption('resize');
4083
+ if ( canBindResize ) {
4084
+ this.bindResize();
4085
+ }
4086
+ };
4087
+
4088
+ // goes through all children again and gets bricks in proper order
4089
+ proto.reloadItems = function() {
4090
+ // collection of item elements
4091
+ this.items = this._itemize( this.element.children );
4092
+ };
4093
+
4094
+
4095
+ /**
4096
+ * turn elements into Outlayer.Items to be used in layout
4097
+ * @param {Array or NodeList or HTMLElement} elems
4098
+ * @returns {Array} items - collection of new Outlayer Items
4099
+ */
4100
+ proto._itemize = function( elems ) {
4101
+
4102
+ var itemElems = this._filterFindItemElements( elems );
4103
+ var Item = this.constructor.Item;
4104
+
4105
+ // create new Outlayer Items for collection
4106
+ var items = [];
4107
+ for ( var i=0; i < itemElems.length; i++ ) {
4108
+ var elem = itemElems[i];
4109
+ var item = new Item( elem, this );
4110
+ items.push( item );
4111
+ }
4112
+
4113
+ return items;
4114
+ };
4115
+
4116
+ /**
4117
+ * get item elements to be used in layout
4118
+ * @param {Array or NodeList or HTMLElement} elems
4119
+ * @returns {Array} items - item elements
4120
+ */
4121
+ proto._filterFindItemElements = function( elems ) {
4122
+ return utils.filterFindElements( elems, this.options.itemSelector );
4123
+ };
4124
+
4125
+ /**
4126
+ * getter method for getting item elements
4127
+ * @returns {Array} elems - collection of item elements
4128
+ */
4129
+ proto.getItemElements = function() {
4130
+ return this.items.map( function( item ) {
4131
+ return item.element;
4132
+ });
4133
+ };
4134
+
4135
+ // ----- init & layout ----- //
4136
+
4137
+ /**
4138
+ * lays out all items
4139
+ */
4140
+ proto.layout = function() {
4141
+ this._resetLayout();
4142
+ this._manageStamps();
4143
+
4144
+ // don't animate first layout
4145
+ var layoutInstant = this._getOption('layoutInstant');
4146
+ var isInstant = layoutInstant !== undefined ?
4147
+ layoutInstant : !this._isLayoutInited;
4148
+ this.layoutItems( this.items, isInstant );
4149
+
4150
+ // flag for initalized
4151
+ this._isLayoutInited = true;
4152
+ };
4153
+
4154
+ // _init is alias for layout
4155
+ proto._init = proto.layout;
4156
+
4157
+ /**
4158
+ * logic before any new layout
4159
+ */
4160
+ proto._resetLayout = function() {
4161
+ this.getSize();
4162
+ };
4163
+
4164
+
4165
+ proto.getSize = function() {
4166
+ this.size = getSize( this.element );
4167
+ };
4168
+
4169
+ /**
4170
+ * get measurement from option, for columnWidth, rowHeight, gutter
4171
+ * if option is String -> get element from selector string, & get size of element
4172
+ * if option is Element -> get size of element
4173
+ * else use option as a number
4174
+ *
4175
+ * @param {String} measurement
4176
+ * @param {String} size - width or height
4177
+ * @private
4178
+ */
4179
+ proto._getMeasurement = function( measurement, size ) {
4180
+ var option = this.options[ measurement ];
4181
+ var elem;
4182
+ if ( !option ) {
4183
+ // default to 0
4184
+ this[ measurement ] = 0;
4185
  } else {
4186
+ // use option as an element
4187
+ if ( typeof option == 'string' ) {
4188
+ elem = this.element.querySelector( option );
4189
+ } else if ( option instanceof HTMLElement ) {
4190
+ elem = option;
4191
+ }
4192
+ // use size of element, if element
4193
+ this[ measurement ] = elem ? getSize( elem )[ size ] : option;
4194
+ }
4195
+ };
4196
+
4197
+ /**
4198
+ * layout a collection of item elements
4199
+ * @api public
4200
+ */
4201
+ proto.layoutItems = function( items, isInstant ) {
4202
+ items = this._getItemsForLayout( items );
4203
+
4204
+ this._layoutItems( items, isInstant );
4205
+
4206
+ this._postLayout();
4207
+ };
4208
+
4209
+ /**
4210
+ * get the items to be laid out
4211
+ * you may want to skip over some items
4212
+ * @param {Array} items
4213
+ * @returns {Array} items
4214
+ */
4215
+ proto._getItemsForLayout = function( items ) {
4216
+ return items.filter( function( item ) {
4217
+ return !item.isIgnored;
4218
+ });
4219
+ };
4220
+
4221
+ /**
4222
+ * layout items
4223
+ * @param {Array} items
4224
+ * @param {Boolean} isInstant
4225
+ */
4226
+ proto._layoutItems = function( items, isInstant ) {
4227
+ this._emitCompleteOnItems( 'layout', items );
4228
+
4229
+ if ( !items || !items.length ) {
4230
+ // no items, emit event with empty array
4231
+ return;
4232
+ }
4233
+
4234
+ var queue = [];
4235
+
4236
+ items.forEach( function( item ) {
4237
+ // get x/y object from method
4238
+ var position = this._getItemLayoutPosition( item );
4239
+ // enqueue
4240
+ position.item = item;
4241
+ position.isInstant = isInstant || item.isLayoutInstant;
4242
+ queue.push( position );
4243
+ }, this );
4244
+
4245
+ this._processLayoutQueue( queue );
4246
+ };
4247
+
4248
+ /**
4249
+ * get item layout position
4250
+ * @param {Outlayer.Item} item
4251
+ * @returns {Object} x and y position
4252
+ */
4253
+ proto._getItemLayoutPosition = function( /* item */ ) {
4254
+ return {
4255
+ x: 0,
4256
+ y: 0
4257
+ };
4258
+ };
4259
+
4260
+ /**
4261
+ * iterate over array and position each item
4262
+ * Reason being - separating this logic prevents 'layout invalidation'
4263
+ * thx @paul_irish
4264
+ * @param {Array} queue
4265
+ */
4266
+ proto._processLayoutQueue = function( queue ) {
4267
+ this.updateStagger();
4268
+ queue.forEach( function( obj, i ) {
4269
+ this._positionItem( obj.item, obj.x, obj.y, obj.isInstant, i );
4270
+ }, this );
4271
+ };
4272
+
4273
+ // set stagger from option in milliseconds number
4274
+ proto.updateStagger = function() {
4275
+ var stagger = this.options.stagger;
4276
+ if ( stagger === null || stagger === undefined ) {
4277
+ this.stagger = 0;
4278
+ return;
4279
+ }
4280
+ this.stagger = getMilliseconds( stagger );
4281
+ return this.stagger;
4282
+ };
4283
+
4284
+ /**
4285
+ * Sets position of item in DOM
4286
+ * @param {Outlayer.Item} item
4287
+ * @param {Number} x - horizontal position
4288
+ * @param {Number} y - vertical position
4289
+ * @param {Boolean} isInstant - disables transitions
4290
+ */
4291
+ proto._positionItem = function( item, x, y, isInstant, i ) {
4292
+ if ( isInstant ) {
4293
+ // if not transition, just set CSS
4294
+ item.goTo( x, y );
4295
+ } else {
4296
+ item.stagger( i * this.stagger );
4297
+ item.moveTo( x, y );
4298
+ }
4299
+ };
4300
+
4301
+ /**
4302
+ * Any logic you want to do after each layout,
4303
+ * i.e. size the container
4304
+ */
4305
+ proto._postLayout = function() {
4306
+ this.resizeContainer();
4307
+ };
4308
+
4309
+ proto.resizeContainer = function() {
4310
+ var isResizingContainer = this._getOption('resizeContainer');
4311
+ if ( !isResizingContainer ) {
4312
+ return;
4313
+ }
4314
+ var size = this._getContainerSize();
4315
+ if ( size ) {
4316
+ this._setContainerMeasure( size.width, true );
4317
+ this._setContainerMeasure( size.height, false );
4318
+ }
4319
+ };
4320
+
4321
+ /**
4322
+ * Sets width or height of container if returned
4323
+ * @returns {Object} size
4324
+ * @param {Number} width
4325
+ * @param {Number} height
4326
+ */
4327
+ proto._getContainerSize = noop;
4328
+
4329
+ /**
4330
+ * @param {Number} measure - size of width or height
4331
+ * @param {Boolean} isWidth
4332
+ */
4333
+ proto._setContainerMeasure = function( measure, isWidth ) {
4334
+ if ( measure === undefined ) {
4335
+ return;
4336
+ }
4337
+
4338
+ var elemSize = this.size;
4339
+ // add padding and border width if border box
4340
+ if ( elemSize.isBorderBox ) {
4341
+ measure += isWidth ? elemSize.paddingLeft + elemSize.paddingRight +
4342
+ elemSize.borderLeftWidth + elemSize.borderRightWidth :
4343
+ elemSize.paddingBottom + elemSize.paddingTop +
4344
+ elemSize.borderTopWidth + elemSize.borderBottomWidth;
4345
+ }
4346
+
4347
+ measure = Math.max( measure, 0 );
4348
+ this.element.style[ isWidth ? 'width' : 'height' ] = measure + 'px';
4349
+ };
4350
+
4351
+ /**
4352
+ * emit eventComplete on a collection of items events
4353
+ * @param {String} eventName
4354
+ * @param {Array} items - Outlayer.Items
4355
+ */
4356
+ proto._emitCompleteOnItems = function( eventName, items ) {
4357
+ var _this = this;
4358
+ function onComplete() {
4359
+ _this.dispatchEvent( eventName + 'Complete', null, [ items ] );
4360
+ }
4361
+
4362
+ var count = items.length;
4363
+ if ( !items || !count ) {
4364
+ onComplete();
4365
+ return;
4366
+ }
4367
+
4368
+ var doneCount = 0;
4369
+ function tick() {
4370
+ doneCount++;
4371
+ if ( doneCount == count ) {
4372
+ onComplete();
4373
+ }
4374
+ }
4375
+
4376
+ // bind callback
4377
+ items.forEach( function( item ) {
4378
+ item.once( eventName, tick );
4379
+ });
4380
+ };
4381
+
4382
+ /**
4383
+ * emits events via EvEmitter and jQuery events
4384
+ * @param {String} type - name of event
4385
+ * @param {Event} event - original event
4386
+ * @param {Array} args - extra arguments
4387
+ */
4388
+ proto.dispatchEvent = function( type, event, args ) {
4389
+ // add original event to arguments
4390
+ var emitArgs = event ? [ event ].concat( args ) : args;
4391
+ this.emitEvent( type, emitArgs );
4392
+
4393
+ if ( jQuery ) {
4394
+ // set this.$element
4395
+ this.$element = this.$element || jQuery( this.element );
4396
+ if ( event ) {
4397
+ // create jQuery event
4398
+ var $event = jQuery.Event( event );
4399
+ $event.type = type;
4400
+ this.$element.trigger( $event, args );
4401
+ } else {
4402
+ // just trigger with type if no event available
4403
+ this.$element.trigger( type, args );
4404
+ }
4405
+ }
4406
+ };
4407
+
4408
+ // -------------------------- ignore & stamps -------------------------- //
4409
+
4410
+
4411
+ /**
4412
+ * keep item in collection, but do not lay it out
4413
+ * ignored items do not get skipped in layout
4414
+ * @param {Element} elem
4415
+ */
4416
+ proto.ignore = function( elem ) {
4417
+ var item = this.getItem( elem );
4418
+ if ( item ) {
4419
+ item.isIgnored = true;
4420
+ }
4421
+ };
4422
+
4423
+ /**
4424
+ * return item to layout collection
4425
+ * @param {Element} elem
4426
+ */
4427
+ proto.unignore = function( elem ) {
4428
+ var item = this.getItem( elem );
4429
+ if ( item ) {
4430
+ delete item.isIgnored;
4431
+ }
4432
+ };
4433
+
4434
+ /**
4435
+ * adds elements to stamps
4436
+ * @param {NodeList, Array, Element, or String} elems
4437
+ */
4438
+ proto.stamp = function( elems ) {
4439
+ elems = this._find( elems );
4440
+ if ( !elems ) {
4441
+ return;
4442
+ }
4443
+
4444
+ this.stamps = this.stamps.concat( elems );
4445
+ // ignore
4446
+ elems.forEach( this.ignore, this );
4447
+ };
4448
+
4449
+ /**
4450
+ * removes elements to stamps
4451
+ * @param {NodeList, Array, or Element} elems
4452
+ */
4453
+ proto.unstamp = function( elems ) {
4454
+ elems = this._find( elems );
4455
+ if ( !elems ){
4456
+ return;
4457
+ }
4458
+
4459
+ elems.forEach( function( elem ) {
4460
+ // filter out removed stamp elements
4461
+ utils.removeFrom( this.stamps, elem );
4462
+ this.unignore( elem );
4463
+ }, this );
4464
+ };
4465
+
4466
+ /**
4467
+ * finds child elements
4468
+ * @param {NodeList, Array, Element, or String} elems
4469
+ * @returns {Array} elems
4470
+ */
4471
+ proto._find = function( elems ) {
4472
+ if ( !elems ) {
4473
+ return;
4474
+ }
4475
+ // if string, use argument as selector string
4476
+ if ( typeof elems == 'string' ) {
4477
+ elems = this.element.querySelectorAll( elems );
4478
+ }
4479
+ elems = utils.makeArray( elems );
4480
+ return elems;
4481
+ };
4482
+
4483
+ proto._manageStamps = function() {
4484
+ if ( !this.stamps || !this.stamps.length ) {
4485
+ return;
4486
+ }
4487
+
4488
+ this._getBoundingRect();
4489
+
4490
+ this.stamps.forEach( this._manageStamp, this );
4491
+ };
4492
+
4493
+ // update boundingLeft / Top
4494
+ proto._getBoundingRect = function() {
4495
+ // get bounding rect for container element
4496
+ var boundingRect = this.element.getBoundingClientRect();
4497
+ var size = this.size;
4498
+ this._boundingRect = {
4499
+ left: boundingRect.left + size.paddingLeft + size.borderLeftWidth,
4500
+ top: boundingRect.top + size.paddingTop + size.borderTopWidth,
4501
+ right: boundingRect.right - ( size.paddingRight + size.borderRightWidth ),
4502
+ bottom: boundingRect.bottom - ( size.paddingBottom + size.borderBottomWidth )
4503
+ };
4504
+ };
4505
+
4506
+ /**
4507
+ * @param {Element} stamp
4508
+ **/
4509
+ proto._manageStamp = noop;
4510
+
4511
+ /**
4512
+ * get x/y position of element relative to container element
4513
+ * @param {Element} elem
4514
+ * @returns {Object} offset - has left, top, right, bottom
4515
+ */
4516
+ proto._getElementOffset = function( elem ) {
4517
+ var boundingRect = elem.getBoundingClientRect();
4518
+ var thisRect = this._boundingRect;
4519
+ var size = getSize( elem );
4520
+ var offset = {
4521
+ left: boundingRect.left - thisRect.left - size.marginLeft,
4522
+ top: boundingRect.top - thisRect.top - size.marginTop,
4523
+ right: thisRect.right - boundingRect.right - size.marginRight,
4524
+ bottom: thisRect.bottom - boundingRect.bottom - size.marginBottom
4525
+ };
4526
+ return offset;
4527
+ };
4528
+
4529
+ // -------------------------- resize -------------------------- //
4530
+
4531
+ // enable event handlers for listeners
4532
+ // i.e. resize -> onresize
4533
+ proto.handleEvent = utils.handleEvent;
4534
+
4535
+ /**
4536
+ * Bind layout to window resizing
4537
+ */
4538
+ proto.bindResize = function() {
4539
+ window.addEventListener( 'resize', this );
4540
+ this.isResizeBound = true;
4541
+ };
4542
+
4543
+ /**
4544
+ * Unbind layout to window resizing
4545
+ */
4546
+ proto.unbindResize = function() {
4547
+ window.removeEventListener( 'resize', this );
4548
+ this.isResizeBound = false;
4549
+ };
4550
+
4551
+ proto.onresize = function() {
4552
+ this.resize();
4553
+ };
4554
+
4555
+ utils.debounceMethod( Outlayer, 'onresize', 100 );
4556
+
4557
+ proto.resize = function() {
4558
+ // don't trigger if size did not change
4559
+ // or if resize was unbound. See #9
4560
+ if ( !this.isResizeBound || !this.needsResizeLayout() ) {
4561
+ return;
4562
+ }
4563
+
4564
+ this.layout();
4565
+ };
4566
+
4567
+ /**
4568
+ * check if layout is needed post layout
4569
+ * @returns Boolean
4570
+ */
4571
+ proto.needsResizeLayout = function() {
4572
+ var size = getSize( this.element );
4573
+ // check that this.size and size are there
4574
+ // IE8 triggers resize on body size change, so they might not be
4575
+ var hasSizes = this.size && size;
4576
+ return hasSizes && size.innerWidth !== this.size.innerWidth;
4577
+ };
4578
+
4579
+ // -------------------------- methods -------------------------- //
4580
+
4581
+ /**
4582
+ * add items to Outlayer instance
4583
+ * @param {Array or NodeList or Element} elems
4584
+ * @returns {Array} items - Outlayer.Items
4585
+ **/
4586
+ proto.addItems = function( elems ) {
4587
+ var items = this._itemize( elems );
4588
+ // add items to collection
4589
+ if ( items.length ) {
4590
+ this.items = this.items.concat( items );
4591
+ }
4592
+ return items;
4593
+ };
4594
+
4595
+ /**
4596
+ * Layout newly-appended item elements
4597
+ * @param {Array or NodeList or Element} elems
4598
+ */
4599
+ proto.appended = function( elems ) {
4600
+ var items = this.addItems( elems );
4601
+ if ( !items.length ) {
4602
+ return;
4603
+ }
4604
+ // layout and reveal just the new items
4605
+ this.layoutItems( items, true );
4606
+ this.reveal( items );
4607
+ };
4608
+
4609
+ /**
4610
+ * Layout prepended elements
4611
+ * @param {Array or NodeList or Element} elems
4612
+ */
4613
+ proto.prepended = function( elems ) {
4614
+ var items = this._itemize( elems );
4615
+ if ( !items.length ) {
4616
+ return;
4617
+ }
4618
+ // add items to beginning of collection
4619
+ var previousItems = this.items.slice(0);
4620
+ this.items = items.concat( previousItems );
4621
+ // start new layout
4622
+ this._resetLayout();
4623
+ this._manageStamps();
4624
+ // layout new stuff without transition
4625
+ this.layoutItems( items, true );
4626
+ this.reveal( items );
4627
+ // layout previous items
4628
+ this.layoutItems( previousItems );
4629
+ };
4630
+
4631
+ /**
4632
+ * reveal a collection of items
4633
+ * @param {Array of Outlayer.Items} items
4634
+ */
4635
+ proto.reveal = function( items ) {
4636
+ this._emitCompleteOnItems( 'reveal', items );
4637
+ if ( !items || !items.length ) {
4638
+ return;
4639
+ }
4640
+ var stagger = this.updateStagger();
4641
+ items.forEach( function( item, i ) {
4642
+ item.stagger( i * stagger );
4643
+ item.reveal();
4644
+ });
4645
+ };
4646
+
4647
+ /**
4648
+ * hide a collection of items
4649
+ * @param {Array of Outlayer.Items} items
4650
+ */
4651
+ proto.hide = function( items ) {
4652
+ this._emitCompleteOnItems( 'hide', items );
4653
+ if ( !items || !items.length ) {
4654
+ return;
4655
+ }
4656
+ var stagger = this.updateStagger();
4657
+ items.forEach( function( item, i ) {
4658
+ item.stagger( i * stagger );
4659
+ item.hide();
4660
+ });
4661
+ };
4662
+
4663
+ /**
4664
+ * reveal item elements
4665
+ * @param {Array}, {Element}, {NodeList} items
4666
+ */
4667
+ proto.revealItemElements = function( elems ) {
4668
+ var items = this.getItems( elems );
4669
+ this.reveal( items );
4670
+ };
4671
+
4672
+ /**
4673
+ * hide item elements
4674
+ * @param {Array}, {Element}, {NodeList} items
4675
+ */
4676
+ proto.hideItemElements = function( elems ) {
4677
+ var items = this.getItems( elems );
4678
+ this.hide( items );
4679
+ };
4680
+
4681
+ /**
4682
+ * get Outlayer.Item, given an Element
4683
+ * @param {Element} elem
4684
+ * @param {Function} callback
4685
+ * @returns {Outlayer.Item} item
4686
+ */
4687
+ proto.getItem = function( elem ) {
4688
+ // loop through items to get the one that matches
4689
+ for ( var i=0; i < this.items.length; i++ ) {
4690
+ var item = this.items[i];
4691
+ if ( item.element == elem ) {
4692
+ // return item
4693
+ return item;
4694
+ }
4695
+ }
4696
+ };
4697
+
4698
+ /**
4699
+ * get collection of Outlayer.Items, given Elements
4700
+ * @param {Array} elems
4701
+ * @returns {Array} items - Outlayer.Items
4702
+ */
4703
+ proto.getItems = function( elems ) {
4704
+ elems = utils.makeArray( elems );
4705
+ var items = [];
4706
+ elems.forEach( function( elem ) {
4707
+ var item = this.getItem( elem );
4708
+ if ( item ) {
4709
+ items.push( item );
4710
+ }
4711
+ }, this );
4712
+
4713
+ return items;
4714
+ };
4715
+
4716
+ /**
4717
+ * remove element(s) from instance and DOM
4718
+ * @param {Array or NodeList or Element} elems
4719
+ */
4720
+ proto.remove = function( elems ) {
4721
+ var removeItems = this.getItems( elems );
4722
+
4723
+ this._emitCompleteOnItems( 'remove', removeItems );
4724
+
4725
+ // bail if no items to remove
4726
+ if ( !removeItems || !removeItems.length ) {
4727
+ return;
4728
+ }
4729
+
4730
+ removeItems.forEach( function( item ) {
4731
+ item.remove();
4732
+ // remove item from collection
4733
+ utils.removeFrom( this.items, item );
4734
+ }, this );
4735
+ };
4736
+
4737
+ // ----- destroy ----- //
4738
+
4739
+ // remove and disable Outlayer instance
4740
+ proto.destroy = function() {
4741
+ // clean up dynamic styles
4742
+ var style = this.element.style;
4743
+ style.height = '';
4744
+ style.position = '';
4745
+ style.width = '';
4746
+ // destroy items
4747
+ this.items.forEach( function( item ) {
4748
+ item.destroy();
4749
+ });
4750
+
4751
+ this.unbindResize();
4752
+
4753
+ var id = this.element.outlayerGUID;
4754
+ delete instances[ id ]; // remove reference to instance by id
4755
+ delete this.element.outlayerGUID;
4756
+ // remove data for jQuery
4757
+ if ( jQuery ) {
4758
+ jQuery.removeData( this.element, this.constructor.namespace );
4759
+ }
4760
+
4761
+ };
4762
+
4763
+ // -------------------------- data -------------------------- //
4764
+
4765
+ /**
4766
+ * get Outlayer instance from element
4767
+ * @param {Element} elem
4768
+ * @returns {Outlayer}
4769
+ */
4770
+ Outlayer.data = function( elem ) {
4771
+ elem = utils.getQueryElement( elem );
4772
+ var id = elem && elem.outlayerGUID;
4773
+ return id && instances[ id ];
4774
+ };
4775
+
4776
+
4777
+ // -------------------------- create Outlayer class -------------------------- //
4778
+
4779
+ /**
4780
+ * create a layout class
4781
+ * @param {String} namespace
4782
+ */
4783
+ Outlayer.create = function( namespace, options ) {
4784
+ // sub-class Outlayer
4785
+ var Layout = subclass( Outlayer );
4786
+ // apply new options and compatOptions
4787
+ Layout.defaults = utils.extend( {}, Outlayer.defaults );
4788
+ utils.extend( Layout.defaults, options );
4789
+ Layout.compatOptions = utils.extend( {}, Outlayer.compatOptions );
4790
+
4791
+ Layout.namespace = namespace;
4792
+
4793
+ Layout.data = Outlayer.data;
4794
+
4795
+ // sub-class Item
4796
+ Layout.Item = subclass( Item );
4797
+
4798
+ // -------------------------- declarative -------------------------- //
4799
+
4800
+ utils.htmlInit( Layout, namespace );
4801
+
4802
+ // -------------------------- jQuery bridge -------------------------- //
4803
+
4804
+ // make into jQuery plugin
4805
+ if ( jQuery && jQuery.bridget ) {
4806
+ jQuery.bridget( namespace, Layout );
4807
+ }
4808
+
4809
+ return Layout;
4810
+ };
4811
+
4812
+ function subclass( Parent ) {
4813
+ function SubClass() {
4814
+ Parent.apply( this, arguments );
4815
+ }
4816
+
4817
+ SubClass.prototype = Object.create( Parent.prototype );
4818
+ SubClass.prototype.constructor = SubClass;
4819
+
4820
+ return SubClass;
4821
+ }
4822
+
4823
+ // ----- helpers ----- //
4824
+
4825
+ // how many milliseconds are in each unit
4826
+ var msUnits = {
4827
+ ms: 1,
4828
+ s: 1000
4829
+ };
4830
+
4831
+ // munge time-like parameter into millisecond number
4832
+ // '0.4s' -> 40
4833
+ function getMilliseconds( time ) {
4834
+ if ( typeof time == 'number' ) {
4835
+ return time;
4836
+ }
4837
+ var matches = time.match( /(^\d*\.?\d*)(\w*)/ );
4838
+ var num = matches && matches[1];
4839
+ var unit = matches && matches[2];
4840
+ if ( !num.length ) {
4841
+ return 0;
4842
+ }
4843
+ num = parseFloat( num );
4844
+ var mult = msUnits[ unit ] || 1;
4845
+ return num * mult;
4846
+ }
4847
+
4848
+ // ----- fin ----- //
4849
+
4850
+ // back in global
4851
+ Outlayer.Item = Item;
4852
+
4853
+ return Outlayer;
4854
+
4855
+ }));
4856
+
4857
+
4858
+ /***/ }),
4859
+
4860
+ /***/ "./node_modules/process/browser.js":
4861
+ /*!*****************************************!*\
4862
+ !*** ./node_modules/process/browser.js ***!
4863
+ \*****************************************/
4864
+ /*! no static exports found */
4865
+ /***/ (function(module, exports) {
4866
+
4867
+ // shim for using process in browser
4868
+ var process = module.exports = {};
4869
+
4870
+ // cached from whatever global is present so that test runners that stub it
4871
+ // don't break things. But we need to wrap it in a try catch in case it is
4872
+ // wrapped in strict mode code which doesn't define any globals. It's inside a
4873
+ // function because try/catches deoptimize in certain engines.
4874
+
4875
+ var cachedSetTimeout;
4876
+ var cachedClearTimeout;
4877
+
4878
+ function defaultSetTimout() {
4879
+ throw new Error('setTimeout has not been defined');
4880
+ }
4881
+ function defaultClearTimeout () {
4882
+ throw new Error('clearTimeout has not been defined');
4883
+ }
4884
+ (function () {
4885
+ try {
4886
+ if (typeof setTimeout === 'function') {
4887
+ cachedSetTimeout = setTimeout;
4888
+ } else {
4889
+ cachedSetTimeout = defaultSetTimout;
4890
+ }
4891
+ } catch (e) {
4892
+ cachedSetTimeout = defaultSetTimout;
4893
+ }
4894
+ try {
4895
+ if (typeof clearTimeout === 'function') {
4896
+ cachedClearTimeout = clearTimeout;
4897
+ } else {
4898
+ cachedClearTimeout = defaultClearTimeout;
4899
+ }
4900
+ } catch (e) {
4901
+ cachedClearTimeout = defaultClearTimeout;
4902
+ }
4903
+ } ())
4904
+ function runTimeout(fun) {
4905
+ if (cachedSetTimeout === setTimeout) {
4906
+ //normal enviroments in sane situations
4907
+ return setTimeout(fun, 0);
4908
+ }
4909
+ // if setTimeout wasn't available but was latter defined
4910
+ if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
4911
+ cachedSetTimeout = setTimeout;
4912
+ return setTimeout(fun, 0);
4913
+ }
4914
+ try {
4915
+ // when when somebody has screwed with setTimeout but no I.E. maddness
4916
+ return cachedSetTimeout(fun, 0);
4917
+ } catch(e){
4918
+ try {
4919
+ // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
4920
+ return cachedSetTimeout.call(null, fun, 0);
4921
+ } catch(e){
4922
+ // 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
4923
+ return cachedSetTimeout.call(this, fun, 0);
4924
+ }
4925
+ }
4926
+
4927
+
4928
+ }
4929
+ function runClearTimeout(marker) {
4930
+ if (cachedClearTimeout === clearTimeout) {
4931
+ //normal enviroments in sane situations
4932
+ return clearTimeout(marker);
4933
+ }
4934
+ // if clearTimeout wasn't available but was latter defined
4935
+ if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
4936
+ cachedClearTimeout = clearTimeout;
4937
+ return clearTimeout(marker);
4938
+ }
4939
+ try {
4940
+ // when when somebody has screwed with setTimeout but no I.E. maddness
4941
+ return cachedClearTimeout(marker);
4942
+ } catch (e){
4943
+ try {
4944
+ // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
4945
+ return cachedClearTimeout.call(null, marker);
4946
+ } catch (e){
4947
+ // 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.
4948
+ // Some versions of I.E. have different rules for clearTimeout vs setTimeout
4949
+ return cachedClearTimeout.call(this, marker);
4950
+ }
4951
+ }
4952
+
4953
+
4954
+
4955
+ }
4956
+ var queue = [];
4957
+ var draining = false;
4958
+ var currentQueue;
4959
+ var queueIndex = -1;
4960
+
4961
+ function cleanUpNextTick() {
4962
+ if (!draining || !currentQueue) {
4963
+ return;
4964
+ }
4965
+ draining = false;
4966
+ if (currentQueue.length) {
4967
+ queue = currentQueue.concat(queue);
4968
+ } else {
4969
+ queueIndex = -1;
4970
+ }
4971
+ if (queue.length) {
4972
+ drainQueue();
4973
+ }
4974
+ }
4975
+
4976
+ function drainQueue() {
4977
+ if (draining) {
4978
+ return;
4979
+ }
4980
+ var timeout = runTimeout(cleanUpNextTick);
4981
+ draining = true;
4982
+
4983
+ var len = queue.length;
4984
+ while(len) {
4985
+ currentQueue = queue;
4986
+ queue = [];
4987
+ while (++queueIndex < len) {
4988
+ if (currentQueue) {
4989
+ currentQueue[queueIndex].run();
4990
+ }
4991
+ }
4992
+ queueIndex = -1;
4993
+ len = queue.length;
4994
+ }
4995
+ currentQueue = null;
4996
+ draining = false;
4997
+ runClearTimeout(timeout);
4998
+ }
4999
+
5000
+ process.nextTick = function (fun) {
5001
+ var args = new Array(arguments.length - 1);
5002
+ if (arguments.length > 1) {
5003
+ for (var i = 1; i < arguments.length; i++) {
5004
+ args[i - 1] = arguments[i];
5005
+ }
5006
+ }
5007
+ queue.push(new Item(fun, args));
5008
+ if (queue.length === 1 && !draining) {
5009
+ runTimeout(drainQueue);
5010
+ }
5011
+ };
5012
+
5013
+ // v8 likes predictible objects
5014
+ function Item(fun, array) {
5015
+ this.fun = fun;
5016
+ this.array = array;
5017
+ }
5018
+ Item.prototype.run = function () {
5019
+ this.fun.apply(null, this.array);
5020
+ };
5021
+ process.title = 'browser';
5022
+ process.browser = true;
5023
+ process.env = {};
5024
+ process.argv = [];
5025
+ process.version = ''; // empty string to avoid regexp issues
5026
+ process.versions = {};
5027
+
5028
+ function noop() {}
5029
+
5030
+ process.on = noop;
5031
+ process.addListener = noop;
5032
+ process.once = noop;
5033
+ process.off = noop;
5034
+ process.removeListener = noop;
5035
+ process.removeAllListeners = noop;
5036
+ process.emit = noop;
5037
+ process.prependListener = noop;
5038
+ process.prependOnceListener = noop;
5039
+
5040
+ process.listeners = function (name) { return [] }
5041
+
5042
+ process.binding = function (name) {
5043
+ throw new Error('process.binding is not supported');
5044
+ };
5045
+
5046
+ process.cwd = function () { return '/' };
5047
+ process.chdir = function (dir) {
5048
+ throw new Error('process.chdir is not supported');
5049
+ };
5050
+ process.umask = function() { return 0; };
5051
+
5052
+
5053
+ /***/ }),
5054
+
5055
+ /***/ "./node_modules/react-dom/cjs/react-dom-server.browser.development.js":
5056
+ /*!****************************************************************************!*\
5057
+ !*** ./node_modules/react-dom/cjs/react-dom-server.browser.development.js ***!
5058
+ \****************************************************************************/
5059
+ /*! no static exports found */
5060
+ /***/ (function(module, exports, __webpack_require__) {
5061
+
5062
+ "use strict";
5063
+ /** @license React v17.0.2
5064
+ * react-dom-server.browser.development.js
5065
+ *
5066
+ * Copyright (c) Facebook, Inc. and its affiliates.
5067
+ *
5068
+ * This source code is licensed under the MIT license found in the
5069
+ * LICENSE file in the root directory of this source tree.
5070
+ */
5071
+
5072
+
5073
+
5074
+ if (true) {
5075
+ (function() {
5076
+ 'use strict';
5077
+
5078
+ var React = __webpack_require__(/*! react */ "./node_modules/react/index.js");
5079
+ var _assign = __webpack_require__(/*! object-assign */ "./node_modules/object-assign/index.js");
5080
+
5081
+ // Do not require this module directly! Use normal `invariant` calls with
5082
+ // template literal strings. The messages will be replaced with error codes
5083
+ // during build.
5084
+ function formatProdErrorMessage(code) {
5085
+ var url = 'https://reactjs.org/docs/error-decoder.html?invariant=' + code;
5086
+
5087
+ for (var i = 1; i < arguments.length; i++) {
5088
+ url += '&args[]=' + encodeURIComponent(arguments[i]);
5089
+ }
5090
+
5091
+ return "Minified React error #" + code + "; visit " + url + " for the full message or " + 'use the non-minified dev environment for full errors and additional ' + 'helpful warnings.';
5092
+ }
5093
+
5094
+ // TODO: this is special because it gets imported during build.
5095
+ var ReactVersion = '17.0.2';
5096
+
5097
+ var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
5098
+
5099
+ // by calls to these methods by a Babel plugin.
5100
+ //
5101
+ // In PROD (or in packages without access to React internals),
5102
+ // they are left as they are instead.
5103
+
5104
+ function warn(format) {
5105
+ {
5106
+ for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
5107
+ args[_key - 1] = arguments[_key];
5108
+ }
5109
+
5110
+ printWarning('warn', format, args);
5111
+ }
5112
+ }
5113
+ function error(format) {
5114
+ {
5115
+ for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
5116
+ args[_key2 - 1] = arguments[_key2];
5117
+ }
5118
+
5119
+ printWarning('error', format, args);
5120
+ }
5121
+ }
5122
+
5123
+ function printWarning(level, format, args) {
5124
+ // When changing this logic, you might want to also
5125
+ // update consoleWithStackDev.www.js as well.
5126
+ {
5127
+ var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
5128
+ var stack = ReactDebugCurrentFrame.getStackAddendum();
5129
+
5130
+ if (stack !== '') {
5131
+ format += '%s';
5132
+ args = args.concat([stack]);
5133
+ }
5134
+
5135
+ var argsWithFormat = args.map(function (item) {
5136
+ return '' + item;
5137
+ }); // Careful: RN currently depends on this prefix
5138
+
5139
+ argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it
5140
+ // breaks IE9: https://github.com/facebook/react/issues/13610
5141
+ // eslint-disable-next-line react-internal/no-production-logging
5142
+
5143
+ Function.prototype.apply.call(console[level], console, argsWithFormat);
5144
+ }
5145
+ }
5146
+
5147
+ // ATTENTION
5148
+ // When adding new symbols to this file,
5149
+ // Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'
5150
+ // The Symbol used to tag the ReactElement-like types. If there is no native Symbol
5151
+ // nor polyfill, then a plain number is used for performance.
5152
+ var REACT_ELEMENT_TYPE = 0xeac7;
5153
+ var REACT_PORTAL_TYPE = 0xeaca;
5154
+ var REACT_FRAGMENT_TYPE = 0xeacb;
5155
+ var REACT_STRICT_MODE_TYPE = 0xeacc;
5156
+ var REACT_PROFILER_TYPE = 0xead2;
5157
+ var REACT_PROVIDER_TYPE = 0xeacd;
5158
+ var REACT_CONTEXT_TYPE = 0xeace;
5159
+ var REACT_FORWARD_REF_TYPE = 0xead0;
5160
+ var REACT_SUSPENSE_TYPE = 0xead1;
5161
+ var REACT_SUSPENSE_LIST_TYPE = 0xead8;
5162
+ var REACT_MEMO_TYPE = 0xead3;
5163
+ var REACT_LAZY_TYPE = 0xead4;
5164
+ var REACT_BLOCK_TYPE = 0xead9;
5165
+ var REACT_SERVER_BLOCK_TYPE = 0xeada;
5166
+ var REACT_FUNDAMENTAL_TYPE = 0xead5;
5167
+ var REACT_SCOPE_TYPE = 0xead7;
5168
+ var REACT_OPAQUE_ID_TYPE = 0xeae0;
5169
+ var REACT_DEBUG_TRACING_MODE_TYPE = 0xeae1;
5170
+ var REACT_OFFSCREEN_TYPE = 0xeae2;
5171
+ var REACT_LEGACY_HIDDEN_TYPE = 0xeae3;
5172
+
5173
+ if (typeof Symbol === 'function' && Symbol.for) {
5174
+ var symbolFor = Symbol.for;
5175
+ REACT_ELEMENT_TYPE = symbolFor('react.element');
5176
+ REACT_PORTAL_TYPE = symbolFor('react.portal');
5177
+ REACT_FRAGMENT_TYPE = symbolFor('react.fragment');
5178
+ REACT_STRICT_MODE_TYPE = symbolFor('react.strict_mode');
5179
+ REACT_PROFILER_TYPE = symbolFor('react.profiler');
5180
+ REACT_PROVIDER_TYPE = symbolFor('react.provider');
5181
+ REACT_CONTEXT_TYPE = symbolFor('react.context');
5182
+ REACT_FORWARD_REF_TYPE = symbolFor('react.forward_ref');
5183
+ REACT_SUSPENSE_TYPE = symbolFor('react.suspense');
5184
+ REACT_SUSPENSE_LIST_TYPE = symbolFor('react.suspense_list');
5185
+ REACT_MEMO_TYPE = symbolFor('react.memo');
5186
+ REACT_LAZY_TYPE = symbolFor('react.lazy');
5187
+ REACT_BLOCK_TYPE = symbolFor('react.block');
5188
+ REACT_SERVER_BLOCK_TYPE = symbolFor('react.server.block');
5189
+ REACT_FUNDAMENTAL_TYPE = symbolFor('react.fundamental');
5190
+ REACT_SCOPE_TYPE = symbolFor('react.scope');
5191
+ REACT_OPAQUE_ID_TYPE = symbolFor('react.opaque.id');
5192
+ REACT_DEBUG_TRACING_MODE_TYPE = symbolFor('react.debug_trace_mode');
5193
+ REACT_OFFSCREEN_TYPE = symbolFor('react.offscreen');
5194
+ REACT_LEGACY_HIDDEN_TYPE = symbolFor('react.legacy_hidden');
5195
+ }
5196
+
5197
+ function getWrappedName(outerType, innerType, wrapperName) {
5198
+ var functionName = innerType.displayName || innerType.name || '';
5199
+ return outerType.displayName || (functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName);
5200
+ }
5201
+
5202
+ function getContextName(type) {
5203
+ return type.displayName || 'Context';
5204
+ }
5205
+
5206
+ function getComponentName(type) {
5207
+ if (type == null) {
5208
+ // Host root, text node or just invalid type.
5209
+ return null;
5210
+ }
5211
+
5212
+ {
5213
+ if (typeof type.tag === 'number') {
5214
+ error('Received an unexpected object in getComponentName(). ' + 'This is likely a bug in React. Please file an issue.');
5215
+ }
5216
+ }
5217
+
5218
+ if (typeof type === 'function') {
5219
+ return type.displayName || type.name || null;
5220
+ }
5221
+
5222
+ if (typeof type === 'string') {
5223
+ return type;
5224
+ }
5225
+
5226
+ switch (type) {
5227
+ case REACT_FRAGMENT_TYPE:
5228
+ return 'Fragment';
5229
+
5230
+ case REACT_PORTAL_TYPE:
5231
+ return 'Portal';
5232
+
5233
+ case REACT_PROFILER_TYPE:
5234
+ return 'Profiler';
5235
+
5236
+ case REACT_STRICT_MODE_TYPE:
5237
+ return 'StrictMode';
5238
+
5239
+ case REACT_SUSPENSE_TYPE:
5240
+ return 'Suspense';
5241
+
5242
+ case REACT_SUSPENSE_LIST_TYPE:
5243
+ return 'SuspenseList';
5244
+ }
5245
+
5246
+ if (typeof type === 'object') {
5247
+ switch (type.$$typeof) {
5248
+ case REACT_CONTEXT_TYPE:
5249
+ var context = type;
5250
+ return getContextName(context) + '.Consumer';
5251
+
5252
+ case REACT_PROVIDER_TYPE:
5253
+ var provider = type;
5254
+ return getContextName(provider._context) + '.Provider';
5255
+
5256
+ case REACT_FORWARD_REF_TYPE:
5257
+ return getWrappedName(type, type.render, 'ForwardRef');
5258
+
5259
+ case REACT_MEMO_TYPE:
5260
+ return getComponentName(type.type);
5261
+
5262
+ case REACT_BLOCK_TYPE:
5263
+ return getComponentName(type._render);
5264
+
5265
+ case REACT_LAZY_TYPE:
5266
+ {
5267
+ var lazyComponent = type;
5268
+ var payload = lazyComponent._payload;
5269
+ var init = lazyComponent._init;
5270
+
5271
+ try {
5272
+ return getComponentName(init(payload));
5273
+ } catch (x) {
5274
+ return null;
5275
+ }
5276
+ }
5277
+ }
5278
+ }
5279
+
5280
+ return null;
5281
+ }
5282
+
5283
+ // Filter certain DOM attributes (e.g. src, href) if their values are empty strings.
5284
+
5285
+ var enableSuspenseServerRenderer = false;
5286
+
5287
+ // Helpers to patch console.logs to avoid logging during side-effect free
5288
+ // replaying on render function. This currently only patches the object
5289
+ // lazily which won't cover if the log function was extracted eagerly.
5290
+ // We could also eagerly patch the method.
5291
+ var disabledDepth = 0;
5292
+ var prevLog;
5293
+ var prevInfo;
5294
+ var prevWarn;
5295
+ var prevError;
5296
+ var prevGroup;
5297
+ var prevGroupCollapsed;
5298
+ var prevGroupEnd;
5299
+
5300
+ function disabledLog() {}
5301
+
5302
+ disabledLog.__reactDisabledLog = true;
5303
+ function disableLogs() {
5304
+ {
5305
+ if (disabledDepth === 0) {
5306
+ /* eslint-disable react-internal/no-production-logging */
5307
+ prevLog = console.log;
5308
+ prevInfo = console.info;
5309
+ prevWarn = console.warn;
5310
+ prevError = console.error;
5311
+ prevGroup = console.group;
5312
+ prevGroupCollapsed = console.groupCollapsed;
5313
+ prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099
5314
+
5315
+ var props = {
5316
+ configurable: true,
5317
+ enumerable: true,
5318
+ value: disabledLog,
5319
+ writable: true
5320
+ }; // $FlowFixMe Flow thinks console is immutable.
5321
+
5322
+ Object.defineProperties(console, {
5323
+ info: props,
5324
+ log: props,
5325
+ warn: props,
5326
+ error: props,
5327
+ group: props,
5328
+ groupCollapsed: props,
5329
+ groupEnd: props
5330
+ });
5331
+ /* eslint-enable react-internal/no-production-logging */
5332
+ }
5333
+
5334
+ disabledDepth++;
5335
+ }
5336
+ }
5337
+ function reenableLogs() {
5338
+ {
5339
+ disabledDepth--;
5340
+
5341
+ if (disabledDepth === 0) {
5342
+ /* eslint-disable react-internal/no-production-logging */
5343
+ var props = {
5344
+ configurable: true,
5345
+ enumerable: true,
5346
+ writable: true
5347
+ }; // $FlowFixMe Flow thinks console is immutable.
5348
+
5349
+ Object.defineProperties(console, {
5350
+ log: _assign({}, props, {
5351
+ value: prevLog
5352
+ }),
5353
+ info: _assign({}, props, {
5354
+ value: prevInfo
5355
+ }),
5356
+ warn: _assign({}, props, {
5357
+ value: prevWarn
5358
+ }),
5359
+ error: _assign({}, props, {
5360
+ value: prevError
5361
+ }),
5362
+ group: _assign({}, props, {
5363
+ value: prevGroup
5364
+ }),
5365
+ groupCollapsed: _assign({}, props, {
5366
+ value: prevGroupCollapsed
5367
+ }),
5368
+ groupEnd: _assign({}, props, {
5369
+ value: prevGroupEnd
5370
+ })
5371
+ });
5372
+ /* eslint-enable react-internal/no-production-logging */
5373
+ }
5374
+
5375
+ if (disabledDepth < 0) {
5376
+ error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');
5377
+ }
5378
+ }
5379
+ }
5380
+
5381
+ var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
5382
+ var prefix;
5383
+ function describeBuiltInComponentFrame(name, source, ownerFn) {
5384
+ {
5385
+ if (prefix === undefined) {
5386
+ // Extract the VM specific prefix used by each line.
5387
+ try {
5388
+ throw Error();
5389
+ } catch (x) {
5390
+ var match = x.stack.trim().match(/\n( *(at )?)/);
5391
+ prefix = match && match[1] || '';
5392
+ }
5393
+ } // We use the prefix to ensure our stacks line up with native stack frames.
5394
+
5395
+
5396
+ return '\n' + prefix + name;
5397
+ }
5398
+ }
5399
+ var reentry = false;
5400
+ var componentFrameCache;
5401
+
5402
+ {
5403
+ var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;
5404
+ componentFrameCache = new PossiblyWeakMap();
5405
+ }
5406
+
5407
+ function describeNativeComponentFrame(fn, construct) {
5408
+ // If something asked for a stack inside a fake render, it should get ignored.
5409
+ if (!fn || reentry) {
5410
+ return '';
5411
+ }
5412
+
5413
+ {
5414
+ var frame = componentFrameCache.get(fn);
5415
+
5416
+ if (frame !== undefined) {
5417
+ return frame;
5418
+ }
5419
+ }
5420
+
5421
+ var control;
5422
+ reentry = true;
5423
+ var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.
5424
+
5425
+ Error.prepareStackTrace = undefined;
5426
+ var previousDispatcher;
5427
+
5428
+ {
5429
+ previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function
5430
+ // for warnings.
5431
+
5432
+ ReactCurrentDispatcher.current = null;
5433
+ disableLogs();
5434
+ }
5435
+
5436
+ try {
5437
+ // This should throw.
5438
+ if (construct) {
5439
+ // Something should be setting the props in the constructor.
5440
+ var Fake = function () {
5441
+ throw Error();
5442
+ }; // $FlowFixMe
5443
+
5444
+
5445
+ Object.defineProperty(Fake.prototype, 'props', {
5446
+ set: function () {
5447
+ // We use a throwing setter instead of frozen or non-writable props
5448
+ // because that won't throw in a non-strict mode function.
5449
+ throw Error();
5450
+ }
5451
+ });
5452
+
5453
+ if (typeof Reflect === 'object' && Reflect.construct) {
5454
+ // We construct a different control for this case to include any extra
5455
+ // frames added by the construct call.
5456
+ try {
5457
+ Reflect.construct(Fake, []);
5458
+ } catch (x) {
5459
+ control = x;
5460
+ }
5461
+
5462
+ Reflect.construct(fn, [], Fake);
5463
+ } else {
5464
+ try {
5465
+ Fake.call();
5466
+ } catch (x) {
5467
+ control = x;
5468
+ }
5469
+
5470
+ fn.call(Fake.prototype);
5471
+ }
5472
+ } else {
5473
+ try {
5474
+ throw Error();
5475
+ } catch (x) {
5476
+ control = x;
5477
+ }
5478
+
5479
+ fn();
5480
+ }
5481
+ } catch (sample) {
5482
+ // This is inlined manually because closure doesn't do it for us.
5483
+ if (sample && control && typeof sample.stack === 'string') {
5484
+ // This extracts the first frame from the sample that isn't also in the control.
5485
+ // Skipping one frame that we assume is the frame that calls the two.
5486
+ var sampleLines = sample.stack.split('\n');
5487
+ var controlLines = control.stack.split('\n');
5488
+ var s = sampleLines.length - 1;
5489
+ var c = controlLines.length - 1;
5490
+
5491
+ while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {
5492
+ // We expect at least one stack frame to be shared.
5493
+ // Typically this will be the root most one. However, stack frames may be
5494
+ // cut off due to maximum stack limits. In this case, one maybe cut off
5495
+ // earlier than the other. We assume that the sample is longer or the same
5496
+ // and there for cut off earlier. So we should find the root most frame in
5497
+ // the sample somewhere in the control.
5498
+ c--;
5499
+ }
5500
+
5501
+ for (; s >= 1 && c >= 0; s--, c--) {
5502
+ // Next we find the first one that isn't the same which should be the
5503
+ // frame that called our sample function and the control.
5504
+ if (sampleLines[s] !== controlLines[c]) {
5505
+ // In V8, the first line is describing the message but other VMs don't.
5506
+ // If we're about to return the first line, and the control is also on the same
5507
+ // line, that's a pretty good indicator that our sample threw at same line as
5508
+ // the control. I.e. before we entered the sample frame. So we ignore this result.
5509
+ // This can happen if you passed a class to function component, or non-function.
5510
+ if (s !== 1 || c !== 1) {
5511
+ do {
5512
+ s--;
5513
+ c--; // We may still have similar intermediate frames from the construct call.
5514
+ // The next one that isn't the same should be our match though.
5515
+
5516
+ if (c < 0 || sampleLines[s] !== controlLines[c]) {
5517
+ // V8 adds a "new" prefix for native classes. Let's remove it to make it prettier.
5518
+ var _frame = '\n' + sampleLines[s].replace(' at new ', ' at ');
5519
+
5520
+ {
5521
+ if (typeof fn === 'function') {
5522
+ componentFrameCache.set(fn, _frame);
5523
+ }
5524
+ } // Return the line we found.
5525
+
5526
+
5527
+ return _frame;
5528
+ }
5529
+ } while (s >= 1 && c >= 0);
5530
+ }
5531
+
5532
+ break;
5533
+ }
5534
+ }
5535
+ }
5536
+ } finally {
5537
+ reentry = false;
5538
+
5539
+ {
5540
+ ReactCurrentDispatcher.current = previousDispatcher;
5541
+ reenableLogs();
5542
+ }
5543
+
5544
+ Error.prepareStackTrace = previousPrepareStackTrace;
5545
+ } // Fallback to just using the name if we couldn't make it throw.
5546
+
5547
+
5548
+ var name = fn ? fn.displayName || fn.name : '';
5549
+ var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';
5550
+
5551
+ {
5552
+ if (typeof fn === 'function') {
5553
+ componentFrameCache.set(fn, syntheticFrame);
5554
+ }
5555
+ }
5556
+
5557
+ return syntheticFrame;
5558
+ }
5559
+ function describeFunctionComponentFrame(fn, source, ownerFn) {
5560
+ {
5561
+ return describeNativeComponentFrame(fn, false);
5562
+ }
5563
+ }
5564
+
5565
+ function shouldConstruct(Component) {
5566
+ var prototype = Component.prototype;
5567
+ return !!(prototype && prototype.isReactComponent);
5568
+ }
5569
+
5570
+ function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
5571
+
5572
+ if (type == null) {
5573
+ return '';
5574
+ }
5575
+
5576
+ if (typeof type === 'function') {
5577
+ {
5578
+ return describeNativeComponentFrame(type, shouldConstruct(type));
5579
+ }
5580
+ }
5581
+
5582
+ if (typeof type === 'string') {
5583
+ return describeBuiltInComponentFrame(type);
5584
+ }
5585
+
5586
+ switch (type) {
5587
+ case REACT_SUSPENSE_TYPE:
5588
+ return describeBuiltInComponentFrame('Suspense');
5589
+
5590
+ case REACT_SUSPENSE_LIST_TYPE:
5591
+ return describeBuiltInComponentFrame('SuspenseList');
5592
+ }
5593
+
5594
+ if (typeof type === 'object') {
5595
+ switch (type.$$typeof) {
5596
+ case REACT_FORWARD_REF_TYPE:
5597
+ return describeFunctionComponentFrame(type.render);
5598
+
5599
+ case REACT_MEMO_TYPE:
5600
+ // Memo may contain any component type so we recursively resolve it.
5601
+ return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
5602
+
5603
+ case REACT_BLOCK_TYPE:
5604
+ return describeFunctionComponentFrame(type._render);
5605
+
5606
+ case REACT_LAZY_TYPE:
5607
+ {
5608
+ var lazyComponent = type;
5609
+ var payload = lazyComponent._payload;
5610
+ var init = lazyComponent._init;
5611
+
5612
+ try {
5613
+ // Lazy may contain any component type so we recursively resolve it.
5614
+ return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
5615
+ } catch (x) {}
5616
+ }
5617
+ }
5618
+ }
5619
+
5620
+ return '';
5621
+ }
5622
+
5623
+ var loggedTypeFailures = {};
5624
+ var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
5625
+
5626
+ function setCurrentlyValidatingElement(element) {
5627
+ {
5628
+ if (element) {
5629
+ var owner = element._owner;
5630
+ var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
5631
+ ReactDebugCurrentFrame.setExtraStackFrame(stack);
5632
+ } else {
5633
+ ReactDebugCurrentFrame.setExtraStackFrame(null);
5634
+ }
5635
+ }
5636
+ }
5637
+
5638
+ function checkPropTypes(typeSpecs, values, location, componentName, element) {
5639
+ {
5640
+ // $FlowFixMe This is okay but Flow doesn't know it.
5641
+ var has = Function.call.bind(Object.prototype.hasOwnProperty);
5642
+
5643
+ for (var typeSpecName in typeSpecs) {
5644
+ if (has(typeSpecs, typeSpecName)) {
5645
+ var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to
5646
+ // fail the render phase where it didn't fail before. So we log it.
5647
+ // After these have been cleaned up, we'll let them throw.
5648
+
5649
+ try {
5650
+ // This is intentionally an invariant that gets caught. It's the same
5651
+ // behavior as without this statement except with a better message.
5652
+ if (typeof typeSpecs[typeSpecName] !== 'function') {
5653
+ var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.');
5654
+ err.name = 'Invariant Violation';
5655
+ throw err;
5656
+ }
5657
+
5658
+ error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');
5659
+ } catch (ex) {
5660
+ error$1 = ex;
5661
+ }
5662
+
5663
+ if (error$1 && !(error$1 instanceof Error)) {
5664
+ setCurrentlyValidatingElement(element);
5665
+
5666
+ 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', location, typeSpecName, typeof error$1);
5667
+
5668
+ setCurrentlyValidatingElement(null);
5669
+ }
5670
+
5671
+ if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
5672
+ // Only monitor this failure once because there tends to be a lot of the
5673
+ // same error.
5674
+ loggedTypeFailures[error$1.message] = true;
5675
+ setCurrentlyValidatingElement(element);
5676
+
5677
+ error('Failed %s type: %s', location, error$1.message);
5678
+
5679
+ setCurrentlyValidatingElement(null);
5680
+ }
5681
+ }
5682
+ }
5683
+ }
5684
+ }
5685
+
5686
+ var didWarnAboutInvalidateContextType;
5687
+
5688
+ {
5689
+ didWarnAboutInvalidateContextType = new Set();
5690
+ }
5691
+
5692
+ var emptyObject = {};
5693
+
5694
+ {
5695
+ Object.freeze(emptyObject);
5696
+ }
5697
+
5698
+ function maskContext(type, context) {
5699
+ var contextTypes = type.contextTypes;
5700
+
5701
+ if (!contextTypes) {
5702
+ return emptyObject;
5703
+ }
5704
+
5705
+ var maskedContext = {};
5706
+
5707
+ for (var contextName in contextTypes) {
5708
+ maskedContext[contextName] = context[contextName];
5709
+ }
5710
+
5711
+ return maskedContext;
5712
+ }
5713
+
5714
+ function checkContextTypes(typeSpecs, values, location) {
5715
+ {
5716
+ checkPropTypes(typeSpecs, values, location, 'Component');
5717
+ }
5718
+ }
5719
+
5720
+ function validateContextBounds(context, threadID) {
5721
+ // If we don't have enough slots in this context to store this threadID,
5722
+ // fill it in without leaving any holes to ensure that the VM optimizes
5723
+ // this as non-holey index properties.
5724
+ // (Note: If `react` package is < 16.6, _threadCount is undefined.)
5725
+ for (var i = context._threadCount | 0; i <= threadID; i++) {
5726
+ // We assume that this is the same as the defaultValue which might not be
5727
+ // true if we're rendering inside a secondary renderer but they are
5728
+ // secondary because these use cases are very rare.
5729
+ context[i] = context._currentValue2;
5730
+ context._threadCount = i + 1;
5731
+ }
5732
+ }
5733
+ function processContext(type, context, threadID, isClass) {
5734
+ if (isClass) {
5735
+ var contextType = type.contextType;
5736
+
5737
+ {
5738
+ if ('contextType' in type) {
5739
+ var isValid = // Allow null for conditional declaration
5740
+ contextType === null || contextType !== undefined && contextType.$$typeof === REACT_CONTEXT_TYPE && contextType._context === undefined; // Not a <Context.Consumer>
5741
+
5742
+ if (!isValid && !didWarnAboutInvalidateContextType.has(type)) {
5743
+ didWarnAboutInvalidateContextType.add(type);
5744
+ var addendum = '';
5745
+
5746
+ if (contextType === undefined) {
5747
+ addendum = ' However, it is set to undefined. ' + 'This can be caused by a typo or by mixing up named and default imports. ' + 'This can also happen due to a circular dependency, so ' + 'try moving the createContext() call to a separate file.';
5748
+ } else if (typeof contextType !== 'object') {
5749
+ addendum = ' However, it is set to a ' + typeof contextType + '.';
5750
+ } else if (contextType.$$typeof === REACT_PROVIDER_TYPE) {
5751
+ addendum = ' Did you accidentally pass the Context.Provider instead?';
5752
+ } else if (contextType._context !== undefined) {
5753
+ // <Context.Consumer>
5754
+ addendum = ' Did you accidentally pass the Context.Consumer instead?';
5755
+ } else {
5756
+ addendum = ' However, it is set to an object with keys {' + Object.keys(contextType).join(', ') + '}.';
5757
+ }
5758
+
5759
+ error('%s defines an invalid contextType. ' + 'contextType should point to the Context object returned by React.createContext().%s', getComponentName(type) || 'Component', addendum);
5760
+ }
5761
+ }
5762
+ }
5763
+
5764
+ if (typeof contextType === 'object' && contextType !== null) {
5765
+ validateContextBounds(contextType, threadID);
5766
+ return contextType[threadID];
5767
+ }
5768
+
5769
+ {
5770
+ var maskedContext = maskContext(type, context);
5771
+
5772
+ {
5773
+ if (type.contextTypes) {
5774
+ checkContextTypes(type.contextTypes, maskedContext, 'context');
5775
+ }
5776
+ }
5777
+
5778
+ return maskedContext;
5779
+ }
5780
+ } else {
5781
+ {
5782
+ var _maskedContext = maskContext(type, context);
5783
+
5784
+ {
5785
+ if (type.contextTypes) {
5786
+ checkContextTypes(type.contextTypes, _maskedContext, 'context');
5787
+ }
5788
+ }
5789
+
5790
+ return _maskedContext;
5791
+ }
5792
+ }
5793
+ }
5794
+
5795
+ var nextAvailableThreadIDs = new Uint16Array(16);
5796
+
5797
+ for (var i = 0; i < 15; i++) {
5798
+ nextAvailableThreadIDs[i] = i + 1;
5799
+ }
5800
+
5801
+ nextAvailableThreadIDs[15] = 0;
5802
+
5803
+ function growThreadCountAndReturnNextAvailable() {
5804
+ var oldArray = nextAvailableThreadIDs;
5805
+ var oldSize = oldArray.length;
5806
+ var newSize = oldSize * 2;
5807
+
5808
+ if (!(newSize <= 0x10000)) {
5809
+ {
5810
+ throw Error( "Maximum number of concurrent React renderers exceeded. This can happen if you are not properly destroying the Readable provided by React. Ensure that you call .destroy() on it if you no longer want to read from it, and did not read to the end. If you use .pipe() this should be automatic." );
5811
+ }
5812
+ }
5813
+
5814
+ var newArray = new Uint16Array(newSize);
5815
+ newArray.set(oldArray);
5816
+ nextAvailableThreadIDs = newArray;
5817
+ nextAvailableThreadIDs[0] = oldSize + 1;
5818
+
5819
+ for (var _i = oldSize; _i < newSize - 1; _i++) {
5820
+ nextAvailableThreadIDs[_i] = _i + 1;
5821
+ }
5822
+
5823
+ nextAvailableThreadIDs[newSize - 1] = 0;
5824
+ return oldSize;
5825
+ }
5826
+
5827
+ function allocThreadID() {
5828
+ var nextID = nextAvailableThreadIDs[0];
5829
+
5830
+ if (nextID === 0) {
5831
+ return growThreadCountAndReturnNextAvailable();
5832
+ }
5833
+
5834
+ nextAvailableThreadIDs[0] = nextAvailableThreadIDs[nextID];
5835
+ return nextID;
5836
+ }
5837
+ function freeThreadID(id) {
5838
+ nextAvailableThreadIDs[id] = nextAvailableThreadIDs[0];
5839
+ nextAvailableThreadIDs[0] = id;
5840
+ }
5841
+
5842
+ // A reserved attribute.
5843
+ // It is handled by React separately and shouldn't be written to the DOM.
5844
+ var RESERVED = 0; // A simple string attribute.
5845
+ // Attributes that aren't in the filter are presumed to have this type.
5846
+
5847
+ var STRING = 1; // A string attribute that accepts booleans in React. In HTML, these are called
5848
+ // "enumerated" attributes with "true" and "false" as possible values.
5849
+ // When true, it should be set to a "true" string.
5850
+ // When false, it should be set to a "false" string.
5851
+
5852
+ var BOOLEANISH_STRING = 2; // A real boolean attribute.
5853
+ // When true, it should be present (set either to an empty string or its name).
5854
+ // When false, it should be omitted.
5855
+
5856
+ var BOOLEAN = 3; // An attribute that can be used as a flag as well as with a value.
5857
+ // When true, it should be present (set either to an empty string or its name).
5858
+ // When false, it should be omitted.
5859
+ // For any other value, should be present with that value.
5860
+
5861
+ var OVERLOADED_BOOLEAN = 4; // An attribute that must be numeric or parse as a numeric.
5862
+ // When falsy, it should be removed.
5863
+
5864
+ var NUMERIC = 5; // An attribute that must be positive numeric or parse as a positive numeric.
5865
+ // When falsy, it should be removed.
5866
+
5867
+ var POSITIVE_NUMERIC = 6;
5868
+
5869
+ /* eslint-disable max-len */
5870
+ 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";
5871
+ /* eslint-enable max-len */
5872
+
5873
+ var ATTRIBUTE_NAME_CHAR = ATTRIBUTE_NAME_START_CHAR + "\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040";
5874
+ var ROOT_ATTRIBUTE_NAME = 'data-reactroot';
5875
+ var VALID_ATTRIBUTE_NAME_REGEX = new RegExp('^[' + ATTRIBUTE_NAME_START_CHAR + '][' + ATTRIBUTE_NAME_CHAR + ']*$');
5876
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
5877
+ var illegalAttributeNameCache = {};
5878
+ var validatedAttributeNameCache = {};
5879
+ function isAttributeNameSafe(attributeName) {
5880
+ if (hasOwnProperty.call(validatedAttributeNameCache, attributeName)) {
5881
+ return true;
5882
+ }
5883
+
5884
+ if (hasOwnProperty.call(illegalAttributeNameCache, attributeName)) {
5885
+ return false;
5886
+ }
5887
+
5888
+ if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) {
5889
+ validatedAttributeNameCache[attributeName] = true;
5890
+ return true;
5891
+ }
5892
+
5893
+ illegalAttributeNameCache[attributeName] = true;
5894
+
5895
+ {
5896
+ error('Invalid attribute name: `%s`', attributeName);
5897
+ }
5898
+
5899
+ return false;
5900
+ }
5901
+ function shouldIgnoreAttribute(name, propertyInfo, isCustomComponentTag) {
5902
+ if (propertyInfo !== null) {
5903
+ return propertyInfo.type === RESERVED;
5904
+ }
5905
+
5906
+ if (isCustomComponentTag) {
5907
+ return false;
5908
+ }
5909
+
5910
+ if (name.length > 2 && (name[0] === 'o' || name[0] === 'O') && (name[1] === 'n' || name[1] === 'N')) {
5911
+ return true;
5912
+ }
5913
+
5914
+ return false;
5915
+ }
5916
+ function shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag) {
5917
+ if (propertyInfo !== null && propertyInfo.type === RESERVED) {
5918
+ return false;
5919
+ }
5920
+
5921
+ switch (typeof value) {
5922
+ case 'function': // $FlowIssue symbol is perfectly valid here
5923
+
5924
+ case 'symbol':
5925
+ // eslint-disable-line
5926
+ return true;
5927
+
5928
+ case 'boolean':
5929
+ {
5930
+ if (isCustomComponentTag) {
5931
+ return false;
5932
+ }
5933
+
5934
+ if (propertyInfo !== null) {
5935
+ return !propertyInfo.acceptsBooleans;
5936
+ } else {
5937
+ var prefix = name.toLowerCase().slice(0, 5);
5938
+ return prefix !== 'data-' && prefix !== 'aria-';
5939
+ }
5940
+ }
5941
+
5942
+ default:
5943
+ return false;
5944
+ }
5945
+ }
5946
+ function shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag) {
5947
+ if (value === null || typeof value === 'undefined') {
5948
+ return true;
5949
+ }
5950
+
5951
+ if (shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag)) {
5952
+ return true;
5953
+ }
5954
+
5955
+ if (isCustomComponentTag) {
5956
+ return false;
5957
+ }
5958
+
5959
+ if (propertyInfo !== null) {
5960
+
5961
+ switch (propertyInfo.type) {
5962
+ case BOOLEAN:
5963
+ return !value;
5964
+
5965
+ case OVERLOADED_BOOLEAN:
5966
+ return value === false;
5967
+
5968
+ case NUMERIC:
5969
+ return isNaN(value);
5970
+
5971
+ case POSITIVE_NUMERIC:
5972
+ return isNaN(value) || value < 1;
5973
+ }
5974
+ }
5975
+
5976
+ return false;
5977
+ }
5978
+ function getPropertyInfo(name) {
5979
+ return properties.hasOwnProperty(name) ? properties[name] : null;
5980
+ }
5981
+
5982
+ function PropertyInfoRecord(name, type, mustUseProperty, attributeName, attributeNamespace, sanitizeURL, removeEmptyString) {
5983
+ this.acceptsBooleans = type === BOOLEANISH_STRING || type === BOOLEAN || type === OVERLOADED_BOOLEAN;
5984
+ this.attributeName = attributeName;
5985
+ this.attributeNamespace = attributeNamespace;
5986
+ this.mustUseProperty = mustUseProperty;
5987
+ this.propertyName = name;
5988
+ this.type = type;
5989
+ this.sanitizeURL = sanitizeURL;
5990
+ this.removeEmptyString = removeEmptyString;
5991
+ } // When adding attributes to this list, be sure to also add them to
5992
+ // the `possibleStandardNames` module to ensure casing and incorrect
5993
+ // name warnings.
5994
+
5995
+
5996
+ var properties = {}; // These props are reserved by React. They shouldn't be written to the DOM.
5997
+
5998
+ var reservedProps = ['children', 'dangerouslySetInnerHTML', // TODO: This prevents the assignment of defaultValue to regular
5999
+ // elements (not just inputs). Now that ReactDOMInput assigns to the
6000
+ // defaultValue property -- do we need this?
6001
+ 'defaultValue', 'defaultChecked', 'innerHTML', 'suppressContentEditableWarning', 'suppressHydrationWarning', 'style'];
6002
+ reservedProps.forEach(function (name) {
6003
+ properties[name] = new PropertyInfoRecord(name, RESERVED, false, // mustUseProperty
6004
+ name, // attributeName
6005
+ null, // attributeNamespace
6006
+ false, // sanitizeURL
6007
+ false);
6008
+ }); // A few React string attributes have a different name.
6009
+ // This is a mapping from React prop names to the attribute names.
6010
+
6011
+ [['acceptCharset', 'accept-charset'], ['className', 'class'], ['htmlFor', 'for'], ['httpEquiv', 'http-equiv']].forEach(function (_ref) {
6012
+ var name = _ref[0],
6013
+ attributeName = _ref[1];
6014
+ properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
6015
+ attributeName, // attributeName
6016
+ null, // attributeNamespace
6017
+ false, // sanitizeURL
6018
+ false);
6019
+ }); // These are "enumerated" HTML attributes that accept "true" and "false".
6020
+ // In React, we let users pass `true` and `false` even though technically
6021
+ // these aren't boolean attributes (they are coerced to strings).
6022
+
6023
+ ['contentEditable', 'draggable', 'spellCheck', 'value'].forEach(function (name) {
6024
+ properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, // mustUseProperty
6025
+ name.toLowerCase(), // attributeName
6026
+ null, // attributeNamespace
6027
+ false, // sanitizeURL
6028
+ false);
6029
+ }); // These are "enumerated" SVG attributes that accept "true" and "false".
6030
+ // In React, we let users pass `true` and `false` even though technically
6031
+ // these aren't boolean attributes (they are coerced to strings).
6032
+ // Since these are SVG attributes, their attribute names are case-sensitive.
6033
+
6034
+ ['autoReverse', 'externalResourcesRequired', 'focusable', 'preserveAlpha'].forEach(function (name) {
6035
+ properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, // mustUseProperty
6036
+ name, // attributeName
6037
+ null, // attributeNamespace
6038
+ false, // sanitizeURL
6039
+ false);
6040
+ }); // These are HTML boolean attributes.
6041
+
6042
+ ['allowFullScreen', 'async', // Note: there is a special case that prevents it from being written to the DOM
6043
+ // on the client side because the browsers are inconsistent. Instead we call focus().
6044
+ 'autoFocus', 'autoPlay', 'controls', 'default', 'defer', 'disabled', 'disablePictureInPicture', 'disableRemotePlayback', 'formNoValidate', 'hidden', 'loop', 'noModule', 'noValidate', 'open', 'playsInline', 'readOnly', 'required', 'reversed', 'scoped', 'seamless', // Microdata
6045
+ 'itemScope'].forEach(function (name) {
6046
+ properties[name] = new PropertyInfoRecord(name, BOOLEAN, false, // mustUseProperty
6047
+ name.toLowerCase(), // attributeName
6048
+ null, // attributeNamespace
6049
+ false, // sanitizeURL
6050
+ false);
6051
+ }); // These are the few React props that we set as DOM properties
6052
+ // rather than attributes. These are all booleans.
6053
+
6054
+ ['checked', // Note: `option.selected` is not updated if `select.multiple` is
6055
+ // disabled with `removeAttribute`. We have special logic for handling this.
6056
+ 'multiple', 'muted', 'selected' // NOTE: if you add a camelCased prop to this list,
6057
+ // you'll need to set attributeName to name.toLowerCase()
6058
+ // instead in the assignment below.
6059
+ ].forEach(function (name) {
6060
+ properties[name] = new PropertyInfoRecord(name, BOOLEAN, true, // mustUseProperty
6061
+ name, // attributeName
6062
+ null, // attributeNamespace
6063
+ false, // sanitizeURL
6064
+ false);
6065
+ }); // These are HTML attributes that are "overloaded booleans": they behave like
6066
+ // booleans, but can also accept a string value.
6067
+
6068
+ ['capture', 'download' // NOTE: if you add a camelCased prop to this list,
6069
+ // you'll need to set attributeName to name.toLowerCase()
6070
+ // instead in the assignment below.
6071
+ ].forEach(function (name) {
6072
+ properties[name] = new PropertyInfoRecord(name, OVERLOADED_BOOLEAN, false, // mustUseProperty
6073
+ name, // attributeName
6074
+ null, // attributeNamespace
6075
+ false, // sanitizeURL
6076
+ false);
6077
+ }); // These are HTML attributes that must be positive numbers.
6078
+
6079
+ ['cols', 'rows', 'size', 'span' // NOTE: if you add a camelCased prop to this list,
6080
+ // you'll need to set attributeName to name.toLowerCase()
6081
+ // instead in the assignment below.
6082
+ ].forEach(function (name) {
6083
+ properties[name] = new PropertyInfoRecord(name, POSITIVE_NUMERIC, false, // mustUseProperty
6084
+ name, // attributeName
6085
+ null, // attributeNamespace
6086
+ false, // sanitizeURL
6087
+ false);
6088
+ }); // These are HTML attributes that must be numbers.
6089
+
6090
+ ['rowSpan', 'start'].forEach(function (name) {
6091
+ properties[name] = new PropertyInfoRecord(name, NUMERIC, false, // mustUseProperty
6092
+ name.toLowerCase(), // attributeName
6093
+ null, // attributeNamespace
6094
+ false, // sanitizeURL
6095
+ false);
6096
+ });
6097
+ var CAMELIZE = /[\-\:]([a-z])/g;
6098
+
6099
+ var capitalize = function (token) {
6100
+ return token[1].toUpperCase();
6101
+ }; // This is a list of all SVG attributes that need special casing, namespacing,
6102
+ // or boolean value assignment. Regular attributes that just accept strings
6103
+ // and have the same names are omitted, just like in the HTML attribute filter.
6104
+ // Some of these attributes can be hard to find. This list was created by
6105
+ // scraping the MDN documentation.
6106
+
6107
+
6108
+ ['accent-height', 'alignment-baseline', 'arabic-form', 'baseline-shift', 'cap-height', 'clip-path', 'clip-rule', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'dominant-baseline', 'enable-background', 'fill-opacity', 'fill-rule', 'flood-color', 'flood-opacity', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'glyph-name', 'glyph-orientation-horizontal', 'glyph-orientation-vertical', 'horiz-adv-x', 'horiz-origin-x', 'image-rendering', 'letter-spacing', 'lighting-color', 'marker-end', 'marker-mid', 'marker-start', 'overline-position', 'overline-thickness', 'paint-order', 'panose-1', 'pointer-events', 'rendering-intent', 'shape-rendering', 'stop-color', 'stop-opacity', 'strikethrough-position', 'strikethrough-thickness', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke-width', 'text-anchor', 'text-decoration', 'text-rendering', 'underline-position', 'underline-thickness', 'unicode-bidi', 'unicode-range', 'units-per-em', 'v-alphabetic', 'v-hanging', 'v-ideographic', 'v-mathematical', 'vector-effect', 'vert-adv-y', 'vert-origin-x', 'vert-origin-y', 'word-spacing', 'writing-mode', 'xmlns:xlink', 'x-height' // NOTE: if you add a camelCased prop to this list,
6109
+ // you'll need to set attributeName to name.toLowerCase()
6110
+ // instead in the assignment below.
6111
+ ].forEach(function (attributeName) {
6112
+ var name = attributeName.replace(CAMELIZE, capitalize);
6113
+ properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
6114
+ attributeName, null, // attributeNamespace
6115
+ false, // sanitizeURL
6116
+ false);
6117
+ }); // String SVG attributes with the xlink namespace.
6118
+
6119
+ ['xlink:actuate', 'xlink:arcrole', 'xlink:role', 'xlink:show', 'xlink:title', 'xlink:type' // NOTE: if you add a camelCased prop to this list,
6120
+ // you'll need to set attributeName to name.toLowerCase()
6121
+ // instead in the assignment below.
6122
+ ].forEach(function (attributeName) {
6123
+ var name = attributeName.replace(CAMELIZE, capitalize);
6124
+ properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
6125
+ attributeName, 'http://www.w3.org/1999/xlink', false, // sanitizeURL
6126
+ false);
6127
+ }); // String SVG attributes with the xml namespace.
6128
+
6129
+ ['xml:base', 'xml:lang', 'xml:space' // NOTE: if you add a camelCased prop to this list,
6130
+ // you'll need to set attributeName to name.toLowerCase()
6131
+ // instead in the assignment below.
6132
+ ].forEach(function (attributeName) {
6133
+ var name = attributeName.replace(CAMELIZE, capitalize);
6134
+ properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
6135
+ attributeName, 'http://www.w3.org/XML/1998/namespace', false, // sanitizeURL
6136
+ false);
6137
+ }); // These attribute exists both in HTML and SVG.
6138
+ // The attribute name is case-sensitive in SVG so we can't just use
6139
+ // the React name like we do for attributes that exist only in HTML.
6140
+
6141
+ ['tabIndex', 'crossOrigin'].forEach(function (attributeName) {
6142
+ properties[attributeName] = new PropertyInfoRecord(attributeName, STRING, false, // mustUseProperty
6143
+ attributeName.toLowerCase(), // attributeName
6144
+ null, // attributeNamespace
6145
+ false, // sanitizeURL
6146
+ false);
6147
+ }); // These attributes accept URLs. These must not allow javascript: URLS.
6148
+ // These will also need to accept Trusted Types object in the future.
6149
+
6150
+ var xlinkHref = 'xlinkHref';
6151
+ properties[xlinkHref] = new PropertyInfoRecord('xlinkHref', STRING, false, // mustUseProperty
6152
+ 'xlink:href', 'http://www.w3.org/1999/xlink', true, // sanitizeURL
6153
+ false);
6154
+ ['src', 'href', 'action', 'formAction'].forEach(function (attributeName) {
6155
+ properties[attributeName] = new PropertyInfoRecord(attributeName, STRING, false, // mustUseProperty
6156
+ attributeName.toLowerCase(), // attributeName
6157
+ null, // attributeNamespace
6158
+ true, // sanitizeURL
6159
+ true);
6160
+ });
6161
+
6162
+ // and any newline or tab are filtered out as if they're not part of the URL.
6163
+ // https://url.spec.whatwg.org/#url-parsing
6164
+ // Tab or newline are defined as \r\n\t:
6165
+ // https://infra.spec.whatwg.org/#ascii-tab-or-newline
6166
+ // A C0 control is a code point in the range \u0000 NULL to \u001F
6167
+ // INFORMATION SEPARATOR ONE, inclusive:
6168
+ // https://infra.spec.whatwg.org/#c0-control-or-space
6169
+
6170
+ /* eslint-disable max-len */
6171
+
6172
+ var isJavaScriptProtocol = /^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*\:/i;
6173
+ var didWarn = false;
6174
+
6175
+ function sanitizeURL(url) {
6176
+ {
6177
+ if (!didWarn && isJavaScriptProtocol.test(url)) {
6178
+ didWarn = true;
6179
+
6180
+ error('A future version of React will block javascript: URLs as a security precaution. ' + 'Use event handlers instead if you can. If you need to generate unsafe HTML try ' + 'using dangerouslySetInnerHTML instead. React was passed %s.', JSON.stringify(url));
6181
+ }
6182
+ }
6183
+ }
6184
+
6185
+ // code copied and modified from escape-html
6186
+
6187
+ /**
6188
+ * Module variables.
6189
+ * @private
6190
+ */
6191
+ var matchHtmlRegExp = /["'&<>]/;
6192
+ /**
6193
+ * Escapes special characters and HTML entities in a given html string.
6194
+ *
6195
+ * @param {string} string HTML string to escape for later insertion
6196
+ * @return {string}
6197
+ * @public
6198
+ */
6199
+
6200
+ function escapeHtml(string) {
6201
+ var str = '' + string;
6202
+ var match = matchHtmlRegExp.exec(str);
6203
+
6204
+ if (!match) {
6205
+ return str;
6206
+ }
6207
+
6208
+ var escape;
6209
+ var html = '';
6210
+ var index;
6211
+ var lastIndex = 0;
6212
+
6213
+ for (index = match.index; index < str.length; index++) {
6214
+ switch (str.charCodeAt(index)) {
6215
+ case 34:
6216
+ // "
6217
+ escape = '&quot;';
6218
+ break;
6219
+
6220
+ case 38:
6221
+ // &
6222
+ escape = '&amp;';
6223
+ break;
6224
+
6225
+ case 39:
6226
+ // '
6227
+ escape = '&#x27;'; // modified from escape-html; used to be '&#39'
6228
+
6229
+ break;
6230
+
6231
+ case 60:
6232
+ // <
6233
+ escape = '&lt;';
6234
+ break;
6235
+
6236
+ case 62:
6237
+ // >
6238
+ escape = '&gt;';
6239
+ break;
6240
+
6241
+ default:
6242
+ continue;
6243
+ }
6244
+
6245
+ if (lastIndex !== index) {
6246
+ html += str.substring(lastIndex, index);
6247
+ }
6248
+
6249
+ lastIndex = index + 1;
6250
+ html += escape;
6251
+ }
6252
+
6253
+ return lastIndex !== index ? html + str.substring(lastIndex, index) : html;
6254
+ } // end code copied and modified from escape-html
6255
+
6256
+ /**
6257
+ * Escapes text to prevent scripting attacks.
6258
+ *
6259
+ * @param {*} text Text value to escape.
6260
+ * @return {string} An escaped string.
6261
+ */
6262
+
6263
+
6264
+ function escapeTextForBrowser(text) {
6265
+ if (typeof text === 'boolean' || typeof text === 'number') {
6266
+ // this shortcircuit helps perf for types that we know will never have
6267
+ // special characters, especially given that this function is used often
6268
+ // for numeric dom ids.
6269
+ return '' + text;
6270
+ }
6271
+
6272
+ return escapeHtml(text);
6273
+ }
6274
+
6275
+ /**
6276
+ * Escapes attribute value to prevent scripting attacks.
6277
+ *
6278
+ * @param {*} value Value to escape.
6279
+ * @return {string} An escaped string.
6280
+ */
6281
+
6282
+ function quoteAttributeValueForBrowser(value) {
6283
+ return '"' + escapeTextForBrowser(value) + '"';
6284
+ }
6285
+
6286
+ function createMarkupForRoot() {
6287
+ return ROOT_ATTRIBUTE_NAME + '=""';
6288
+ }
6289
+ /**
6290
+ * Creates markup for a property.
6291
+ *
6292
+ * @param {string} name
6293
+ * @param {*} value
6294
+ * @return {?string} Markup string, or null if the property was invalid.
6295
+ */
6296
+
6297
+ function createMarkupForProperty(name, value) {
6298
+ var propertyInfo = getPropertyInfo(name);
6299
+
6300
+ if (name !== 'style' && shouldIgnoreAttribute(name, propertyInfo, false)) {
6301
+ return '';
6302
+ }
6303
+
6304
+ if (shouldRemoveAttribute(name, value, propertyInfo, false)) {
6305
+ return '';
6306
+ }
6307
+
6308
+ if (propertyInfo !== null) {
6309
+ var attributeName = propertyInfo.attributeName;
6310
+ var type = propertyInfo.type;
6311
+
6312
+ if (type === BOOLEAN || type === OVERLOADED_BOOLEAN && value === true) {
6313
+ return attributeName + '=""';
6314
+ } else {
6315
+ if (propertyInfo.sanitizeURL) {
6316
+ value = '' + value;
6317
+ sanitizeURL(value);
6318
+ }
6319
+
6320
+ return attributeName + '=' + quoteAttributeValueForBrowser(value);
6321
+ }
6322
+ } else if (isAttributeNameSafe(name)) {
6323
+ return name + '=' + quoteAttributeValueForBrowser(value);
6324
+ }
6325
+
6326
+ return '';
6327
+ }
6328
+ /**
6329
+ * Creates markup for a custom property.
6330
+ *
6331
+ * @param {string} name
6332
+ * @param {*} value
6333
+ * @return {string} Markup string, or empty string if the property was invalid.
6334
+ */
6335
+
6336
+ function createMarkupForCustomAttribute(name, value) {
6337
+ if (!isAttributeNameSafe(name) || value == null) {
6338
+ return '';
6339
+ }
6340
+
6341
+ return name + '=' + quoteAttributeValueForBrowser(value);
6342
+ }
6343
+
6344
+ /**
6345
+ * inlined Object.is polyfill to avoid requiring consumers ship their own
6346
+ * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
6347
+ */
6348
+ function is(x, y) {
6349
+ return x === y && (x !== 0 || 1 / x === 1 / y) || x !== x && y !== y // eslint-disable-line no-self-compare
6350
+ ;
6351
+ }
6352
+
6353
+ var objectIs = typeof Object.is === 'function' ? Object.is : is;
6354
+
6355
+ var currentlyRenderingComponent = null;
6356
+ var firstWorkInProgressHook = null;
6357
+ var workInProgressHook = null; // Whether the work-in-progress hook is a re-rendered hook
6358
+
6359
+ var isReRender = false; // Whether an update was scheduled during the currently executing render pass.
6360
+
6361
+ var didScheduleRenderPhaseUpdate = false; // Lazily created map of render-phase updates
6362
+
6363
+ var renderPhaseUpdates = null; // Counter to prevent infinite loops.
6364
+
6365
+ var numberOfReRenders = 0;
6366
+ var RE_RENDER_LIMIT = 25;
6367
+ var isInHookUserCodeInDev = false; // In DEV, this is the name of the currently executing primitive hook
6368
+
6369
+ var currentHookNameInDev;
6370
+
6371
+ function resolveCurrentlyRenderingComponent() {
6372
+ if (!(currentlyRenderingComponent !== null)) {
6373
+ {
6374
+ throw Error( "Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem." );
6375
+ }
6376
+ }
6377
+
6378
+ {
6379
+ if (isInHookUserCodeInDev) {
6380
+ error('Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. ' + 'You can only call Hooks at the top level of your React function. ' + 'For more information, see ' + 'https://reactjs.org/link/rules-of-hooks');
6381
+ }
6382
+ }
6383
+
6384
+ return currentlyRenderingComponent;
6385
+ }
6386
+
6387
+ function areHookInputsEqual(nextDeps, prevDeps) {
6388
+ if (prevDeps === null) {
6389
+ {
6390
+ error('%s received a final argument during this render, but not during ' + 'the previous render. Even though the final argument is optional, ' + 'its type cannot change between renders.', currentHookNameInDev);
6391
+ }
6392
+
6393
+ return false;
6394
+ }
6395
+
6396
+ {
6397
+ // Don't bother comparing lengths in prod because these arrays should be
6398
+ // passed inline.
6399
+ if (nextDeps.length !== prevDeps.length) {
6400
+ error('The final argument passed to %s changed size between renders. The ' + 'order and size of this array must remain constant.\n\n' + 'Previous: %s\n' + 'Incoming: %s', currentHookNameInDev, "[" + nextDeps.join(', ') + "]", "[" + prevDeps.join(', ') + "]");
6401
+ }
6402
+ }
6403
+
6404
+ for (var i = 0; i < prevDeps.length && i < nextDeps.length; i++) {
6405
+ if (objectIs(nextDeps[i], prevDeps[i])) {
6406
+ continue;
6407
+ }
6408
+
6409
+ return false;
6410
+ }
6411
+
6412
+ return true;
6413
+ }
6414
+
6415
+ function createHook() {
6416
+ if (numberOfReRenders > 0) {
6417
+ {
6418
+ {
6419
+ throw Error( "Rendered more hooks than during the previous render" );
6420
+ }
6421
+ }
6422
+ }
6423
+
6424
+ return {
6425
+ memoizedState: null,
6426
+ queue: null,
6427
+ next: null
6428
+ };
6429
+ }
6430
+
6431
+ function createWorkInProgressHook() {
6432
+ if (workInProgressHook === null) {
6433
+ // This is the first hook in the list
6434
+ if (firstWorkInProgressHook === null) {
6435
+ isReRender = false;
6436
+ firstWorkInProgressHook = workInProgressHook = createHook();
6437
+ } else {
6438
+ // There's already a work-in-progress. Reuse it.
6439
+ isReRender = true;
6440
+ workInProgressHook = firstWorkInProgressHook;
6441
+ }
6442
+ } else {
6443
+ if (workInProgressHook.next === null) {
6444
+ isReRender = false; // Append to the end of the list
6445
+
6446
+ workInProgressHook = workInProgressHook.next = createHook();
6447
+ } else {
6448
+ // There's already a work-in-progress. Reuse it.
6449
+ isReRender = true;
6450
+ workInProgressHook = workInProgressHook.next;
6451
+ }
6452
+ }
6453
+
6454
+ return workInProgressHook;
6455
+ }
6456
+
6457
+ function prepareToUseHooks(componentIdentity) {
6458
+ currentlyRenderingComponent = componentIdentity;
6459
+
6460
+ {
6461
+ isInHookUserCodeInDev = false;
6462
+ } // The following should have already been reset
6463
+ // didScheduleRenderPhaseUpdate = false;
6464
+ // firstWorkInProgressHook = null;
6465
+ // numberOfReRenders = 0;
6466
+ // renderPhaseUpdates = null;
6467
+ // workInProgressHook = null;
6468
+
6469
+ }
6470
+ function finishHooks(Component, props, children, refOrContext) {
6471
+ // This must be called after every function component to prevent hooks from
6472
+ // being used in classes.
6473
+ while (didScheduleRenderPhaseUpdate) {
6474
+ // Updates were scheduled during the render phase. They are stored in
6475
+ // the `renderPhaseUpdates` map. Call the component again, reusing the
6476
+ // work-in-progress hooks and applying the additional updates on top. Keep
6477
+ // restarting until no more updates are scheduled.
6478
+ didScheduleRenderPhaseUpdate = false;
6479
+ numberOfReRenders += 1; // Start over from the beginning of the list
6480
+
6481
+ workInProgressHook = null;
6482
+ children = Component(props, refOrContext);
6483
+ }
6484
+
6485
+ resetHooksState();
6486
+ return children;
6487
+ } // Reset the internal hooks state if an error occurs while rendering a component
6488
+
6489
+ function resetHooksState() {
6490
+ {
6491
+ isInHookUserCodeInDev = false;
6492
+ }
6493
+
6494
+ currentlyRenderingComponent = null;
6495
+ didScheduleRenderPhaseUpdate = false;
6496
+ firstWorkInProgressHook = null;
6497
+ numberOfReRenders = 0;
6498
+ renderPhaseUpdates = null;
6499
+ workInProgressHook = null;
6500
+ }
6501
+
6502
+ function readContext(context, observedBits) {
6503
+ var threadID = currentPartialRenderer.threadID;
6504
+ validateContextBounds(context, threadID);
6505
+
6506
+ {
6507
+ if (isInHookUserCodeInDev) {
6508
+ error('Context can only be read while React is rendering. ' + 'In classes, you can read it in the render method or getDerivedStateFromProps. ' + 'In function components, you can read it directly in the function body, but not ' + 'inside Hooks like useReducer() or useMemo().');
6509
+ }
6510
+ }
6511
+
6512
+ return context[threadID];
6513
+ }
6514
+
6515
+ function useContext(context, observedBits) {
6516
+ {
6517
+ currentHookNameInDev = 'useContext';
6518
+ }
6519
+
6520
+ resolveCurrentlyRenderingComponent();
6521
+ var threadID = currentPartialRenderer.threadID;
6522
+ validateContextBounds(context, threadID);
6523
+ return context[threadID];
6524
+ }
6525
+
6526
+ function basicStateReducer(state, action) {
6527
+ // $FlowFixMe: Flow doesn't like mixed types
6528
+ return typeof action === 'function' ? action(state) : action;
6529
+ }
6530
+
6531
+ function useState(initialState) {
6532
+ {
6533
+ currentHookNameInDev = 'useState';
6534
+ }
6535
+
6536
+ return useReducer(basicStateReducer, // useReducer has a special case to support lazy useState initializers
6537
+ initialState);
6538
+ }
6539
+ function useReducer(reducer, initialArg, init) {
6540
+ {
6541
+ if (reducer !== basicStateReducer) {
6542
+ currentHookNameInDev = 'useReducer';
6543
+ }
6544
+ }
6545
+
6546
+ currentlyRenderingComponent = resolveCurrentlyRenderingComponent();
6547
+ workInProgressHook = createWorkInProgressHook();
6548
+
6549
+ if (isReRender) {
6550
+ // This is a re-render. Apply the new render phase updates to the previous
6551
+ // current hook.
6552
+ var queue = workInProgressHook.queue;
6553
+ var dispatch = queue.dispatch;
6554
+
6555
+ if (renderPhaseUpdates !== null) {
6556
+ // Render phase updates are stored in a map of queue -> linked list
6557
+ var firstRenderPhaseUpdate = renderPhaseUpdates.get(queue);
6558
+
6559
+ if (firstRenderPhaseUpdate !== undefined) {
6560
+ renderPhaseUpdates.delete(queue);
6561
+ var newState = workInProgressHook.memoizedState;
6562
+ var update = firstRenderPhaseUpdate;
6563
+
6564
+ do {
6565
+ // Process this render phase update. We don't have to check the
6566
+ // priority because it will always be the same as the current
6567
+ // render's.
6568
+ var action = update.action;
6569
+
6570
+ {
6571
+ isInHookUserCodeInDev = true;
6572
+ }
6573
+
6574
+ newState = reducer(newState, action);
6575
+
6576
+ {
6577
+ isInHookUserCodeInDev = false;
6578
+ }
6579
+
6580
+ update = update.next;
6581
+ } while (update !== null);
6582
+
6583
+ workInProgressHook.memoizedState = newState;
6584
+ return [newState, dispatch];
6585
+ }
6586
+ }
6587
+
6588
+ return [workInProgressHook.memoizedState, dispatch];
6589
+ } else {
6590
+ {
6591
+ isInHookUserCodeInDev = true;
6592
+ }
6593
+
6594
+ var initialState;
6595
+
6596
+ if (reducer === basicStateReducer) {
6597
+ // Special case for `useState`.
6598
+ initialState = typeof initialArg === 'function' ? initialArg() : initialArg;
6599
+ } else {
6600
+ initialState = init !== undefined ? init(initialArg) : initialArg;
6601
+ }
6602
+
6603
+ {
6604
+ isInHookUserCodeInDev = false;
6605
+ }
6606
+
6607
+ workInProgressHook.memoizedState = initialState;
6608
+
6609
+ var _queue = workInProgressHook.queue = {
6610
+ last: null,
6611
+ dispatch: null
6612
+ };
6613
+
6614
+ var _dispatch = _queue.dispatch = dispatchAction.bind(null, currentlyRenderingComponent, _queue);
6615
+
6616
+ return [workInProgressHook.memoizedState, _dispatch];
6617
+ }
6618
+ }
6619
+
6620
+ function useMemo(nextCreate, deps) {
6621
+ currentlyRenderingComponent = resolveCurrentlyRenderingComponent();
6622
+ workInProgressHook = createWorkInProgressHook();
6623
+ var nextDeps = deps === undefined ? null : deps;
6624
+
6625
+ if (workInProgressHook !== null) {
6626
+ var prevState = workInProgressHook.memoizedState;
6627
+
6628
+ if (prevState !== null) {
6629
+ if (nextDeps !== null) {
6630
+ var prevDeps = prevState[1];
6631
+
6632
+ if (areHookInputsEqual(nextDeps, prevDeps)) {
6633
+ return prevState[0];
6634
+ }
6635
+ }
6636
+ }
6637
+ }
6638
+
6639
+ {
6640
+ isInHookUserCodeInDev = true;
6641
+ }
6642
+
6643
+ var nextValue = nextCreate();
6644
+
6645
+ {
6646
+ isInHookUserCodeInDev = false;
6647
+ }
6648
+
6649
+ workInProgressHook.memoizedState = [nextValue, nextDeps];
6650
+ return nextValue;
6651
+ }
6652
+
6653
+ function useRef(initialValue) {
6654
+ currentlyRenderingComponent = resolveCurrentlyRenderingComponent();
6655
+ workInProgressHook = createWorkInProgressHook();
6656
+ var previousRef = workInProgressHook.memoizedState;
6657
+
6658
+ if (previousRef === null) {
6659
+ var ref = {
6660
+ current: initialValue
6661
+ };
6662
+
6663
+ {
6664
+ Object.seal(ref);
6665
+ }
6666
+
6667
+ workInProgressHook.memoizedState = ref;
6668
+ return ref;
6669
+ } else {
6670
+ return previousRef;
6671
+ }
6672
+ }
6673
+
6674
+ function useLayoutEffect(create, inputs) {
6675
+ {
6676
+ currentHookNameInDev = 'useLayoutEffect';
6677
+
6678
+ error('useLayoutEffect does nothing on the server, because its effect cannot ' + "be encoded into the server renderer's output format. This will lead " + 'to a mismatch between the initial, non-hydrated UI and the intended ' + 'UI. To avoid this, useLayoutEffect should only be used in ' + 'components that render exclusively on the client. ' + 'See https://reactjs.org/link/uselayouteffect-ssr for common fixes.');
6679
+ }
6680
+ }
6681
+
6682
+ function dispatchAction(componentIdentity, queue, action) {
6683
+ if (!(numberOfReRenders < RE_RENDER_LIMIT)) {
6684
+ {
6685
+ throw Error( "Too many re-renders. React limits the number of renders to prevent an infinite loop." );
6686
+ }
6687
+ }
6688
+
6689
+ if (componentIdentity === currentlyRenderingComponent) {
6690
+ // This is a render phase update. Stash it in a lazily-created map of
6691
+ // queue -> linked list of updates. After this render pass, we'll restart
6692
+ // and apply the stashed updates on top of the work-in-progress hook.
6693
+ didScheduleRenderPhaseUpdate = true;
6694
+ var update = {
6695
+ action: action,
6696
+ next: null
6697
+ };
6698
+
6699
+ if (renderPhaseUpdates === null) {
6700
+ renderPhaseUpdates = new Map();
6701
+ }
6702
+
6703
+ var firstRenderPhaseUpdate = renderPhaseUpdates.get(queue);
6704
+
6705
+ if (firstRenderPhaseUpdate === undefined) {
6706
+ renderPhaseUpdates.set(queue, update);
6707
+ } else {
6708
+ // Append the update to the end of the list.
6709
+ var lastRenderPhaseUpdate = firstRenderPhaseUpdate;
6710
+
6711
+ while (lastRenderPhaseUpdate.next !== null) {
6712
+ lastRenderPhaseUpdate = lastRenderPhaseUpdate.next;
6713
+ }
6714
+
6715
+ lastRenderPhaseUpdate.next = update;
6716
+ }
6717
+ }
6718
+ }
6719
+
6720
+ function useCallback(callback, deps) {
6721
+ return useMemo(function () {
6722
+ return callback;
6723
+ }, deps);
6724
+ } // TODO Decide on how to implement this hook for server rendering.
6725
+ // If a mutation occurs during render, consider triggering a Suspense boundary
6726
+ // and falling back to client rendering.
6727
+
6728
+ function useMutableSource(source, getSnapshot, subscribe) {
6729
+ resolveCurrentlyRenderingComponent();
6730
+ return getSnapshot(source._source);
6731
+ }
6732
+
6733
+ function useDeferredValue(value) {
6734
+ resolveCurrentlyRenderingComponent();
6735
+ return value;
6736
+ }
6737
+
6738
+ function useTransition() {
6739
+ resolveCurrentlyRenderingComponent();
6740
+
6741
+ var startTransition = function (callback) {
6742
+ callback();
6743
+ };
6744
+
6745
+ return [startTransition, false];
6746
+ }
6747
+
6748
+ function useOpaqueIdentifier() {
6749
+ return (currentPartialRenderer.identifierPrefix || '') + 'R:' + (currentPartialRenderer.uniqueID++).toString(36);
6750
+ }
6751
+
6752
+ function noop() {}
6753
+
6754
+ var currentPartialRenderer = null;
6755
+ function setCurrentPartialRenderer(renderer) {
6756
+ currentPartialRenderer = renderer;
6757
+ }
6758
+ var Dispatcher = {
6759
+ readContext: readContext,
6760
+ useContext: useContext,
6761
+ useMemo: useMemo,
6762
+ useReducer: useReducer,
6763
+ useRef: useRef,
6764
+ useState: useState,
6765
+ useLayoutEffect: useLayoutEffect,
6766
+ useCallback: useCallback,
6767
+ // useImperativeHandle is not run in the server environment
6768
+ useImperativeHandle: noop,
6769
+ // Effects are not run in the server environment.
6770
+ useEffect: noop,
6771
+ // Debugging effect
6772
+ useDebugValue: noop,
6773
+ useDeferredValue: useDeferredValue,
6774
+ useTransition: useTransition,
6775
+ useOpaqueIdentifier: useOpaqueIdentifier,
6776
+ // Subscriptions are not setup in a server environment.
6777
+ useMutableSource: useMutableSource
6778
+ };
6779
+
6780
+ var HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';
6781
+ var MATH_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';
6782
+ var SVG_NAMESPACE = 'http://www.w3.org/2000/svg';
6783
+ var Namespaces = {
6784
+ html: HTML_NAMESPACE,
6785
+ mathml: MATH_NAMESPACE,
6786
+ svg: SVG_NAMESPACE
6787
+ }; // Assumes there is no parent namespace.
6788
+
6789
+ function getIntrinsicNamespace(type) {
6790
+ switch (type) {
6791
+ case 'svg':
6792
+ return SVG_NAMESPACE;
6793
+
6794
+ case 'math':
6795
+ return MATH_NAMESPACE;
6796
+
6797
+ default:
6798
+ return HTML_NAMESPACE;
6799
+ }
6800
+ }
6801
+ function getChildNamespace(parentNamespace, type) {
6802
+ if (parentNamespace == null || parentNamespace === HTML_NAMESPACE) {
6803
+ // No (or default) parent namespace: potential entry point.
6804
+ return getIntrinsicNamespace(type);
6805
+ }
6806
+
6807
+ if (parentNamespace === SVG_NAMESPACE && type === 'foreignObject') {
6808
+ // We're leaving SVG.
6809
+ return HTML_NAMESPACE;
6810
+ } // By default, pass namespace below.
6811
+
6812
+
6813
+ return parentNamespace;
6814
+ }
6815
+
6816
+ var hasReadOnlyValue = {
6817
+ button: true,
6818
+ checkbox: true,
6819
+ image: true,
6820
+ hidden: true,
6821
+ radio: true,
6822
+ reset: true,
6823
+ submit: true
6824
+ };
6825
+ function checkControlledValueProps(tagName, props) {
6826
+ {
6827
+ if (!(hasReadOnlyValue[props.type] || props.onChange || props.onInput || props.readOnly || props.disabled || props.value == null)) {
6828
+ 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`.');
6829
+ }
6830
+
6831
+ if (!(props.onChange || props.readOnly || props.disabled || props.checked == null)) {
6832
+ 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`.');
6833
+ }
6834
+ }
6835
+ }
6836
+
6837
+ // For HTML, certain tags should omit their close tag. We keep a list for
6838
+ // those special-case tags.
6839
+ var omittedCloseTags = {
6840
+ area: true,
6841
+ base: true,
6842
+ br: true,
6843
+ col: true,
6844
+ embed: true,
6845
+ hr: true,
6846
+ img: true,
6847
+ input: true,
6848
+ keygen: true,
6849
+ link: true,
6850
+ meta: true,
6851
+ param: true,
6852
+ source: true,
6853
+ track: true,
6854
+ wbr: true // NOTE: menuitem's close tag should be omitted, but that causes problems.
6855
+
6856
+ };
6857
+
6858
+ // `omittedCloseTags` except that `menuitem` should still have its closing tag.
6859
+
6860
+ var voidElementTags = _assign({
6861
+ menuitem: true
6862
+ }, omittedCloseTags);
6863
+
6864
+ var HTML = '__html';
6865
+
6866
+ function assertValidProps(tag, props) {
6867
+ if (!props) {
6868
+ return;
6869
+ } // Note the use of `==` which checks for null or undefined.
6870
+
6871
+
6872
+ if (voidElementTags[tag]) {
6873
+ if (!(props.children == null && props.dangerouslySetInnerHTML == null)) {
6874
+ {
6875
+ throw Error( tag + " is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`." );
6876
+ }
6877
+ }
6878
+ }
6879
+
6880
+ if (props.dangerouslySetInnerHTML != null) {
6881
+ if (!(props.children == null)) {
6882
+ {
6883
+ throw Error( "Can only set one of `children` or `props.dangerouslySetInnerHTML`." );
6884
+ }
6885
+ }
6886
+
6887
+ if (!(typeof props.dangerouslySetInnerHTML === 'object' && HTML in props.dangerouslySetInnerHTML)) {
6888
+ {
6889
+ throw Error( "`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://reactjs.org/link/dangerously-set-inner-html for more information." );
6890
+ }
6891
+ }
6892
+ }
6893
+
6894
+ {
6895
+ if (!props.suppressContentEditableWarning && props.contentEditable && props.children != null) {
6896
+ error('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.');
6897
+ }
6898
+ }
6899
+
6900
+ if (!(props.style == null || typeof props.style === 'object')) {
6901
+ {
6902
+ throw Error( "The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX." );
6903
+ }
6904
+ }
6905
+ }
6906
+
6907
+ /**
6908
+ * CSS properties which accept numbers but are not in units of "px".
6909
+ */
6910
+ var isUnitlessNumber = {
6911
+ animationIterationCount: true,
6912
+ borderImageOutset: true,
6913
+ borderImageSlice: true,
6914
+ borderImageWidth: true,
6915
+ boxFlex: true,
6916
+ boxFlexGroup: true,
6917
+ boxOrdinalGroup: true,
6918
+ columnCount: true,
6919
+ columns: true,
6920
+ flex: true,
6921
+ flexGrow: true,
6922
+ flexPositive: true,
6923
+ flexShrink: true,
6924
+ flexNegative: true,
6925
+ flexOrder: true,
6926
+ gridArea: true,
6927
+ gridRow: true,
6928
+ gridRowEnd: true,
6929
+ gridRowSpan: true,
6930
+ gridRowStart: true,
6931
+ gridColumn: true,
6932
+ gridColumnEnd: true,
6933
+ gridColumnSpan: true,
6934
+ gridColumnStart: true,
6935
+ fontWeight: true,
6936
+ lineClamp: true,
6937
+ lineHeight: true,
6938
+ opacity: true,
6939
+ order: true,
6940
+ orphans: true,
6941
+ tabSize: true,
6942
+ widows: true,
6943
+ zIndex: true,
6944
+ zoom: true,
6945
+ // SVG-related properties
6946
+ fillOpacity: true,
6947
+ floodOpacity: true,
6948
+ stopOpacity: true,
6949
+ strokeDasharray: true,
6950
+ strokeDashoffset: true,
6951
+ strokeMiterlimit: true,
6952
+ strokeOpacity: true,
6953
+ strokeWidth: true
6954
+ };
6955
+ /**
6956
+ * @param {string} prefix vendor-specific prefix, eg: Webkit
6957
+ * @param {string} key style name, eg: transitionDuration
6958
+ * @return {string} style name prefixed with `prefix`, properly camelCased, eg:
6959
+ * WebkitTransitionDuration
6960
+ */
6961
+
6962
+ function prefixKey(prefix, key) {
6963
+ return prefix + key.charAt(0).toUpperCase() + key.substring(1);
6964
+ }
6965
+ /**
6966
+ * Support style names that may come passed in prefixed by adding permutations
6967
+ * of vendor prefixes.
6968
+ */
6969
+
6970
+
6971
+ var prefixes = ['Webkit', 'ms', 'Moz', 'O']; // Using Object.keys here, or else the vanilla for-in loop makes IE8 go into an
6972
+ // infinite loop, because it iterates over the newly added props too.
6973
+
6974
+ Object.keys(isUnitlessNumber).forEach(function (prop) {
6975
+ prefixes.forEach(function (prefix) {
6976
+ isUnitlessNumber[prefixKey(prefix, prop)] = isUnitlessNumber[prop];
6977
+ });
6978
+ });
6979
+
6980
+ /**
6981
+ * Convert a value into the proper css writable value. The style name `name`
6982
+ * should be logical (no hyphens), as specified
6983
+ * in `CSSProperty.isUnitlessNumber`.
6984
+ *
6985
+ * @param {string} name CSS property name such as `topMargin`.
6986
+ * @param {*} value CSS property value such as `10px`.
6987
+ * @return {string} Normalized style value with dimensions applied.
6988
+ */
6989
+
6990
+ function dangerousStyleValue(name, value, isCustomProperty) {
6991
+ // Note that we've removed escapeTextForBrowser() calls here since the
6992
+ // whole string will be escaped when the attribute is injected into
6993
+ // the markup. If you provide unsafe user data here they can inject
6994
+ // arbitrary CSS which may be problematic (I couldn't repro this):
6995
+ // https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet
6996
+ // http://www.thespanner.co.uk/2007/11/26/ultimate-xss-css-injection/
6997
+ // This is not an XSS hole but instead a potential CSS injection issue
6998
+ // which has lead to a greater discussion about how we're going to
6999
+ // trust URLs moving forward. See #2115901
7000
+ var isEmpty = value == null || typeof value === 'boolean' || value === '';
7001
+
7002
+ if (isEmpty) {
7003
+ return '';
7004
+ }
7005
+
7006
+ if (!isCustomProperty && typeof value === 'number' && value !== 0 && !(isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name])) {
7007
+ return value + 'px'; // Presumes implicit 'px' suffix for unitless numbers
7008
+ }
7009
+
7010
+ return ('' + value).trim();
7011
+ }
7012
+
7013
+ var uppercasePattern = /([A-Z])/g;
7014
+ var msPattern = /^ms-/;
7015
+ /**
7016
+ * Hyphenates a camelcased CSS property name, for example:
7017
+ *
7018
+ * > hyphenateStyleName('backgroundColor')
7019
+ * < "background-color"
7020
+ * > hyphenateStyleName('MozTransition')
7021
+ * < "-moz-transition"
7022
+ * > hyphenateStyleName('msTransition')
7023
+ * < "-ms-transition"
7024
+ *
7025
+ * As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix
7026
+ * is converted to `-ms-`.
7027
+ */
7028
+
7029
+ function hyphenateStyleName(name) {
7030
+ return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');
7031
+ }
7032
+
7033
+ function isCustomComponent(tagName, props) {
7034
+ if (tagName.indexOf('-') === -1) {
7035
+ return typeof props.is === 'string';
7036
+ }
7037
+
7038
+ switch (tagName) {
7039
+ // These are reserved SVG and MathML elements.
7040
+ // We don't mind this list too much because we expect it to never grow.
7041
+ // The alternative is to track the namespace in a few places which is convoluted.
7042
+ // https://w3c.github.io/webcomponents/spec/custom/#custom-elements-core-concepts
7043
+ case 'annotation-xml':
7044
+ case 'color-profile':
7045
+ case 'font-face':
7046
+ case 'font-face-src':
7047
+ case 'font-face-uri':
7048
+ case 'font-face-format':
7049
+ case 'font-face-name':
7050
+ case 'missing-glyph':
7051
+ return false;
7052
+
7053
+ default:
7054
+ return true;
7055
+ }
7056
+ }
7057
+
7058
+ var warnValidStyle = function () {};
7059
+
7060
+ {
7061
+ // 'msTransform' is correct, but the other prefixes should be capitalized
7062
+ var badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/;
7063
+ var msPattern$1 = /^-ms-/;
7064
+ var hyphenPattern = /-(.)/g; // style values shouldn't contain a semicolon
7065
+
7066
+ var badStyleValueWithSemicolonPattern = /;\s*$/;
7067
+ var warnedStyleNames = {};
7068
+ var warnedStyleValues = {};
7069
+ var warnedForNaNValue = false;
7070
+ var warnedForInfinityValue = false;
7071
+
7072
+ var camelize = function (string) {
7073
+ return string.replace(hyphenPattern, function (_, character) {
7074
+ return character.toUpperCase();
7075
+ });
7076
+ };
7077
+
7078
+ var warnHyphenatedStyleName = function (name) {
7079
+ if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {
7080
+ return;
7081
+ }
7082
+
7083
+ warnedStyleNames[name] = true;
7084
+
7085
+ error('Unsupported style property %s. Did you mean %s?', name, // As Andi Smith suggests
7086
+ // (http://www.andismith.com/blog/2012/02/modernizr-prefixed/), an `-ms` prefix
7087
+ // is converted to lowercase `ms`.
7088
+ camelize(name.replace(msPattern$1, 'ms-')));
7089
+ };
7090
+
7091
+ var warnBadVendoredStyleName = function (name) {
7092
+ if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {
7093
+ return;
7094
+ }
7095
+
7096
+ warnedStyleNames[name] = true;
7097
+
7098
+ error('Unsupported vendor-prefixed style property %s. Did you mean %s?', name, name.charAt(0).toUpperCase() + name.slice(1));
7099
+ };
7100
+
7101
+ var warnStyleValueWithSemicolon = function (name, value) {
7102
+ if (warnedStyleValues.hasOwnProperty(value) && warnedStyleValues[value]) {
7103
+ return;
7104
+ }
7105
+
7106
+ warnedStyleValues[value] = true;
7107
+
7108
+ error("Style property values shouldn't contain a semicolon. " + 'Try "%s: %s" instead.', name, value.replace(badStyleValueWithSemicolonPattern, ''));
7109
+ };
7110
+
7111
+ var warnStyleValueIsNaN = function (name, value) {
7112
+ if (warnedForNaNValue) {
7113
+ return;
7114
+ }
7115
+
7116
+ warnedForNaNValue = true;
7117
+
7118
+ error('`NaN` is an invalid value for the `%s` css style property.', name);
7119
+ };
7120
+
7121
+ var warnStyleValueIsInfinity = function (name, value) {
7122
+ if (warnedForInfinityValue) {
7123
+ return;
7124
+ }
7125
+
7126
+ warnedForInfinityValue = true;
7127
+
7128
+ error('`Infinity` is an invalid value for the `%s` css style property.', name);
7129
+ };
7130
+
7131
+ warnValidStyle = function (name, value) {
7132
+ if (name.indexOf('-') > -1) {
7133
+ warnHyphenatedStyleName(name);
7134
+ } else if (badVendoredStyleNamePattern.test(name)) {
7135
+ warnBadVendoredStyleName(name);
7136
+ } else if (badStyleValueWithSemicolonPattern.test(value)) {
7137
+ warnStyleValueWithSemicolon(name, value);
7138
+ }
7139
+
7140
+ if (typeof value === 'number') {
7141
+ if (isNaN(value)) {
7142
+ warnStyleValueIsNaN(name, value);
7143
+ } else if (!isFinite(value)) {
7144
+ warnStyleValueIsInfinity(name, value);
7145
+ }
7146
+ }
7147
+ };
7148
+ }
7149
+
7150
+ var warnValidStyle$1 = warnValidStyle;
7151
+
7152
+ var ariaProperties = {
7153
+ 'aria-current': 0,
7154
+ // state
7155
+ 'aria-details': 0,
7156
+ 'aria-disabled': 0,
7157
+ // state
7158
+ 'aria-hidden': 0,
7159
+ // state
7160
+ 'aria-invalid': 0,
7161
+ // state
7162
+ 'aria-keyshortcuts': 0,
7163
+ 'aria-label': 0,
7164
+ 'aria-roledescription': 0,
7165
+ // Widget Attributes
7166
+ 'aria-autocomplete': 0,
7167
+ 'aria-checked': 0,
7168
+ 'aria-expanded': 0,
7169
+ 'aria-haspopup': 0,
7170
+ 'aria-level': 0,
7171
+ 'aria-modal': 0,
7172
+ 'aria-multiline': 0,
7173
+ 'aria-multiselectable': 0,
7174
+ 'aria-orientation': 0,
7175
+ 'aria-placeholder': 0,
7176
+ 'aria-pressed': 0,
7177
+ 'aria-readonly': 0,
7178
+ 'aria-required': 0,
7179
+ 'aria-selected': 0,
7180
+ 'aria-sort': 0,
7181
+ 'aria-valuemax': 0,
7182
+ 'aria-valuemin': 0,
7183
+ 'aria-valuenow': 0,
7184
+ 'aria-valuetext': 0,
7185
+ // Live Region Attributes
7186
+ 'aria-atomic': 0,
7187
+ 'aria-busy': 0,
7188
+ 'aria-live': 0,
7189
+ 'aria-relevant': 0,
7190
+ // Drag-and-Drop Attributes
7191
+ 'aria-dropeffect': 0,
7192
+ 'aria-grabbed': 0,
7193
+ // Relationship Attributes
7194
+ 'aria-activedescendant': 0,
7195
+ 'aria-colcount': 0,
7196
+ 'aria-colindex': 0,
7197
+ 'aria-colspan': 0,
7198
+ 'aria-controls': 0,
7199
+ 'aria-describedby': 0,
7200
+ 'aria-errormessage': 0,
7201
+ 'aria-flowto': 0,
7202
+ 'aria-labelledby': 0,
7203
+ 'aria-owns': 0,
7204
+ 'aria-posinset': 0,
7205
+ 'aria-rowcount': 0,
7206
+ 'aria-rowindex': 0,
7207
+ 'aria-rowspan': 0,
7208
+ 'aria-setsize': 0
7209
+ };
7210
+
7211
+ var warnedProperties = {};
7212
+ var rARIA = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$');
7213
+ var rARIACamel = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$');
7214
+ var hasOwnProperty$1 = Object.prototype.hasOwnProperty;
7215
+
7216
+ function validateProperty(tagName, name) {
7217
+ {
7218
+ if (hasOwnProperty$1.call(warnedProperties, name) && warnedProperties[name]) {
7219
+ return true;
7220
+ }
7221
+
7222
+ if (rARIACamel.test(name)) {
7223
+ var ariaName = 'aria-' + name.slice(4).toLowerCase();
7224
+ var correctName = ariaProperties.hasOwnProperty(ariaName) ? ariaName : null; // If this is an aria-* attribute, but is not listed in the known DOM
7225
+ // DOM properties, then it is an invalid aria-* attribute.
7226
+
7227
+ if (correctName == null) {
7228
+ error('Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.', name);
7229
+
7230
+ warnedProperties[name] = true;
7231
+ return true;
7232
+ } // aria-* attributes should be lowercase; suggest the lowercase version.
7233
+
7234
+
7235
+ if (name !== correctName) {
7236
+ error('Invalid ARIA attribute `%s`. Did you mean `%s`?', name, correctName);
7237
+
7238
+ warnedProperties[name] = true;
7239
+ return true;
7240
+ }
7241
+ }
7242
+
7243
+ if (rARIA.test(name)) {
7244
+ var lowerCasedName = name.toLowerCase();
7245
+ var standardName = ariaProperties.hasOwnProperty(lowerCasedName) ? lowerCasedName : null; // If this is an aria-* attribute, but is not listed in the known DOM
7246
+ // DOM properties, then it is an invalid aria-* attribute.
7247
+
7248
+ if (standardName == null) {
7249
+ warnedProperties[name] = true;
7250
+ return false;
7251
+ } // aria-* attributes should be lowercase; suggest the lowercase version.
7252
+
7253
+
7254
+ if (name !== standardName) {
7255
+ error('Unknown ARIA attribute `%s`. Did you mean `%s`?', name, standardName);
7256
+
7257
+ warnedProperties[name] = true;
7258
+ return true;
7259
+ }
7260
+ }
7261
+ }
7262
+
7263
+ return true;
7264
+ }
7265
+
7266
+ function warnInvalidARIAProps(type, props) {
7267
+ {
7268
+ var invalidProps = [];
7269
+
7270
+ for (var key in props) {
7271
+ var isValid = validateProperty(type, key);
7272
+
7273
+ if (!isValid) {
7274
+ invalidProps.push(key);
7275
+ }
7276
+ }
7277
+
7278
+ var unknownPropString = invalidProps.map(function (prop) {
7279
+ return '`' + prop + '`';
7280
+ }).join(', ');
7281
+
7282
+ if (invalidProps.length === 1) {
7283
+ error('Invalid aria prop %s on <%s> tag. ' + 'For details, see https://reactjs.org/link/invalid-aria-props', unknownPropString, type);
7284
+ } else if (invalidProps.length > 1) {
7285
+ error('Invalid aria props %s on <%s> tag. ' + 'For details, see https://reactjs.org/link/invalid-aria-props', unknownPropString, type);
7286
+ }
7287
+ }
7288
+ }
7289
+
7290
+ function validateProperties(type, props) {
7291
+ if (isCustomComponent(type, props)) {
7292
+ return;
7293
+ }
7294
+
7295
+ warnInvalidARIAProps(type, props);
7296
+ }
7297
+
7298
+ var didWarnValueNull = false;
7299
+ function validateProperties$1(type, props) {
7300
+ {
7301
+ if (type !== 'input' && type !== 'textarea' && type !== 'select') {
7302
+ return;
7303
+ }
7304
+
7305
+ if (props != null && props.value === null && !didWarnValueNull) {
7306
+ didWarnValueNull = true;
7307
+
7308
+ if (type === 'select' && props.multiple) {
7309
+ error('`value` prop on `%s` should not be null. ' + 'Consider using an empty array when `multiple` is set to `true` ' + 'to clear the component or `undefined` for uncontrolled components.', type);
7310
+ } else {
7311
+ error('`value` prop on `%s` should not be null. ' + 'Consider using an empty string to clear the component or `undefined` ' + 'for uncontrolled components.', type);
7312
+ }
7313
+ }
7314
+ }
7315
+ }
7316
+
7317
+ // When adding attributes to the HTML or SVG allowed attribute list, be sure to
7318
+ // also add them to this module to ensure casing and incorrect name
7319
+ // warnings.
7320
+ var possibleStandardNames = {
7321
+ // HTML
7322
+ accept: 'accept',
7323
+ acceptcharset: 'acceptCharset',
7324
+ 'accept-charset': 'acceptCharset',
7325
+ accesskey: 'accessKey',
7326
+ action: 'action',
7327
+ allowfullscreen: 'allowFullScreen',
7328
+ alt: 'alt',
7329
+ as: 'as',
7330
+ async: 'async',
7331
+ autocapitalize: 'autoCapitalize',
7332
+ autocomplete: 'autoComplete',
7333
+ autocorrect: 'autoCorrect',
7334
+ autofocus: 'autoFocus',
7335
+ autoplay: 'autoPlay',
7336
+ autosave: 'autoSave',
7337
+ capture: 'capture',
7338
+ cellpadding: 'cellPadding',
7339
+ cellspacing: 'cellSpacing',
7340
+ challenge: 'challenge',
7341
+ charset: 'charSet',
7342
+ checked: 'checked',
7343
+ children: 'children',
7344
+ cite: 'cite',
7345
+ class: 'className',
7346
+ classid: 'classID',
7347
+ classname: 'className',
7348
+ cols: 'cols',
7349
+ colspan: 'colSpan',
7350
+ content: 'content',
7351
+ contenteditable: 'contentEditable',
7352
+ contextmenu: 'contextMenu',
7353
+ controls: 'controls',
7354
+ controlslist: 'controlsList',
7355
+ coords: 'coords',
7356
+ crossorigin: 'crossOrigin',
7357
+ dangerouslysetinnerhtml: 'dangerouslySetInnerHTML',
7358
+ data: 'data',
7359
+ datetime: 'dateTime',
7360
+ default: 'default',
7361
+ defaultchecked: 'defaultChecked',
7362
+ defaultvalue: 'defaultValue',
7363
+ defer: 'defer',
7364
+ dir: 'dir',
7365
+ disabled: 'disabled',
7366
+ disablepictureinpicture: 'disablePictureInPicture',
7367
+ disableremoteplayback: 'disableRemotePlayback',
7368
+ download: 'download',
7369
+ draggable: 'draggable',
7370
+ enctype: 'encType',
7371
+ enterkeyhint: 'enterKeyHint',
7372
+ for: 'htmlFor',
7373
+ form: 'form',
7374
+ formmethod: 'formMethod',
7375
+ formaction: 'formAction',
7376
+ formenctype: 'formEncType',
7377
+ formnovalidate: 'formNoValidate',
7378
+ formtarget: 'formTarget',
7379
+ frameborder: 'frameBorder',
7380
+ headers: 'headers',
7381
+ height: 'height',
7382
+ hidden: 'hidden',
7383
+ high: 'high',
7384
+ href: 'href',
7385
+ hreflang: 'hrefLang',
7386
+ htmlfor: 'htmlFor',
7387
+ httpequiv: 'httpEquiv',
7388
+ 'http-equiv': 'httpEquiv',
7389
+ icon: 'icon',
7390
+ id: 'id',
7391
+ innerhtml: 'innerHTML',
7392
+ inputmode: 'inputMode',
7393
+ integrity: 'integrity',
7394
+ is: 'is',
7395
+ itemid: 'itemID',
7396
+ itemprop: 'itemProp',
7397
+ itemref: 'itemRef',
7398
+ itemscope: 'itemScope',
7399
+ itemtype: 'itemType',
7400
+ keyparams: 'keyParams',
7401
+ keytype: 'keyType',
7402
+ kind: 'kind',
7403
+ label: 'label',
7404
+ lang: 'lang',
7405
+ list: 'list',
7406
+ loop: 'loop',
7407
+ low: 'low',
7408
+ manifest: 'manifest',
7409
+ marginwidth: 'marginWidth',
7410
+ marginheight: 'marginHeight',
7411
+ max: 'max',
7412
+ maxlength: 'maxLength',
7413
+ media: 'media',
7414
+ mediagroup: 'mediaGroup',
7415
+ method: 'method',
7416
+ min: 'min',
7417
+ minlength: 'minLength',
7418
+ multiple: 'multiple',
7419
+ muted: 'muted',
7420
+ name: 'name',
7421
+ nomodule: 'noModule',
7422
+ nonce: 'nonce',
7423
+ novalidate: 'noValidate',
7424
+ open: 'open',
7425
+ optimum: 'optimum',
7426
+ pattern: 'pattern',
7427
+ placeholder: 'placeholder',
7428
+ playsinline: 'playsInline',
7429
+ poster: 'poster',
7430
+ preload: 'preload',
7431
+ profile: 'profile',
7432
+ radiogroup: 'radioGroup',
7433
+ readonly: 'readOnly',
7434
+ referrerpolicy: 'referrerPolicy',
7435
+ rel: 'rel',
7436
+ required: 'required',
7437
+ reversed: 'reversed',
7438
+ role: 'role',
7439
+ rows: 'rows',
7440
+ rowspan: 'rowSpan',
7441
+ sandbox: 'sandbox',
7442
+ scope: 'scope',
7443
+ scoped: 'scoped',
7444
+ scrolling: 'scrolling',
7445
+ seamless: 'seamless',
7446
+ selected: 'selected',
7447
+ shape: 'shape',
7448
+ size: 'size',
7449
+ sizes: 'sizes',
7450
+ span: 'span',
7451
+ spellcheck: 'spellCheck',
7452
+ src: 'src',
7453
+ srcdoc: 'srcDoc',
7454
+ srclang: 'srcLang',
7455
+ srcset: 'srcSet',
7456
+ start: 'start',
7457
+ step: 'step',
7458
+ style: 'style',
7459
+ summary: 'summary',
7460
+ tabindex: 'tabIndex',
7461
+ target: 'target',
7462
+ title: 'title',
7463
+ type: 'type',
7464
+ usemap: 'useMap',
7465
+ value: 'value',
7466
+ width: 'width',
7467
+ wmode: 'wmode',
7468
+ wrap: 'wrap',
7469
+ // SVG
7470
+ about: 'about',
7471
+ accentheight: 'accentHeight',
7472
+ 'accent-height': 'accentHeight',
7473
+ accumulate: 'accumulate',
7474
+ additive: 'additive',
7475
+ alignmentbaseline: 'alignmentBaseline',
7476
+ 'alignment-baseline': 'alignmentBaseline',
7477
+ allowreorder: 'allowReorder',
7478
+ alphabetic: 'alphabetic',
7479
+ amplitude: 'amplitude',
7480
+ arabicform: 'arabicForm',
7481
+ 'arabic-form': 'arabicForm',
7482
+ ascent: 'ascent',
7483
+ attributename: 'attributeName',
7484
+ attributetype: 'attributeType',
7485
+ autoreverse: 'autoReverse',
7486
+ azimuth: 'azimuth',
7487
+ basefrequency: 'baseFrequency',
7488
+ baselineshift: 'baselineShift',
7489
+ 'baseline-shift': 'baselineShift',
7490
+ baseprofile: 'baseProfile',
7491
+ bbox: 'bbox',
7492
+ begin: 'begin',
7493
+ bias: 'bias',
7494
+ by: 'by',
7495
+ calcmode: 'calcMode',
7496
+ capheight: 'capHeight',
7497
+ 'cap-height': 'capHeight',
7498
+ clip: 'clip',
7499
+ clippath: 'clipPath',
7500
+ 'clip-path': 'clipPath',
7501
+ clippathunits: 'clipPathUnits',
7502
+ cliprule: 'clipRule',
7503
+ 'clip-rule': 'clipRule',
7504
+ color: 'color',
7505
+ colorinterpolation: 'colorInterpolation',
7506
+ 'color-interpolation': 'colorInterpolation',
7507
+ colorinterpolationfilters: 'colorInterpolationFilters',
7508
+ 'color-interpolation-filters': 'colorInterpolationFilters',
7509
+ colorprofile: 'colorProfile',
7510
+ 'color-profile': 'colorProfile',
7511
+ colorrendering: 'colorRendering',
7512
+ 'color-rendering': 'colorRendering',
7513
+ contentscripttype: 'contentScriptType',
7514
+ contentstyletype: 'contentStyleType',
7515
+ cursor: 'cursor',
7516
+ cx: 'cx',
7517
+ cy: 'cy',
7518
+ d: 'd',
7519
+ datatype: 'datatype',
7520
+ decelerate: 'decelerate',
7521
+ descent: 'descent',
7522
+ diffuseconstant: 'diffuseConstant',
7523
+ direction: 'direction',
7524
+ display: 'display',
7525
+ divisor: 'divisor',
7526
+ dominantbaseline: 'dominantBaseline',
7527
+ 'dominant-baseline': 'dominantBaseline',
7528
+ dur: 'dur',
7529
+ dx: 'dx',
7530
+ dy: 'dy',
7531
+ edgemode: 'edgeMode',
7532
+ elevation: 'elevation',
7533
+ enablebackground: 'enableBackground',
7534
+ 'enable-background': 'enableBackground',
7535
+ end: 'end',
7536
+ exponent: 'exponent',
7537
+ externalresourcesrequired: 'externalResourcesRequired',
7538
+ fill: 'fill',
7539
+ fillopacity: 'fillOpacity',
7540
+ 'fill-opacity': 'fillOpacity',
7541
+ fillrule: 'fillRule',
7542
+ 'fill-rule': 'fillRule',
7543
+ filter: 'filter',
7544
+ filterres: 'filterRes',
7545
+ filterunits: 'filterUnits',
7546
+ floodopacity: 'floodOpacity',
7547
+ 'flood-opacity': 'floodOpacity',
7548
+ floodcolor: 'floodColor',
7549
+ 'flood-color': 'floodColor',
7550
+ focusable: 'focusable',
7551
+ fontfamily: 'fontFamily',
7552
+ 'font-family': 'fontFamily',
7553
+ fontsize: 'fontSize',
7554
+ 'font-size': 'fontSize',
7555
+ fontsizeadjust: 'fontSizeAdjust',
7556
+ 'font-size-adjust': 'fontSizeAdjust',
7557
+ fontstretch: 'fontStretch',
7558
+ 'font-stretch': 'fontStretch',
7559
+ fontstyle: 'fontStyle',
7560
+ 'font-style': 'fontStyle',
7561
+ fontvariant: 'fontVariant',
7562
+ 'font-variant': 'fontVariant',
7563
+ fontweight: 'fontWeight',
7564
+ 'font-weight': 'fontWeight',
7565
+ format: 'format',
7566
+ from: 'from',
7567
+ fx: 'fx',
7568
+ fy: 'fy',
7569
+ g1: 'g1',
7570
+ g2: 'g2',
7571
+ glyphname: 'glyphName',
7572
+ 'glyph-name': 'glyphName',
7573
+ glyphorientationhorizontal: 'glyphOrientationHorizontal',
7574
+ 'glyph-orientation-horizontal': 'glyphOrientationHorizontal',
7575
+ glyphorientationvertical: 'glyphOrientationVertical',
7576
+ 'glyph-orientation-vertical': 'glyphOrientationVertical',
7577
+ glyphref: 'glyphRef',
7578
+ gradienttransform: 'gradientTransform',
7579
+ gradientunits: 'gradientUnits',
7580
+ hanging: 'hanging',
7581
+ horizadvx: 'horizAdvX',
7582
+ 'horiz-adv-x': 'horizAdvX',
7583
+ horizoriginx: 'horizOriginX',
7584
+ 'horiz-origin-x': 'horizOriginX',
7585
+ ideographic: 'ideographic',
7586
+ imagerendering: 'imageRendering',
7587
+ 'image-rendering': 'imageRendering',
7588
+ in2: 'in2',
7589
+ in: 'in',
7590
+ inlist: 'inlist',
7591
+ intercept: 'intercept',
7592
+ k1: 'k1',
7593
+ k2: 'k2',
7594
+ k3: 'k3',
7595
+ k4: 'k4',
7596
+ k: 'k',
7597
+ kernelmatrix: 'kernelMatrix',
7598
+ kernelunitlength: 'kernelUnitLength',
7599
+ kerning: 'kerning',
7600
+ keypoints: 'keyPoints',
7601
+ keysplines: 'keySplines',
7602
+ keytimes: 'keyTimes',
7603
+ lengthadjust: 'lengthAdjust',
7604
+ letterspacing: 'letterSpacing',
7605
+ 'letter-spacing': 'letterSpacing',
7606
+ lightingcolor: 'lightingColor',
7607
+ 'lighting-color': 'lightingColor',
7608
+ limitingconeangle: 'limitingConeAngle',
7609
+ local: 'local',
7610
+ markerend: 'markerEnd',
7611
+ 'marker-end': 'markerEnd',
7612
+ markerheight: 'markerHeight',
7613
+ markermid: 'markerMid',
7614
+ 'marker-mid': 'markerMid',
7615
+ markerstart: 'markerStart',
7616
+ 'marker-start': 'markerStart',
7617
+ markerunits: 'markerUnits',
7618
+ markerwidth: 'markerWidth',
7619
+ mask: 'mask',
7620
+ maskcontentunits: 'maskContentUnits',
7621
+ maskunits: 'maskUnits',
7622
+ mathematical: 'mathematical',
7623
+ mode: 'mode',
7624
+ numoctaves: 'numOctaves',
7625
+ offset: 'offset',
7626
+ opacity: 'opacity',
7627
+ operator: 'operator',
7628
+ order: 'order',
7629
+ orient: 'orient',
7630
+ orientation: 'orientation',
7631
+ origin: 'origin',
7632
+ overflow: 'overflow',
7633
+ overlineposition: 'overlinePosition',
7634
+ 'overline-position': 'overlinePosition',
7635
+ overlinethickness: 'overlineThickness',
7636
+ 'overline-thickness': 'overlineThickness',
7637
+ paintorder: 'paintOrder',
7638
+ 'paint-order': 'paintOrder',
7639
+ panose1: 'panose1',
7640
+ 'panose-1': 'panose1',
7641
+ pathlength: 'pathLength',
7642
+ patterncontentunits: 'patternContentUnits',
7643
+ patterntransform: 'patternTransform',
7644
+ patternunits: 'patternUnits',
7645
+ pointerevents: 'pointerEvents',
7646
+ 'pointer-events': 'pointerEvents',
7647
+ points: 'points',
7648
+ pointsatx: 'pointsAtX',
7649
+ pointsaty: 'pointsAtY',
7650
+ pointsatz: 'pointsAtZ',
7651
+ prefix: 'prefix',
7652
+ preservealpha: 'preserveAlpha',
7653
+ preserveaspectratio: 'preserveAspectRatio',
7654
+ primitiveunits: 'primitiveUnits',
7655
+ property: 'property',
7656
+ r: 'r',
7657
+ radius: 'radius',
7658
+ refx: 'refX',
7659
+ refy: 'refY',
7660
+ renderingintent: 'renderingIntent',
7661
+ 'rendering-intent': 'renderingIntent',
7662
+ repeatcount: 'repeatCount',
7663
+ repeatdur: 'repeatDur',
7664
+ requiredextensions: 'requiredExtensions',
7665
+ requiredfeatures: 'requiredFeatures',
7666
+ resource: 'resource',
7667
+ restart: 'restart',
7668
+ result: 'result',
7669
+ results: 'results',
7670
+ rotate: 'rotate',
7671
+ rx: 'rx',
7672
+ ry: 'ry',
7673
+ scale: 'scale',
7674
+ security: 'security',
7675
+ seed: 'seed',
7676
+ shaperendering: 'shapeRendering',
7677
+ 'shape-rendering': 'shapeRendering',
7678
+ slope: 'slope',
7679
+ spacing: 'spacing',
7680
+ specularconstant: 'specularConstant',
7681
+ specularexponent: 'specularExponent',
7682
+ speed: 'speed',
7683
+ spreadmethod: 'spreadMethod',
7684
+ startoffset: 'startOffset',
7685
+ stddeviation: 'stdDeviation',
7686
+ stemh: 'stemh',
7687
+ stemv: 'stemv',
7688
+ stitchtiles: 'stitchTiles',
7689
+ stopcolor: 'stopColor',
7690
+ 'stop-color': 'stopColor',
7691
+ stopopacity: 'stopOpacity',
7692
+ 'stop-opacity': 'stopOpacity',
7693
+ strikethroughposition: 'strikethroughPosition',
7694
+ 'strikethrough-position': 'strikethroughPosition',
7695
+ strikethroughthickness: 'strikethroughThickness',
7696
+ 'strikethrough-thickness': 'strikethroughThickness',
7697
+ string: 'string',
7698
+ stroke: 'stroke',
7699
+ strokedasharray: 'strokeDasharray',
7700
+ 'stroke-dasharray': 'strokeDasharray',
7701
+ strokedashoffset: 'strokeDashoffset',
7702
+ 'stroke-dashoffset': 'strokeDashoffset',
7703
+ strokelinecap: 'strokeLinecap',
7704
+ 'stroke-linecap': 'strokeLinecap',
7705
+ strokelinejoin: 'strokeLinejoin',
7706
+ 'stroke-linejoin': 'strokeLinejoin',
7707
+ strokemiterlimit: 'strokeMiterlimit',
7708
+ 'stroke-miterlimit': 'strokeMiterlimit',
7709
+ strokewidth: 'strokeWidth',
7710
+ 'stroke-width': 'strokeWidth',
7711
+ strokeopacity: 'strokeOpacity',
7712
+ 'stroke-opacity': 'strokeOpacity',
7713
+ suppresscontenteditablewarning: 'suppressContentEditableWarning',
7714
+ suppresshydrationwarning: 'suppressHydrationWarning',
7715
+ surfacescale: 'surfaceScale',
7716
+ systemlanguage: 'systemLanguage',
7717
+ tablevalues: 'tableValues',
7718
+ targetx: 'targetX',
7719
+ targety: 'targetY',
7720
+ textanchor: 'textAnchor',
7721
+ 'text-anchor': 'textAnchor',
7722
+ textdecoration: 'textDecoration',
7723
+ 'text-decoration': 'textDecoration',
7724
+ textlength: 'textLength',
7725
+ textrendering: 'textRendering',
7726
+ 'text-rendering': 'textRendering',
7727
+ to: 'to',
7728
+ transform: 'transform',
7729
+ typeof: 'typeof',
7730
+ u1: 'u1',
7731
+ u2: 'u2',
7732
+ underlineposition: 'underlinePosition',
7733
+ 'underline-position': 'underlinePosition',
7734
+ underlinethickness: 'underlineThickness',
7735
+ 'underline-thickness': 'underlineThickness',
7736
+ unicode: 'unicode',
7737
+ unicodebidi: 'unicodeBidi',
7738
+ 'unicode-bidi': 'unicodeBidi',
7739
+ unicoderange: 'unicodeRange',
7740
+ 'unicode-range': 'unicodeRange',
7741
+ unitsperem: 'unitsPerEm',
7742
+ 'units-per-em': 'unitsPerEm',
7743
+ unselectable: 'unselectable',
7744
+ valphabetic: 'vAlphabetic',
7745
+ 'v-alphabetic': 'vAlphabetic',
7746
+ values: 'values',
7747
+ vectoreffect: 'vectorEffect',
7748
+ 'vector-effect': 'vectorEffect',
7749
+ version: 'version',
7750
+ vertadvy: 'vertAdvY',
7751
+ 'vert-adv-y': 'vertAdvY',
7752
+ vertoriginx: 'vertOriginX',
7753
+ 'vert-origin-x': 'vertOriginX',
7754
+ vertoriginy: 'vertOriginY',
7755
+ 'vert-origin-y': 'vertOriginY',
7756
+ vhanging: 'vHanging',
7757
+ 'v-hanging': 'vHanging',
7758
+ videographic: 'vIdeographic',
7759
+ 'v-ideographic': 'vIdeographic',
7760
+ viewbox: 'viewBox',
7761
+ viewtarget: 'viewTarget',
7762
+ visibility: 'visibility',
7763
+ vmathematical: 'vMathematical',
7764
+ 'v-mathematical': 'vMathematical',
7765
+ vocab: 'vocab',
7766
+ widths: 'widths',
7767
+ wordspacing: 'wordSpacing',
7768
+ 'word-spacing': 'wordSpacing',
7769
+ writingmode: 'writingMode',
7770
+ 'writing-mode': 'writingMode',
7771
+ x1: 'x1',
7772
+ x2: 'x2',
7773
+ x: 'x',
7774
+ xchannelselector: 'xChannelSelector',
7775
+ xheight: 'xHeight',
7776
+ 'x-height': 'xHeight',
7777
+ xlinkactuate: 'xlinkActuate',
7778
+ 'xlink:actuate': 'xlinkActuate',
7779
+ xlinkarcrole: 'xlinkArcrole',
7780
+ 'xlink:arcrole': 'xlinkArcrole',
7781
+ xlinkhref: 'xlinkHref',
7782
+ 'xlink:href': 'xlinkHref',
7783
+ xlinkrole: 'xlinkRole',
7784
+ 'xlink:role': 'xlinkRole',
7785
+ xlinkshow: 'xlinkShow',
7786
+ 'xlink:show': 'xlinkShow',
7787
+ xlinktitle: 'xlinkTitle',
7788
+ 'xlink:title': 'xlinkTitle',
7789
+ xlinktype: 'xlinkType',
7790
+ 'xlink:type': 'xlinkType',
7791
+ xmlbase: 'xmlBase',
7792
+ 'xml:base': 'xmlBase',
7793
+ xmllang: 'xmlLang',
7794
+ 'xml:lang': 'xmlLang',
7795
+ xmlns: 'xmlns',
7796
+ 'xml:space': 'xmlSpace',
7797
+ xmlnsxlink: 'xmlnsXlink',
7798
+ 'xmlns:xlink': 'xmlnsXlink',
7799
+ xmlspace: 'xmlSpace',
7800
+ y1: 'y1',
7801
+ y2: 'y2',
7802
+ y: 'y',
7803
+ ychannelselector: 'yChannelSelector',
7804
+ z: 'z',
7805
+ zoomandpan: 'zoomAndPan'
7806
+ };
7807
+
7808
+ var validateProperty$1 = function () {};
7809
+
7810
+ {
7811
+ var warnedProperties$1 = {};
7812
+ var _hasOwnProperty = Object.prototype.hasOwnProperty;
7813
+ var EVENT_NAME_REGEX = /^on./;
7814
+ var INVALID_EVENT_NAME_REGEX = /^on[^A-Z]/;
7815
+ var rARIA$1 = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$');
7816
+ var rARIACamel$1 = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$');
7817
+
7818
+ validateProperty$1 = function (tagName, name, value, eventRegistry) {
7819
+ if (_hasOwnProperty.call(warnedProperties$1, name) && warnedProperties$1[name]) {
7820
+ return true;
7821
+ }
7822
+
7823
+ var lowerCasedName = name.toLowerCase();
7824
+
7825
+ if (lowerCasedName === 'onfocusin' || lowerCasedName === 'onfocusout') {
7826
+ error('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.');
7827
+
7828
+ warnedProperties$1[name] = true;
7829
+ return true;
7830
+ } // We can't rely on the event system being injected on the server.
7831
+
7832
+
7833
+ if (eventRegistry != null) {
7834
+ var registrationNameDependencies = eventRegistry.registrationNameDependencies,
7835
+ possibleRegistrationNames = eventRegistry.possibleRegistrationNames;
7836
+
7837
+ if (registrationNameDependencies.hasOwnProperty(name)) {
7838
+ return true;
7839
+ }
7840
+
7841
+ var registrationName = possibleRegistrationNames.hasOwnProperty(lowerCasedName) ? possibleRegistrationNames[lowerCasedName] : null;
7842
+
7843
+ if (registrationName != null) {
7844
+ error('Invalid event handler property `%s`. Did you mean `%s`?', name, registrationName);
7845
+
7846
+ warnedProperties$1[name] = true;
7847
+ return true;
7848
+ }
7849
+
7850
+ if (EVENT_NAME_REGEX.test(name)) {
7851
+ error('Unknown event handler property `%s`. It will be ignored.', name);
7852
+
7853
+ warnedProperties$1[name] = true;
7854
+ return true;
7855
+ }
7856
+ } else if (EVENT_NAME_REGEX.test(name)) {
7857
+ // If no event plugins have been injected, we are in a server environment.
7858
+ // So we can't tell if the event name is correct for sure, but we can filter
7859
+ // out known bad ones like `onclick`. We can't suggest a specific replacement though.
7860
+ if (INVALID_EVENT_NAME_REGEX.test(name)) {
7861
+ error('Invalid event handler property `%s`. ' + 'React events use the camelCase naming convention, for example `onClick`.', name);
7862
+ }
7863
+
7864
+ warnedProperties$1[name] = true;
7865
+ return true;
7866
+ } // Let the ARIA attribute hook validate ARIA attributes
7867
+
7868
+
7869
+ if (rARIA$1.test(name) || rARIACamel$1.test(name)) {
7870
+ return true;
7871
+ }
7872
+
7873
+ if (lowerCasedName === 'innerhtml') {
7874
+ error('Directly setting property `innerHTML` is not permitted. ' + 'For more information, lookup documentation on `dangerouslySetInnerHTML`.');
7875
+
7876
+ warnedProperties$1[name] = true;
7877
+ return true;
7878
+ }
7879
+
7880
+ if (lowerCasedName === 'aria') {
7881
+ error('The `aria` attribute is reserved for future use in React. ' + 'Pass individual `aria-` attributes instead.');
7882
+
7883
+ warnedProperties$1[name] = true;
7884
+ return true;
7885
+ }
7886
+
7887
+ if (lowerCasedName === 'is' && value !== null && value !== undefined && typeof value !== 'string') {
7888
+ error('Received a `%s` for a string attribute `is`. If this is expected, cast ' + 'the value to a string.', typeof value);
7889
+
7890
+ warnedProperties$1[name] = true;
7891
+ return true;
7892
+ }
7893
+
7894
+ if (typeof value === 'number' && isNaN(value)) {
7895
+ error('Received NaN for the `%s` attribute. If this is expected, cast ' + 'the value to a string.', name);
7896
+
7897
+ warnedProperties$1[name] = true;
7898
+ return true;
7899
+ }
7900
+
7901
+ var propertyInfo = getPropertyInfo(name);
7902
+ var isReserved = propertyInfo !== null && propertyInfo.type === RESERVED; // Known attributes should match the casing specified in the property config.
7903
+
7904
+ if (possibleStandardNames.hasOwnProperty(lowerCasedName)) {
7905
+ var standardName = possibleStandardNames[lowerCasedName];
7906
+
7907
+ if (standardName !== name) {
7908
+ error('Invalid DOM property `%s`. Did you mean `%s`?', name, standardName);
7909
+
7910
+ warnedProperties$1[name] = true;
7911
+ return true;
7912
+ }
7913
+ } else if (!isReserved && name !== lowerCasedName) {
7914
+ // Unknown attributes should have lowercase casing since that's how they
7915
+ // will be cased anyway with server rendering.
7916
+ error('React does not recognize the `%s` prop on a DOM element. If you ' + 'intentionally want it to appear in the DOM as a custom ' + 'attribute, spell it as lowercase `%s` instead. ' + 'If you accidentally passed it from a parent component, remove ' + 'it from the DOM element.', name, lowerCasedName);
7917
+
7918
+ warnedProperties$1[name] = true;
7919
+ return true;
7920
+ }
7921
+
7922
+ if (typeof value === 'boolean' && shouldRemoveAttributeWithWarning(name, value, propertyInfo, false)) {
7923
+ if (value) {
7924
+ error('Received `%s` for a non-boolean attribute `%s`.\n\n' + 'If you want to write it to the DOM, pass a string instead: ' + '%s="%s" or %s={value.toString()}.', value, name, name, value, name);
7925
+ } else {
7926
+ error('Received `%s` for a non-boolean attribute `%s`.\n\n' + 'If you want to write it to the DOM, pass a string instead: ' + '%s="%s" or %s={value.toString()}.\n\n' + 'If you used to conditionally omit it with %s={condition && value}, ' + 'pass %s={condition ? value : undefined} instead.', value, name, name, value, name, name, name);
7927
+ }
7928
+
7929
+ warnedProperties$1[name] = true;
7930
+ return true;
7931
+ } // Now that we've validated casing, do not validate
7932
+ // data types for reserved props
7933
+
7934
+
7935
+ if (isReserved) {
7936
+ return true;
7937
+ } // Warn when a known attribute is a bad type
7938
+
7939
+
7940
+ if (shouldRemoveAttributeWithWarning(name, value, propertyInfo, false)) {
7941
+ warnedProperties$1[name] = true;
7942
+ return false;
7943
+ } // Warn when passing the strings 'false' or 'true' into a boolean prop
7944
+
7945
+
7946
+ if ((value === 'false' || value === 'true') && propertyInfo !== null && propertyInfo.type === BOOLEAN) {
7947
+ error('Received the string `%s` for the boolean attribute `%s`. ' + '%s ' + 'Did you mean %s={%s}?', value, name, value === 'false' ? 'The browser will interpret it as a truthy value.' : 'Although this works, it will not work as expected if you pass the string "false".', name, value);
7948
+
7949
+ warnedProperties$1[name] = true;
7950
+ return true;
7951
+ }
7952
+
7953
+ return true;
7954
+ };
7955
+ }
7956
+
7957
+ var warnUnknownProperties = function (type, props, eventRegistry) {
7958
+ {
7959
+ var unknownProps = [];
7960
+
7961
+ for (var key in props) {
7962
+ var isValid = validateProperty$1(type, key, props[key], eventRegistry);
7963
+
7964
+ if (!isValid) {
7965
+ unknownProps.push(key);
7966
+ }
7967
+ }
7968
+
7969
+ var unknownPropString = unknownProps.map(function (prop) {
7970
+ return '`' + prop + '`';
7971
+ }).join(', ');
7972
+
7973
+ if (unknownProps.length === 1) {
7974
+ error('Invalid value for prop %s on <%s> tag. Either remove it from the element, ' + 'or pass a string or number value to keep it in the DOM. ' + 'For details, see https://reactjs.org/link/attribute-behavior ', unknownPropString, type);
7975
+ } else if (unknownProps.length > 1) {
7976
+ error('Invalid values for props %s on <%s> tag. Either remove them from the element, ' + 'or pass a string or number value to keep them in the DOM. ' + 'For details, see https://reactjs.org/link/attribute-behavior ', unknownPropString, type);
7977
+ }
7978
+ }
7979
+ };
7980
+
7981
+ function validateProperties$2(type, props, eventRegistry) {
7982
+ if (isCustomComponent(type, props)) {
7983
+ return;
7984
+ }
7985
+
7986
+ warnUnknownProperties(type, props, eventRegistry);
7987
+ }
7988
+
7989
+ var toArray = React.Children.toArray; // This is only used in DEV.
7990
+ // Each entry is `this.stack` from a currently executing renderer instance.
7991
+ // (There may be more than one because ReactDOMServer is reentrant).
7992
+ // Each stack is an array of frames which may contain nested stacks of elements.
7993
+
7994
+ var currentDebugStacks = [];
7995
+ var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher;
7996
+ var ReactDebugCurrentFrame$1;
7997
+ var prevGetCurrentStackImpl = null;
7998
+
7999
+ var getCurrentServerStackImpl = function () {
8000
+ return '';
8001
+ };
8002
+
8003
+ var describeStackFrame = function (element) {
8004
+ return '';
8005
+ };
8006
+
8007
+ var validatePropertiesInDevelopment = function (type, props) {};
8008
+
8009
+ var pushCurrentDebugStack = function (stack) {};
8010
+
8011
+ var pushElementToDebugStack = function (element) {};
8012
+
8013
+ var popCurrentDebugStack = function () {};
8014
+
8015
+ var hasWarnedAboutUsingContextAsConsumer = false;
8016
+
8017
+ {
8018
+ ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
8019
+
8020
+ validatePropertiesInDevelopment = function (type, props) {
8021
+ validateProperties(type, props);
8022
+ validateProperties$1(type, props);
8023
+ validateProperties$2(type, props, null);
8024
+ };
8025
+
8026
+ describeStackFrame = function (element) {
8027
+ return describeUnknownElementTypeFrameInDEV(element.type, element._source, null);
8028
+ };
8029
+
8030
+ pushCurrentDebugStack = function (stack) {
8031
+ currentDebugStacks.push(stack);
8032
+
8033
+ if (currentDebugStacks.length === 1) {
8034
+ // We are entering a server renderer.
8035
+ // Remember the previous (e.g. client) global stack implementation.
8036
+ prevGetCurrentStackImpl = ReactDebugCurrentFrame$1.getCurrentStack;
8037
+ ReactDebugCurrentFrame$1.getCurrentStack = getCurrentServerStackImpl;
8038
+ }
8039
+ };
8040
+
8041
+ pushElementToDebugStack = function (element) {
8042
+ // For the innermost executing ReactDOMServer call,
8043
+ var stack = currentDebugStacks[currentDebugStacks.length - 1]; // Take the innermost executing frame (e.g. <Foo>),
8044
+
8045
+ var frame = stack[stack.length - 1]; // and record that it has one more element associated with it.
8046
+
8047
+ frame.debugElementStack.push(element); // We only need this because we tail-optimize single-element
8048
+ // children and directly handle them in an inner loop instead of
8049
+ // creating separate frames for them.
8050
+ };
8051
+
8052
+ popCurrentDebugStack = function () {
8053
+ currentDebugStacks.pop();
8054
+
8055
+ if (currentDebugStacks.length === 0) {
8056
+ // We are exiting the server renderer.
8057
+ // Restore the previous (e.g. client) global stack implementation.
8058
+ ReactDebugCurrentFrame$1.getCurrentStack = prevGetCurrentStackImpl;
8059
+ prevGetCurrentStackImpl = null;
8060
+ }
8061
+ };
8062
+
8063
+ getCurrentServerStackImpl = function () {
8064
+ if (currentDebugStacks.length === 0) {
8065
+ // Nothing is currently rendering.
8066
+ return '';
8067
+ } // ReactDOMServer is reentrant so there may be multiple calls at the same time.
8068
+ // Take the frames from the innermost call which is the last in the array.
8069
+
8070
+
8071
+ var frames = currentDebugStacks[currentDebugStacks.length - 1];
8072
+ var stack = ''; // Go through every frame in the stack from the innermost one.
8073
+
8074
+ for (var i = frames.length - 1; i >= 0; i--) {
8075
+ var frame = frames[i]; // Every frame might have more than one debug element stack entry associated with it.
8076
+ // This is because single-child nesting doesn't create materialized frames.
8077
+ // Instead it would push them through `pushElementToDebugStack()`.
8078
+
8079
+ var debugElementStack = frame.debugElementStack;
8080
+
8081
+ for (var ii = debugElementStack.length - 1; ii >= 0; ii--) {
8082
+ stack += describeStackFrame(debugElementStack[ii]);
8083
+ }
8084
+ }
8085
+
8086
+ return stack;
8087
+ };
8088
+ }
8089
+
8090
+ var didWarnDefaultInputValue = false;
8091
+ var didWarnDefaultChecked = false;
8092
+ var didWarnDefaultSelectValue = false;
8093
+ var didWarnDefaultTextareaValue = false;
8094
+ var didWarnInvalidOptionChildren = false;
8095
+ var didWarnAboutNoopUpdateForComponent = {};
8096
+ var didWarnAboutBadClass = {};
8097
+ var didWarnAboutModulePatternComponent = {};
8098
+ var didWarnAboutDeprecatedWillMount = {};
8099
+ var didWarnAboutUndefinedDerivedState = {};
8100
+ var didWarnAboutUninitializedState = {};
8101
+ var valuePropNames = ['value', 'defaultValue'];
8102
+ var newlineEatingTags = {
8103
+ listing: true,
8104
+ pre: true,
8105
+ textarea: true
8106
+ }; // We accept any tag to be rendered but since this gets injected into arbitrary
8107
+ // HTML, we want to make sure that it's a safe tag.
8108
+ // http://www.w3.org/TR/REC-xml/#NT-Name
8109
+
8110
+ var VALID_TAG_REGEX = /^[a-zA-Z][a-zA-Z:_\.\-\d]*$/; // Simplified subset
8111
+
8112
+ var validatedTagCache = {};
8113
+
8114
+ function validateDangerousTag(tag) {
8115
+ if (!validatedTagCache.hasOwnProperty(tag)) {
8116
+ if (!VALID_TAG_REGEX.test(tag)) {
8117
+ {
8118
+ throw Error( "Invalid tag: " + tag );
8119
+ }
8120
+ }
8121
+
8122
+ validatedTagCache[tag] = true;
8123
+ }
8124
+ }
8125
+
8126
+ var styleNameCache = {};
8127
+
8128
+ var processStyleName = function (styleName) {
8129
+ if (styleNameCache.hasOwnProperty(styleName)) {
8130
+ return styleNameCache[styleName];
8131
+ }
8132
+
8133
+ var result = hyphenateStyleName(styleName);
8134
+ styleNameCache[styleName] = result;
8135
+ return result;
8136
+ };
8137
+
8138
+ function createMarkupForStyles(styles) {
8139
+ var serialized = '';
8140
+ var delimiter = '';
8141
+
8142
+ for (var styleName in styles) {
8143
+ if (!styles.hasOwnProperty(styleName)) {
8144
+ continue;
8145
+ }
8146
+
8147
+ var isCustomProperty = styleName.indexOf('--') === 0;
8148
+ var styleValue = styles[styleName];
8149
+
8150
+ {
8151
+ if (!isCustomProperty) {
8152
+ warnValidStyle$1(styleName, styleValue);
8153
+ }
8154
+ }
8155
+
8156
+ if (styleValue != null) {
8157
+ serialized += delimiter + (isCustomProperty ? styleName : processStyleName(styleName)) + ':';
8158
+ serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty);
8159
+ delimiter = ';';
8160
+ }
8161
+ }
8162
+
8163
+ return serialized || null;
8164
+ }
8165
+
8166
+ function warnNoop(publicInstance, callerName) {
8167
+ {
8168
+ var _constructor = publicInstance.constructor;
8169
+ var componentName = _constructor && getComponentName(_constructor) || 'ReactClass';
8170
+ var warningKey = componentName + '.' + callerName;
8171
+
8172
+ if (didWarnAboutNoopUpdateForComponent[warningKey]) {
8173
+ return;
8174
+ }
8175
+
8176
+ error('%s(...): Can only update a mounting component. ' + 'This usually means you called %s() outside componentWillMount() on the server. ' + 'This is a no-op.\n\nPlease check the code for the %s component.', callerName, callerName, componentName);
8177
+
8178
+ didWarnAboutNoopUpdateForComponent[warningKey] = true;
8179
+ }
8180
+ }
8181
+
8182
+ function shouldConstruct$1(Component) {
8183
+ return Component.prototype && Component.prototype.isReactComponent;
8184
+ }
8185
+
8186
+ function getNonChildrenInnerMarkup(props) {
8187
+ var innerHTML = props.dangerouslySetInnerHTML;
8188
+
8189
+ if (innerHTML != null) {
8190
+ if (innerHTML.__html != null) {
8191
+ return innerHTML.__html;
8192
+ }
8193
+ } else {
8194
+ var content = props.children;
8195
+
8196
+ if (typeof content === 'string' || typeof content === 'number') {
8197
+ return escapeTextForBrowser(content);
8198
+ }
8199
+ }
8200
+
8201
+ return null;
8202
+ }
8203
+
8204
+ function flattenTopLevelChildren(children) {
8205
+ if (!React.isValidElement(children)) {
8206
+ return toArray(children);
8207
+ }
8208
+
8209
+ var element = children;
8210
+
8211
+ if (element.type !== REACT_FRAGMENT_TYPE) {
8212
+ return [element];
8213
+ }
8214
+
8215
+ var fragmentChildren = element.props.children;
8216
+
8217
+ if (!React.isValidElement(fragmentChildren)) {
8218
+ return toArray(fragmentChildren);
8219
+ }
8220
+
8221
+ var fragmentChildElement = fragmentChildren;
8222
+ return [fragmentChildElement];
8223
+ }
8224
+
8225
+ function flattenOptionChildren(children) {
8226
+ if (children === undefined || children === null) {
8227
+ return children;
8228
+ }
8229
+
8230
+ var content = ''; // Flatten children and warn if they aren't strings or numbers;
8231
+ // invalid types are ignored.
8232
+
8233
+ React.Children.forEach(children, function (child) {
8234
+ if (child == null) {
8235
+ return;
8236
+ }
8237
+
8238
+ content += child;
8239
+
8240
+ {
8241
+ if (!didWarnInvalidOptionChildren && typeof child !== 'string' && typeof child !== 'number') {
8242
+ didWarnInvalidOptionChildren = true;
8243
+
8244
+ error('Only strings and numbers are supported as <option> children.');
8245
+ }
8246
+ }
8247
+ });
8248
+ return content;
8249
+ }
8250
+
8251
+ var hasOwnProperty$2 = Object.prototype.hasOwnProperty;
8252
+ var STYLE = 'style';
8253
+ var RESERVED_PROPS = {
8254
+ children: null,
8255
+ dangerouslySetInnerHTML: null,
8256
+ suppressContentEditableWarning: null,
8257
+ suppressHydrationWarning: null
8258
+ };
8259
+
8260
+ function createOpenTagMarkup(tagVerbatim, tagLowercase, props, namespace, makeStaticMarkup, isRootElement) {
8261
+ var ret = '<' + tagVerbatim;
8262
+ var isCustomComponent$1 = isCustomComponent(tagLowercase, props);
8263
+
8264
+ for (var propKey in props) {
8265
+ if (!hasOwnProperty$2.call(props, propKey)) {
8266
+ continue;
8267
+ }
8268
+
8269
+ var propValue = props[propKey];
8270
+
8271
+ if (propValue == null) {
8272
+ continue;
8273
+ }
8274
+
8275
+ if (propKey === STYLE) {
8276
+ propValue = createMarkupForStyles(propValue);
8277
+ }
8278
+
8279
+ var markup = null;
8280
+
8281
+ if (isCustomComponent$1) {
8282
+ if (!RESERVED_PROPS.hasOwnProperty(propKey)) {
8283
+ markup = createMarkupForCustomAttribute(propKey, propValue);
8284
+ }
8285
+ } else {
8286
+ markup = createMarkupForProperty(propKey, propValue);
8287
+ }
8288
+
8289
+ if (markup) {
8290
+ ret += ' ' + markup;
8291
+ }
8292
+ } // For static pages, no need to put React ID and checksum. Saves lots of
8293
+ // bytes.
8294
+
8295
+
8296
+ if (makeStaticMarkup) {
8297
+ return ret;
8298
+ }
8299
+
8300
+ if (isRootElement) {
8301
+ ret += ' ' + createMarkupForRoot();
8302
+ }
8303
+
8304
+ return ret;
8305
+ }
8306
+
8307
+ function validateRenderResult(child, type) {
8308
+ if (child === undefined) {
8309
+ {
8310
+ {
8311
+ throw Error( (getComponentName(type) || 'Component') + "(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null." );
8312
+ }
8313
+ }
8314
+ }
8315
+ }
8316
+
8317
+ function resolve(child, context, threadID) {
8318
+ while (React.isValidElement(child)) {
8319
+ // Safe because we just checked it's an element.
8320
+ var element = child;
8321
+ var Component = element.type;
8322
+
8323
+ {
8324
+ pushElementToDebugStack(element);
8325
+ }
8326
+
8327
+ if (typeof Component !== 'function') {
8328
+ break;
8329
+ }
8330
+
8331
+ processChild(element, Component);
8332
+ } // Extra closure so queue and replace can be captured properly
8333
+
8334
+
8335
+ function processChild(element, Component) {
8336
+ var isClass = shouldConstruct$1(Component);
8337
+ var publicContext = processContext(Component, context, threadID, isClass);
8338
+ var queue = [];
8339
+ var replace = false;
8340
+ var updater = {
8341
+ isMounted: function (publicInstance) {
8342
+ return false;
8343
+ },
8344
+ enqueueForceUpdate: function (publicInstance) {
8345
+ if (queue === null) {
8346
+ warnNoop(publicInstance, 'forceUpdate');
8347
+ return null;
8348
+ }
8349
+ },
8350
+ enqueueReplaceState: function (publicInstance, completeState) {
8351
+ replace = true;
8352
+ queue = [completeState];
8353
+ },
8354
+ enqueueSetState: function (publicInstance, currentPartialState) {
8355
+ if (queue === null) {
8356
+ warnNoop(publicInstance, 'setState');
8357
+ return null;
8358
+ }
8359
+
8360
+ queue.push(currentPartialState);
8361
+ }
8362
+ };
8363
+ var inst;
8364
+
8365
+ if (isClass) {
8366
+ inst = new Component(element.props, publicContext, updater);
8367
+
8368
+ if (typeof Component.getDerivedStateFromProps === 'function') {
8369
+ {
8370
+ if (inst.state === null || inst.state === undefined) {
8371
+ var componentName = getComponentName(Component) || 'Unknown';
8372
+
8373
+ if (!didWarnAboutUninitializedState[componentName]) {
8374
+ error('`%s` uses `getDerivedStateFromProps` but its initial state is ' + '%s. This is not recommended. Instead, define the initial state by ' + 'assigning an object to `this.state` in the constructor of `%s`. ' + 'This ensures that `getDerivedStateFromProps` arguments have a consistent shape.', componentName, inst.state === null ? 'null' : 'undefined', componentName);
8375
+
8376
+ didWarnAboutUninitializedState[componentName] = true;
8377
+ }
8378
+ }
8379
+ }
8380
+
8381
+ var partialState = Component.getDerivedStateFromProps.call(null, element.props, inst.state);
8382
+
8383
+ {
8384
+ if (partialState === undefined) {
8385
+ var _componentName = getComponentName(Component) || 'Unknown';
8386
+
8387
+ if (!didWarnAboutUndefinedDerivedState[_componentName]) {
8388
+ error('%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. ' + 'You have returned undefined.', _componentName);
8389
+
8390
+ didWarnAboutUndefinedDerivedState[_componentName] = true;
8391
+ }
8392
+ }
8393
+ }
8394
+
8395
+ if (partialState != null) {
8396
+ inst.state = _assign({}, inst.state, partialState);
8397
+ }
8398
+ }
8399
+ } else {
8400
+ {
8401
+ if (Component.prototype && typeof Component.prototype.render === 'function') {
8402
+ var _componentName2 = getComponentName(Component) || 'Unknown';
8403
+
8404
+ if (!didWarnAboutBadClass[_componentName2]) {
8405
+ error("The <%s /> component appears to have a render method, but doesn't extend React.Component. " + 'This is likely to cause errors. Change %s to extend React.Component instead.', _componentName2, _componentName2);
8406
+
8407
+ didWarnAboutBadClass[_componentName2] = true;
8408
+ }
8409
+ }
8410
+ }
8411
+
8412
+ var componentIdentity = {};
8413
+ prepareToUseHooks(componentIdentity);
8414
+ inst = Component(element.props, publicContext, updater);
8415
+ inst = finishHooks(Component, element.props, inst, publicContext);
8416
+
8417
+ {
8418
+ // Support for module components is deprecated and is removed behind a flag.
8419
+ // Whether or not it would crash later, we want to show a good message in DEV first.
8420
+ if (inst != null && inst.render != null) {
8421
+ var _componentName3 = getComponentName(Component) || 'Unknown';
8422
+
8423
+ if (!didWarnAboutModulePatternComponent[_componentName3]) {
8424
+ error('The <%s /> component appears to be a function component that returns a class instance. ' + 'Change %s to a class that extends React.Component instead. ' + "If you can't use a class try assigning the prototype on the function as a workaround. " + "`%s.prototype = React.Component.prototype`. Don't use an arrow function since it " + 'cannot be called with `new` by React.', _componentName3, _componentName3, _componentName3);
8425
+
8426
+ didWarnAboutModulePatternComponent[_componentName3] = true;
8427
+ }
8428
+ }
8429
+ } // If the flag is on, everything is assumed to be a function component.
8430
+ // Otherwise, we also do the unfortunate dynamic checks.
8431
+
8432
+
8433
+ if ( inst == null || inst.render == null) {
8434
+ child = inst;
8435
+ validateRenderResult(child, Component);
8436
+ return;
8437
+ }
8438
+ }
8439
+
8440
+ inst.props = element.props;
8441
+ inst.context = publicContext;
8442
+ inst.updater = updater;
8443
+ var initialState = inst.state;
8444
+
8445
+ if (initialState === undefined) {
8446
+ inst.state = initialState = null;
8447
+ }
8448
+
8449
+ if (typeof inst.UNSAFE_componentWillMount === 'function' || typeof inst.componentWillMount === 'function') {
8450
+ if (typeof inst.componentWillMount === 'function') {
8451
+ {
8452
+ if ( inst.componentWillMount.__suppressDeprecationWarning !== true) {
8453
+ var _componentName4 = getComponentName(Component) || 'Unknown';
8454
+
8455
+ if (!didWarnAboutDeprecatedWillMount[_componentName4]) {
8456
+ warn( // keep this warning in sync with ReactStrictModeWarning.js
8457
+ 'componentWillMount has been renamed, and is not recommended for use. ' + 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n' + '* Move code from componentWillMount to componentDidMount (preferred in most cases) ' + 'or the constructor.\n' + '\nPlease update the following components: %s', _componentName4);
8458
+
8459
+ didWarnAboutDeprecatedWillMount[_componentName4] = true;
8460
+ }
8461
+ }
8462
+ } // In order to support react-lifecycles-compat polyfilled components,
8463
+ // Unsafe lifecycles should not be invoked for any component with the new gDSFP.
8464
+
8465
+
8466
+ if (typeof Component.getDerivedStateFromProps !== 'function') {
8467
+ inst.componentWillMount();
8468
+ }
8469
+ }
8470
+
8471
+ if (typeof inst.UNSAFE_componentWillMount === 'function' && typeof Component.getDerivedStateFromProps !== 'function') {
8472
+ // In order to support react-lifecycles-compat polyfilled components,
8473
+ // Unsafe lifecycles should not be invoked for any component with the new gDSFP.
8474
+ inst.UNSAFE_componentWillMount();
8475
+ }
8476
+
8477
+ if (queue.length) {
8478
+ var oldQueue = queue;
8479
+ var oldReplace = replace;
8480
+ queue = null;
8481
+ replace = false;
8482
+
8483
+ if (oldReplace && oldQueue.length === 1) {
8484
+ inst.state = oldQueue[0];
8485
+ } else {
8486
+ var nextState = oldReplace ? oldQueue[0] : inst.state;
8487
+ var dontMutate = true;
8488
+
8489
+ for (var i = oldReplace ? 1 : 0; i < oldQueue.length; i++) {
8490
+ var partial = oldQueue[i];
8491
+
8492
+ var _partialState = typeof partial === 'function' ? partial.call(inst, nextState, element.props, publicContext) : partial;
8493
+
8494
+ if (_partialState != null) {
8495
+ if (dontMutate) {
8496
+ dontMutate = false;
8497
+ nextState = _assign({}, nextState, _partialState);
8498
+ } else {
8499
+ _assign(nextState, _partialState);
8500
+ }
8501
+ }
8502
+ }
8503
+
8504
+ inst.state = nextState;
8505
+ }
8506
+ } else {
8507
+ queue = null;
8508
+ }
8509
+ }
8510
+
8511
+ child = inst.render();
8512
+
8513
+ {
8514
+ if (child === undefined && inst.render._isMockFunction) {
8515
+ // This is probably bad practice. Consider warning here and
8516
+ // deprecating this convenience.
8517
+ child = null;
8518
+ }
8519
+ }
8520
+
8521
+ validateRenderResult(child, Component);
8522
+ var childContext;
8523
+
8524
+ {
8525
+ if (typeof inst.getChildContext === 'function') {
8526
+ var _childContextTypes = Component.childContextTypes;
8527
+
8528
+ if (typeof _childContextTypes === 'object') {
8529
+ childContext = inst.getChildContext();
8530
+
8531
+ for (var contextKey in childContext) {
8532
+ if (!(contextKey in _childContextTypes)) {
8533
+ {
8534
+ throw Error( (getComponentName(Component) || 'Unknown') + ".getChildContext(): key \"" + contextKey + "\" is not defined in childContextTypes." );
8535
+ }
8536
+ }
8537
+ }
8538
+ } else {
8539
+ {
8540
+ error('%s.getChildContext(): childContextTypes must be defined in order to ' + 'use getChildContext().', getComponentName(Component) || 'Unknown');
8541
+ }
8542
+ }
8543
+ }
8544
+
8545
+ if (childContext) {
8546
+ context = _assign({}, context, childContext);
8547
+ }
8548
+ }
8549
+ }
8550
+
8551
+ return {
8552
+ child: child,
8553
+ context: context
8554
+ };
8555
+ }
8556
+
8557
+ var ReactDOMServerRenderer = /*#__PURE__*/function () {
8558
+ // TODO: type this more strictly:
8559
+ // DEV-only
8560
+ function ReactDOMServerRenderer(children, makeStaticMarkup, options) {
8561
+ var flatChildren = flattenTopLevelChildren(children);
8562
+ var topFrame = {
8563
+ type: null,
8564
+ // Assume all trees start in the HTML namespace (not totally true, but
8565
+ // this is what we did historically)
8566
+ domNamespace: Namespaces.html,
8567
+ children: flatChildren,
8568
+ childIndex: 0,
8569
+ context: emptyObject,
8570
+ footer: ''
8571
+ };
8572
+
8573
+ {
8574
+ topFrame.debugElementStack = [];
8575
+ }
8576
+
8577
+ this.threadID = allocThreadID();
8578
+ this.stack = [topFrame];
8579
+ this.exhausted = false;
8580
+ this.currentSelectValue = null;
8581
+ this.previousWasTextNode = false;
8582
+ this.makeStaticMarkup = makeStaticMarkup;
8583
+ this.suspenseDepth = 0; // Context (new API)
8584
+
8585
+ this.contextIndex = -1;
8586
+ this.contextStack = [];
8587
+ this.contextValueStack = []; // useOpaqueIdentifier ID
8588
+
8589
+ this.uniqueID = 0;
8590
+ this.identifierPrefix = options && options.identifierPrefix || '';
8591
+
8592
+ {
8593
+ this.contextProviderStack = [];
8594
+ }
8595
+ }
8596
+
8597
+ var _proto = ReactDOMServerRenderer.prototype;
8598
+
8599
+ _proto.destroy = function destroy() {
8600
+ if (!this.exhausted) {
8601
+ this.exhausted = true;
8602
+ this.clearProviders();
8603
+ freeThreadID(this.threadID);
8604
+ }
8605
+ }
8606
+ /**
8607
+ * Note: We use just two stacks regardless of how many context providers you have.
8608
+ * Providers are always popped in the reverse order to how they were pushed
8609
+ * so we always know on the way down which provider you'll encounter next on the way up.
8610
+ * On the way down, we push the current provider, and its context value *before*
8611
+ * we mutated it, onto the stacks. Therefore, on the way up, we always know which
8612
+ * provider needs to be "restored" to which value.
8613
+ * https://github.com/facebook/react/pull/12985#issuecomment-396301248
8614
+ */
8615
+ ;
8616
+
8617
+ _proto.pushProvider = function pushProvider(provider) {
8618
+ var index = ++this.contextIndex;
8619
+ var context = provider.type._context;
8620
+ var threadID = this.threadID;
8621
+ validateContextBounds(context, threadID);
8622
+ var previousValue = context[threadID]; // Remember which value to restore this context to on our way up.
8623
+
8624
+ this.contextStack[index] = context;
8625
+ this.contextValueStack[index] = previousValue;
8626
+
8627
+ {
8628
+ // Only used for push/pop mismatch warnings.
8629
+ this.contextProviderStack[index] = provider;
8630
+ } // Mutate the current value.
8631
+
8632
+
8633
+ context[threadID] = provider.props.value;
8634
+ };
8635
+
8636
+ _proto.popProvider = function popProvider(provider) {
8637
+ var index = this.contextIndex;
8638
+
8639
+ {
8640
+ if (index < 0 || provider !== this.contextProviderStack[index]) {
8641
+ error('Unexpected pop.');
8642
+ }
8643
+ }
8644
+
8645
+ var context = this.contextStack[index];
8646
+ var previousValue = this.contextValueStack[index]; // "Hide" these null assignments from Flow by using `any`
8647
+ // because conceptually they are deletions--as long as we
8648
+ // promise to never access values beyond `this.contextIndex`.
8649
+
8650
+ this.contextStack[index] = null;
8651
+ this.contextValueStack[index] = null;
8652
+
8653
+ {
8654
+ this.contextProviderStack[index] = null;
8655
+ }
8656
+
8657
+ this.contextIndex--; // Restore to the previous value we stored as we were walking down.
8658
+ // We've already verified that this context has been expanded to accommodate
8659
+ // this thread id, so we don't need to do it again.
8660
+
8661
+ context[this.threadID] = previousValue;
8662
+ };
8663
+
8664
+ _proto.clearProviders = function clearProviders() {
8665
+ // Restore any remaining providers on the stack to previous values
8666
+ for (var index = this.contextIndex; index >= 0; index--) {
8667
+ var context = this.contextStack[index];
8668
+ var previousValue = this.contextValueStack[index];
8669
+ context[this.threadID] = previousValue;
8670
+ }
8671
+ };
8672
+
8673
+ _proto.read = function read(bytes) {
8674
+ if (this.exhausted) {
8675
+ return null;
8676
+ }
8677
+
8678
+ var prevPartialRenderer = currentPartialRenderer;
8679
+ setCurrentPartialRenderer(this);
8680
+ var prevDispatcher = ReactCurrentDispatcher$1.current;
8681
+ ReactCurrentDispatcher$1.current = Dispatcher;
8682
+
8683
+ try {
8684
+ // Markup generated within <Suspense> ends up buffered until we know
8685
+ // nothing in that boundary suspended
8686
+ var out = [''];
8687
+ var suspended = false;
8688
+
8689
+ while (out[0].length < bytes) {
8690
+ if (this.stack.length === 0) {
8691
+ this.exhausted = true;
8692
+ freeThreadID(this.threadID);
8693
+ break;
8694
+ }
8695
+
8696
+ var frame = this.stack[this.stack.length - 1];
8697
+
8698
+ if (suspended || frame.childIndex >= frame.children.length) {
8699
+ var footer = frame.footer;
8700
+
8701
+ if (footer !== '') {
8702
+ this.previousWasTextNode = false;
8703
+ }
8704
+
8705
+ this.stack.pop();
8706
+
8707
+ if (frame.type === 'select') {
8708
+ this.currentSelectValue = null;
8709
+ } else if (frame.type != null && frame.type.type != null && frame.type.type.$$typeof === REACT_PROVIDER_TYPE) {
8710
+ var provider = frame.type;
8711
+ this.popProvider(provider);
8712
+ } else if (frame.type === REACT_SUSPENSE_TYPE) {
8713
+ this.suspenseDepth--;
8714
+ var buffered = out.pop();
8715
+
8716
+ if (suspended) {
8717
+ suspended = false; // If rendering was suspended at this boundary, render the fallbackFrame
8718
+
8719
+ var fallbackFrame = frame.fallbackFrame;
8720
+
8721
+ if (!fallbackFrame) {
8722
+ {
8723
+ throw Error(true ? "ReactDOMServer did not find an internal fallback frame for Suspense. This is a bug in React. Please file an issue." : undefined);
8724
+ }
8725
+ }
8726
+
8727
+ this.stack.push(fallbackFrame);
8728
+ out[this.suspenseDepth] += '<!--$!-->'; // Skip flushing output since we're switching to the fallback
8729
+
8730
+ continue;
8731
+ } else {
8732
+ out[this.suspenseDepth] += buffered;
8733
+ }
8734
+ } // Flush output
8735
+
8736
+
8737
+ out[this.suspenseDepth] += footer;
8738
+ continue;
8739
+ }
8740
+
8741
+ var child = frame.children[frame.childIndex++];
8742
+ var outBuffer = '';
8743
+
8744
+ if (true) {
8745
+ pushCurrentDebugStack(this.stack); // We're starting work on this frame, so reset its inner stack.
8746
+
8747
+ frame.debugElementStack.length = 0;
8748
+ }
8749
+
8750
+ try {
8751
+ outBuffer += this.render(child, frame.context, frame.domNamespace);
8752
+ } catch (err) {
8753
+ if (err != null && typeof err.then === 'function') {
8754
+ if (enableSuspenseServerRenderer) {
8755
+ if (!(this.suspenseDepth > 0)) {
8756
+ {
8757
+ throw Error(true ? "A React component suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display." : undefined);
8758
+ }
8759
+ }
8760
+
8761
+ suspended = true;
8762
+ } else {
8763
+ if (true) {
8764
+ {
8765
+ throw Error(true ? "ReactDOMServer does not yet support Suspense." : undefined);
8766
+ }
8767
+ }
8768
+ }
8769
+ } else {
8770
+ throw err;
8771
+ }
8772
+ } finally {
8773
+ if (true) {
8774
+ popCurrentDebugStack();
8775
+ }
8776
+ }
8777
+
8778
+ if (out.length <= this.suspenseDepth) {
8779
+ out.push('');
8780
+ }
8781
+
8782
+ out[this.suspenseDepth] += outBuffer;
8783
+ }
8784
+
8785
+ return out[0];
8786
+ } finally {
8787
+ ReactCurrentDispatcher$1.current = prevDispatcher;
8788
+ setCurrentPartialRenderer(prevPartialRenderer);
8789
+ resetHooksState();
8790
+ }
8791
+ };
8792
+
8793
+ _proto.render = function render(child, context, parentNamespace) {
8794
+ if (typeof child === 'string' || typeof child === 'number') {
8795
+ var text = '' + child;
8796
+
8797
+ if (text === '') {
8798
+ return '';
8799
+ }
8800
+
8801
+ if (this.makeStaticMarkup) {
8802
+ return escapeTextForBrowser(text);
8803
+ }
8804
+
8805
+ if (this.previousWasTextNode) {
8806
+ return '<!-- -->' + escapeTextForBrowser(text);
8807
+ }
8808
+
8809
+ this.previousWasTextNode = true;
8810
+ return escapeTextForBrowser(text);
8811
+ } else {
8812
+ var nextChild;
8813
+
8814
+ var _resolve = resolve(child, context, this.threadID);
8815
+
8816
+ nextChild = _resolve.child;
8817
+ context = _resolve.context;
8818
+
8819
+ if (nextChild === null || nextChild === false) {
8820
+ return '';
8821
+ } else if (!React.isValidElement(nextChild)) {
8822
+ if (nextChild != null && nextChild.$$typeof != null) {
8823
+ // Catch unexpected special types early.
8824
+ var $$typeof = nextChild.$$typeof;
8825
+
8826
+ if (!($$typeof !== REACT_PORTAL_TYPE)) {
8827
+ {
8828
+ throw Error( "Portals are not currently supported by the server renderer. Render them conditionally so that they only appear on the client render." );
8829
+ }
8830
+ } // Catch-all to prevent an infinite loop if React.Children.toArray() supports some new type.
8831
+
8832
+
8833
+ {
8834
+ {
8835
+ throw Error( "Unknown element-like object type: " + $$typeof.toString() + ". This is likely a bug in React. Please file an issue." );
8836
+ }
8837
+ }
8838
+ }
8839
+
8840
+ var nextChildren = toArray(nextChild);
8841
+ var frame = {
8842
+ type: null,
8843
+ domNamespace: parentNamespace,
8844
+ children: nextChildren,
8845
+ childIndex: 0,
8846
+ context: context,
8847
+ footer: ''
8848
+ };
8849
+
8850
+ {
8851
+ frame.debugElementStack = [];
8852
+ }
8853
+
8854
+ this.stack.push(frame);
8855
+ return '';
8856
+ } // Safe because we just checked it's an element.
8857
+
8858
+
8859
+ var nextElement = nextChild;
8860
+ var elementType = nextElement.type;
8861
+
8862
+ if (typeof elementType === 'string') {
8863
+ return this.renderDOM(nextElement, context, parentNamespace);
8864
+ }
8865
+
8866
+ switch (elementType) {
8867
+ // TODO: LegacyHidden acts the same as a fragment. This only works
8868
+ // because we currently assume that every instance of LegacyHidden is
8869
+ // accompanied by a host component wrapper. In the hidden mode, the host
8870
+ // component is given a `hidden` attribute, which ensures that the
8871
+ // initial HTML is not visible. To support the use of LegacyHidden as a
8872
+ // true fragment, without an extra DOM node, we would have to hide the
8873
+ // initial HTML in some other way.
8874
+ case REACT_LEGACY_HIDDEN_TYPE:
8875
+ case REACT_DEBUG_TRACING_MODE_TYPE:
8876
+ case REACT_STRICT_MODE_TYPE:
8877
+ case REACT_PROFILER_TYPE:
8878
+ case REACT_SUSPENSE_LIST_TYPE:
8879
+ case REACT_FRAGMENT_TYPE:
8880
+ {
8881
+ var _nextChildren = toArray(nextChild.props.children);
8882
+
8883
+ var _frame = {
8884
+ type: null,
8885
+ domNamespace: parentNamespace,
8886
+ children: _nextChildren,
8887
+ childIndex: 0,
8888
+ context: context,
8889
+ footer: ''
8890
+ };
8891
+
8892
+ {
8893
+ _frame.debugElementStack = [];
8894
+ }
8895
+
8896
+ this.stack.push(_frame);
8897
+ return '';
8898
+ }
8899
+
8900
+ case REACT_SUSPENSE_TYPE:
8901
+ {
8902
+ {
8903
+ {
8904
+ {
8905
+ throw Error( "ReactDOMServer does not yet support Suspense." );
8906
+ }
8907
+ }
8908
+ }
8909
+ }
8910
+ // eslint-disable-next-line-no-fallthrough
8911
+
8912
+ case REACT_SCOPE_TYPE:
8913
+ {
8914
+
8915
+ {
8916
+ {
8917
+ throw Error( "ReactDOMServer does not yet support scope components." );
8918
+ }
8919
+ }
8920
+ }
8921
+ }
8922
+
8923
+ if (typeof elementType === 'object' && elementType !== null) {
8924
+ switch (elementType.$$typeof) {
8925
+ case REACT_FORWARD_REF_TYPE:
8926
+ {
8927
+ var element = nextChild;
8928
+
8929
+ var _nextChildren5;
8930
+
8931
+ var componentIdentity = {};
8932
+ prepareToUseHooks(componentIdentity);
8933
+ _nextChildren5 = elementType.render(element.props, element.ref);
8934
+ _nextChildren5 = finishHooks(elementType.render, element.props, _nextChildren5, element.ref);
8935
+ _nextChildren5 = toArray(_nextChildren5);
8936
+ var _frame5 = {
8937
+ type: null,
8938
+ domNamespace: parentNamespace,
8939
+ children: _nextChildren5,
8940
+ childIndex: 0,
8941
+ context: context,
8942
+ footer: ''
8943
+ };
8944
+
8945
+ {
8946
+ _frame5.debugElementStack = [];
8947
+ }
8948
+
8949
+ this.stack.push(_frame5);
8950
+ return '';
8951
+ }
8952
+
8953
+ case REACT_MEMO_TYPE:
8954
+ {
8955
+ var _element = nextChild;
8956
+ var _nextChildren6 = [React.createElement(elementType.type, _assign({
8957
+ ref: _element.ref
8958
+ }, _element.props))];
8959
+ var _frame6 = {
8960
+ type: null,
8961
+ domNamespace: parentNamespace,
8962
+ children: _nextChildren6,
8963
+ childIndex: 0,
8964
+ context: context,
8965
+ footer: ''
8966
+ };
8967
+
8968
+ {
8969
+ _frame6.debugElementStack = [];
8970
+ }
8971
+
8972
+ this.stack.push(_frame6);
8973
+ return '';
8974
+ }
8975
+
8976
+ case REACT_PROVIDER_TYPE:
8977
+ {
8978
+ var provider = nextChild;
8979
+ var nextProps = provider.props;
8980
+
8981
+ var _nextChildren7 = toArray(nextProps.children);
8982
+
8983
+ var _frame7 = {
8984
+ type: provider,
8985
+ domNamespace: parentNamespace,
8986
+ children: _nextChildren7,
8987
+ childIndex: 0,
8988
+ context: context,
8989
+ footer: ''
8990
+ };
8991
+
8992
+ {
8993
+ _frame7.debugElementStack = [];
8994
+ }
8995
+
8996
+ this.pushProvider(provider);
8997
+ this.stack.push(_frame7);
8998
+ return '';
8999
+ }
9000
+
9001
+ case REACT_CONTEXT_TYPE:
9002
+ {
9003
+ var reactContext = nextChild.type; // The logic below for Context differs depending on PROD or DEV mode. In
9004
+ // DEV mode, we create a separate object for Context.Consumer that acts
9005
+ // like a proxy to Context. This proxy object adds unnecessary code in PROD
9006
+ // so we use the old behaviour (Context.Consumer references Context) to
9007
+ // reduce size and overhead. The separate object references context via
9008
+ // a property called "_context", which also gives us the ability to check
9009
+ // in DEV mode if this property exists or not and warn if it does not.
9010
+
9011
+ {
9012
+ if (reactContext._context === undefined) {
9013
+ // This may be because it's a Context (rather than a Consumer).
9014
+ // Or it may be because it's older React where they're the same thing.
9015
+ // We only want to warn if we're sure it's a new React.
9016
+ if (reactContext !== reactContext.Consumer) {
9017
+ if (!hasWarnedAboutUsingContextAsConsumer) {
9018
+ hasWarnedAboutUsingContextAsConsumer = true;
9019
+
9020
+ error('Rendering <Context> directly is not supported and will be removed in ' + 'a future major release. Did you mean to render <Context.Consumer> instead?');
9021
+ }
9022
+ }
9023
+ } else {
9024
+ reactContext = reactContext._context;
9025
+ }
9026
+ }
9027
+
9028
+ var _nextProps = nextChild.props;
9029
+ var threadID = this.threadID;
9030
+ validateContextBounds(reactContext, threadID);
9031
+ var nextValue = reactContext[threadID];
9032
+
9033
+ var _nextChildren8 = toArray(_nextProps.children(nextValue));
9034
+
9035
+ var _frame8 = {
9036
+ type: nextChild,
9037
+ domNamespace: parentNamespace,
9038
+ children: _nextChildren8,
9039
+ childIndex: 0,
9040
+ context: context,
9041
+ footer: ''
9042
+ };
9043
+
9044
+ {
9045
+ _frame8.debugElementStack = [];
9046
+ }
9047
+
9048
+ this.stack.push(_frame8);
9049
+ return '';
9050
+ }
9051
+ // eslint-disable-next-line-no-fallthrough
9052
+
9053
+ case REACT_FUNDAMENTAL_TYPE:
9054
+ {
9055
+
9056
+ {
9057
+ {
9058
+ throw Error( "ReactDOMServer does not yet support the fundamental API." );
9059
+ }
9060
+ }
9061
+ }
9062
+ // eslint-disable-next-line-no-fallthrough
9063
+
9064
+ case REACT_LAZY_TYPE:
9065
+ {
9066
+ var _element2 = nextChild;
9067
+ var lazyComponent = nextChild.type; // Attempt to initialize lazy component regardless of whether the
9068
+ // suspense server-side renderer is enabled so synchronously
9069
+ // resolved constructors are supported.
9070
+
9071
+ var payload = lazyComponent._payload;
9072
+ var init = lazyComponent._init;
9073
+ var result = init(payload);
9074
+ var _nextChildren10 = [React.createElement(result, _assign({
9075
+ ref: _element2.ref
9076
+ }, _element2.props))];
9077
+ var _frame10 = {
9078
+ type: null,
9079
+ domNamespace: parentNamespace,
9080
+ children: _nextChildren10,
9081
+ childIndex: 0,
9082
+ context: context,
9083
+ footer: ''
9084
+ };
9085
+
9086
+ {
9087
+ _frame10.debugElementStack = [];
9088
+ }
9089
+
9090
+ this.stack.push(_frame10);
9091
+ return '';
9092
+ }
9093
+ }
9094
+ }
9095
+
9096
+ var info = '';
9097
+
9098
+ {
9099
+ var owner = nextElement._owner;
9100
+
9101
+ if (elementType === undefined || typeof elementType === 'object' && elementType !== null && Object.keys(elementType).length === 0) {
9102
+ info += ' You likely forgot to export your component from the file ' + "it's defined in, or you might have mixed up default and " + 'named imports.';
9103
+ }
9104
+
9105
+ var ownerName = owner ? getComponentName(owner) : null;
9106
+
9107
+ if (ownerName) {
9108
+ info += '\n\nCheck the render method of `' + ownerName + '`.';
9109
+ }
9110
+ }
9111
+
9112
+ {
9113
+ {
9114
+ throw Error( "Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: " + (elementType == null ? elementType : typeof elementType) + "." + info );
9115
+ }
9116
+ }
9117
+ }
9118
+ };
9119
+
9120
+ _proto.renderDOM = function renderDOM(element, context, parentNamespace) {
9121
+ var tag = element.type.toLowerCase();
9122
+ var namespace = parentNamespace;
9123
+
9124
+ if (parentNamespace === Namespaces.html) {
9125
+ namespace = getIntrinsicNamespace(tag);
9126
+ }
9127
+
9128
+ {
9129
+ if (namespace === Namespaces.html) {
9130
+ // Should this check be gated by parent namespace? Not sure we want to
9131
+ // allow <SVG> or <mATH>.
9132
+ if (tag !== element.type) {
9133
+ error('<%s /> is using incorrect casing. ' + 'Use PascalCase for React components, ' + 'or lowercase for HTML elements.', element.type);
9134
+ }
9135
+ }
9136
+ }
9137
+
9138
+ validateDangerousTag(tag);
9139
+ var props = element.props;
9140
+
9141
+ if (tag === 'input') {
9142
+ {
9143
+ checkControlledValueProps('input', props);
9144
+
9145
+ if (props.checked !== undefined && props.defaultChecked !== undefined && !didWarnDefaultChecked) {
9146
+ error('%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://reactjs.org/link/controlled-components', 'A component', props.type);
9147
+
9148
+ didWarnDefaultChecked = true;
9149
+ }
9150
+
9151
+ if (props.value !== undefined && props.defaultValue !== undefined && !didWarnDefaultInputValue) {
9152
+ error('%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://reactjs.org/link/controlled-components', 'A component', props.type);
9153
+
9154
+ didWarnDefaultInputValue = true;
9155
+ }
9156
+ }
9157
+
9158
+ props = _assign({
9159
+ type: undefined
9160
+ }, props, {
9161
+ defaultChecked: undefined,
9162
+ defaultValue: undefined,
9163
+ value: props.value != null ? props.value : props.defaultValue,
9164
+ checked: props.checked != null ? props.checked : props.defaultChecked
9165
+ });
9166
+ } else if (tag === 'textarea') {
9167
+ {
9168
+ checkControlledValueProps('textarea', props);
9169
+
9170
+ if (props.value !== undefined && props.defaultValue !== undefined && !didWarnDefaultTextareaValue) {
9171
+ error('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://reactjs.org/link/controlled-components');
9172
+
9173
+ didWarnDefaultTextareaValue = true;
9174
+ }
9175
+ }
9176
+
9177
+ var initialValue = props.value;
9178
+
9179
+ if (initialValue == null) {
9180
+ var defaultValue = props.defaultValue; // TODO (yungsters): Remove support for children content in <textarea>.
9181
+
9182
+ var textareaChildren = props.children;
9183
+
9184
+ if (textareaChildren != null) {
9185
+ {
9186
+ error('Use the `defaultValue` or `value` props instead of setting ' + 'children on <textarea>.');
9187
+ }
9188
+
9189
+ if (!(defaultValue == null)) {
9190
+ {
9191
+ throw Error( "If you supply `defaultValue` on a <textarea>, do not pass children." );
9192
+ }
9193
+ }
9194
+
9195
+ if (Array.isArray(textareaChildren)) {
9196
+ if (!(textareaChildren.length <= 1)) {
9197
+ {
9198
+ throw Error( "<textarea> can only have at most one child." );
9199
+ }
9200
+ }
9201
+
9202
+ textareaChildren = textareaChildren[0];
9203
+ }
9204
+
9205
+ defaultValue = '' + textareaChildren;
9206
+ }
9207
+
9208
+ if (defaultValue == null) {
9209
+ defaultValue = '';
9210
+ }
9211
+
9212
+ initialValue = defaultValue;
9213
+ }
9214
+
9215
+ props = _assign({}, props, {
9216
+ value: undefined,
9217
+ children: '' + initialValue
9218
+ });
9219
+ } else if (tag === 'select') {
9220
+ {
9221
+ checkControlledValueProps('select', props);
9222
+
9223
+ for (var i = 0; i < valuePropNames.length; i++) {
9224
+ var propName = valuePropNames[i];
9225
+
9226
+ if (props[propName] == null) {
9227
+ continue;
9228
+ }
9229
+
9230
+ var isArray = Array.isArray(props[propName]);
9231
+
9232
+ if (props.multiple && !isArray) {
9233
+ error('The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.', propName);
9234
+ } else if (!props.multiple && isArray) {
9235
+ error('The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.', propName);
9236
+ }
9237
+ }
9238
+
9239
+ if (props.value !== undefined && props.defaultValue !== undefined && !didWarnDefaultSelectValue) {
9240
+ error('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://reactjs.org/link/controlled-components');
9241
+
9242
+ didWarnDefaultSelectValue = true;
9243
+ }
9244
+ }
9245
+
9246
+ this.currentSelectValue = props.value != null ? props.value : props.defaultValue;
9247
+ props = _assign({}, props, {
9248
+ value: undefined
9249
+ });
9250
+ } else if (tag === 'option') {
9251
+ var selected = null;
9252
+ var selectValue = this.currentSelectValue;
9253
+ var optionChildren = flattenOptionChildren(props.children);
9254
+
9255
+ if (selectValue != null) {
9256
+ var value;
9257
+
9258
+ if (props.value != null) {
9259
+ value = props.value + '';
9260
+ } else {
9261
+ value = optionChildren;
9262
+ }
9263
+
9264
+ selected = false;
9265
+
9266
+ if (Array.isArray(selectValue)) {
9267
+ // multiple
9268
+ for (var j = 0; j < selectValue.length; j++) {
9269
+ if ('' + selectValue[j] === value) {
9270
+ selected = true;
9271
+ break;
9272
+ }
9273
+ }
9274
+ } else {
9275
+ selected = '' + selectValue === value;
9276
+ }
9277
+
9278
+ props = _assign({
9279
+ selected: undefined,
9280
+ children: undefined
9281
+ }, props, {
9282
+ selected: selected,
9283
+ children: optionChildren
9284
+ });
9285
+ }
9286
+ }
9287
+
9288
+ {
9289
+ validatePropertiesInDevelopment(tag, props);
9290
+ }
9291
+
9292
+ assertValidProps(tag, props);
9293
+ var out = createOpenTagMarkup(element.type, tag, props, namespace, this.makeStaticMarkup, this.stack.length === 1);
9294
+ var footer = '';
9295
+
9296
+ if (omittedCloseTags.hasOwnProperty(tag)) {
9297
+ out += '/>';
9298
+ } else {
9299
+ out += '>';
9300
+ footer = '</' + element.type + '>';
9301
+ }
9302
+
9303
+ var children;
9304
+ var innerMarkup = getNonChildrenInnerMarkup(props);
9305
+
9306
+ if (innerMarkup != null) {
9307
+ children = [];
9308
+
9309
+ if (newlineEatingTags.hasOwnProperty(tag) && innerMarkup.charAt(0) === '\n') {
9310
+ // text/html ignores the first character in these tags if it's a newline
9311
+ // Prefer to break application/xml over text/html (for now) by adding
9312
+ // a newline specifically to get eaten by the parser. (Alternately for
9313
+ // textareas, replacing "^\n" with "\r\n" doesn't get eaten, and the first
9314
+ // \r is normalized out by HTMLTextAreaElement#value.)
9315
+ // See: <http://www.w3.org/TR/html-polyglot/#newlines-in-textarea-and-pre>
9316
+ // See: <http://www.w3.org/TR/html5/syntax.html#element-restrictions>
9317
+ // See: <http://www.w3.org/TR/html5/syntax.html#newlines>
9318
+ // See: Parsing of "textarea" "listing" and "pre" elements
9319
+ // from <http://www.w3.org/TR/html5/syntax.html#parsing-main-inbody>
9320
+ out += '\n';
9321
+ }
9322
+
9323
+ out += innerMarkup;
9324
+ } else {
9325
+ children = toArray(props.children);
9326
+ }
9327
+
9328
+ var frame = {
9329
+ domNamespace: getChildNamespace(parentNamespace, element.type),
9330
+ type: tag,
9331
+ children: children,
9332
+ childIndex: 0,
9333
+ context: context,
9334
+ footer: footer
9335
+ };
9336
+
9337
+ {
9338
+ frame.debugElementStack = [];
9339
+ }
9340
+
9341
+ this.stack.push(frame);
9342
+ this.previousWasTextNode = false;
9343
+ return out;
9344
+ };
9345
+
9346
+ return ReactDOMServerRenderer;
9347
+ }();
9348
+
9349
+ /**
9350
+ * Render a ReactElement to its initial HTML. This should only be used on the
9351
+ * server.
9352
+ * See https://reactjs.org/docs/react-dom-server.html#rendertostring
9353
+ */
9354
+
9355
+ function renderToString(element, options) {
9356
+ var renderer = new ReactDOMServerRenderer(element, false, options);
9357
+
9358
+ try {
9359
+ var markup = renderer.read(Infinity);
9360
+ return markup;
9361
+ } finally {
9362
+ renderer.destroy();
9363
+ }
9364
+ }
9365
+ /**
9366
+ * Similar to renderToString, except this doesn't create extra DOM attributes
9367
+ * such as data-react-id that React uses internally.
9368
+ * See https://reactjs.org/docs/react-dom-server.html#rendertostaticmarkup
9369
+ */
9370
+
9371
+ function renderToStaticMarkup(element, options) {
9372
+ var renderer = new ReactDOMServerRenderer(element, true, options);
9373
+
9374
+ try {
9375
+ var markup = renderer.read(Infinity);
9376
+ return markup;
9377
+ } finally {
9378
+ renderer.destroy();
9379
+ }
9380
+ }
9381
+
9382
+ function renderToNodeStream() {
9383
+ {
9384
+ {
9385
+ throw Error( "ReactDOMServer.renderToNodeStream(): The streaming API is not available in the browser. Use ReactDOMServer.renderToString() instead." );
9386
+ }
9387
+ }
9388
+ }
9389
+
9390
+ function renderToStaticNodeStream() {
9391
+ {
9392
+ {
9393
+ throw Error( "ReactDOMServer.renderToStaticNodeStream(): The streaming API is not available in the browser. Use ReactDOMServer.renderToStaticMarkup() instead." );
9394
+ }
9395
+ }
9396
+ }
9397
+
9398
+ exports.renderToNodeStream = renderToNodeStream;
9399
+ exports.renderToStaticMarkup = renderToStaticMarkup;
9400
+ exports.renderToStaticNodeStream = renderToStaticNodeStream;
9401
+ exports.renderToString = renderToString;
9402
+ exports.version = ReactVersion;
9403
+ })();
9404
+ }
9405
+
9406
+
9407
+ /***/ }),
9408
+
9409
+ /***/ "./node_modules/react-dom/cjs/react-dom.development.js":
9410
+ /*!*************************************************************!*\
9411
+ !*** ./node_modules/react-dom/cjs/react-dom.development.js ***!
9412
+ \*************************************************************/
9413
+ /*! no static exports found */
9414
+ /***/ (function(module, exports, __webpack_require__) {
9415
+
9416
+ "use strict";
9417
+ /** @license React v17.0.2
9418
+ * react-dom.development.js
9419
+ *
9420
+ * Copyright (c) Facebook, Inc. and its affiliates.
9421
+ *
9422
+ * This source code is licensed under the MIT license found in the
9423
+ * LICENSE file in the root directory of this source tree.
9424
+ */
9425
+
9426
+
9427
+
9428
+ if (true) {
9429
+ (function() {
9430
+ 'use strict';
9431
+
9432
+ var React = __webpack_require__(/*! react */ "./node_modules/react/index.js");
9433
+ var _assign = __webpack_require__(/*! object-assign */ "./node_modules/object-assign/index.js");
9434
+ var Scheduler = __webpack_require__(/*! scheduler */ "./node_modules/scheduler/index.js");
9435
+ var tracing = __webpack_require__(/*! scheduler/tracing */ "./node_modules/scheduler/tracing.js");
9436
+
9437
+ var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
9438
+
9439
+ // by calls to these methods by a Babel plugin.
9440
+ //
9441
+ // In PROD (or in packages without access to React internals),
9442
+ // they are left as they are instead.
9443
+
9444
+ function warn(format) {
9445
+ {
9446
+ for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
9447
+ args[_key - 1] = arguments[_key];
9448
+ }
9449
+
9450
+ printWarning('warn', format, args);
9451
+ }
9452
+ }
9453
+ function error(format) {
9454
+ {
9455
+ for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
9456
+ args[_key2 - 1] = arguments[_key2];
9457
+ }
9458
+
9459
+ printWarning('error', format, args);
9460
+ }
9461
+ }
9462
+
9463
+ function printWarning(level, format, args) {
9464
+ // When changing this logic, you might want to also
9465
+ // update consoleWithStackDev.www.js as well.
9466
+ {
9467
+ var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
9468
+ var stack = ReactDebugCurrentFrame.getStackAddendum();
9469
+
9470
+ if (stack !== '') {
9471
+ format += '%s';
9472
+ args = args.concat([stack]);
9473
+ }
9474
+
9475
+ var argsWithFormat = args.map(function (item) {
9476
+ return '' + item;
9477
+ }); // Careful: RN currently depends on this prefix
9478
+
9479
+ argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it
9480
+ // breaks IE9: https://github.com/facebook/react/issues/13610
9481
+ // eslint-disable-next-line react-internal/no-production-logging
9482
+
9483
+ Function.prototype.apply.call(console[level], console, argsWithFormat);
9484
+ }
9485
+ }
9486
+
9487
+ if (!React) {
9488
+ {
9489
+ throw Error( "ReactDOM was loaded before React. Make sure you load the React package before loading ReactDOM." );
9490
+ }
9491
+ }
9492
+
9493
+ var FunctionComponent = 0;
9494
+ var ClassComponent = 1;
9495
+ var IndeterminateComponent = 2; // Before we know whether it is function or class
9496
+
9497
+ var HostRoot = 3; // Root of a host tree. Could be nested inside another node.
9498
+
9499
+ var HostPortal = 4; // A subtree. Could be an entry point to a different renderer.
9500
+
9501
+ var HostComponent = 5;
9502
+ var HostText = 6;
9503
+ var Fragment = 7;
9504
+ var Mode = 8;
9505
+ var ContextConsumer = 9;
9506
+ var ContextProvider = 10;
9507
+ var ForwardRef = 11;
9508
+ var Profiler = 12;
9509
+ var SuspenseComponent = 13;
9510
+ var MemoComponent = 14;
9511
+ var SimpleMemoComponent = 15;
9512
+ var LazyComponent = 16;
9513
+ var IncompleteClassComponent = 17;
9514
+ var DehydratedFragment = 18;
9515
+ var SuspenseListComponent = 19;
9516
+ var FundamentalComponent = 20;
9517
+ var ScopeComponent = 21;
9518
+ var Block = 22;
9519
+ var OffscreenComponent = 23;
9520
+ var LegacyHiddenComponent = 24;
9521
+
9522
+ // Filter certain DOM attributes (e.g. src, href) if their values are empty strings.
9523
+
9524
+ var enableProfilerTimer = true; // Record durations for commit and passive effects phases.
9525
+
9526
+ var enableFundamentalAPI = false; // Experimental Scope support.
9527
+ var enableNewReconciler = false; // Errors that are thrown while unmounting (or after in the case of passive effects)
9528
+ var warnAboutStringRefs = false;
9529
+
9530
+ var allNativeEvents = new Set();
9531
+ /**
9532
+ * Mapping from registration name to event name
9533
+ */
9534
+
9535
+
9536
+ var registrationNameDependencies = {};
9537
+ /**
9538
+ * Mapping from lowercase registration names to the properly cased version,
9539
+ * used to warn in the case of missing event handlers. Available
9540
+ * only in true.
9541
+ * @type {Object}
9542
+ */
9543
+
9544
+ var possibleRegistrationNames = {} ; // Trust the developer to only use possibleRegistrationNames in true
9545
+
9546
+ function registerTwoPhaseEvent(registrationName, dependencies) {
9547
+ registerDirectEvent(registrationName, dependencies);
9548
+ registerDirectEvent(registrationName + 'Capture', dependencies);
9549
+ }
9550
+ function registerDirectEvent(registrationName, dependencies) {
9551
+ {
9552
+ if (registrationNameDependencies[registrationName]) {
9553
+ error('EventRegistry: More than one plugin attempted to publish the same ' + 'registration name, `%s`.', registrationName);
9554
+ }
9555
+ }
9556
+
9557
+ registrationNameDependencies[registrationName] = dependencies;
9558
+
9559
+ {
9560
+ var lowerCasedName = registrationName.toLowerCase();
9561
+ possibleRegistrationNames[lowerCasedName] = registrationName;
9562
+
9563
+ if (registrationName === 'onDoubleClick') {
9564
+ possibleRegistrationNames.ondblclick = registrationName;
9565
+ }
9566
+ }
9567
+
9568
+ for (var i = 0; i < dependencies.length; i++) {
9569
+ allNativeEvents.add(dependencies[i]);
9570
+ }
9571
+ }
9572
+
9573
+ var canUseDOM = !!(typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined');
9574
+
9575
+ // A reserved attribute.
9576
+ // It is handled by React separately and shouldn't be written to the DOM.
9577
+ var RESERVED = 0; // A simple string attribute.
9578
+ // Attributes that aren't in the filter are presumed to have this type.
9579
+
9580
+ var STRING = 1; // A string attribute that accepts booleans in React. In HTML, these are called
9581
+ // "enumerated" attributes with "true" and "false" as possible values.
9582
+ // When true, it should be set to a "true" string.
9583
+ // When false, it should be set to a "false" string.
9584
+
9585
+ var BOOLEANISH_STRING = 2; // A real boolean attribute.
9586
+ // When true, it should be present (set either to an empty string or its name).
9587
+ // When false, it should be omitted.
9588
+
9589
+ var BOOLEAN = 3; // An attribute that can be used as a flag as well as with a value.
9590
+ // When true, it should be present (set either to an empty string or its name).
9591
+ // When false, it should be omitted.
9592
+ // For any other value, should be present with that value.
9593
+
9594
+ var OVERLOADED_BOOLEAN = 4; // An attribute that must be numeric or parse as a numeric.
9595
+ // When falsy, it should be removed.
9596
+
9597
+ var NUMERIC = 5; // An attribute that must be positive numeric or parse as a positive numeric.
9598
+ // When falsy, it should be removed.
9599
+
9600
+ var POSITIVE_NUMERIC = 6;
9601
+
9602
+ /* eslint-disable max-len */
9603
+ 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";
9604
+ /* eslint-enable max-len */
9605
+
9606
+ var ATTRIBUTE_NAME_CHAR = ATTRIBUTE_NAME_START_CHAR + "\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040";
9607
+ var ROOT_ATTRIBUTE_NAME = 'data-reactroot';
9608
+ var VALID_ATTRIBUTE_NAME_REGEX = new RegExp('^[' + ATTRIBUTE_NAME_START_CHAR + '][' + ATTRIBUTE_NAME_CHAR + ']*$');
9609
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
9610
+ var illegalAttributeNameCache = {};
9611
+ var validatedAttributeNameCache = {};
9612
+ function isAttributeNameSafe(attributeName) {
9613
+ if (hasOwnProperty.call(validatedAttributeNameCache, attributeName)) {
9614
+ return true;
9615
+ }
9616
+
9617
+ if (hasOwnProperty.call(illegalAttributeNameCache, attributeName)) {
9618
+ return false;
9619
+ }
9620
+
9621
+ if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) {
9622
+ validatedAttributeNameCache[attributeName] = true;
9623
+ return true;
9624
+ }
9625
+
9626
+ illegalAttributeNameCache[attributeName] = true;
9627
+
9628
+ {
9629
+ error('Invalid attribute name: `%s`', attributeName);
9630
+ }
9631
+
9632
+ return false;
9633
+ }
9634
+ function shouldIgnoreAttribute(name, propertyInfo, isCustomComponentTag) {
9635
+ if (propertyInfo !== null) {
9636
+ return propertyInfo.type === RESERVED;
9637
+ }
9638
+
9639
+ if (isCustomComponentTag) {
9640
+ return false;
9641
+ }
9642
+
9643
+ if (name.length > 2 && (name[0] === 'o' || name[0] === 'O') && (name[1] === 'n' || name[1] === 'N')) {
9644
+ return true;
9645
+ }
9646
+
9647
+ return false;
9648
+ }
9649
+ function shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag) {
9650
+ if (propertyInfo !== null && propertyInfo.type === RESERVED) {
9651
+ return false;
9652
+ }
9653
+
9654
+ switch (typeof value) {
9655
+ case 'function': // $FlowIssue symbol is perfectly valid here
9656
+
9657
+ case 'symbol':
9658
+ // eslint-disable-line
9659
+ return true;
9660
+
9661
+ case 'boolean':
9662
+ {
9663
+ if (isCustomComponentTag) {
9664
+ return false;
9665
+ }
9666
+
9667
+ if (propertyInfo !== null) {
9668
+ return !propertyInfo.acceptsBooleans;
9669
+ } else {
9670
+ var prefix = name.toLowerCase().slice(0, 5);
9671
+ return prefix !== 'data-' && prefix !== 'aria-';
9672
+ }
9673
+ }
9674
+
9675
+ default:
9676
+ return false;
9677
+ }
9678
+ }
9679
+ function shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag) {
9680
+ if (value === null || typeof value === 'undefined') {
9681
+ return true;
9682
+ }
9683
+
9684
+ if (shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag)) {
9685
+ return true;
9686
+ }
9687
+
9688
+ if (isCustomComponentTag) {
9689
+ return false;
9690
+ }
9691
+
9692
+ if (propertyInfo !== null) {
9693
+
9694
+ switch (propertyInfo.type) {
9695
+ case BOOLEAN:
9696
+ return !value;
9697
+
9698
+ case OVERLOADED_BOOLEAN:
9699
+ return value === false;
9700
+
9701
+ case NUMERIC:
9702
+ return isNaN(value);
9703
+
9704
+ case POSITIVE_NUMERIC:
9705
+ return isNaN(value) || value < 1;
9706
+ }
9707
+ }
9708
+
9709
+ return false;
9710
+ }
9711
+ function getPropertyInfo(name) {
9712
+ return properties.hasOwnProperty(name) ? properties[name] : null;
9713
+ }
9714
+
9715
+ function PropertyInfoRecord(name, type, mustUseProperty, attributeName, attributeNamespace, sanitizeURL, removeEmptyString) {
9716
+ this.acceptsBooleans = type === BOOLEANISH_STRING || type === BOOLEAN || type === OVERLOADED_BOOLEAN;
9717
+ this.attributeName = attributeName;
9718
+ this.attributeNamespace = attributeNamespace;
9719
+ this.mustUseProperty = mustUseProperty;
9720
+ this.propertyName = name;
9721
+ this.type = type;
9722
+ this.sanitizeURL = sanitizeURL;
9723
+ this.removeEmptyString = removeEmptyString;
9724
+ } // When adding attributes to this list, be sure to also add them to
9725
+ // the `possibleStandardNames` module to ensure casing and incorrect
9726
+ // name warnings.
9727
+
9728
+
9729
+ var properties = {}; // These props are reserved by React. They shouldn't be written to the DOM.
9730
+
9731
+ var reservedProps = ['children', 'dangerouslySetInnerHTML', // TODO: This prevents the assignment of defaultValue to regular
9732
+ // elements (not just inputs). Now that ReactDOMInput assigns to the
9733
+ // defaultValue property -- do we need this?
9734
+ 'defaultValue', 'defaultChecked', 'innerHTML', 'suppressContentEditableWarning', 'suppressHydrationWarning', 'style'];
9735
+ reservedProps.forEach(function (name) {
9736
+ properties[name] = new PropertyInfoRecord(name, RESERVED, false, // mustUseProperty
9737
+ name, // attributeName
9738
+ null, // attributeNamespace
9739
+ false, // sanitizeURL
9740
+ false);
9741
+ }); // A few React string attributes have a different name.
9742
+ // This is a mapping from React prop names to the attribute names.
9743
+
9744
+ [['acceptCharset', 'accept-charset'], ['className', 'class'], ['htmlFor', 'for'], ['httpEquiv', 'http-equiv']].forEach(function (_ref) {
9745
+ var name = _ref[0],
9746
+ attributeName = _ref[1];
9747
+ properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
9748
+ attributeName, // attributeName
9749
+ null, // attributeNamespace
9750
+ false, // sanitizeURL
9751
+ false);
9752
+ }); // These are "enumerated" HTML attributes that accept "true" and "false".
9753
+ // In React, we let users pass `true` and `false` even though technically
9754
+ // these aren't boolean attributes (they are coerced to strings).
9755
+
9756
+ ['contentEditable', 'draggable', 'spellCheck', 'value'].forEach(function (name) {
9757
+ properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, // mustUseProperty
9758
+ name.toLowerCase(), // attributeName
9759
+ null, // attributeNamespace
9760
+ false, // sanitizeURL
9761
+ false);
9762
+ }); // These are "enumerated" SVG attributes that accept "true" and "false".
9763
+ // In React, we let users pass `true` and `false` even though technically
9764
+ // these aren't boolean attributes (they are coerced to strings).
9765
+ // Since these are SVG attributes, their attribute names are case-sensitive.
9766
+
9767
+ ['autoReverse', 'externalResourcesRequired', 'focusable', 'preserveAlpha'].forEach(function (name) {
9768
+ properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, // mustUseProperty
9769
+ name, // attributeName
9770
+ null, // attributeNamespace
9771
+ false, // sanitizeURL
9772
+ false);
9773
+ }); // These are HTML boolean attributes.
9774
+
9775
+ ['allowFullScreen', 'async', // Note: there is a special case that prevents it from being written to the DOM
9776
+ // on the client side because the browsers are inconsistent. Instead we call focus().
9777
+ 'autoFocus', 'autoPlay', 'controls', 'default', 'defer', 'disabled', 'disablePictureInPicture', 'disableRemotePlayback', 'formNoValidate', 'hidden', 'loop', 'noModule', 'noValidate', 'open', 'playsInline', 'readOnly', 'required', 'reversed', 'scoped', 'seamless', // Microdata
9778
+ 'itemScope'].forEach(function (name) {
9779
+ properties[name] = new PropertyInfoRecord(name, BOOLEAN, false, // mustUseProperty
9780
+ name.toLowerCase(), // attributeName
9781
+ null, // attributeNamespace
9782
+ false, // sanitizeURL
9783
+ false);
9784
+ }); // These are the few React props that we set as DOM properties
9785
+ // rather than attributes. These are all booleans.
9786
+
9787
+ ['checked', // Note: `option.selected` is not updated if `select.multiple` is
9788
+ // disabled with `removeAttribute`. We have special logic for handling this.
9789
+ 'multiple', 'muted', 'selected' // NOTE: if you add a camelCased prop to this list,
9790
+ // you'll need to set attributeName to name.toLowerCase()
9791
+ // instead in the assignment below.
9792
+ ].forEach(function (name) {
9793
+ properties[name] = new PropertyInfoRecord(name, BOOLEAN, true, // mustUseProperty
9794
+ name, // attributeName
9795
+ null, // attributeNamespace
9796
+ false, // sanitizeURL
9797
+ false);
9798
+ }); // These are HTML attributes that are "overloaded booleans": they behave like
9799
+ // booleans, but can also accept a string value.
9800
+
9801
+ ['capture', 'download' // NOTE: if you add a camelCased prop to this list,
9802
+ // you'll need to set attributeName to name.toLowerCase()
9803
+ // instead in the assignment below.
9804
+ ].forEach(function (name) {
9805
+ properties[name] = new PropertyInfoRecord(name, OVERLOADED_BOOLEAN, false, // mustUseProperty
9806
+ name, // attributeName
9807
+ null, // attributeNamespace
9808
+ false, // sanitizeURL
9809
+ false);
9810
+ }); // These are HTML attributes that must be positive numbers.
9811
+
9812
+ ['cols', 'rows', 'size', 'span' // NOTE: if you add a camelCased prop to this list,
9813
+ // you'll need to set attributeName to name.toLowerCase()
9814
+ // instead in the assignment below.
9815
+ ].forEach(function (name) {
9816
+ properties[name] = new PropertyInfoRecord(name, POSITIVE_NUMERIC, false, // mustUseProperty
9817
+ name, // attributeName
9818
+ null, // attributeNamespace
9819
+ false, // sanitizeURL
9820
+ false);
9821
+ }); // These are HTML attributes that must be numbers.
9822
+
9823
+ ['rowSpan', 'start'].forEach(function (name) {
9824
+ properties[name] = new PropertyInfoRecord(name, NUMERIC, false, // mustUseProperty
9825
+ name.toLowerCase(), // attributeName
9826
+ null, // attributeNamespace
9827
+ false, // sanitizeURL
9828
+ false);
9829
+ });
9830
+ var CAMELIZE = /[\-\:]([a-z])/g;
9831
+
9832
+ var capitalize = function (token) {
9833
+ return token[1].toUpperCase();
9834
+ }; // This is a list of all SVG attributes that need special casing, namespacing,
9835
+ // or boolean value assignment. Regular attributes that just accept strings
9836
+ // and have the same names are omitted, just like in the HTML attribute filter.
9837
+ // Some of these attributes can be hard to find. This list was created by
9838
+ // scraping the MDN documentation.
9839
+
9840
+
9841
+ ['accent-height', 'alignment-baseline', 'arabic-form', 'baseline-shift', 'cap-height', 'clip-path', 'clip-rule', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'dominant-baseline', 'enable-background', 'fill-opacity', 'fill-rule', 'flood-color', 'flood-opacity', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'glyph-name', 'glyph-orientation-horizontal', 'glyph-orientation-vertical', 'horiz-adv-x', 'horiz-origin-x', 'image-rendering', 'letter-spacing', 'lighting-color', 'marker-end', 'marker-mid', 'marker-start', 'overline-position', 'overline-thickness', 'paint-order', 'panose-1', 'pointer-events', 'rendering-intent', 'shape-rendering', 'stop-color', 'stop-opacity', 'strikethrough-position', 'strikethrough-thickness', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke-width', 'text-anchor', 'text-decoration', 'text-rendering', 'underline-position', 'underline-thickness', 'unicode-bidi', 'unicode-range', 'units-per-em', 'v-alphabetic', 'v-hanging', 'v-ideographic', 'v-mathematical', 'vector-effect', 'vert-adv-y', 'vert-origin-x', 'vert-origin-y', 'word-spacing', 'writing-mode', 'xmlns:xlink', 'x-height' // NOTE: if you add a camelCased prop to this list,
9842
+ // you'll need to set attributeName to name.toLowerCase()
9843
+ // instead in the assignment below.
9844
+ ].forEach(function (attributeName) {
9845
+ var name = attributeName.replace(CAMELIZE, capitalize);
9846
+ properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
9847
+ attributeName, null, // attributeNamespace
9848
+ false, // sanitizeURL
9849
+ false);
9850
+ }); // String SVG attributes with the xlink namespace.
9851
+
9852
+ ['xlink:actuate', 'xlink:arcrole', 'xlink:role', 'xlink:show', 'xlink:title', 'xlink:type' // NOTE: if you add a camelCased prop to this list,
9853
+ // you'll need to set attributeName to name.toLowerCase()
9854
+ // instead in the assignment below.
9855
+ ].forEach(function (attributeName) {
9856
+ var name = attributeName.replace(CAMELIZE, capitalize);
9857
+ properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
9858
+ attributeName, 'http://www.w3.org/1999/xlink', false, // sanitizeURL
9859
+ false);
9860
+ }); // String SVG attributes with the xml namespace.
9861
+
9862
+ ['xml:base', 'xml:lang', 'xml:space' // NOTE: if you add a camelCased prop to this list,
9863
+ // you'll need to set attributeName to name.toLowerCase()
9864
+ // instead in the assignment below.
9865
+ ].forEach(function (attributeName) {
9866
+ var name = attributeName.replace(CAMELIZE, capitalize);
9867
+ properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
9868
+ attributeName, 'http://www.w3.org/XML/1998/namespace', false, // sanitizeURL
9869
+ false);
9870
+ }); // These attribute exists both in HTML and SVG.
9871
+ // The attribute name is case-sensitive in SVG so we can't just use
9872
+ // the React name like we do for attributes that exist only in HTML.
9873
+
9874
+ ['tabIndex', 'crossOrigin'].forEach(function (attributeName) {
9875
+ properties[attributeName] = new PropertyInfoRecord(attributeName, STRING, false, // mustUseProperty
9876
+ attributeName.toLowerCase(), // attributeName
9877
+ null, // attributeNamespace
9878
+ false, // sanitizeURL
9879
+ false);
9880
+ }); // These attributes accept URLs. These must not allow javascript: URLS.
9881
+ // These will also need to accept Trusted Types object in the future.
9882
+
9883
+ var xlinkHref = 'xlinkHref';
9884
+ properties[xlinkHref] = new PropertyInfoRecord('xlinkHref', STRING, false, // mustUseProperty
9885
+ 'xlink:href', 'http://www.w3.org/1999/xlink', true, // sanitizeURL
9886
+ false);
9887
+ ['src', 'href', 'action', 'formAction'].forEach(function (attributeName) {
9888
+ properties[attributeName] = new PropertyInfoRecord(attributeName, STRING, false, // mustUseProperty
9889
+ attributeName.toLowerCase(), // attributeName
9890
+ null, // attributeNamespace
9891
+ true, // sanitizeURL
9892
+ true);
9893
+ });
9894
+
9895
+ // and any newline or tab are filtered out as if they're not part of the URL.
9896
+ // https://url.spec.whatwg.org/#url-parsing
9897
+ // Tab or newline are defined as \r\n\t:
9898
+ // https://infra.spec.whatwg.org/#ascii-tab-or-newline
9899
+ // A C0 control is a code point in the range \u0000 NULL to \u001F
9900
+ // INFORMATION SEPARATOR ONE, inclusive:
9901
+ // https://infra.spec.whatwg.org/#c0-control-or-space
9902
+
9903
+ /* eslint-disable max-len */
9904
+
9905
+ var isJavaScriptProtocol = /^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*\:/i;
9906
+ var didWarn = false;
9907
+
9908
+ function sanitizeURL(url) {
9909
+ {
9910
+ if (!didWarn && isJavaScriptProtocol.test(url)) {
9911
+ didWarn = true;
9912
+
9913
+ error('A future version of React will block javascript: URLs as a security precaution. ' + 'Use event handlers instead if you can. If you need to generate unsafe HTML try ' + 'using dangerouslySetInnerHTML instead. React was passed %s.', JSON.stringify(url));
9914
+ }
9915
+ }
9916
+ }
9917
+
9918
+ /**
9919
+ * Get the value for a property on a node. Only used in DEV for SSR validation.
9920
+ * The "expected" argument is used as a hint of what the expected value is.
9921
+ * Some properties have multiple equivalent values.
9922
+ */
9923
+ function getValueForProperty(node, name, expected, propertyInfo) {
9924
+ {
9925
+ if (propertyInfo.mustUseProperty) {
9926
+ var propertyName = propertyInfo.propertyName;
9927
+ return node[propertyName];
9928
+ } else {
9929
+ if ( propertyInfo.sanitizeURL) {
9930
+ // If we haven't fully disabled javascript: URLs, and if
9931
+ // the hydration is successful of a javascript: URL, we
9932
+ // still want to warn on the client.
9933
+ sanitizeURL('' + expected);
9934
+ }
9935
+
9936
+ var attributeName = propertyInfo.attributeName;
9937
+ var stringValue = null;
9938
+
9939
+ if (propertyInfo.type === OVERLOADED_BOOLEAN) {
9940
+ if (node.hasAttribute(attributeName)) {
9941
+ var value = node.getAttribute(attributeName);
9942
+
9943
+ if (value === '') {
9944
+ return true;
9945
+ }
9946
+
9947
+ if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {
9948
+ return value;
9949
+ }
9950
+
9951
+ if (value === '' + expected) {
9952
+ return expected;
9953
+ }
9954
+
9955
+ return value;
9956
+ }
9957
+ } else if (node.hasAttribute(attributeName)) {
9958
+ if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {
9959
+ // We had an attribute but shouldn't have had one, so read it
9960
+ // for the error message.
9961
+ return node.getAttribute(attributeName);
9962
+ }
9963
+
9964
+ if (propertyInfo.type === BOOLEAN) {
9965
+ // If this was a boolean, it doesn't matter what the value is
9966
+ // the fact that we have it is the same as the expected.
9967
+ return expected;
9968
+ } // Even if this property uses a namespace we use getAttribute
9969
+ // because we assume its namespaced name is the same as our config.
9970
+ // To use getAttributeNS we need the local name which we don't have
9971
+ // in our config atm.
9972
+
9973
+
9974
+ stringValue = node.getAttribute(attributeName);
9975
+ }
9976
+
9977
+ if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {
9978
+ return stringValue === null ? expected : stringValue;
9979
+ } else if (stringValue === '' + expected) {
9980
+ return expected;
9981
+ } else {
9982
+ return stringValue;
9983
+ }
9984
+ }
9985
+ }
9986
+ }
9987
+ /**
9988
+ * Get the value for a attribute on a node. Only used in DEV for SSR validation.
9989
+ * The third argument is used as a hint of what the expected value is. Some
9990
+ * attributes have multiple equivalent values.
9991
+ */
9992
+
9993
+ function getValueForAttribute(node, name, expected) {
9994
+ {
9995
+ if (!isAttributeNameSafe(name)) {
9996
+ return;
9997
+ } // If the object is an opaque reference ID, it's expected that
9998
+ // the next prop is different than the server value, so just return
9999
+ // expected
10000
+
10001
+
10002
+ if (isOpaqueHydratingObject(expected)) {
10003
+ return expected;
10004
+ }
10005
+
10006
+ if (!node.hasAttribute(name)) {
10007
+ return expected === undefined ? undefined : null;
10008
+ }
10009
+
10010
+ var value = node.getAttribute(name);
10011
+
10012
+ if (value === '' + expected) {
10013
+ return expected;
10014
+ }
10015
+
10016
+ return value;
10017
+ }
10018
+ }
10019
+ /**
10020
+ * Sets the value for a property on a node.
10021
+ *
10022
+ * @param {DOMElement} node
10023
+ * @param {string} name
10024
+ * @param {*} value
10025
+ */
10026
+
10027
+ function setValueForProperty(node, name, value, isCustomComponentTag) {
10028
+ var propertyInfo = getPropertyInfo(name);
10029
+
10030
+ if (shouldIgnoreAttribute(name, propertyInfo, isCustomComponentTag)) {
10031
+ return;
10032
+ }
10033
+
10034
+ if (shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag)) {
10035
+ value = null;
10036
+ } // If the prop isn't in the special list, treat it as a simple attribute.
10037
+
10038
+
10039
+ if (isCustomComponentTag || propertyInfo === null) {
10040
+ if (isAttributeNameSafe(name)) {
10041
+ var _attributeName = name;
10042
+
10043
+ if (value === null) {
10044
+ node.removeAttribute(_attributeName);
10045
+ } else {
10046
+ node.setAttribute(_attributeName, '' + value);
10047
+ }
10048
+ }
10049
+
10050
+ return;
10051
+ }
10052
+
10053
+ var mustUseProperty = propertyInfo.mustUseProperty;
10054
+
10055
+ if (mustUseProperty) {
10056
+ var propertyName = propertyInfo.propertyName;
10057
+
10058
+ if (value === null) {
10059
+ var type = propertyInfo.type;
10060
+ node[propertyName] = type === BOOLEAN ? false : '';
10061
+ } else {
10062
+ // Contrary to `setAttribute`, object properties are properly
10063
+ // `toString`ed by IE8/9.
10064
+ node[propertyName] = value;
10065
+ }
10066
+
10067
+ return;
10068
+ } // The rest are treated as attributes with special cases.
10069
+
10070
+
10071
+ var attributeName = propertyInfo.attributeName,
10072
+ attributeNamespace = propertyInfo.attributeNamespace;
10073
+
10074
+ if (value === null) {
10075
+ node.removeAttribute(attributeName);
10076
+ } else {
10077
+ var _type = propertyInfo.type;
10078
+ var attributeValue;
10079
+
10080
+ if (_type === BOOLEAN || _type === OVERLOADED_BOOLEAN && value === true) {
10081
+ // If attribute type is boolean, we know for sure it won't be an execution sink
10082
+ // and we won't require Trusted Type here.
10083
+ attributeValue = '';
10084
+ } else {
10085
+ // `setAttribute` with objects becomes only `[object]` in IE8/9,
10086
+ // ('' + value) makes it output the correct toString()-value.
10087
+ {
10088
+ attributeValue = '' + value;
10089
+ }
10090
+
10091
+ if (propertyInfo.sanitizeURL) {
10092
+ sanitizeURL(attributeValue.toString());
10093
+ }
10094
+ }
10095
+
10096
+ if (attributeNamespace) {
10097
+ node.setAttributeNS(attributeNamespace, attributeName, attributeValue);
10098
+ } else {
10099
+ node.setAttribute(attributeName, attributeValue);
10100
+ }
10101
+ }
10102
+ }
10103
+
10104
+ // ATTENTION
10105
+ // When adding new symbols to this file,
10106
+ // Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'
10107
+ // The Symbol used to tag the ReactElement-like types. If there is no native Symbol
10108
+ // nor polyfill, then a plain number is used for performance.
10109
+ var REACT_ELEMENT_TYPE = 0xeac7;
10110
+ var REACT_PORTAL_TYPE = 0xeaca;
10111
+ var REACT_FRAGMENT_TYPE = 0xeacb;
10112
+ var REACT_STRICT_MODE_TYPE = 0xeacc;
10113
+ var REACT_PROFILER_TYPE = 0xead2;
10114
+ var REACT_PROVIDER_TYPE = 0xeacd;
10115
+ var REACT_CONTEXT_TYPE = 0xeace;
10116
+ var REACT_FORWARD_REF_TYPE = 0xead0;
10117
+ var REACT_SUSPENSE_TYPE = 0xead1;
10118
+ var REACT_SUSPENSE_LIST_TYPE = 0xead8;
10119
+ var REACT_MEMO_TYPE = 0xead3;
10120
+ var REACT_LAZY_TYPE = 0xead4;
10121
+ var REACT_BLOCK_TYPE = 0xead9;
10122
+ var REACT_SERVER_BLOCK_TYPE = 0xeada;
10123
+ var REACT_FUNDAMENTAL_TYPE = 0xead5;
10124
+ var REACT_SCOPE_TYPE = 0xead7;
10125
+ var REACT_OPAQUE_ID_TYPE = 0xeae0;
10126
+ var REACT_DEBUG_TRACING_MODE_TYPE = 0xeae1;
10127
+ var REACT_OFFSCREEN_TYPE = 0xeae2;
10128
+ var REACT_LEGACY_HIDDEN_TYPE = 0xeae3;
10129
+
10130
+ if (typeof Symbol === 'function' && Symbol.for) {
10131
+ var symbolFor = Symbol.for;
10132
+ REACT_ELEMENT_TYPE = symbolFor('react.element');
10133
+ REACT_PORTAL_TYPE = symbolFor('react.portal');
10134
+ REACT_FRAGMENT_TYPE = symbolFor('react.fragment');
10135
+ REACT_STRICT_MODE_TYPE = symbolFor('react.strict_mode');
10136
+ REACT_PROFILER_TYPE = symbolFor('react.profiler');
10137
+ REACT_PROVIDER_TYPE = symbolFor('react.provider');
10138
+ REACT_CONTEXT_TYPE = symbolFor('react.context');
10139
+ REACT_FORWARD_REF_TYPE = symbolFor('react.forward_ref');
10140
+ REACT_SUSPENSE_TYPE = symbolFor('react.suspense');
10141
+ REACT_SUSPENSE_LIST_TYPE = symbolFor('react.suspense_list');
10142
+ REACT_MEMO_TYPE = symbolFor('react.memo');
10143
+ REACT_LAZY_TYPE = symbolFor('react.lazy');
10144
+ REACT_BLOCK_TYPE = symbolFor('react.block');
10145
+ REACT_SERVER_BLOCK_TYPE = symbolFor('react.server.block');
10146
+ REACT_FUNDAMENTAL_TYPE = symbolFor('react.fundamental');
10147
+ REACT_SCOPE_TYPE = symbolFor('react.scope');
10148
+ REACT_OPAQUE_ID_TYPE = symbolFor('react.opaque.id');
10149
+ REACT_DEBUG_TRACING_MODE_TYPE = symbolFor('react.debug_trace_mode');
10150
+ REACT_OFFSCREEN_TYPE = symbolFor('react.offscreen');
10151
+ REACT_LEGACY_HIDDEN_TYPE = symbolFor('react.legacy_hidden');
10152
+ }
10153
+
10154
+ var MAYBE_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
10155
+ var FAUX_ITERATOR_SYMBOL = '@@iterator';
10156
+ function getIteratorFn(maybeIterable) {
10157
+ if (maybeIterable === null || typeof maybeIterable !== 'object') {
10158
+ return null;
10159
+ }
10160
+
10161
+ var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
10162
+
10163
+ if (typeof maybeIterator === 'function') {
10164
+ return maybeIterator;
10165
+ }
10166
+
10167
+ return null;
10168
+ }
10169
+
10170
+ // Helpers to patch console.logs to avoid logging during side-effect free
10171
+ // replaying on render function. This currently only patches the object
10172
+ // lazily which won't cover if the log function was extracted eagerly.
10173
+ // We could also eagerly patch the method.
10174
+ var disabledDepth = 0;
10175
+ var prevLog;
10176
+ var prevInfo;
10177
+ var prevWarn;
10178
+ var prevError;
10179
+ var prevGroup;
10180
+ var prevGroupCollapsed;
10181
+ var prevGroupEnd;
10182
+
10183
+ function disabledLog() {}
10184
+
10185
+ disabledLog.__reactDisabledLog = true;
10186
+ function disableLogs() {
10187
+ {
10188
+ if (disabledDepth === 0) {
10189
+ /* eslint-disable react-internal/no-production-logging */
10190
+ prevLog = console.log;
10191
+ prevInfo = console.info;
10192
+ prevWarn = console.warn;
10193
+ prevError = console.error;
10194
+ prevGroup = console.group;
10195
+ prevGroupCollapsed = console.groupCollapsed;
10196
+ prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099
10197
+
10198
+ var props = {
10199
+ configurable: true,
10200
+ enumerable: true,
10201
+ value: disabledLog,
10202
+ writable: true
10203
+ }; // $FlowFixMe Flow thinks console is immutable.
10204
+
10205
+ Object.defineProperties(console, {
10206
+ info: props,
10207
+ log: props,
10208
+ warn: props,
10209
+ error: props,
10210
+ group: props,
10211
+ groupCollapsed: props,
10212
+ groupEnd: props
10213
+ });
10214
+ /* eslint-enable react-internal/no-production-logging */
10215
+ }
10216
+
10217
+ disabledDepth++;
10218
+ }
10219
+ }
10220
+ function reenableLogs() {
10221
+ {
10222
+ disabledDepth--;
10223
+
10224
+ if (disabledDepth === 0) {
10225
+ /* eslint-disable react-internal/no-production-logging */
10226
+ var props = {
10227
+ configurable: true,
10228
+ enumerable: true,
10229
+ writable: true
10230
+ }; // $FlowFixMe Flow thinks console is immutable.
10231
+
10232
+ Object.defineProperties(console, {
10233
+ log: _assign({}, props, {
10234
+ value: prevLog
10235
+ }),
10236
+ info: _assign({}, props, {
10237
+ value: prevInfo
10238
+ }),
10239
+ warn: _assign({}, props, {
10240
+ value: prevWarn
10241
+ }),
10242
+ error: _assign({}, props, {
10243
+ value: prevError
10244
+ }),
10245
+ group: _assign({}, props, {
10246
+ value: prevGroup
10247
+ }),
10248
+ groupCollapsed: _assign({}, props, {
10249
+ value: prevGroupCollapsed
10250
+ }),
10251
+ groupEnd: _assign({}, props, {
10252
+ value: prevGroupEnd
10253
+ })
10254
+ });
10255
+ /* eslint-enable react-internal/no-production-logging */
10256
+ }
10257
+
10258
+ if (disabledDepth < 0) {
10259
+ error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');
10260
+ }
10261
+ }
10262
+ }
10263
+
10264
+ var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
10265
+ var prefix;
10266
+ function describeBuiltInComponentFrame(name, source, ownerFn) {
10267
+ {
10268
+ if (prefix === undefined) {
10269
+ // Extract the VM specific prefix used by each line.
10270
+ try {
10271
+ throw Error();
10272
+ } catch (x) {
10273
+ var match = x.stack.trim().match(/\n( *(at )?)/);
10274
+ prefix = match && match[1] || '';
10275
+ }
10276
+ } // We use the prefix to ensure our stacks line up with native stack frames.
10277
+
10278
+
10279
+ return '\n' + prefix + name;
10280
+ }
10281
+ }
10282
+ var reentry = false;
10283
+ var componentFrameCache;
10284
+
10285
+ {
10286
+ var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;
10287
+ componentFrameCache = new PossiblyWeakMap();
10288
+ }
10289
+
10290
+ function describeNativeComponentFrame(fn, construct) {
10291
+ // If something asked for a stack inside a fake render, it should get ignored.
10292
+ if (!fn || reentry) {
10293
+ return '';
10294
+ }
10295
+
10296
+ {
10297
+ var frame = componentFrameCache.get(fn);
10298
+
10299
+ if (frame !== undefined) {
10300
+ return frame;
10301
+ }
10302
+ }
10303
+
10304
+ var control;
10305
+ reentry = true;
10306
+ var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.
10307
+
10308
+ Error.prepareStackTrace = undefined;
10309
+ var previousDispatcher;
10310
+
10311
+ {
10312
+ previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function
10313
+ // for warnings.
10314
+
10315
+ ReactCurrentDispatcher.current = null;
10316
+ disableLogs();
10317
+ }
10318
+
10319
+ try {
10320
+ // This should throw.
10321
+ if (construct) {
10322
+ // Something should be setting the props in the constructor.
10323
+ var Fake = function () {
10324
+ throw Error();
10325
+ }; // $FlowFixMe
10326
+
10327
+
10328
+ Object.defineProperty(Fake.prototype, 'props', {
10329
+ set: function () {
10330
+ // We use a throwing setter instead of frozen or non-writable props
10331
+ // because that won't throw in a non-strict mode function.
10332
+ throw Error();
10333
+ }
10334
+ });
10335
+
10336
+ if (typeof Reflect === 'object' && Reflect.construct) {
10337
+ // We construct a different control for this case to include any extra
10338
+ // frames added by the construct call.
10339
+ try {
10340
+ Reflect.construct(Fake, []);
10341
+ } catch (x) {
10342
+ control = x;
10343
+ }
10344
+
10345
+ Reflect.construct(fn, [], Fake);
10346
+ } else {
10347
+ try {
10348
+ Fake.call();
10349
+ } catch (x) {
10350
+ control = x;
10351
+ }
10352
+
10353
+ fn.call(Fake.prototype);
10354
+ }
10355
+ } else {
10356
+ try {
10357
+ throw Error();
10358
+ } catch (x) {
10359
+ control = x;
10360
+ }
10361
+
10362
+ fn();
10363
+ }
10364
+ } catch (sample) {
10365
+ // This is inlined manually because closure doesn't do it for us.
10366
+ if (sample && control && typeof sample.stack === 'string') {
10367
+ // This extracts the first frame from the sample that isn't also in the control.
10368
+ // Skipping one frame that we assume is the frame that calls the two.
10369
+ var sampleLines = sample.stack.split('\n');
10370
+ var controlLines = control.stack.split('\n');
10371
+ var s = sampleLines.length - 1;
10372
+ var c = controlLines.length - 1;
10373
+
10374
+ while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {
10375
+ // We expect at least one stack frame to be shared.
10376
+ // Typically this will be the root most one. However, stack frames may be
10377
+ // cut off due to maximum stack limits. In this case, one maybe cut off
10378
+ // earlier than the other. We assume that the sample is longer or the same
10379
+ // and there for cut off earlier. So we should find the root most frame in
10380
+ // the sample somewhere in the control.
10381
+ c--;
10382
+ }
10383
+
10384
+ for (; s >= 1 && c >= 0; s--, c--) {
10385
+ // Next we find the first one that isn't the same which should be the
10386
+ // frame that called our sample function and the control.
10387
+ if (sampleLines[s] !== controlLines[c]) {
10388
+ // In V8, the first line is describing the message but other VMs don't.
10389
+ // If we're about to return the first line, and the control is also on the same
10390
+ // line, that's a pretty good indicator that our sample threw at same line as
10391
+ // the control. I.e. before we entered the sample frame. So we ignore this result.
10392
+ // This can happen if you passed a class to function component, or non-function.
10393
+ if (s !== 1 || c !== 1) {
10394
+ do {
10395
+ s--;
10396
+ c--; // We may still have similar intermediate frames from the construct call.
10397
+ // The next one that isn't the same should be our match though.
10398
+
10399
+ if (c < 0 || sampleLines[s] !== controlLines[c]) {
10400
+ // V8 adds a "new" prefix for native classes. Let's remove it to make it prettier.
10401
+ var _frame = '\n' + sampleLines[s].replace(' at new ', ' at ');
10402
+
10403
+ {
10404
+ if (typeof fn === 'function') {
10405
+ componentFrameCache.set(fn, _frame);
10406
+ }
10407
+ } // Return the line we found.
10408
+
10409
+
10410
+ return _frame;
10411
+ }
10412
+ } while (s >= 1 && c >= 0);
10413
+ }
10414
+
10415
+ break;
10416
+ }
10417
+ }
10418
+ }
10419
+ } finally {
10420
+ reentry = false;
10421
+
10422
+ {
10423
+ ReactCurrentDispatcher.current = previousDispatcher;
10424
+ reenableLogs();
10425
+ }
10426
+
10427
+ Error.prepareStackTrace = previousPrepareStackTrace;
10428
+ } // Fallback to just using the name if we couldn't make it throw.
10429
+
10430
+
10431
+ var name = fn ? fn.displayName || fn.name : '';
10432
+ var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';
10433
+
10434
+ {
10435
+ if (typeof fn === 'function') {
10436
+ componentFrameCache.set(fn, syntheticFrame);
10437
+ }
10438
+ }
10439
+
10440
+ return syntheticFrame;
10441
+ }
10442
+
10443
+ function describeClassComponentFrame(ctor, source, ownerFn) {
10444
+ {
10445
+ return describeNativeComponentFrame(ctor, true);
10446
+ }
10447
+ }
10448
+ function describeFunctionComponentFrame(fn, source, ownerFn) {
10449
+ {
10450
+ return describeNativeComponentFrame(fn, false);
10451
+ }
10452
+ }
10453
+
10454
+ function shouldConstruct(Component) {
10455
+ var prototype = Component.prototype;
10456
+ return !!(prototype && prototype.isReactComponent);
10457
+ }
10458
+
10459
+ function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
10460
+
10461
+ if (type == null) {
10462
+ return '';
10463
+ }
10464
+
10465
+ if (typeof type === 'function') {
10466
+ {
10467
+ return describeNativeComponentFrame(type, shouldConstruct(type));
10468
+ }
10469
+ }
10470
+
10471
+ if (typeof type === 'string') {
10472
+ return describeBuiltInComponentFrame(type);
10473
+ }
10474
+
10475
+ switch (type) {
10476
+ case REACT_SUSPENSE_TYPE:
10477
+ return describeBuiltInComponentFrame('Suspense');
10478
+
10479
+ case REACT_SUSPENSE_LIST_TYPE:
10480
+ return describeBuiltInComponentFrame('SuspenseList');
10481
+ }
10482
+
10483
+ if (typeof type === 'object') {
10484
+ switch (type.$$typeof) {
10485
+ case REACT_FORWARD_REF_TYPE:
10486
+ return describeFunctionComponentFrame(type.render);
10487
+
10488
+ case REACT_MEMO_TYPE:
10489
+ // Memo may contain any component type so we recursively resolve it.
10490
+ return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
10491
+
10492
+ case REACT_BLOCK_TYPE:
10493
+ return describeFunctionComponentFrame(type._render);
10494
+
10495
+ case REACT_LAZY_TYPE:
10496
+ {
10497
+ var lazyComponent = type;
10498
+ var payload = lazyComponent._payload;
10499
+ var init = lazyComponent._init;
10500
+
10501
+ try {
10502
+ // Lazy may contain any component type so we recursively resolve it.
10503
+ return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
10504
+ } catch (x) {}
10505
+ }
10506
+ }
10507
+ }
10508
+
10509
+ return '';
10510
+ }
10511
+
10512
+ function describeFiber(fiber) {
10513
+ var owner = fiber._debugOwner ? fiber._debugOwner.type : null ;
10514
+ var source = fiber._debugSource ;
10515
+
10516
+ switch (fiber.tag) {
10517
+ case HostComponent:
10518
+ return describeBuiltInComponentFrame(fiber.type);
10519
+
10520
+ case LazyComponent:
10521
+ return describeBuiltInComponentFrame('Lazy');
10522
+
10523
+ case SuspenseComponent:
10524
+ return describeBuiltInComponentFrame('Suspense');
10525
+
10526
+ case SuspenseListComponent:
10527
+ return describeBuiltInComponentFrame('SuspenseList');
10528
+
10529
+ case FunctionComponent:
10530
+ case IndeterminateComponent:
10531
+ case SimpleMemoComponent:
10532
+ return describeFunctionComponentFrame(fiber.type);
10533
+
10534
+ case ForwardRef:
10535
+ return describeFunctionComponentFrame(fiber.type.render);
10536
+
10537
+ case Block:
10538
+ return describeFunctionComponentFrame(fiber.type._render);
10539
+
10540
+ case ClassComponent:
10541
+ return describeClassComponentFrame(fiber.type);
10542
+
10543
+ default:
10544
+ return '';
10545
+ }
10546
+ }
10547
+
10548
+ function getStackByFiberInDevAndProd(workInProgress) {
10549
+ try {
10550
+ var info = '';
10551
+ var node = workInProgress;
10552
+
10553
+ do {
10554
+ info += describeFiber(node);
10555
+ node = node.return;
10556
+ } while (node);
10557
+
10558
+ return info;
10559
+ } catch (x) {
10560
+ return '\nError generating stack: ' + x.message + '\n' + x.stack;
10561
+ }
10562
+ }
10563
+
10564
+ function getWrappedName(outerType, innerType, wrapperName) {
10565
+ var functionName = innerType.displayName || innerType.name || '';
10566
+ return outerType.displayName || (functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName);
10567
+ }
10568
+
10569
+ function getContextName(type) {
10570
+ return type.displayName || 'Context';
10571
+ }
10572
+
10573
+ function getComponentName(type) {
10574
+ if (type == null) {
10575
+ // Host root, text node or just invalid type.
10576
+ return null;
10577
+ }
10578
+
10579
+ {
10580
+ if (typeof type.tag === 'number') {
10581
+ error('Received an unexpected object in getComponentName(). ' + 'This is likely a bug in React. Please file an issue.');
10582
+ }
10583
+ }
10584
+
10585
+ if (typeof type === 'function') {
10586
+ return type.displayName || type.name || null;
10587
+ }
10588
+
10589
+ if (typeof type === 'string') {
10590
+ return type;
10591
+ }
10592
+
10593
+ switch (type) {
10594
+ case REACT_FRAGMENT_TYPE:
10595
+ return 'Fragment';
10596
+
10597
+ case REACT_PORTAL_TYPE:
10598
+ return 'Portal';
10599
+
10600
+ case REACT_PROFILER_TYPE:
10601
+ return 'Profiler';
10602
+
10603
+ case REACT_STRICT_MODE_TYPE:
10604
+ return 'StrictMode';
10605
+
10606
+ case REACT_SUSPENSE_TYPE:
10607
+ return 'Suspense';
10608
+
10609
+ case REACT_SUSPENSE_LIST_TYPE:
10610
+ return 'SuspenseList';
10611
+ }
10612
+
10613
+ if (typeof type === 'object') {
10614
+ switch (type.$$typeof) {
10615
+ case REACT_CONTEXT_TYPE:
10616
+ var context = type;
10617
+ return getContextName(context) + '.Consumer';
10618
+
10619
+ case REACT_PROVIDER_TYPE:
10620
+ var provider = type;
10621
+ return getContextName(provider._context) + '.Provider';
10622
+
10623
+ case REACT_FORWARD_REF_TYPE:
10624
+ return getWrappedName(type, type.render, 'ForwardRef');
10625
+
10626
+ case REACT_MEMO_TYPE:
10627
+ return getComponentName(type.type);
10628
+
10629
+ case REACT_BLOCK_TYPE:
10630
+ return getComponentName(type._render);
10631
+
10632
+ case REACT_LAZY_TYPE:
10633
+ {
10634
+ var lazyComponent = type;
10635
+ var payload = lazyComponent._payload;
10636
+ var init = lazyComponent._init;
10637
+
10638
+ try {
10639
+ return getComponentName(init(payload));
10640
+ } catch (x) {
10641
+ return null;
10642
+ }
10643
+ }
10644
+ }
10645
+ }
10646
+
10647
+ return null;
10648
+ }
10649
+
10650
+ var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
10651
+ var current = null;
10652
+ var isRendering = false;
10653
+ function getCurrentFiberOwnerNameInDevOrNull() {
10654
+ {
10655
+ if (current === null) {
10656
+ return null;
10657
+ }
10658
+
10659
+ var owner = current._debugOwner;
10660
+
10661
+ if (owner !== null && typeof owner !== 'undefined') {
10662
+ return getComponentName(owner.type);
10663
+ }
10664
+ }
10665
+
10666
+ return null;
10667
+ }
10668
+
10669
+ function getCurrentFiberStackInDev() {
10670
+ {
10671
+ if (current === null) {
10672
+ return '';
10673
+ } // Safe because if current fiber exists, we are reconciling,
10674
+ // and it is guaranteed to be the work-in-progress version.
10675
+
10676
+
10677
+ return getStackByFiberInDevAndProd(current);
10678
+ }
10679
+ }
10680
+
10681
+ function resetCurrentFiber() {
10682
+ {
10683
+ ReactDebugCurrentFrame.getCurrentStack = null;
10684
+ current = null;
10685
+ isRendering = false;
10686
+ }
10687
+ }
10688
+ function setCurrentFiber(fiber) {
10689
+ {
10690
+ ReactDebugCurrentFrame.getCurrentStack = getCurrentFiberStackInDev;
10691
+ current = fiber;
10692
+ isRendering = false;
10693
+ }
10694
+ }
10695
+ function setIsRendering(rendering) {
10696
+ {
10697
+ isRendering = rendering;
10698
+ }
10699
+ }
10700
+ function getIsRendering() {
10701
+ {
10702
+ return isRendering;
10703
+ }
10704
+ }
10705
+
10706
+ // Flow does not allow string concatenation of most non-string types. To work
10707
+ // around this limitation, we use an opaque type that can only be obtained by
10708
+ // passing the value through getToStringValue first.
10709
+ function toString(value) {
10710
+ return '' + value;
10711
+ }
10712
+ function getToStringValue(value) {
10713
+ switch (typeof value) {
10714
+ case 'boolean':
10715
+ case 'number':
10716
+ case 'object':
10717
+ case 'string':
10718
+ case 'undefined':
10719
+ return value;
10720
+
10721
+ default:
10722
+ // function, symbol are assigned as empty strings
10723
+ return '';
10724
+ }
10725
+ }
10726
+
10727
+ var hasReadOnlyValue = {
10728
+ button: true,
10729
+ checkbox: true,
10730
+ image: true,
10731
+ hidden: true,
10732
+ radio: true,
10733
+ reset: true,
10734
+ submit: true
10735
+ };
10736
+ function checkControlledValueProps(tagName, props) {
10737
+ {
10738
+ if (!(hasReadOnlyValue[props.type] || props.onChange || props.onInput || props.readOnly || props.disabled || props.value == null)) {
10739
+ 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`.');
10740
+ }
10741
+
10742
+ if (!(props.onChange || props.readOnly || props.disabled || props.checked == null)) {
10743
+ 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`.');
10744
+ }
10745
+ }
10746
+ }
10747
+
10748
+ function isCheckable(elem) {
10749
+ var type = elem.type;
10750
+ var nodeName = elem.nodeName;
10751
+ return nodeName && nodeName.toLowerCase() === 'input' && (type === 'checkbox' || type === 'radio');
10752
+ }
10753
+
10754
+ function getTracker(node) {
10755
+ return node._valueTracker;
10756
+ }
10757
+
10758
+ function detachTracker(node) {
10759
+ node._valueTracker = null;
10760
+ }
10761
+
10762
+ function getValueFromNode(node) {
10763
+ var value = '';
10764
+
10765
+ if (!node) {
10766
+ return value;
10767
+ }
10768
+
10769
+ if (isCheckable(node)) {
10770
+ value = node.checked ? 'true' : 'false';
10771
+ } else {
10772
+ value = node.value;
10773
+ }
10774
+
10775
+ return value;
10776
+ }
10777
+
10778
+ function trackValueOnNode(node) {
10779
+ var valueField = isCheckable(node) ? 'checked' : 'value';
10780
+ var descriptor = Object.getOwnPropertyDescriptor(node.constructor.prototype, valueField);
10781
+ var currentValue = '' + node[valueField]; // if someone has already defined a value or Safari, then bail
10782
+ // and don't track value will cause over reporting of changes,
10783
+ // but it's better then a hard failure
10784
+ // (needed for certain tests that spyOn input values and Safari)
10785
+
10786
+ if (node.hasOwnProperty(valueField) || typeof descriptor === 'undefined' || typeof descriptor.get !== 'function' || typeof descriptor.set !== 'function') {
10787
+ return;
10788
+ }
10789
+
10790
+ var get = descriptor.get,
10791
+ set = descriptor.set;
10792
+ Object.defineProperty(node, valueField, {
10793
+ configurable: true,
10794
+ get: function () {
10795
+ return get.call(this);
10796
+ },
10797
+ set: function (value) {
10798
+ currentValue = '' + value;
10799
+ set.call(this, value);
10800
+ }
10801
+ }); // We could've passed this the first time
10802
+ // but it triggers a bug in IE11 and Edge 14/15.
10803
+ // Calling defineProperty() again should be equivalent.
10804
+ // https://github.com/facebook/react/issues/11768
10805
+
10806
+ Object.defineProperty(node, valueField, {
10807
+ enumerable: descriptor.enumerable
10808
+ });
10809
+ var tracker = {
10810
+ getValue: function () {
10811
+ return currentValue;
10812
+ },
10813
+ setValue: function (value) {
10814
+ currentValue = '' + value;
10815
+ },
10816
+ stopTracking: function () {
10817
+ detachTracker(node);
10818
+ delete node[valueField];
10819
+ }
10820
+ };
10821
+ return tracker;
10822
+ }
10823
+
10824
+ function track(node) {
10825
+ if (getTracker(node)) {
10826
+ return;
10827
+ } // TODO: Once it's just Fiber we can move this to node._wrapperState
10828
+
10829
+
10830
+ node._valueTracker = trackValueOnNode(node);
10831
+ }
10832
+ function updateValueIfChanged(node) {
10833
+ if (!node) {
10834
+ return false;
10835
+ }
10836
+
10837
+ var tracker = getTracker(node); // if there is no tracker at this point it's unlikely
10838
+ // that trying again will succeed
10839
+
10840
+ if (!tracker) {
10841
+ return true;
10842
+ }
10843
+
10844
+ var lastValue = tracker.getValue();
10845
+ var nextValue = getValueFromNode(node);
10846
+
10847
+ if (nextValue !== lastValue) {
10848
+ tracker.setValue(nextValue);
10849
+ return true;
10850
+ }
10851
+
10852
+ return false;
10853
+ }
10854
+
10855
+ function getActiveElement(doc) {
10856
+ doc = doc || (typeof document !== 'undefined' ? document : undefined);
10857
+
10858
+ if (typeof doc === 'undefined') {
10859
+ return null;
10860
+ }
10861
+
10862
+ try {
10863
+ return doc.activeElement || doc.body;
10864
+ } catch (e) {
10865
+ return doc.body;
10866
+ }
10867
+ }
10868
+
10869
+ var didWarnValueDefaultValue = false;
10870
+ var didWarnCheckedDefaultChecked = false;
10871
+ var didWarnControlledToUncontrolled = false;
10872
+ var didWarnUncontrolledToControlled = false;
10873
+
10874
+ function isControlled(props) {
10875
+ var usesChecked = props.type === 'checkbox' || props.type === 'radio';
10876
+ return usesChecked ? props.checked != null : props.value != null;
10877
+ }
10878
+ /**
10879
+ * Implements an <input> host component that allows setting these optional
10880
+ * props: `checked`, `value`, `defaultChecked`, and `defaultValue`.
10881
+ *
10882
+ * If `checked` or `value` are not supplied (or null/undefined), user actions
10883
+ * that affect the checked state or value will trigger updates to the element.
10884
+ *
10885
+ * If they are supplied (and not null/undefined), the rendered element will not
10886
+ * trigger updates to the element. Instead, the props must change in order for
10887
+ * the rendered element to be updated.
10888
+ *
10889
+ * The rendered element will be initialized as unchecked (or `defaultChecked`)
10890
+ * with an empty value (or `defaultValue`).
10891
+ *
10892
+ * See http://www.w3.org/TR/2012/WD-html5-20121025/the-input-element.html
10893
+ */
10894
+
10895
+
10896
+ function getHostProps(element, props) {
10897
+ var node = element;
10898
+ var checked = props.checked;
10899
+
10900
+ var hostProps = _assign({}, props, {
10901
+ defaultChecked: undefined,
10902
+ defaultValue: undefined,
10903
+ value: undefined,
10904
+ checked: checked != null ? checked : node._wrapperState.initialChecked
10905
+ });
10906
+
10907
+ return hostProps;
10908
+ }
10909
+ function initWrapperState(element, props) {
10910
+ {
10911
+ checkControlledValueProps('input', props);
10912
+
10913
+ if (props.checked !== undefined && props.defaultChecked !== undefined && !didWarnCheckedDefaultChecked) {
10914
+ error('%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://reactjs.org/link/controlled-components', getCurrentFiberOwnerNameInDevOrNull() || 'A component', props.type);
10915
+
10916
+ didWarnCheckedDefaultChecked = true;
10917
+ }
10918
+
10919
+ if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue) {
10920
+ error('%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://reactjs.org/link/controlled-components', getCurrentFiberOwnerNameInDevOrNull() || 'A component', props.type);
10921
+
10922
+ didWarnValueDefaultValue = true;
10923
+ }
10924
+ }
10925
+
10926
+ var node = element;
10927
+ var defaultValue = props.defaultValue == null ? '' : props.defaultValue;
10928
+ node._wrapperState = {
10929
+ initialChecked: props.checked != null ? props.checked : props.defaultChecked,
10930
+ initialValue: getToStringValue(props.value != null ? props.value : defaultValue),
10931
+ controlled: isControlled(props)
10932
+ };
10933
+ }
10934
+ function updateChecked(element, props) {
10935
+ var node = element;
10936
+ var checked = props.checked;
10937
+
10938
+ if (checked != null) {
10939
+ setValueForProperty(node, 'checked', checked, false);
10940
+ }
10941
+ }
10942
+ function updateWrapper(element, props) {
10943
+ var node = element;
10944
+
10945
+ {
10946
+ var controlled = isControlled(props);
10947
+
10948
+ if (!node._wrapperState.controlled && controlled && !didWarnUncontrolledToControlled) {
10949
+ error('A component is changing an uncontrolled input to be controlled. ' + 'This is likely caused by the value changing from undefined to ' + 'a defined value, which should not happen. ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components');
10950
+
10951
+ didWarnUncontrolledToControlled = true;
10952
+ }
10953
+
10954
+ if (node._wrapperState.controlled && !controlled && !didWarnControlledToUncontrolled) {
10955
+ error('A component is changing a controlled input to be uncontrolled. ' + 'This is likely caused by the value changing from a defined to ' + 'undefined, which should not happen. ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components');
10956
+
10957
+ didWarnControlledToUncontrolled = true;
10958
+ }
10959
+ }
10960
+
10961
+ updateChecked(element, props);
10962
+ var value = getToStringValue(props.value);
10963
+ var type = props.type;
10964
+
10965
+ if (value != null) {
10966
+ if (type === 'number') {
10967
+ if (value === 0 && node.value === '' || // We explicitly want to coerce to number here if possible.
10968
+ // eslint-disable-next-line
10969
+ node.value != value) {
10970
+ node.value = toString(value);
10971
+ }
10972
+ } else if (node.value !== toString(value)) {
10973
+ node.value = toString(value);
10974
+ }
10975
+ } else if (type === 'submit' || type === 'reset') {
10976
+ // Submit/reset inputs need the attribute removed completely to avoid
10977
+ // blank-text buttons.
10978
+ node.removeAttribute('value');
10979
+ return;
10980
+ }
10981
+
10982
+ {
10983
+ // When syncing the value attribute, the value comes from a cascade of
10984
+ // properties:
10985
+ // 1. The value React property
10986
+ // 2. The defaultValue React property
10987
+ // 3. Otherwise there should be no change
10988
+ if (props.hasOwnProperty('value')) {
10989
+ setDefaultValue(node, props.type, value);
10990
+ } else if (props.hasOwnProperty('defaultValue')) {
10991
+ setDefaultValue(node, props.type, getToStringValue(props.defaultValue));
10992
+ }
10993
+ }
10994
+
10995
+ {
10996
+ // When syncing the checked attribute, it only changes when it needs
10997
+ // to be removed, such as transitioning from a checkbox into a text input
10998
+ if (props.checked == null && props.defaultChecked != null) {
10999
+ node.defaultChecked = !!props.defaultChecked;
11000
+ }
11001
+ }
11002
+ }
11003
+ function postMountWrapper(element, props, isHydrating) {
11004
+ var node = element; // Do not assign value if it is already set. This prevents user text input
11005
+ // from being lost during SSR hydration.
11006
+
11007
+ if (props.hasOwnProperty('value') || props.hasOwnProperty('defaultValue')) {
11008
+ var type = props.type;
11009
+ var isButton = type === 'submit' || type === 'reset'; // Avoid setting value attribute on submit/reset inputs as it overrides the
11010
+ // default value provided by the browser. See: #12872
11011
+
11012
+ if (isButton && (props.value === undefined || props.value === null)) {
11013
+ return;
11014
+ }
11015
+
11016
+ var initialValue = toString(node._wrapperState.initialValue); // Do not assign value if it is already set. This prevents user text input
11017
+ // from being lost during SSR hydration.
11018
+
11019
+ if (!isHydrating) {
11020
+ {
11021
+ // When syncing the value attribute, the value property should use
11022
+ // the wrapperState._initialValue property. This uses:
11023
+ //
11024
+ // 1. The value React property when present
11025
+ // 2. The defaultValue React property when present
11026
+ // 3. An empty string
11027
+ if (initialValue !== node.value) {
11028
+ node.value = initialValue;
11029
+ }
11030
+ }
11031
+ }
11032
+
11033
+ {
11034
+ // Otherwise, the value attribute is synchronized to the property,
11035
+ // so we assign defaultValue to the same thing as the value property
11036
+ // assignment step above.
11037
+ node.defaultValue = initialValue;
11038
+ }
11039
+ } // Normally, we'd just do `node.checked = node.checked` upon initial mount, less this bug
11040
+ // this is needed to work around a chrome bug where setting defaultChecked
11041
+ // will sometimes influence the value of checked (even after detachment).
11042
+ // Reference: https://bugs.chromium.org/p/chromium/issues/detail?id=608416
11043
+ // We need to temporarily unset name to avoid disrupting radio button groups.
11044
+
11045
+
11046
+ var name = node.name;
11047
+
11048
+ if (name !== '') {
11049
+ node.name = '';
11050
+ }
11051
+
11052
+ {
11053
+ // When syncing the checked attribute, both the checked property and
11054
+ // attribute are assigned at the same time using defaultChecked. This uses:
11055
+ //
11056
+ // 1. The checked React property when present
11057
+ // 2. The defaultChecked React property when present
11058
+ // 3. Otherwise, false
11059
+ node.defaultChecked = !node.defaultChecked;
11060
+ node.defaultChecked = !!node._wrapperState.initialChecked;
11061
+ }
11062
+
11063
+ if (name !== '') {
11064
+ node.name = name;
11065
+ }
11066
+ }
11067
+ function restoreControlledState(element, props) {
11068
+ var node = element;
11069
+ updateWrapper(node, props);
11070
+ updateNamedCousins(node, props);
11071
+ }
11072
+
11073
+ function updateNamedCousins(rootNode, props) {
11074
+ var name = props.name;
11075
+
11076
+ if (props.type === 'radio' && name != null) {
11077
+ var queryRoot = rootNode;
11078
+
11079
+ while (queryRoot.parentNode) {
11080
+ queryRoot = queryRoot.parentNode;
11081
+ } // If `rootNode.form` was non-null, then we could try `form.elements`,
11082
+ // but that sometimes behaves strangely in IE8. We could also try using
11083
+ // `form.getElementsByName`, but that will only return direct children
11084
+ // and won't include inputs that use the HTML5 `form=` attribute. Since
11085
+ // the input might not even be in a form. It might not even be in the
11086
+ // document. Let's just use the local `querySelectorAll` to ensure we don't
11087
+ // miss anything.
11088
+
11089
+
11090
+ var group = queryRoot.querySelectorAll('input[name=' + JSON.stringify('' + name) + '][type="radio"]');
11091
+
11092
+ for (var i = 0; i < group.length; i++) {
11093
+ var otherNode = group[i];
11094
+
11095
+ if (otherNode === rootNode || otherNode.form !== rootNode.form) {
11096
+ continue;
11097
+ } // This will throw if radio buttons rendered by different copies of React
11098
+ // and the same name are rendered into the same form (same as #1939).
11099
+ // That's probably okay; we don't support it just as we don't support
11100
+ // mixing React radio buttons with non-React ones.
11101
+
11102
+
11103
+ var otherProps = getFiberCurrentPropsFromNode(otherNode);
11104
+
11105
+ if (!otherProps) {
11106
+ {
11107
+ throw Error( "ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported." );
11108
+ }
11109
+ } // We need update the tracked value on the named cousin since the value
11110
+ // was changed but the input saw no event or value set
11111
+
11112
+
11113
+ updateValueIfChanged(otherNode); // If this is a controlled radio button group, forcing the input that
11114
+ // was previously checked to update will cause it to be come re-checked
11115
+ // as appropriate.
11116
+
11117
+ updateWrapper(otherNode, otherProps);
11118
+ }
11119
+ }
11120
+ } // In Chrome, assigning defaultValue to certain input types triggers input validation.
11121
+ // For number inputs, the display value loses trailing decimal points. For email inputs,
11122
+ // Chrome raises "The specified value <x> is not a valid email address".
11123
+ //
11124
+ // Here we check to see if the defaultValue has actually changed, avoiding these problems
11125
+ // when the user is inputting text
11126
+ //
11127
+ // https://github.com/facebook/react/issues/7253
11128
+
11129
+
11130
+ function setDefaultValue(node, type, value) {
11131
+ if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js
11132
+ type !== 'number' || getActiveElement(node.ownerDocument) !== node) {
11133
+ if (value == null) {
11134
+ node.defaultValue = toString(node._wrapperState.initialValue);
11135
+ } else if (node.defaultValue !== toString(value)) {
11136
+ node.defaultValue = toString(value);
11137
+ }
11138
+ }
11139
+ }
11140
+
11141
+ var didWarnSelectedSetOnOption = false;
11142
+ var didWarnInvalidChild = false;
11143
+
11144
+ function flattenChildren(children) {
11145
+ var content = ''; // Flatten children. We'll warn if they are invalid
11146
+ // during validateProps() which runs for hydration too.
11147
+ // Note that this would throw on non-element objects.
11148
+ // Elements are stringified (which is normally irrelevant
11149
+ // but matters for <fbt>).
11150
+
11151
+ React.Children.forEach(children, function (child) {
11152
+ if (child == null) {
11153
+ return;
11154
+ }
11155
+
11156
+ content += child; // Note: we don't warn about invalid children here.
11157
+ // Instead, this is done separately below so that
11158
+ // it happens during the hydration code path too.
11159
+ });
11160
+ return content;
11161
+ }
11162
+ /**
11163
+ * Implements an <option> host component that warns when `selected` is set.
11164
+ */
11165
+
11166
+
11167
+ function validateProps(element, props) {
11168
+ {
11169
+ // This mirrors the code path above, but runs for hydration too.
11170
+ // Warn about invalid children here so that client and hydration are consistent.
11171
+ // TODO: this seems like it could cause a DEV-only throw for hydration
11172
+ // if children contains a non-element object. We should try to avoid that.
11173
+ if (typeof props.children === 'object' && props.children !== null) {
11174
+ React.Children.forEach(props.children, function (child) {
11175
+ if (child == null) {
11176
+ return;
11177
+ }
11178
+
11179
+ if (typeof child === 'string' || typeof child === 'number') {
11180
+ return;
11181
+ }
11182
+
11183
+ if (typeof child.type !== 'string') {
11184
+ return;
11185
+ }
11186
+
11187
+ if (!didWarnInvalidChild) {
11188
+ didWarnInvalidChild = true;
11189
+
11190
+ error('Only strings and numbers are supported as <option> children.');
11191
+ }
11192
+ });
11193
+ } // TODO: Remove support for `selected` in <option>.
11194
+
11195
+
11196
+ if (props.selected != null && !didWarnSelectedSetOnOption) {
11197
+ error('Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.');
11198
+
11199
+ didWarnSelectedSetOnOption = true;
11200
+ }
11201
+ }
11202
+ }
11203
+ function postMountWrapper$1(element, props) {
11204
+ // value="" should make a value attribute (#6219)
11205
+ if (props.value != null) {
11206
+ element.setAttribute('value', toString(getToStringValue(props.value)));
11207
+ }
11208
+ }
11209
+ function getHostProps$1(element, props) {
11210
+ var hostProps = _assign({
11211
+ children: undefined
11212
+ }, props);
11213
+
11214
+ var content = flattenChildren(props.children);
11215
+
11216
+ if (content) {
11217
+ hostProps.children = content;
11218
+ }
11219
+
11220
+ return hostProps;
11221
+ }
11222
+
11223
+ var didWarnValueDefaultValue$1;
11224
+
11225
+ {
11226
+ didWarnValueDefaultValue$1 = false;
11227
+ }
11228
+
11229
+ function getDeclarationErrorAddendum() {
11230
+ var ownerName = getCurrentFiberOwnerNameInDevOrNull();
11231
+
11232
+ if (ownerName) {
11233
+ return '\n\nCheck the render method of `' + ownerName + '`.';
11234
+ }
11235
+
11236
+ return '';
11237
+ }
11238
+
11239
+ var valuePropNames = ['value', 'defaultValue'];
11240
+ /**
11241
+ * Validation function for `value` and `defaultValue`.
11242
+ */
11243
+
11244
+ function checkSelectPropTypes(props) {
11245
+ {
11246
+ checkControlledValueProps('select', props);
11247
+
11248
+ for (var i = 0; i < valuePropNames.length; i++) {
11249
+ var propName = valuePropNames[i];
11250
+
11251
+ if (props[propName] == null) {
11252
+ continue;
11253
+ }
11254
+
11255
+ var isArray = Array.isArray(props[propName]);
11256
+
11257
+ if (props.multiple && !isArray) {
11258
+ error('The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum());
11259
+ } else if (!props.multiple && isArray) {
11260
+ error('The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum());
11261
+ }
11262
+ }
11263
+ }
11264
+ }
11265
+
11266
+ function updateOptions(node, multiple, propValue, setDefaultSelected) {
11267
+ var options = node.options;
11268
+
11269
+ if (multiple) {
11270
+ var selectedValues = propValue;
11271
+ var selectedValue = {};
11272
+
11273
+ for (var i = 0; i < selectedValues.length; i++) {
11274
+ // Prefix to avoid chaos with special keys.
11275
+ selectedValue['$' + selectedValues[i]] = true;
11276
+ }
11277
+
11278
+ for (var _i = 0; _i < options.length; _i++) {
11279
+ var selected = selectedValue.hasOwnProperty('$' + options[_i].value);
11280
+
11281
+ if (options[_i].selected !== selected) {
11282
+ options[_i].selected = selected;
11283
+ }
11284
+
11285
+ if (selected && setDefaultSelected) {
11286
+ options[_i].defaultSelected = true;
11287
+ }
11288
+ }
11289
+ } else {
11290
+ // Do not set `select.value` as exact behavior isn't consistent across all
11291
+ // browsers for all cases.
11292
+ var _selectedValue = toString(getToStringValue(propValue));
11293
+
11294
+ var defaultSelected = null;
11295
+
11296
+ for (var _i2 = 0; _i2 < options.length; _i2++) {
11297
+ if (options[_i2].value === _selectedValue) {
11298
+ options[_i2].selected = true;
11299
+
11300
+ if (setDefaultSelected) {
11301
+ options[_i2].defaultSelected = true;
11302
+ }
11303
+
11304
+ return;
11305
+ }
11306
+
11307
+ if (defaultSelected === null && !options[_i2].disabled) {
11308
+ defaultSelected = options[_i2];
11309
+ }
11310
+ }
11311
+
11312
+ if (defaultSelected !== null) {
11313
+ defaultSelected.selected = true;
11314
+ }
11315
+ }
11316
+ }
11317
+ /**
11318
+ * Implements a <select> host component that allows optionally setting the
11319
+ * props `value` and `defaultValue`. If `multiple` is false, the prop must be a
11320
+ * stringable. If `multiple` is true, the prop must be an array of stringables.
11321
+ *
11322
+ * If `value` is not supplied (or null/undefined), user actions that change the
11323
+ * selected option will trigger updates to the rendered options.
11324
+ *
11325
+ * If it is supplied (and not null/undefined), the rendered options will not
11326
+ * update in response to user actions. Instead, the `value` prop must change in
11327
+ * order for the rendered options to update.
11328
+ *
11329
+ * If `defaultValue` is provided, any options with the supplied values will be
11330
+ * selected.
11331
+ */
11332
+
11333
+
11334
+ function getHostProps$2(element, props) {
11335
+ return _assign({}, props, {
11336
+ value: undefined
11337
+ });
11338
+ }
11339
+ function initWrapperState$1(element, props) {
11340
+ var node = element;
11341
+
11342
+ {
11343
+ checkSelectPropTypes(props);
11344
+ }
11345
+
11346
+ node._wrapperState = {
11347
+ wasMultiple: !!props.multiple
11348
+ };
11349
+
11350
+ {
11351
+ if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue$1) {
11352
+ error('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://reactjs.org/link/controlled-components');
11353
+
11354
+ didWarnValueDefaultValue$1 = true;
11355
+ }
11356
+ }
11357
+ }
11358
+ function postMountWrapper$2(element, props) {
11359
+ var node = element;
11360
+ node.multiple = !!props.multiple;
11361
+ var value = props.value;
11362
+
11363
+ if (value != null) {
11364
+ updateOptions(node, !!props.multiple, value, false);
11365
+ } else if (props.defaultValue != null) {
11366
+ updateOptions(node, !!props.multiple, props.defaultValue, true);
11367
+ }
11368
+ }
11369
+ function postUpdateWrapper(element, props) {
11370
+ var node = element;
11371
+ var wasMultiple = node._wrapperState.wasMultiple;
11372
+ node._wrapperState.wasMultiple = !!props.multiple;
11373
+ var value = props.value;
11374
+
11375
+ if (value != null) {
11376
+ updateOptions(node, !!props.multiple, value, false);
11377
+ } else if (wasMultiple !== !!props.multiple) {
11378
+ // For simplicity, reapply `defaultValue` if `multiple` is toggled.
11379
+ if (props.defaultValue != null) {
11380
+ updateOptions(node, !!props.multiple, props.defaultValue, true);
11381
+ } else {
11382
+ // Revert the select back to its default unselected state.
11383
+ updateOptions(node, !!props.multiple, props.multiple ? [] : '', false);
11384
+ }
11385
+ }
11386
+ }
11387
+ function restoreControlledState$1(element, props) {
11388
+ var node = element;
11389
+ var value = props.value;
11390
+
11391
+ if (value != null) {
11392
+ updateOptions(node, !!props.multiple, value, false);
11393
+ }
11394
+ }
11395
+
11396
+ var didWarnValDefaultVal = false;
11397
+
11398
+ /**
11399
+ * Implements a <textarea> host component that allows setting `value`, and
11400
+ * `defaultValue`. This differs from the traditional DOM API because value is
11401
+ * usually set as PCDATA children.
11402
+ *
11403
+ * If `value` is not supplied (or null/undefined), user actions that affect the
11404
+ * value will trigger updates to the element.
11405
+ *
11406
+ * If `value` is supplied (and not null/undefined), the rendered element will
11407
+ * not trigger updates to the element. Instead, the `value` prop must change in
11408
+ * order for the rendered element to be updated.
11409
+ *
11410
+ * The rendered element will be initialized with an empty value, the prop
11411
+ * `defaultValue` if specified, or the children content (deprecated).
11412
+ */
11413
+ function getHostProps$3(element, props) {
11414
+ var node = element;
11415
+
11416
+ if (!(props.dangerouslySetInnerHTML == null)) {
11417
+ {
11418
+ throw Error( "`dangerouslySetInnerHTML` does not make sense on <textarea>." );
11419
+ }
11420
+ } // Always set children to the same thing. In IE9, the selection range will
11421
+ // get reset if `textContent` is mutated. We could add a check in setTextContent
11422
+ // to only set the value if/when the value differs from the node value (which would
11423
+ // completely solve this IE9 bug), but Sebastian+Sophie seemed to like this
11424
+ // solution. The value can be a boolean or object so that's why it's forced
11425
+ // to be a string.
11426
+
11427
+
11428
+ var hostProps = _assign({}, props, {
11429
+ value: undefined,
11430
+ defaultValue: undefined,
11431
+ children: toString(node._wrapperState.initialValue)
11432
+ });
11433
+
11434
+ return hostProps;
11435
+ }
11436
+ function initWrapperState$2(element, props) {
11437
+ var node = element;
11438
+
11439
+ {
11440
+ checkControlledValueProps('textarea', props);
11441
+
11442
+ if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValDefaultVal) {
11443
+ error('%s contains a textarea with both value and defaultValue props. ' + '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://reactjs.org/link/controlled-components', getCurrentFiberOwnerNameInDevOrNull() || 'A component');
11444
+
11445
+ didWarnValDefaultVal = true;
11446
+ }
11447
+ }
11448
+
11449
+ var initialValue = props.value; // Only bother fetching default value if we're going to use it
11450
+
11451
+ if (initialValue == null) {
11452
+ var children = props.children,
11453
+ defaultValue = props.defaultValue;
11454
+
11455
+ if (children != null) {
11456
+ {
11457
+ error('Use the `defaultValue` or `value` props instead of setting ' + 'children on <textarea>.');
11458
+ }
11459
+
11460
+ {
11461
+ if (!(defaultValue == null)) {
11462
+ {
11463
+ throw Error( "If you supply `defaultValue` on a <textarea>, do not pass children." );
11464
+ }
11465
+ }
11466
+
11467
+ if (Array.isArray(children)) {
11468
+ if (!(children.length <= 1)) {
11469
+ {
11470
+ throw Error( "<textarea> can only have at most one child." );
11471
+ }
11472
+ }
11473
+
11474
+ children = children[0];
11475
+ }
11476
+
11477
+ defaultValue = children;
11478
+ }
11479
+ }
11480
+
11481
+ if (defaultValue == null) {
11482
+ defaultValue = '';
11483
+ }
11484
+
11485
+ initialValue = defaultValue;
11486
+ }
11487
+
11488
+ node._wrapperState = {
11489
+ initialValue: getToStringValue(initialValue)
11490
+ };
11491
+ }
11492
+ function updateWrapper$1(element, props) {
11493
+ var node = element;
11494
+ var value = getToStringValue(props.value);
11495
+ var defaultValue = getToStringValue(props.defaultValue);
11496
+
11497
+ if (value != null) {
11498
+ // Cast `value` to a string to ensure the value is set correctly. While
11499
+ // browsers typically do this as necessary, jsdom doesn't.
11500
+ var newValue = toString(value); // To avoid side effects (such as losing text selection), only set value if changed
11501
+
11502
+ if (newValue !== node.value) {
11503
+ node.value = newValue;
11504
+ }
11505
+
11506
+ if (props.defaultValue == null && node.defaultValue !== newValue) {
11507
+ node.defaultValue = newValue;
11508
+ }
11509
+ }
11510
+
11511
+ if (defaultValue != null) {
11512
+ node.defaultValue = toString(defaultValue);
11513
+ }
11514
+ }
11515
+ function postMountWrapper$3(element, props) {
11516
+ var node = element; // This is in postMount because we need access to the DOM node, which is not
11517
+ // available until after the component has mounted.
11518
+
11519
+ var textContent = node.textContent; // Only set node.value if textContent is equal to the expected
11520
+ // initial value. In IE10/IE11 there is a bug where the placeholder attribute
11521
+ // will populate textContent as well.
11522
+ // https://developer.microsoft.com/microsoft-edge/platform/issues/101525/
11523
+
11524
+ if (textContent === node._wrapperState.initialValue) {
11525
+ if (textContent !== '' && textContent !== null) {
11526
+ node.value = textContent;
11527
+ }
11528
+ }
11529
+ }
11530
+ function restoreControlledState$2(element, props) {
11531
+ // DOM component is still mounted; update
11532
+ updateWrapper$1(element, props);
11533
+ }
11534
+
11535
+ var HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';
11536
+ var MATH_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';
11537
+ var SVG_NAMESPACE = 'http://www.w3.org/2000/svg';
11538
+ var Namespaces = {
11539
+ html: HTML_NAMESPACE,
11540
+ mathml: MATH_NAMESPACE,
11541
+ svg: SVG_NAMESPACE
11542
+ }; // Assumes there is no parent namespace.
11543
+
11544
+ function getIntrinsicNamespace(type) {
11545
+ switch (type) {
11546
+ case 'svg':
11547
+ return SVG_NAMESPACE;
11548
+
11549
+ case 'math':
11550
+ return MATH_NAMESPACE;
11551
+
11552
+ default:
11553
+ return HTML_NAMESPACE;
11554
+ }
11555
+ }
11556
+ function getChildNamespace(parentNamespace, type) {
11557
+ if (parentNamespace == null || parentNamespace === HTML_NAMESPACE) {
11558
+ // No (or default) parent namespace: potential entry point.
11559
+ return getIntrinsicNamespace(type);
11560
+ }
11561
+
11562
+ if (parentNamespace === SVG_NAMESPACE && type === 'foreignObject') {
11563
+ // We're leaving SVG.
11564
+ return HTML_NAMESPACE;
11565
+ } // By default, pass namespace below.
11566
+
11567
+
11568
+ return parentNamespace;
11569
+ }
11570
+
11571
+ /* globals MSApp */
11572
+
11573
+ /**
11574
+ * Create a function which has 'unsafe' privileges (required by windows8 apps)
11575
+ */
11576
+ var createMicrosoftUnsafeLocalFunction = function (func) {
11577
+ if (typeof MSApp !== 'undefined' && MSApp.execUnsafeLocalFunction) {
11578
+ return function (arg0, arg1, arg2, arg3) {
11579
+ MSApp.execUnsafeLocalFunction(function () {
11580
+ return func(arg0, arg1, arg2, arg3);
11581
+ });
11582
+ };
11583
+ } else {
11584
+ return func;
11585
+ }
11586
+ };
11587
+
11588
+ var reusableSVGContainer;
11589
+ /**
11590
+ * Set the innerHTML property of a node
11591
+ *
11592
+ * @param {DOMElement} node
11593
+ * @param {string} html
11594
+ * @internal
11595
+ */
11596
+
11597
+ var setInnerHTML = createMicrosoftUnsafeLocalFunction(function (node, html) {
11598
+ if (node.namespaceURI === Namespaces.svg) {
11599
+
11600
+ if (!('innerHTML' in node)) {
11601
+ // IE does not have innerHTML for SVG nodes, so instead we inject the
11602
+ // new markup in a temp node and then move the child nodes across into
11603
+ // the target node
11604
+ reusableSVGContainer = reusableSVGContainer || document.createElement('div');
11605
+ reusableSVGContainer.innerHTML = '<svg>' + html.valueOf().toString() + '</svg>';
11606
+ var svgNode = reusableSVGContainer.firstChild;
11607
+
11608
+ while (node.firstChild) {
11609
+ node.removeChild(node.firstChild);
11610
+ }
11611
+
11612
+ while (svgNode.firstChild) {
11613
+ node.appendChild(svgNode.firstChild);
11614
+ }
11615
+
11616
+ return;
11617
+ }
11618
+ }
11619
+
11620
+ node.innerHTML = html;
11621
+ });
11622
+
11623
+ /**
11624
+ * HTML nodeType values that represent the type of the node
11625
+ */
11626
+ var ELEMENT_NODE = 1;
11627
+ var TEXT_NODE = 3;
11628
+ var COMMENT_NODE = 8;
11629
+ var DOCUMENT_NODE = 9;
11630
+ var DOCUMENT_FRAGMENT_NODE = 11;
11631
+
11632
+ /**
11633
+ * Set the textContent property of a node. For text updates, it's faster
11634
+ * to set the `nodeValue` of the Text node directly instead of using
11635
+ * `.textContent` which will remove the existing node and create a new one.
11636
+ *
11637
+ * @param {DOMElement} node
11638
+ * @param {string} text
11639
+ * @internal
11640
+ */
11641
+
11642
+ var setTextContent = function (node, text) {
11643
+ if (text) {
11644
+ var firstChild = node.firstChild;
11645
+
11646
+ if (firstChild && firstChild === node.lastChild && firstChild.nodeType === TEXT_NODE) {
11647
+ firstChild.nodeValue = text;
11648
+ return;
11649
+ }
11650
+ }
11651
+
11652
+ node.textContent = text;
11653
+ };
11654
+
11655
+ // List derived from Gecko source code:
11656
+ // https://github.com/mozilla/gecko-dev/blob/4e638efc71/layout/style/test/property_database.js
11657
+ var shorthandToLonghand = {
11658
+ animation: ['animationDelay', 'animationDirection', 'animationDuration', 'animationFillMode', 'animationIterationCount', 'animationName', 'animationPlayState', 'animationTimingFunction'],
11659
+ background: ['backgroundAttachment', 'backgroundClip', 'backgroundColor', 'backgroundImage', 'backgroundOrigin', 'backgroundPositionX', 'backgroundPositionY', 'backgroundRepeat', 'backgroundSize'],
11660
+ backgroundPosition: ['backgroundPositionX', 'backgroundPositionY'],
11661
+ border: ['borderBottomColor', 'borderBottomStyle', 'borderBottomWidth', 'borderImageOutset', 'borderImageRepeat', 'borderImageSlice', 'borderImageSource', 'borderImageWidth', 'borderLeftColor', 'borderLeftStyle', 'borderLeftWidth', 'borderRightColor', 'borderRightStyle', 'borderRightWidth', 'borderTopColor', 'borderTopStyle', 'borderTopWidth'],
11662
+ borderBlockEnd: ['borderBlockEndColor', 'borderBlockEndStyle', 'borderBlockEndWidth'],
11663
+ borderBlockStart: ['borderBlockStartColor', 'borderBlockStartStyle', 'borderBlockStartWidth'],
11664
+ borderBottom: ['borderBottomColor', 'borderBottomStyle', 'borderBottomWidth'],
11665
+ borderColor: ['borderBottomColor', 'borderLeftColor', 'borderRightColor', 'borderTopColor'],
11666
+ borderImage: ['borderImageOutset', 'borderImageRepeat', 'borderImageSlice', 'borderImageSource', 'borderImageWidth'],
11667
+ borderInlineEnd: ['borderInlineEndColor', 'borderInlineEndStyle', 'borderInlineEndWidth'],
11668
+ borderInlineStart: ['borderInlineStartColor', 'borderInlineStartStyle', 'borderInlineStartWidth'],
11669
+ borderLeft: ['borderLeftColor', 'borderLeftStyle', 'borderLeftWidth'],
11670
+ borderRadius: ['borderBottomLeftRadius', 'borderBottomRightRadius', 'borderTopLeftRadius', 'borderTopRightRadius'],
11671
+ borderRight: ['borderRightColor', 'borderRightStyle', 'borderRightWidth'],
11672
+ borderStyle: ['borderBottomStyle', 'borderLeftStyle', 'borderRightStyle', 'borderTopStyle'],
11673
+ borderTop: ['borderTopColor', 'borderTopStyle', 'borderTopWidth'],
11674
+ borderWidth: ['borderBottomWidth', 'borderLeftWidth', 'borderRightWidth', 'borderTopWidth'],
11675
+ columnRule: ['columnRuleColor', 'columnRuleStyle', 'columnRuleWidth'],
11676
+ columns: ['columnCount', 'columnWidth'],
11677
+ flex: ['flexBasis', 'flexGrow', 'flexShrink'],
11678
+ flexFlow: ['flexDirection', 'flexWrap'],
11679
+ font: ['fontFamily', 'fontFeatureSettings', 'fontKerning', 'fontLanguageOverride', 'fontSize', 'fontSizeAdjust', 'fontStretch', 'fontStyle', 'fontVariant', 'fontVariantAlternates', 'fontVariantCaps', 'fontVariantEastAsian', 'fontVariantLigatures', 'fontVariantNumeric', 'fontVariantPosition', 'fontWeight', 'lineHeight'],
11680
+ fontVariant: ['fontVariantAlternates', 'fontVariantCaps', 'fontVariantEastAsian', 'fontVariantLigatures', 'fontVariantNumeric', 'fontVariantPosition'],
11681
+ gap: ['columnGap', 'rowGap'],
11682
+ grid: ['gridAutoColumns', 'gridAutoFlow', 'gridAutoRows', 'gridTemplateAreas', 'gridTemplateColumns', 'gridTemplateRows'],
11683
+ gridArea: ['gridColumnEnd', 'gridColumnStart', 'gridRowEnd', 'gridRowStart'],
11684
+ gridColumn: ['gridColumnEnd', 'gridColumnStart'],
11685
+ gridColumnGap: ['columnGap'],
11686
+ gridGap: ['columnGap', 'rowGap'],
11687
+ gridRow: ['gridRowEnd', 'gridRowStart'],
11688
+ gridRowGap: ['rowGap'],
11689
+ gridTemplate: ['gridTemplateAreas', 'gridTemplateColumns', 'gridTemplateRows'],
11690
+ listStyle: ['listStyleImage', 'listStylePosition', 'listStyleType'],
11691
+ margin: ['marginBottom', 'marginLeft', 'marginRight', 'marginTop'],
11692
+ marker: ['markerEnd', 'markerMid', 'markerStart'],
11693
+ mask: ['maskClip', 'maskComposite', 'maskImage', 'maskMode', 'maskOrigin', 'maskPositionX', 'maskPositionY', 'maskRepeat', 'maskSize'],
11694
+ maskPosition: ['maskPositionX', 'maskPositionY'],
11695
+ outline: ['outlineColor', 'outlineStyle', 'outlineWidth'],
11696
+ overflow: ['overflowX', 'overflowY'],
11697
+ padding: ['paddingBottom', 'paddingLeft', 'paddingRight', 'paddingTop'],
11698
+ placeContent: ['alignContent', 'justifyContent'],
11699
+ placeItems: ['alignItems', 'justifyItems'],
11700
+ placeSelf: ['alignSelf', 'justifySelf'],
11701
+ textDecoration: ['textDecorationColor', 'textDecorationLine', 'textDecorationStyle'],
11702
+ textEmphasis: ['textEmphasisColor', 'textEmphasisStyle'],
11703
+ transition: ['transitionDelay', 'transitionDuration', 'transitionProperty', 'transitionTimingFunction'],
11704
+ wordWrap: ['overflowWrap']
11705
+ };
11706
+
11707
+ /**
11708
+ * CSS properties which accept numbers but are not in units of "px".
11709
+ */
11710
+ var isUnitlessNumber = {
11711
+ animationIterationCount: true,
11712
+ borderImageOutset: true,
11713
+ borderImageSlice: true,
11714
+ borderImageWidth: true,
11715
+ boxFlex: true,
11716
+ boxFlexGroup: true,
11717
+ boxOrdinalGroup: true,
11718
+ columnCount: true,
11719
+ columns: true,
11720
+ flex: true,
11721
+ flexGrow: true,
11722
+ flexPositive: true,
11723
+ flexShrink: true,
11724
+ flexNegative: true,
11725
+ flexOrder: true,
11726
+ gridArea: true,
11727
+ gridRow: true,
11728
+ gridRowEnd: true,
11729
+ gridRowSpan: true,
11730
+ gridRowStart: true,
11731
+ gridColumn: true,
11732
+ gridColumnEnd: true,
11733
+ gridColumnSpan: true,
11734
+ gridColumnStart: true,
11735
+ fontWeight: true,
11736
+ lineClamp: true,
11737
+ lineHeight: true,
11738
+ opacity: true,
11739
+ order: true,
11740
+ orphans: true,
11741
+ tabSize: true,
11742
+ widows: true,
11743
+ zIndex: true,
11744
+ zoom: true,
11745
+ // SVG-related properties
11746
+ fillOpacity: true,
11747
+ floodOpacity: true,
11748
+ stopOpacity: true,
11749
+ strokeDasharray: true,
11750
+ strokeDashoffset: true,
11751
+ strokeMiterlimit: true,
11752
+ strokeOpacity: true,
11753
+ strokeWidth: true
11754
+ };
11755
+ /**
11756
+ * @param {string} prefix vendor-specific prefix, eg: Webkit
11757
+ * @param {string} key style name, eg: transitionDuration
11758
+ * @return {string} style name prefixed with `prefix`, properly camelCased, eg:
11759
+ * WebkitTransitionDuration
11760
+ */
11761
+
11762
+ function prefixKey(prefix, key) {
11763
+ return prefix + key.charAt(0).toUpperCase() + key.substring(1);
11764
+ }
11765
+ /**
11766
+ * Support style names that may come passed in prefixed by adding permutations
11767
+ * of vendor prefixes.
11768
+ */
11769
+
11770
+
11771
+ var prefixes = ['Webkit', 'ms', 'Moz', 'O']; // Using Object.keys here, or else the vanilla for-in loop makes IE8 go into an
11772
+ // infinite loop, because it iterates over the newly added props too.
11773
+
11774
+ Object.keys(isUnitlessNumber).forEach(function (prop) {
11775
+ prefixes.forEach(function (prefix) {
11776
+ isUnitlessNumber[prefixKey(prefix, prop)] = isUnitlessNumber[prop];
11777
+ });
11778
+ });
11779
+
11780
+ /**
11781
+ * Convert a value into the proper css writable value. The style name `name`
11782
+ * should be logical (no hyphens), as specified
11783
+ * in `CSSProperty.isUnitlessNumber`.
11784
+ *
11785
+ * @param {string} name CSS property name such as `topMargin`.
11786
+ * @param {*} value CSS property value such as `10px`.
11787
+ * @return {string} Normalized style value with dimensions applied.
11788
+ */
11789
+
11790
+ function dangerousStyleValue(name, value, isCustomProperty) {
11791
+ // Note that we've removed escapeTextForBrowser() calls here since the
11792
+ // whole string will be escaped when the attribute is injected into
11793
+ // the markup. If you provide unsafe user data here they can inject
11794
+ // arbitrary CSS which may be problematic (I couldn't repro this):
11795
+ // https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet
11796
+ // http://www.thespanner.co.uk/2007/11/26/ultimate-xss-css-injection/
11797
+ // This is not an XSS hole but instead a potential CSS injection issue
11798
+ // which has lead to a greater discussion about how we're going to
11799
+ // trust URLs moving forward. See #2115901
11800
+ var isEmpty = value == null || typeof value === 'boolean' || value === '';
11801
+
11802
+ if (isEmpty) {
11803
+ return '';
11804
+ }
11805
+
11806
+ if (!isCustomProperty && typeof value === 'number' && value !== 0 && !(isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name])) {
11807
+ return value + 'px'; // Presumes implicit 'px' suffix for unitless numbers
11808
+ }
11809
+
11810
+ return ('' + value).trim();
11811
+ }
11812
+
11813
+ var uppercasePattern = /([A-Z])/g;
11814
+ var msPattern = /^ms-/;
11815
+ /**
11816
+ * Hyphenates a camelcased CSS property name, for example:
11817
+ *
11818
+ * > hyphenateStyleName('backgroundColor')
11819
+ * < "background-color"
11820
+ * > hyphenateStyleName('MozTransition')
11821
+ * < "-moz-transition"
11822
+ * > hyphenateStyleName('msTransition')
11823
+ * < "-ms-transition"
11824
+ *
11825
+ * As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix
11826
+ * is converted to `-ms-`.
11827
+ */
11828
+
11829
+ function hyphenateStyleName(name) {
11830
+ return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');
11831
+ }
11832
+
11833
+ var warnValidStyle = function () {};
11834
+
11835
+ {
11836
+ // 'msTransform' is correct, but the other prefixes should be capitalized
11837
+ var badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/;
11838
+ var msPattern$1 = /^-ms-/;
11839
+ var hyphenPattern = /-(.)/g; // style values shouldn't contain a semicolon
11840
+
11841
+ var badStyleValueWithSemicolonPattern = /;\s*$/;
11842
+ var warnedStyleNames = {};
11843
+ var warnedStyleValues = {};
11844
+ var warnedForNaNValue = false;
11845
+ var warnedForInfinityValue = false;
11846
+
11847
+ var camelize = function (string) {
11848
+ return string.replace(hyphenPattern, function (_, character) {
11849
+ return character.toUpperCase();
11850
+ });
11851
+ };
11852
+
11853
+ var warnHyphenatedStyleName = function (name) {
11854
+ if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {
11855
+ return;
11856
+ }
11857
+
11858
+ warnedStyleNames[name] = true;
11859
+
11860
+ error('Unsupported style property %s. Did you mean %s?', name, // As Andi Smith suggests
11861
+ // (http://www.andismith.com/blog/2012/02/modernizr-prefixed/), an `-ms` prefix
11862
+ // is converted to lowercase `ms`.
11863
+ camelize(name.replace(msPattern$1, 'ms-')));
11864
+ };
11865
+
11866
+ var warnBadVendoredStyleName = function (name) {
11867
+ if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {
11868
+ return;
11869
+ }
11870
+
11871
+ warnedStyleNames[name] = true;
11872
+
11873
+ error('Unsupported vendor-prefixed style property %s. Did you mean %s?', name, name.charAt(0).toUpperCase() + name.slice(1));
11874
+ };
11875
+
11876
+ var warnStyleValueWithSemicolon = function (name, value) {
11877
+ if (warnedStyleValues.hasOwnProperty(value) && warnedStyleValues[value]) {
11878
+ return;
11879
+ }
11880
+
11881
+ warnedStyleValues[value] = true;
11882
+
11883
+ error("Style property values shouldn't contain a semicolon. " + 'Try "%s: %s" instead.', name, value.replace(badStyleValueWithSemicolonPattern, ''));
11884
+ };
11885
+
11886
+ var warnStyleValueIsNaN = function (name, value) {
11887
+ if (warnedForNaNValue) {
11888
+ return;
11889
+ }
11890
+
11891
+ warnedForNaNValue = true;
11892
+
11893
+ error('`NaN` is an invalid value for the `%s` css style property.', name);
11894
+ };
11895
+
11896
+ var warnStyleValueIsInfinity = function (name, value) {
11897
+ if (warnedForInfinityValue) {
11898
+ return;
11899
+ }
11900
+
11901
+ warnedForInfinityValue = true;
11902
+
11903
+ error('`Infinity` is an invalid value for the `%s` css style property.', name);
11904
+ };
11905
+
11906
+ warnValidStyle = function (name, value) {
11907
+ if (name.indexOf('-') > -1) {
11908
+ warnHyphenatedStyleName(name);
11909
+ } else if (badVendoredStyleNamePattern.test(name)) {
11910
+ warnBadVendoredStyleName(name);
11911
+ } else if (badStyleValueWithSemicolonPattern.test(value)) {
11912
+ warnStyleValueWithSemicolon(name, value);
11913
+ }
11914
+
11915
+ if (typeof value === 'number') {
11916
+ if (isNaN(value)) {
11917
+ warnStyleValueIsNaN(name, value);
11918
+ } else if (!isFinite(value)) {
11919
+ warnStyleValueIsInfinity(name, value);
11920
+ }
11921
+ }
11922
+ };
11923
+ }
11924
+
11925
+ var warnValidStyle$1 = warnValidStyle;
11926
+
11927
+ /**
11928
+ * Operations for dealing with CSS properties.
11929
+ */
11930
+
11931
+ /**
11932
+ * This creates a string that is expected to be equivalent to the style
11933
+ * attribute generated by server-side rendering. It by-passes warnings and
11934
+ * security checks so it's not safe to use this value for anything other than
11935
+ * comparison. It is only used in DEV for SSR validation.
11936
+ */
11937
+
11938
+ function createDangerousStringForStyles(styles) {
11939
+ {
11940
+ var serialized = '';
11941
+ var delimiter = '';
11942
+
11943
+ for (var styleName in styles) {
11944
+ if (!styles.hasOwnProperty(styleName)) {
11945
+ continue;
11946
+ }
11947
+
11948
+ var styleValue = styles[styleName];
11949
+
11950
+ if (styleValue != null) {
11951
+ var isCustomProperty = styleName.indexOf('--') === 0;
11952
+ serialized += delimiter + (isCustomProperty ? styleName : hyphenateStyleName(styleName)) + ':';
11953
+ serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty);
11954
+ delimiter = ';';
11955
+ }
11956
+ }
11957
+
11958
+ return serialized || null;
11959
+ }
11960
+ }
11961
+ /**
11962
+ * Sets the value for multiple styles on a node. If a value is specified as
11963
+ * '' (empty string), the corresponding style property will be unset.
11964
+ *
11965
+ * @param {DOMElement} node
11966
+ * @param {object} styles
11967
+ */
11968
+
11969
+ function setValueForStyles(node, styles) {
11970
+ var style = node.style;
11971
+
11972
+ for (var styleName in styles) {
11973
+ if (!styles.hasOwnProperty(styleName)) {
11974
+ continue;
11975
+ }
11976
+
11977
+ var isCustomProperty = styleName.indexOf('--') === 0;
11978
+
11979
+ {
11980
+ if (!isCustomProperty) {
11981
+ warnValidStyle$1(styleName, styles[styleName]);
11982
+ }
11983
+ }
11984
+
11985
+ var styleValue = dangerousStyleValue(styleName, styles[styleName], isCustomProperty);
11986
+
11987
+ if (styleName === 'float') {
11988
+ styleName = 'cssFloat';
11989
+ }
11990
+
11991
+ if (isCustomProperty) {
11992
+ style.setProperty(styleName, styleValue);
11993
+ } else {
11994
+ style[styleName] = styleValue;
11995
+ }
11996
+ }
11997
+ }
11998
+
11999
+ function isValueEmpty(value) {
12000
+ return value == null || typeof value === 'boolean' || value === '';
12001
+ }
12002
+ /**
12003
+ * Given {color: 'red', overflow: 'hidden'} returns {
12004
+ * color: 'color',
12005
+ * overflowX: 'overflow',
12006
+ * overflowY: 'overflow',
12007
+ * }. This can be read as "the overflowY property was set by the overflow
12008
+ * shorthand". That is, the values are the property that each was derived from.
12009
+ */
12010
+
12011
+
12012
+ function expandShorthandMap(styles) {
12013
+ var expanded = {};
12014
+
12015
+ for (var key in styles) {
12016
+ var longhands = shorthandToLonghand[key] || [key];
12017
+
12018
+ for (var i = 0; i < longhands.length; i++) {
12019
+ expanded[longhands[i]] = key;
12020
+ }
12021
+ }
12022
+
12023
+ return expanded;
12024
+ }
12025
+ /**
12026
+ * When mixing shorthand and longhand property names, we warn during updates if
12027
+ * we expect an incorrect result to occur. In particular, we warn for:
12028
+ *
12029
+ * Updating a shorthand property (longhand gets overwritten):
12030
+ * {font: 'foo', fontVariant: 'bar'} -> {font: 'baz', fontVariant: 'bar'}
12031
+ * becomes .style.font = 'baz'
12032
+ * Removing a shorthand property (longhand gets lost too):
12033
+ * {font: 'foo', fontVariant: 'bar'} -> {fontVariant: 'bar'}
12034
+ * becomes .style.font = ''
12035
+ * Removing a longhand property (should revert to shorthand; doesn't):
12036
+ * {font: 'foo', fontVariant: 'bar'} -> {font: 'foo'}
12037
+ * becomes .style.fontVariant = ''
12038
+ */
12039
+
12040
+
12041
+ function validateShorthandPropertyCollisionInDev(styleUpdates, nextStyles) {
12042
+ {
12043
+ if (!nextStyles) {
12044
+ return;
12045
+ }
12046
+
12047
+ var expandedUpdates = expandShorthandMap(styleUpdates);
12048
+ var expandedStyles = expandShorthandMap(nextStyles);
12049
+ var warnedAbout = {};
12050
+
12051
+ for (var key in expandedUpdates) {
12052
+ var originalKey = expandedUpdates[key];
12053
+ var correctOriginalKey = expandedStyles[key];
12054
+
12055
+ if (correctOriginalKey && originalKey !== correctOriginalKey) {
12056
+ var warningKey = originalKey + ',' + correctOriginalKey;
12057
+
12058
+ if (warnedAbout[warningKey]) {
12059
+ continue;
12060
+ }
12061
+
12062
+ warnedAbout[warningKey] = true;
12063
+
12064
+ error('%s a style property during rerender (%s) when a ' + 'conflicting property is set (%s) can lead to styling bugs. To ' + "avoid this, don't mix shorthand and non-shorthand properties " + 'for the same value; instead, replace the shorthand with ' + 'separate values.', isValueEmpty(styleUpdates[originalKey]) ? 'Removing' : 'Updating', originalKey, correctOriginalKey);
12065
+ }
12066
+ }
12067
+ }
12068
+ }
12069
+
12070
+ // For HTML, certain tags should omit their close tag. We keep a list for
12071
+ // those special-case tags.
12072
+ var omittedCloseTags = {
12073
+ area: true,
12074
+ base: true,
12075
+ br: true,
12076
+ col: true,
12077
+ embed: true,
12078
+ hr: true,
12079
+ img: true,
12080
+ input: true,
12081
+ keygen: true,
12082
+ link: true,
12083
+ meta: true,
12084
+ param: true,
12085
+ source: true,
12086
+ track: true,
12087
+ wbr: true // NOTE: menuitem's close tag should be omitted, but that causes problems.
12088
+
12089
+ };
12090
+
12091
+ // `omittedCloseTags` except that `menuitem` should still have its closing tag.
12092
+
12093
+ var voidElementTags = _assign({
12094
+ menuitem: true
12095
+ }, omittedCloseTags);
12096
+
12097
+ var HTML = '__html';
12098
+
12099
+ function assertValidProps(tag, props) {
12100
+ if (!props) {
12101
+ return;
12102
+ } // Note the use of `==` which checks for null or undefined.
12103
+
12104
+
12105
+ if (voidElementTags[tag]) {
12106
+ if (!(props.children == null && props.dangerouslySetInnerHTML == null)) {
12107
+ {
12108
+ throw Error( tag + " is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`." );
12109
+ }
12110
+ }
12111
+ }
12112
+
12113
+ if (props.dangerouslySetInnerHTML != null) {
12114
+ if (!(props.children == null)) {
12115
+ {
12116
+ throw Error( "Can only set one of `children` or `props.dangerouslySetInnerHTML`." );
12117
+ }
12118
+ }
12119
+
12120
+ if (!(typeof props.dangerouslySetInnerHTML === 'object' && HTML in props.dangerouslySetInnerHTML)) {
12121
+ {
12122
+ throw Error( "`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://reactjs.org/link/dangerously-set-inner-html for more information." );
12123
+ }
12124
+ }
12125
+ }
12126
+
12127
+ {
12128
+ if (!props.suppressContentEditableWarning && props.contentEditable && props.children != null) {
12129
+ error('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.');
12130
+ }
12131
+ }
12132
+
12133
+ if (!(props.style == null || typeof props.style === 'object')) {
12134
+ {
12135
+ throw Error( "The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX." );
12136
+ }
12137
+ }
12138
+ }
12139
+
12140
+ function isCustomComponent(tagName, props) {
12141
+ if (tagName.indexOf('-') === -1) {
12142
+ return typeof props.is === 'string';
12143
+ }
12144
+
12145
+ switch (tagName) {
12146
+ // These are reserved SVG and MathML elements.
12147
+ // We don't mind this list too much because we expect it to never grow.
12148
+ // The alternative is to track the namespace in a few places which is convoluted.
12149
+ // https://w3c.github.io/webcomponents/spec/custom/#custom-elements-core-concepts
12150
+ case 'annotation-xml':
12151
+ case 'color-profile':
12152
+ case 'font-face':
12153
+ case 'font-face-src':
12154
+ case 'font-face-uri':
12155
+ case 'font-face-format':
12156
+ case 'font-face-name':
12157
+ case 'missing-glyph':
12158
+ return false;
12159
+
12160
+ default:
12161
+ return true;
12162
+ }
12163
+ }
12164
+
12165
+ // When adding attributes to the HTML or SVG allowed attribute list, be sure to
12166
+ // also add them to this module to ensure casing and incorrect name
12167
+ // warnings.
12168
+ var possibleStandardNames = {
12169
+ // HTML
12170
+ accept: 'accept',
12171
+ acceptcharset: 'acceptCharset',
12172
+ 'accept-charset': 'acceptCharset',
12173
+ accesskey: 'accessKey',
12174
+ action: 'action',
12175
+ allowfullscreen: 'allowFullScreen',
12176
+ alt: 'alt',
12177
+ as: 'as',
12178
+ async: 'async',
12179
+ autocapitalize: 'autoCapitalize',
12180
+ autocomplete: 'autoComplete',
12181
+ autocorrect: 'autoCorrect',
12182
+ autofocus: 'autoFocus',
12183
+ autoplay: 'autoPlay',
12184
+ autosave: 'autoSave',
12185
+ capture: 'capture',
12186
+ cellpadding: 'cellPadding',
12187
+ cellspacing: 'cellSpacing',
12188
+ challenge: 'challenge',
12189
+ charset: 'charSet',
12190
+ checked: 'checked',
12191
+ children: 'children',
12192
+ cite: 'cite',
12193
+ class: 'className',
12194
+ classid: 'classID',
12195
+ classname: 'className',
12196
+ cols: 'cols',
12197
+ colspan: 'colSpan',
12198
+ content: 'content',
12199
+ contenteditable: 'contentEditable',
12200
+ contextmenu: 'contextMenu',
12201
+ controls: 'controls',
12202
+ controlslist: 'controlsList',
12203
+ coords: 'coords',
12204
+ crossorigin: 'crossOrigin',
12205
+ dangerouslysetinnerhtml: 'dangerouslySetInnerHTML',
12206
+ data: 'data',
12207
+ datetime: 'dateTime',
12208
+ default: 'default',
12209
+ defaultchecked: 'defaultChecked',
12210
+ defaultvalue: 'defaultValue',
12211
+ defer: 'defer',
12212
+ dir: 'dir',
12213
+ disabled: 'disabled',
12214
+ disablepictureinpicture: 'disablePictureInPicture',
12215
+ disableremoteplayback: 'disableRemotePlayback',
12216
+ download: 'download',
12217
+ draggable: 'draggable',
12218
+ enctype: 'encType',
12219
+ enterkeyhint: 'enterKeyHint',
12220
+ for: 'htmlFor',
12221
+ form: 'form',
12222
+ formmethod: 'formMethod',
12223
+ formaction: 'formAction',
12224
+ formenctype: 'formEncType',
12225
+ formnovalidate: 'formNoValidate',
12226
+ formtarget: 'formTarget',
12227
+ frameborder: 'frameBorder',
12228
+ headers: 'headers',
12229
+ height: 'height',
12230
+ hidden: 'hidden',
12231
+ high: 'high',
12232
+ href: 'href',
12233
+ hreflang: 'hrefLang',
12234
+ htmlfor: 'htmlFor',
12235
+ httpequiv: 'httpEquiv',
12236
+ 'http-equiv': 'httpEquiv',
12237
+ icon: 'icon',
12238
+ id: 'id',
12239
+ innerhtml: 'innerHTML',
12240
+ inputmode: 'inputMode',
12241
+ integrity: 'integrity',
12242
+ is: 'is',
12243
+ itemid: 'itemID',
12244
+ itemprop: 'itemProp',
12245
+ itemref: 'itemRef',
12246
+ itemscope: 'itemScope',
12247
+ itemtype: 'itemType',
12248
+ keyparams: 'keyParams',
12249
+ keytype: 'keyType',
12250
+ kind: 'kind',
12251
+ label: 'label',
12252
+ lang: 'lang',
12253
+ list: 'list',
12254
+ loop: 'loop',
12255
+ low: 'low',
12256
+ manifest: 'manifest',
12257
+ marginwidth: 'marginWidth',
12258
+ marginheight: 'marginHeight',
12259
+ max: 'max',
12260
+ maxlength: 'maxLength',
12261
+ media: 'media',
12262
+ mediagroup: 'mediaGroup',
12263
+ method: 'method',
12264
+ min: 'min',
12265
+ minlength: 'minLength',
12266
+ multiple: 'multiple',
12267
+ muted: 'muted',
12268
+ name: 'name',
12269
+ nomodule: 'noModule',
12270
+ nonce: 'nonce',
12271
+ novalidate: 'noValidate',
12272
+ open: 'open',
12273
+ optimum: 'optimum',
12274
+ pattern: 'pattern',
12275
+ placeholder: 'placeholder',
12276
+ playsinline: 'playsInline',
12277
+ poster: 'poster',
12278
+ preload: 'preload',
12279
+ profile: 'profile',
12280
+ radiogroup: 'radioGroup',
12281
+ readonly: 'readOnly',
12282
+ referrerpolicy: 'referrerPolicy',
12283
+ rel: 'rel',
12284
+ required: 'required',
12285
+ reversed: 'reversed',
12286
+ role: 'role',
12287
+ rows: 'rows',
12288
+ rowspan: 'rowSpan',
12289
+ sandbox: 'sandbox',
12290
+ scope: 'scope',
12291
+ scoped: 'scoped',
12292
+ scrolling: 'scrolling',
12293
+ seamless: 'seamless',
12294
+ selected: 'selected',
12295
+ shape: 'shape',
12296
+ size: 'size',
12297
+ sizes: 'sizes',
12298
+ span: 'span',
12299
+ spellcheck: 'spellCheck',
12300
+ src: 'src',
12301
+ srcdoc: 'srcDoc',
12302
+ srclang: 'srcLang',
12303
+ srcset: 'srcSet',
12304
+ start: 'start',
12305
+ step: 'step',
12306
+ style: 'style',
12307
+ summary: 'summary',
12308
+ tabindex: 'tabIndex',
12309
+ target: 'target',
12310
+ title: 'title',
12311
+ type: 'type',
12312
+ usemap: 'useMap',
12313
+ value: 'value',
12314
+ width: 'width',
12315
+ wmode: 'wmode',
12316
+ wrap: 'wrap',
12317
+ // SVG
12318
+ about: 'about',
12319
+ accentheight: 'accentHeight',
12320
+ 'accent-height': 'accentHeight',
12321
+ accumulate: 'accumulate',
12322
+ additive: 'additive',
12323
+ alignmentbaseline: 'alignmentBaseline',
12324
+ 'alignment-baseline': 'alignmentBaseline',
12325
+ allowreorder: 'allowReorder',
12326
+ alphabetic: 'alphabetic',
12327
+ amplitude: 'amplitude',
12328
+ arabicform: 'arabicForm',
12329
+ 'arabic-form': 'arabicForm',
12330
+ ascent: 'ascent',
12331
+ attributename: 'attributeName',
12332
+ attributetype: 'attributeType',
12333
+ autoreverse: 'autoReverse',
12334
+ azimuth: 'azimuth',
12335
+ basefrequency: 'baseFrequency',
12336
+ baselineshift: 'baselineShift',
12337
+ 'baseline-shift': 'baselineShift',
12338
+ baseprofile: 'baseProfile',
12339
+ bbox: 'bbox',
12340
+ begin: 'begin',
12341
+ bias: 'bias',
12342
+ by: 'by',
12343
+ calcmode: 'calcMode',
12344
+ capheight: 'capHeight',
12345
+ 'cap-height': 'capHeight',
12346
+ clip: 'clip',
12347
+ clippath: 'clipPath',
12348
+ 'clip-path': 'clipPath',
12349
+ clippathunits: 'clipPathUnits',
12350
+ cliprule: 'clipRule',
12351
+ 'clip-rule': 'clipRule',
12352
+ color: 'color',
12353
+ colorinterpolation: 'colorInterpolation',
12354
+ 'color-interpolation': 'colorInterpolation',
12355
+ colorinterpolationfilters: 'colorInterpolationFilters',
12356
+ 'color-interpolation-filters': 'colorInterpolationFilters',
12357
+ colorprofile: 'colorProfile',
12358
+ 'color-profile': 'colorProfile',
12359
+ colorrendering: 'colorRendering',
12360
+ 'color-rendering': 'colorRendering',
12361
+ contentscripttype: 'contentScriptType',
12362
+ contentstyletype: 'contentStyleType',
12363
+ cursor: 'cursor',
12364
+ cx: 'cx',
12365
+ cy: 'cy',
12366
+ d: 'd',
12367
+ datatype: 'datatype',
12368
+ decelerate: 'decelerate',
12369
+ descent: 'descent',
12370
+ diffuseconstant: 'diffuseConstant',
12371
+ direction: 'direction',
12372
+ display: 'display',
12373
+ divisor: 'divisor',
12374
+ dominantbaseline: 'dominantBaseline',
12375
+ 'dominant-baseline': 'dominantBaseline',
12376
+ dur: 'dur',
12377
+ dx: 'dx',
12378
+ dy: 'dy',
12379
+ edgemode: 'edgeMode',
12380
+ elevation: 'elevation',
12381
+ enablebackground: 'enableBackground',
12382
+ 'enable-background': 'enableBackground',
12383
+ end: 'end',
12384
+ exponent: 'exponent',
12385
+ externalresourcesrequired: 'externalResourcesRequired',
12386
+ fill: 'fill',
12387
+ fillopacity: 'fillOpacity',
12388
+ 'fill-opacity': 'fillOpacity',
12389
+ fillrule: 'fillRule',
12390
+ 'fill-rule': 'fillRule',
12391
+ filter: 'filter',
12392
+ filterres: 'filterRes',
12393
+ filterunits: 'filterUnits',
12394
+ floodopacity: 'floodOpacity',
12395
+ 'flood-opacity': 'floodOpacity',
12396
+ floodcolor: 'floodColor',
12397
+ 'flood-color': 'floodColor',
12398
+ focusable: 'focusable',
12399
+ fontfamily: 'fontFamily',
12400
+ 'font-family': 'fontFamily',
12401
+ fontsize: 'fontSize',
12402
+ 'font-size': 'fontSize',
12403
+ fontsizeadjust: 'fontSizeAdjust',
12404
+ 'font-size-adjust': 'fontSizeAdjust',
12405
+ fontstretch: 'fontStretch',
12406
+ 'font-stretch': 'fontStretch',
12407
+ fontstyle: 'fontStyle',
12408
+ 'font-style': 'fontStyle',
12409
+ fontvariant: 'fontVariant',
12410
+ 'font-variant': 'fontVariant',
12411
+ fontweight: 'fontWeight',
12412
+ 'font-weight': 'fontWeight',
12413
+ format: 'format',
12414
+ from: 'from',
12415
+ fx: 'fx',
12416
+ fy: 'fy',
12417
+ g1: 'g1',
12418
+ g2: 'g2',
12419
+ glyphname: 'glyphName',
12420
+ 'glyph-name': 'glyphName',
12421
+ glyphorientationhorizontal: 'glyphOrientationHorizontal',
12422
+ 'glyph-orientation-horizontal': 'glyphOrientationHorizontal',
12423
+ glyphorientationvertical: 'glyphOrientationVertical',
12424
+ 'glyph-orientation-vertical': 'glyphOrientationVertical',
12425
+ glyphref: 'glyphRef',
12426
+ gradienttransform: 'gradientTransform',
12427
+ gradientunits: 'gradientUnits',
12428
+ hanging: 'hanging',
12429
+ horizadvx: 'horizAdvX',
12430
+ 'horiz-adv-x': 'horizAdvX',
12431
+ horizoriginx: 'horizOriginX',
12432
+ 'horiz-origin-x': 'horizOriginX',
12433
+ ideographic: 'ideographic',
12434
+ imagerendering: 'imageRendering',
12435
+ 'image-rendering': 'imageRendering',
12436
+ in2: 'in2',
12437
+ in: 'in',
12438
+ inlist: 'inlist',
12439
+ intercept: 'intercept',
12440
+ k1: 'k1',
12441
+ k2: 'k2',
12442
+ k3: 'k3',
12443
+ k4: 'k4',
12444
+ k: 'k',
12445
+ kernelmatrix: 'kernelMatrix',
12446
+ kernelunitlength: 'kernelUnitLength',
12447
+ kerning: 'kerning',
12448
+ keypoints: 'keyPoints',
12449
+ keysplines: 'keySplines',
12450
+ keytimes: 'keyTimes',
12451
+ lengthadjust: 'lengthAdjust',
12452
+ letterspacing: 'letterSpacing',
12453
+ 'letter-spacing': 'letterSpacing',
12454
+ lightingcolor: 'lightingColor',
12455
+ 'lighting-color': 'lightingColor',
12456
+ limitingconeangle: 'limitingConeAngle',
12457
+ local: 'local',
12458
+ markerend: 'markerEnd',
12459
+ 'marker-end': 'markerEnd',
12460
+ markerheight: 'markerHeight',
12461
+ markermid: 'markerMid',
12462
+ 'marker-mid': 'markerMid',
12463
+ markerstart: 'markerStart',
12464
+ 'marker-start': 'markerStart',
12465
+ markerunits: 'markerUnits',
12466
+ markerwidth: 'markerWidth',
12467
+ mask: 'mask',
12468
+ maskcontentunits: 'maskContentUnits',
12469
+ maskunits: 'maskUnits',
12470
+ mathematical: 'mathematical',
12471
+ mode: 'mode',
12472
+ numoctaves: 'numOctaves',
12473
+ offset: 'offset',
12474
+ opacity: 'opacity',
12475
+ operator: 'operator',
12476
+ order: 'order',
12477
+ orient: 'orient',
12478
+ orientation: 'orientation',
12479
+ origin: 'origin',
12480
+ overflow: 'overflow',
12481
+ overlineposition: 'overlinePosition',
12482
+ 'overline-position': 'overlinePosition',
12483
+ overlinethickness: 'overlineThickness',
12484
+ 'overline-thickness': 'overlineThickness',
12485
+ paintorder: 'paintOrder',
12486
+ 'paint-order': 'paintOrder',
12487
+ panose1: 'panose1',
12488
+ 'panose-1': 'panose1',
12489
+ pathlength: 'pathLength',
12490
+ patterncontentunits: 'patternContentUnits',
12491
+ patterntransform: 'patternTransform',
12492
+ patternunits: 'patternUnits',
12493
+ pointerevents: 'pointerEvents',
12494
+ 'pointer-events': 'pointerEvents',
12495
+ points: 'points',
12496
+ pointsatx: 'pointsAtX',
12497
+ pointsaty: 'pointsAtY',
12498
+ pointsatz: 'pointsAtZ',
12499
+ prefix: 'prefix',
12500
+ preservealpha: 'preserveAlpha',
12501
+ preserveaspectratio: 'preserveAspectRatio',
12502
+ primitiveunits: 'primitiveUnits',
12503
+ property: 'property',
12504
+ r: 'r',
12505
+ radius: 'radius',
12506
+ refx: 'refX',
12507
+ refy: 'refY',
12508
+ renderingintent: 'renderingIntent',
12509
+ 'rendering-intent': 'renderingIntent',
12510
+ repeatcount: 'repeatCount',
12511
+ repeatdur: 'repeatDur',
12512
+ requiredextensions: 'requiredExtensions',
12513
+ requiredfeatures: 'requiredFeatures',
12514
+ resource: 'resource',
12515
+ restart: 'restart',
12516
+ result: 'result',
12517
+ results: 'results',
12518
+ rotate: 'rotate',
12519
+ rx: 'rx',
12520
+ ry: 'ry',
12521
+ scale: 'scale',
12522
+ security: 'security',
12523
+ seed: 'seed',
12524
+ shaperendering: 'shapeRendering',
12525
+ 'shape-rendering': 'shapeRendering',
12526
+ slope: 'slope',
12527
+ spacing: 'spacing',
12528
+ specularconstant: 'specularConstant',
12529
+ specularexponent: 'specularExponent',
12530
+ speed: 'speed',
12531
+ spreadmethod: 'spreadMethod',
12532
+ startoffset: 'startOffset',
12533
+ stddeviation: 'stdDeviation',
12534
+ stemh: 'stemh',
12535
+ stemv: 'stemv',
12536
+ stitchtiles: 'stitchTiles',
12537
+ stopcolor: 'stopColor',
12538
+ 'stop-color': 'stopColor',
12539
+ stopopacity: 'stopOpacity',
12540
+ 'stop-opacity': 'stopOpacity',
12541
+ strikethroughposition: 'strikethroughPosition',
12542
+ 'strikethrough-position': 'strikethroughPosition',
12543
+ strikethroughthickness: 'strikethroughThickness',
12544
+ 'strikethrough-thickness': 'strikethroughThickness',
12545
+ string: 'string',
12546
+ stroke: 'stroke',
12547
+ strokedasharray: 'strokeDasharray',
12548
+ 'stroke-dasharray': 'strokeDasharray',
12549
+ strokedashoffset: 'strokeDashoffset',
12550
+ 'stroke-dashoffset': 'strokeDashoffset',
12551
+ strokelinecap: 'strokeLinecap',
12552
+ 'stroke-linecap': 'strokeLinecap',
12553
+ strokelinejoin: 'strokeLinejoin',
12554
+ 'stroke-linejoin': 'strokeLinejoin',
12555
+ strokemiterlimit: 'strokeMiterlimit',
12556
+ 'stroke-miterlimit': 'strokeMiterlimit',
12557
+ strokewidth: 'strokeWidth',
12558
+ 'stroke-width': 'strokeWidth',
12559
+ strokeopacity: 'strokeOpacity',
12560
+ 'stroke-opacity': 'strokeOpacity',
12561
+ suppresscontenteditablewarning: 'suppressContentEditableWarning',
12562
+ suppresshydrationwarning: 'suppressHydrationWarning',
12563
+ surfacescale: 'surfaceScale',
12564
+ systemlanguage: 'systemLanguage',
12565
+ tablevalues: 'tableValues',
12566
+ targetx: 'targetX',
12567
+ targety: 'targetY',
12568
+ textanchor: 'textAnchor',
12569
+ 'text-anchor': 'textAnchor',
12570
+ textdecoration: 'textDecoration',
12571
+ 'text-decoration': 'textDecoration',
12572
+ textlength: 'textLength',
12573
+ textrendering: 'textRendering',
12574
+ 'text-rendering': 'textRendering',
12575
+ to: 'to',
12576
+ transform: 'transform',
12577
+ typeof: 'typeof',
12578
+ u1: 'u1',
12579
+ u2: 'u2',
12580
+ underlineposition: 'underlinePosition',
12581
+ 'underline-position': 'underlinePosition',
12582
+ underlinethickness: 'underlineThickness',
12583
+ 'underline-thickness': 'underlineThickness',
12584
+ unicode: 'unicode',
12585
+ unicodebidi: 'unicodeBidi',
12586
+ 'unicode-bidi': 'unicodeBidi',
12587
+ unicoderange: 'unicodeRange',
12588
+ 'unicode-range': 'unicodeRange',
12589
+ unitsperem: 'unitsPerEm',
12590
+ 'units-per-em': 'unitsPerEm',
12591
+ unselectable: 'unselectable',
12592
+ valphabetic: 'vAlphabetic',
12593
+ 'v-alphabetic': 'vAlphabetic',
12594
+ values: 'values',
12595
+ vectoreffect: 'vectorEffect',
12596
+ 'vector-effect': 'vectorEffect',
12597
+ version: 'version',
12598
+ vertadvy: 'vertAdvY',
12599
+ 'vert-adv-y': 'vertAdvY',
12600
+ vertoriginx: 'vertOriginX',
12601
+ 'vert-origin-x': 'vertOriginX',
12602
+ vertoriginy: 'vertOriginY',
12603
+ 'vert-origin-y': 'vertOriginY',
12604
+ vhanging: 'vHanging',
12605
+ 'v-hanging': 'vHanging',
12606
+ videographic: 'vIdeographic',
12607
+ 'v-ideographic': 'vIdeographic',
12608
+ viewbox: 'viewBox',
12609
+ viewtarget: 'viewTarget',
12610
+ visibility: 'visibility',
12611
+ vmathematical: 'vMathematical',
12612
+ 'v-mathematical': 'vMathematical',
12613
+ vocab: 'vocab',
12614
+ widths: 'widths',
12615
+ wordspacing: 'wordSpacing',
12616
+ 'word-spacing': 'wordSpacing',
12617
+ writingmode: 'writingMode',
12618
+ 'writing-mode': 'writingMode',
12619
+ x1: 'x1',
12620
+ x2: 'x2',
12621
+ x: 'x',
12622
+ xchannelselector: 'xChannelSelector',
12623
+ xheight: 'xHeight',
12624
+ 'x-height': 'xHeight',
12625
+ xlinkactuate: 'xlinkActuate',
12626
+ 'xlink:actuate': 'xlinkActuate',
12627
+ xlinkarcrole: 'xlinkArcrole',
12628
+ 'xlink:arcrole': 'xlinkArcrole',
12629
+ xlinkhref: 'xlinkHref',
12630
+ 'xlink:href': 'xlinkHref',
12631
+ xlinkrole: 'xlinkRole',
12632
+ 'xlink:role': 'xlinkRole',
12633
+ xlinkshow: 'xlinkShow',
12634
+ 'xlink:show': 'xlinkShow',
12635
+ xlinktitle: 'xlinkTitle',
12636
+ 'xlink:title': 'xlinkTitle',
12637
+ xlinktype: 'xlinkType',
12638
+ 'xlink:type': 'xlinkType',
12639
+ xmlbase: 'xmlBase',
12640
+ 'xml:base': 'xmlBase',
12641
+ xmllang: 'xmlLang',
12642
+ 'xml:lang': 'xmlLang',
12643
+ xmlns: 'xmlns',
12644
+ 'xml:space': 'xmlSpace',
12645
+ xmlnsxlink: 'xmlnsXlink',
12646
+ 'xmlns:xlink': 'xmlnsXlink',
12647
+ xmlspace: 'xmlSpace',
12648
+ y1: 'y1',
12649
+ y2: 'y2',
12650
+ y: 'y',
12651
+ ychannelselector: 'yChannelSelector',
12652
+ z: 'z',
12653
+ zoomandpan: 'zoomAndPan'
12654
+ };
12655
+
12656
+ var ariaProperties = {
12657
+ 'aria-current': 0,
12658
+ // state
12659
+ 'aria-details': 0,
12660
+ 'aria-disabled': 0,
12661
+ // state
12662
+ 'aria-hidden': 0,
12663
+ // state
12664
+ 'aria-invalid': 0,
12665
+ // state
12666
+ 'aria-keyshortcuts': 0,
12667
+ 'aria-label': 0,
12668
+ 'aria-roledescription': 0,
12669
+ // Widget Attributes
12670
+ 'aria-autocomplete': 0,
12671
+ 'aria-checked': 0,
12672
+ 'aria-expanded': 0,
12673
+ 'aria-haspopup': 0,
12674
+ 'aria-level': 0,
12675
+ 'aria-modal': 0,
12676
+ 'aria-multiline': 0,
12677
+ 'aria-multiselectable': 0,
12678
+ 'aria-orientation': 0,
12679
+ 'aria-placeholder': 0,
12680
+ 'aria-pressed': 0,
12681
+ 'aria-readonly': 0,
12682
+ 'aria-required': 0,
12683
+ 'aria-selected': 0,
12684
+ 'aria-sort': 0,
12685
+ 'aria-valuemax': 0,
12686
+ 'aria-valuemin': 0,
12687
+ 'aria-valuenow': 0,
12688
+ 'aria-valuetext': 0,
12689
+ // Live Region Attributes
12690
+ 'aria-atomic': 0,
12691
+ 'aria-busy': 0,
12692
+ 'aria-live': 0,
12693
+ 'aria-relevant': 0,
12694
+ // Drag-and-Drop Attributes
12695
+ 'aria-dropeffect': 0,
12696
+ 'aria-grabbed': 0,
12697
+ // Relationship Attributes
12698
+ 'aria-activedescendant': 0,
12699
+ 'aria-colcount': 0,
12700
+ 'aria-colindex': 0,
12701
+ 'aria-colspan': 0,
12702
+ 'aria-controls': 0,
12703
+ 'aria-describedby': 0,
12704
+ 'aria-errormessage': 0,
12705
+ 'aria-flowto': 0,
12706
+ 'aria-labelledby': 0,
12707
+ 'aria-owns': 0,
12708
+ 'aria-posinset': 0,
12709
+ 'aria-rowcount': 0,
12710
+ 'aria-rowindex': 0,
12711
+ 'aria-rowspan': 0,
12712
+ 'aria-setsize': 0
12713
+ };
12714
+
12715
+ var warnedProperties = {};
12716
+ var rARIA = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$');
12717
+ var rARIACamel = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$');
12718
+ var hasOwnProperty$1 = Object.prototype.hasOwnProperty;
12719
+
12720
+ function validateProperty(tagName, name) {
12721
+ {
12722
+ if (hasOwnProperty$1.call(warnedProperties, name) && warnedProperties[name]) {
12723
+ return true;
12724
+ }
12725
+
12726
+ if (rARIACamel.test(name)) {
12727
+ var ariaName = 'aria-' + name.slice(4).toLowerCase();
12728
+ var correctName = ariaProperties.hasOwnProperty(ariaName) ? ariaName : null; // If this is an aria-* attribute, but is not listed in the known DOM
12729
+ // DOM properties, then it is an invalid aria-* attribute.
12730
+
12731
+ if (correctName == null) {
12732
+ error('Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.', name);
12733
+
12734
+ warnedProperties[name] = true;
12735
+ return true;
12736
+ } // aria-* attributes should be lowercase; suggest the lowercase version.
12737
+
12738
+
12739
+ if (name !== correctName) {
12740
+ error('Invalid ARIA attribute `%s`. Did you mean `%s`?', name, correctName);
12741
+
12742
+ warnedProperties[name] = true;
12743
+ return true;
12744
+ }
12745
+ }
12746
+
12747
+ if (rARIA.test(name)) {
12748
+ var lowerCasedName = name.toLowerCase();
12749
+ var standardName = ariaProperties.hasOwnProperty(lowerCasedName) ? lowerCasedName : null; // If this is an aria-* attribute, but is not listed in the known DOM
12750
+ // DOM properties, then it is an invalid aria-* attribute.
12751
+
12752
+ if (standardName == null) {
12753
+ warnedProperties[name] = true;
12754
+ return false;
12755
+ } // aria-* attributes should be lowercase; suggest the lowercase version.
12756
+
12757
+
12758
+ if (name !== standardName) {
12759
+ error('Unknown ARIA attribute `%s`. Did you mean `%s`?', name, standardName);
12760
+
12761
+ warnedProperties[name] = true;
12762
+ return true;
12763
+ }
12764
+ }
12765
+ }
12766
+
12767
+ return true;
12768
+ }
12769
+
12770
+ function warnInvalidARIAProps(type, props) {
12771
+ {
12772
+ var invalidProps = [];
12773
+
12774
+ for (var key in props) {
12775
+ var isValid = validateProperty(type, key);
12776
+
12777
+ if (!isValid) {
12778
+ invalidProps.push(key);
12779
+ }
12780
+ }
12781
+
12782
+ var unknownPropString = invalidProps.map(function (prop) {
12783
+ return '`' + prop + '`';
12784
+ }).join(', ');
12785
+
12786
+ if (invalidProps.length === 1) {
12787
+ error('Invalid aria prop %s on <%s> tag. ' + 'For details, see https://reactjs.org/link/invalid-aria-props', unknownPropString, type);
12788
+ } else if (invalidProps.length > 1) {
12789
+ error('Invalid aria props %s on <%s> tag. ' + 'For details, see https://reactjs.org/link/invalid-aria-props', unknownPropString, type);
12790
+ }
12791
+ }
12792
+ }
12793
+
12794
+ function validateProperties(type, props) {
12795
+ if (isCustomComponent(type, props)) {
12796
+ return;
12797
+ }
12798
+
12799
+ warnInvalidARIAProps(type, props);
12800
+ }
12801
+
12802
+ var didWarnValueNull = false;
12803
+ function validateProperties$1(type, props) {
12804
+ {
12805
+ if (type !== 'input' && type !== 'textarea' && type !== 'select') {
12806
+ return;
12807
+ }
12808
+
12809
+ if (props != null && props.value === null && !didWarnValueNull) {
12810
+ didWarnValueNull = true;
12811
+
12812
+ if (type === 'select' && props.multiple) {
12813
+ error('`value` prop on `%s` should not be null. ' + 'Consider using an empty array when `multiple` is set to `true` ' + 'to clear the component or `undefined` for uncontrolled components.', type);
12814
+ } else {
12815
+ error('`value` prop on `%s` should not be null. ' + 'Consider using an empty string to clear the component or `undefined` ' + 'for uncontrolled components.', type);
12816
+ }
12817
+ }
12818
+ }
12819
+ }
12820
+
12821
+ var validateProperty$1 = function () {};
12822
+
12823
+ {
12824
+ var warnedProperties$1 = {};
12825
+ var _hasOwnProperty = Object.prototype.hasOwnProperty;
12826
+ var EVENT_NAME_REGEX = /^on./;
12827
+ var INVALID_EVENT_NAME_REGEX = /^on[^A-Z]/;
12828
+ var rARIA$1 = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$');
12829
+ var rARIACamel$1 = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$');
12830
+
12831
+ validateProperty$1 = function (tagName, name, value, eventRegistry) {
12832
+ if (_hasOwnProperty.call(warnedProperties$1, name) && warnedProperties$1[name]) {
12833
+ return true;
12834
+ }
12835
+
12836
+ var lowerCasedName = name.toLowerCase();
12837
+
12838
+ if (lowerCasedName === 'onfocusin' || lowerCasedName === 'onfocusout') {
12839
+ error('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.');
12840
+
12841
+ warnedProperties$1[name] = true;
12842
+ return true;
12843
+ } // We can't rely on the event system being injected on the server.
12844
+
12845
+
12846
+ if (eventRegistry != null) {
12847
+ var registrationNameDependencies = eventRegistry.registrationNameDependencies,
12848
+ possibleRegistrationNames = eventRegistry.possibleRegistrationNames;
12849
+
12850
+ if (registrationNameDependencies.hasOwnProperty(name)) {
12851
+ return true;
12852
+ }
12853
+
12854
+ var registrationName = possibleRegistrationNames.hasOwnProperty(lowerCasedName) ? possibleRegistrationNames[lowerCasedName] : null;
12855
+
12856
+ if (registrationName != null) {
12857
+ error('Invalid event handler property `%s`. Did you mean `%s`?', name, registrationName);
12858
+
12859
+ warnedProperties$1[name] = true;
12860
+ return true;
12861
+ }
12862
+
12863
+ if (EVENT_NAME_REGEX.test(name)) {
12864
+ error('Unknown event handler property `%s`. It will be ignored.', name);
12865
+
12866
+ warnedProperties$1[name] = true;
12867
+ return true;
12868
+ }
12869
+ } else if (EVENT_NAME_REGEX.test(name)) {
12870
+ // If no event plugins have been injected, we are in a server environment.
12871
+ // So we can't tell if the event name is correct for sure, but we can filter
12872
+ // out known bad ones like `onclick`. We can't suggest a specific replacement though.
12873
+ if (INVALID_EVENT_NAME_REGEX.test(name)) {
12874
+ error('Invalid event handler property `%s`. ' + 'React events use the camelCase naming convention, for example `onClick`.', name);
12875
+ }
12876
+
12877
+ warnedProperties$1[name] = true;
12878
+ return true;
12879
+ } // Let the ARIA attribute hook validate ARIA attributes
12880
+
12881
+
12882
+ if (rARIA$1.test(name) || rARIACamel$1.test(name)) {
12883
+ return true;
12884
+ }
12885
+
12886
+ if (lowerCasedName === 'innerhtml') {
12887
+ error('Directly setting property `innerHTML` is not permitted. ' + 'For more information, lookup documentation on `dangerouslySetInnerHTML`.');
12888
+
12889
+ warnedProperties$1[name] = true;
12890
+ return true;
12891
+ }
12892
+
12893
+ if (lowerCasedName === 'aria') {
12894
+ error('The `aria` attribute is reserved for future use in React. ' + 'Pass individual `aria-` attributes instead.');
12895
+
12896
+ warnedProperties$1[name] = true;
12897
+ return true;
12898
+ }
12899
+
12900
+ if (lowerCasedName === 'is' && value !== null && value !== undefined && typeof value !== 'string') {
12901
+ error('Received a `%s` for a string attribute `is`. If this is expected, cast ' + 'the value to a string.', typeof value);
12902
+
12903
+ warnedProperties$1[name] = true;
12904
+ return true;
12905
+ }
12906
+
12907
+ if (typeof value === 'number' && isNaN(value)) {
12908
+ error('Received NaN for the `%s` attribute. If this is expected, cast ' + 'the value to a string.', name);
12909
+
12910
+ warnedProperties$1[name] = true;
12911
+ return true;
12912
+ }
12913
+
12914
+ var propertyInfo = getPropertyInfo(name);
12915
+ var isReserved = propertyInfo !== null && propertyInfo.type === RESERVED; // Known attributes should match the casing specified in the property config.
12916
+
12917
+ if (possibleStandardNames.hasOwnProperty(lowerCasedName)) {
12918
+ var standardName = possibleStandardNames[lowerCasedName];
12919
+
12920
+ if (standardName !== name) {
12921
+ error('Invalid DOM property `%s`. Did you mean `%s`?', name, standardName);
12922
+
12923
+ warnedProperties$1[name] = true;
12924
+ return true;
12925
+ }
12926
+ } else if (!isReserved && name !== lowerCasedName) {
12927
+ // Unknown attributes should have lowercase casing since that's how they
12928
+ // will be cased anyway with server rendering.
12929
+ error('React does not recognize the `%s` prop on a DOM element. If you ' + 'intentionally want it to appear in the DOM as a custom ' + 'attribute, spell it as lowercase `%s` instead. ' + 'If you accidentally passed it from a parent component, remove ' + 'it from the DOM element.', name, lowerCasedName);
12930
+
12931
+ warnedProperties$1[name] = true;
12932
+ return true;
12933
+ }
12934
+
12935
+ if (typeof value === 'boolean' && shouldRemoveAttributeWithWarning(name, value, propertyInfo, false)) {
12936
+ if (value) {
12937
+ error('Received `%s` for a non-boolean attribute `%s`.\n\n' + 'If you want to write it to the DOM, pass a string instead: ' + '%s="%s" or %s={value.toString()}.', value, name, name, value, name);
12938
+ } else {
12939
+ error('Received `%s` for a non-boolean attribute `%s`.\n\n' + 'If you want to write it to the DOM, pass a string instead: ' + '%s="%s" or %s={value.toString()}.\n\n' + 'If you used to conditionally omit it with %s={condition && value}, ' + 'pass %s={condition ? value : undefined} instead.', value, name, name, value, name, name, name);
12940
+ }
12941
+
12942
+ warnedProperties$1[name] = true;
12943
+ return true;
12944
+ } // Now that we've validated casing, do not validate
12945
+ // data types for reserved props
12946
+
12947
+
12948
+ if (isReserved) {
12949
+ return true;
12950
+ } // Warn when a known attribute is a bad type
12951
+
12952
+
12953
+ if (shouldRemoveAttributeWithWarning(name, value, propertyInfo, false)) {
12954
+ warnedProperties$1[name] = true;
12955
+ return false;
12956
+ } // Warn when passing the strings 'false' or 'true' into a boolean prop
12957
+
12958
+
12959
+ if ((value === 'false' || value === 'true') && propertyInfo !== null && propertyInfo.type === BOOLEAN) {
12960
+ error('Received the string `%s` for the boolean attribute `%s`. ' + '%s ' + 'Did you mean %s={%s}?', value, name, value === 'false' ? 'The browser will interpret it as a truthy value.' : 'Although this works, it will not work as expected if you pass the string "false".', name, value);
12961
+
12962
+ warnedProperties$1[name] = true;
12963
+ return true;
12964
+ }
12965
+
12966
+ return true;
12967
+ };
12968
+ }
12969
+
12970
+ var warnUnknownProperties = function (type, props, eventRegistry) {
12971
+ {
12972
+ var unknownProps = [];
12973
+
12974
+ for (var key in props) {
12975
+ var isValid = validateProperty$1(type, key, props[key], eventRegistry);
12976
+
12977
+ if (!isValid) {
12978
+ unknownProps.push(key);
12979
+ }
12980
+ }
12981
+
12982
+ var unknownPropString = unknownProps.map(function (prop) {
12983
+ return '`' + prop + '`';
12984
+ }).join(', ');
12985
+
12986
+ if (unknownProps.length === 1) {
12987
+ error('Invalid value for prop %s on <%s> tag. Either remove it from the element, ' + 'or pass a string or number value to keep it in the DOM. ' + 'For details, see https://reactjs.org/link/attribute-behavior ', unknownPropString, type);
12988
+ } else if (unknownProps.length > 1) {
12989
+ error('Invalid values for props %s on <%s> tag. Either remove them from the element, ' + 'or pass a string or number value to keep them in the DOM. ' + 'For details, see https://reactjs.org/link/attribute-behavior ', unknownPropString, type);
12990
+ }
12991
+ }
12992
+ };
12993
+
12994
+ function validateProperties$2(type, props, eventRegistry) {
12995
+ if (isCustomComponent(type, props)) {
12996
+ return;
12997
+ }
12998
+
12999
+ warnUnknownProperties(type, props, eventRegistry);
13000
+ }
13001
+
13002
+ var IS_EVENT_HANDLE_NON_MANAGED_NODE = 1;
13003
+ var IS_NON_DELEGATED = 1 << 1;
13004
+ var IS_CAPTURE_PHASE = 1 << 2;
13005
+ var IS_REPLAYED = 1 << 4;
13006
+ // set to LEGACY_FB_SUPPORT. LEGACY_FB_SUPPORT only gets set when
13007
+ // we call willDeferLaterForLegacyFBSupport, thus not bailing out
13008
+ // will result in endless cycles like an infinite loop.
13009
+ // We also don't want to defer during event replaying.
13010
+
13011
+ var SHOULD_NOT_PROCESS_POLYFILL_EVENT_PLUGINS = IS_EVENT_HANDLE_NON_MANAGED_NODE | IS_NON_DELEGATED | IS_CAPTURE_PHASE;
13012
+
13013
+ /**
13014
+ * Gets the target node from a native browser event by accounting for
13015
+ * inconsistencies in browser DOM APIs.
13016
+ *
13017
+ * @param {object} nativeEvent Native browser event.
13018
+ * @return {DOMEventTarget} Target node.
13019
+ */
13020
+
13021
+ function getEventTarget(nativeEvent) {
13022
+ // Fallback to nativeEvent.srcElement for IE9
13023
+ // https://github.com/facebook/react/issues/12506
13024
+ var target = nativeEvent.target || nativeEvent.srcElement || window; // Normalize SVG <use> element events #4963
13025
+
13026
+ if (target.correspondingUseElement) {
13027
+ target = target.correspondingUseElement;
13028
+ } // Safari may fire events on text nodes (Node.TEXT_NODE is 3).
13029
+ // @see http://www.quirksmode.org/js/events_properties.html
13030
+
13031
+
13032
+ return target.nodeType === TEXT_NODE ? target.parentNode : target;
13033
+ }
13034
+
13035
+ var restoreImpl = null;
13036
+ var restoreTarget = null;
13037
+ var restoreQueue = null;
13038
+
13039
+ function restoreStateOfTarget(target) {
13040
+ // We perform this translation at the end of the event loop so that we
13041
+ // always receive the correct fiber here
13042
+ var internalInstance = getInstanceFromNode(target);
13043
+
13044
+ if (!internalInstance) {
13045
+ // Unmounted
13046
+ return;
13047
+ }
13048
+
13049
+ if (!(typeof restoreImpl === 'function')) {
13050
+ {
13051
+ throw Error( "setRestoreImplementation() needs to be called to handle a target for controlled events. This error is likely caused by a bug in React. Please file an issue." );
13052
+ }
13053
+ }
13054
+
13055
+ var stateNode = internalInstance.stateNode; // Guard against Fiber being unmounted.
13056
+
13057
+ if (stateNode) {
13058
+ var _props = getFiberCurrentPropsFromNode(stateNode);
13059
+
13060
+ restoreImpl(internalInstance.stateNode, internalInstance.type, _props);
13061
+ }
13062
+ }
13063
+
13064
+ function setRestoreImplementation(impl) {
13065
+ restoreImpl = impl;
13066
+ }
13067
+ function enqueueStateRestore(target) {
13068
+ if (restoreTarget) {
13069
+ if (restoreQueue) {
13070
+ restoreQueue.push(target);
13071
+ } else {
13072
+ restoreQueue = [target];
13073
+ }
13074
+ } else {
13075
+ restoreTarget = target;
13076
+ }
13077
+ }
13078
+ function needsStateRestore() {
13079
+ return restoreTarget !== null || restoreQueue !== null;
13080
+ }
13081
+ function restoreStateIfNeeded() {
13082
+ if (!restoreTarget) {
13083
+ return;
13084
+ }
13085
+
13086
+ var target = restoreTarget;
13087
+ var queuedTargets = restoreQueue;
13088
+ restoreTarget = null;
13089
+ restoreQueue = null;
13090
+ restoreStateOfTarget(target);
13091
+
13092
+ if (queuedTargets) {
13093
+ for (var i = 0; i < queuedTargets.length; i++) {
13094
+ restoreStateOfTarget(queuedTargets[i]);
13095
+ }
13096
+ }
13097
+ }
13098
+
13099
+ // the renderer. Such as when we're dispatching events or if third party
13100
+ // libraries need to call batchedUpdates. Eventually, this API will go away when
13101
+ // everything is batched by default. We'll then have a similar API to opt-out of
13102
+ // scheduled work and instead do synchronous work.
13103
+ // Defaults
13104
+
13105
+ var batchedUpdatesImpl = function (fn, bookkeeping) {
13106
+ return fn(bookkeeping);
13107
+ };
13108
+
13109
+ var discreteUpdatesImpl = function (fn, a, b, c, d) {
13110
+ return fn(a, b, c, d);
13111
+ };
13112
+
13113
+ var flushDiscreteUpdatesImpl = function () {};
13114
+
13115
+ var batchedEventUpdatesImpl = batchedUpdatesImpl;
13116
+ var isInsideEventHandler = false;
13117
+ var isBatchingEventUpdates = false;
13118
+
13119
+ function finishEventHandler() {
13120
+ // Here we wait until all updates have propagated, which is important
13121
+ // when using controlled components within layers:
13122
+ // https://github.com/facebook/react/issues/1698
13123
+ // Then we restore state of any controlled component.
13124
+ var controlledComponentsHavePendingUpdates = needsStateRestore();
13125
+
13126
+ if (controlledComponentsHavePendingUpdates) {
13127
+ // If a controlled event was fired, we may need to restore the state of
13128
+ // the DOM node back to the controlled value. This is necessary when React
13129
+ // bails out of the update without touching the DOM.
13130
+ flushDiscreteUpdatesImpl();
13131
+ restoreStateIfNeeded();
13132
+ }
13133
+ }
13134
+
13135
+ function batchedUpdates(fn, bookkeeping) {
13136
+ if (isInsideEventHandler) {
13137
+ // If we are currently inside another batch, we need to wait until it
13138
+ // fully completes before restoring state.
13139
+ return fn(bookkeeping);
13140
+ }
13141
+
13142
+ isInsideEventHandler = true;
13143
+
13144
+ try {
13145
+ return batchedUpdatesImpl(fn, bookkeeping);
13146
+ } finally {
13147
+ isInsideEventHandler = false;
13148
+ finishEventHandler();
13149
+ }
13150
+ }
13151
+ function batchedEventUpdates(fn, a, b) {
13152
+ if (isBatchingEventUpdates) {
13153
+ // If we are currently inside another batch, we need to wait until it
13154
+ // fully completes before restoring state.
13155
+ return fn(a, b);
13156
+ }
13157
+
13158
+ isBatchingEventUpdates = true;
13159
+
13160
+ try {
13161
+ return batchedEventUpdatesImpl(fn, a, b);
13162
+ } finally {
13163
+ isBatchingEventUpdates = false;
13164
+ finishEventHandler();
13165
+ }
13166
+ }
13167
+ function discreteUpdates(fn, a, b, c, d) {
13168
+ var prevIsInsideEventHandler = isInsideEventHandler;
13169
+ isInsideEventHandler = true;
13170
+
13171
+ try {
13172
+ return discreteUpdatesImpl(fn, a, b, c, d);
13173
+ } finally {
13174
+ isInsideEventHandler = prevIsInsideEventHandler;
13175
+
13176
+ if (!isInsideEventHandler) {
13177
+ finishEventHandler();
13178
+ }
13179
+ }
13180
+ }
13181
+ function flushDiscreteUpdatesIfNeeded(timeStamp) {
13182
+ {
13183
+ if (!isInsideEventHandler) {
13184
+ flushDiscreteUpdatesImpl();
13185
+ }
13186
+ }
13187
+ }
13188
+ function setBatchingImplementation(_batchedUpdatesImpl, _discreteUpdatesImpl, _flushDiscreteUpdatesImpl, _batchedEventUpdatesImpl) {
13189
+ batchedUpdatesImpl = _batchedUpdatesImpl;
13190
+ discreteUpdatesImpl = _discreteUpdatesImpl;
13191
+ flushDiscreteUpdatesImpl = _flushDiscreteUpdatesImpl;
13192
+ batchedEventUpdatesImpl = _batchedEventUpdatesImpl;
13193
+ }
13194
+
13195
+ function isInteractive(tag) {
13196
+ return tag === 'button' || tag === 'input' || tag === 'select' || tag === 'textarea';
13197
+ }
13198
+
13199
+ function shouldPreventMouseEvent(name, type, props) {
13200
+ switch (name) {
13201
+ case 'onClick':
13202
+ case 'onClickCapture':
13203
+ case 'onDoubleClick':
13204
+ case 'onDoubleClickCapture':
13205
+ case 'onMouseDown':
13206
+ case 'onMouseDownCapture':
13207
+ case 'onMouseMove':
13208
+ case 'onMouseMoveCapture':
13209
+ case 'onMouseUp':
13210
+ case 'onMouseUpCapture':
13211
+ case 'onMouseEnter':
13212
+ return !!(props.disabled && isInteractive(type));
13213
+
13214
+ default:
13215
+ return false;
13216
+ }
13217
+ }
13218
+ /**
13219
+ * @param {object} inst The instance, which is the source of events.
13220
+ * @param {string} registrationName Name of listener (e.g. `onClick`).
13221
+ * @return {?function} The stored callback.
13222
+ */
13223
+
13224
+
13225
+ function getListener(inst, registrationName) {
13226
+ var stateNode = inst.stateNode;
13227
+
13228
+ if (stateNode === null) {
13229
+ // Work in progress (ex: onload events in incremental mode).
13230
+ return null;
13231
+ }
13232
+
13233
+ var props = getFiberCurrentPropsFromNode(stateNode);
13234
+
13235
+ if (props === null) {
13236
+ // Work in progress.
13237
+ return null;
13238
+ }
13239
+
13240
+ var listener = props[registrationName];
13241
+
13242
+ if (shouldPreventMouseEvent(registrationName, inst.type, props)) {
13243
+ return null;
13244
+ }
13245
+
13246
+ if (!(!listener || typeof listener === 'function')) {
13247
+ {
13248
+ throw Error( "Expected `" + registrationName + "` listener to be a function, instead got a value of `" + typeof listener + "` type." );
13249
+ }
13250
+ }
13251
+
13252
+ return listener;
13253
+ }
13254
+
13255
+ var passiveBrowserEventsSupported = false; // Check if browser support events with passive listeners
13256
+ // https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#Safely_detecting_option_support
13257
+
13258
+ if (canUseDOM) {
13259
+ try {
13260
+ var options = {}; // $FlowFixMe: Ignore Flow complaining about needing a value
13261
+
13262
+ Object.defineProperty(options, 'passive', {
13263
+ get: function () {
13264
+ passiveBrowserEventsSupported = true;
13265
+ }
13266
+ });
13267
+ window.addEventListener('test', options, options);
13268
+ window.removeEventListener('test', options, options);
13269
+ } catch (e) {
13270
+ passiveBrowserEventsSupported = false;
13271
+ }
13272
+ }
13273
+
13274
+ function invokeGuardedCallbackProd(name, func, context, a, b, c, d, e, f) {
13275
+ var funcArgs = Array.prototype.slice.call(arguments, 3);
13276
+
13277
+ try {
13278
+ func.apply(context, funcArgs);
13279
+ } catch (error) {
13280
+ this.onError(error);
13281
+ }
13282
+ }
13283
+
13284
+ var invokeGuardedCallbackImpl = invokeGuardedCallbackProd;
13285
+
13286
+ {
13287
+ // In DEV mode, we swap out invokeGuardedCallback for a special version
13288
+ // that plays more nicely with the browser's DevTools. The idea is to preserve
13289
+ // "Pause on exceptions" behavior. Because React wraps all user-provided
13290
+ // functions in invokeGuardedCallback, and the production version of
13291
+ // invokeGuardedCallback uses a try-catch, all user exceptions are treated
13292
+ // like caught exceptions, and the DevTools won't pause unless the developer
13293
+ // takes the extra step of enabling pause on caught exceptions. This is
13294
+ // unintuitive, though, because even though React has caught the error, from
13295
+ // the developer's perspective, the error is uncaught.
13296
+ //
13297
+ // To preserve the expected "Pause on exceptions" behavior, we don't use a
13298
+ // try-catch in DEV. Instead, we synchronously dispatch a fake event to a fake
13299
+ // DOM node, and call the user-provided callback from inside an event handler
13300
+ // for that fake event. If the callback throws, the error is "captured" using
13301
+ // a global event handler. But because the error happens in a different
13302
+ // event loop context, it does not interrupt the normal program flow.
13303
+ // Effectively, this gives us try-catch behavior without actually using
13304
+ // try-catch. Neat!
13305
+ // Check that the browser supports the APIs we need to implement our special
13306
+ // DEV version of invokeGuardedCallback
13307
+ if (typeof window !== 'undefined' && typeof window.dispatchEvent === 'function' && typeof document !== 'undefined' && typeof document.createEvent === 'function') {
13308
+ var fakeNode = document.createElement('react');
13309
+
13310
+ invokeGuardedCallbackImpl = function invokeGuardedCallbackDev(name, func, context, a, b, c, d, e, f) {
13311
+ // If document doesn't exist we know for sure we will crash in this method
13312
+ // when we call document.createEvent(). However this can cause confusing
13313
+ // errors: https://github.com/facebookincubator/create-react-app/issues/3482
13314
+ // So we preemptively throw with a better message instead.
13315
+ if (!(typeof document !== 'undefined')) {
13316
+ {
13317
+ throw Error( "The `document` global was defined when React was initialized, but is not defined anymore. This can happen in a test environment if a component schedules an update from an asynchronous callback, but the test has already finished running. To solve this, you can either unmount the component at the end of your test (and ensure that any asynchronous operations get canceled in `componentWillUnmount`), or you can change the test itself to be asynchronous." );
13318
+ }
13319
+ }
13320
+
13321
+ var evt = document.createEvent('Event');
13322
+ var didCall = false; // Keeps track of whether the user-provided callback threw an error. We
13323
+ // set this to true at the beginning, then set it to false right after
13324
+ // calling the function. If the function errors, `didError` will never be
13325
+ // set to false. This strategy works even if the browser is flaky and
13326
+ // fails to call our global error handler, because it doesn't rely on
13327
+ // the error event at all.
13328
+
13329
+ var didError = true; // Keeps track of the value of window.event so that we can reset it
13330
+ // during the callback to let user code access window.event in the
13331
+ // browsers that support it.
13332
+
13333
+ var windowEvent = window.event; // Keeps track of the descriptor of window.event to restore it after event
13334
+ // dispatching: https://github.com/facebook/react/issues/13688
13335
+
13336
+ var windowEventDescriptor = Object.getOwnPropertyDescriptor(window, 'event');
13337
+
13338
+ function restoreAfterDispatch() {
13339
+ // We immediately remove the callback from event listeners so that
13340
+ // nested `invokeGuardedCallback` calls do not clash. Otherwise, a
13341
+ // nested call would trigger the fake event handlers of any call higher
13342
+ // in the stack.
13343
+ fakeNode.removeEventListener(evtType, callCallback, false); // We check for window.hasOwnProperty('event') to prevent the
13344
+ // window.event assignment in both IE <= 10 as they throw an error
13345
+ // "Member not found" in strict mode, and in Firefox which does not
13346
+ // support window.event.
13347
+
13348
+ if (typeof window.event !== 'undefined' && window.hasOwnProperty('event')) {
13349
+ window.event = windowEvent;
13350
+ }
13351
+ } // Create an event handler for our fake event. We will synchronously
13352
+ // dispatch our fake event using `dispatchEvent`. Inside the handler, we
13353
+ // call the user-provided callback.
13354
+
13355
+
13356
+ var funcArgs = Array.prototype.slice.call(arguments, 3);
13357
+
13358
+ function callCallback() {
13359
+ didCall = true;
13360
+ restoreAfterDispatch();
13361
+ func.apply(context, funcArgs);
13362
+ didError = false;
13363
+ } // Create a global error event handler. We use this to capture the value
13364
+ // that was thrown. It's possible that this error handler will fire more
13365
+ // than once; for example, if non-React code also calls `dispatchEvent`
13366
+ // and a handler for that event throws. We should be resilient to most of
13367
+ // those cases. Even if our error event handler fires more than once, the
13368
+ // last error event is always used. If the callback actually does error,
13369
+ // we know that the last error event is the correct one, because it's not
13370
+ // possible for anything else to have happened in between our callback
13371
+ // erroring and the code that follows the `dispatchEvent` call below. If
13372
+ // the callback doesn't error, but the error event was fired, we know to
13373
+ // ignore it because `didError` will be false, as described above.
13374
+
13375
+
13376
+ var error; // Use this to track whether the error event is ever called.
13377
+
13378
+ var didSetError = false;
13379
+ var isCrossOriginError = false;
13380
+
13381
+ function handleWindowError(event) {
13382
+ error = event.error;
13383
+ didSetError = true;
13384
+
13385
+ if (error === null && event.colno === 0 && event.lineno === 0) {
13386
+ isCrossOriginError = true;
13387
+ }
13388
+
13389
+ if (event.defaultPrevented) {
13390
+ // Some other error handler has prevented default.
13391
+ // Browsers silence the error report if this happens.
13392
+ // We'll remember this to later decide whether to log it or not.
13393
+ if (error != null && typeof error === 'object') {
13394
+ try {
13395
+ error._suppressLogging = true;
13396
+ } catch (inner) {// Ignore.
13397
+ }
13398
+ }
13399
+ }
13400
+ } // Create a fake event type.
13401
+
13402
+
13403
+ var evtType = "react-" + (name ? name : 'invokeguardedcallback'); // Attach our event handlers
13404
+
13405
+ window.addEventListener('error', handleWindowError);
13406
+ fakeNode.addEventListener(evtType, callCallback, false); // Synchronously dispatch our fake event. If the user-provided function
13407
+ // errors, it will trigger our global error handler.
13408
+
13409
+ evt.initEvent(evtType, false, false);
13410
+ fakeNode.dispatchEvent(evt);
13411
+
13412
+ if (windowEventDescriptor) {
13413
+ Object.defineProperty(window, 'event', windowEventDescriptor);
13414
+ }
13415
+
13416
+ if (didCall && didError) {
13417
+ if (!didSetError) {
13418
+ // The callback errored, but the error event never fired.
13419
+ error = new Error('An error was thrown inside one of your components, but React ' + "doesn't know what it was. This is likely due to browser " + 'flakiness. React does its best to preserve the "Pause on ' + 'exceptions" behavior of the DevTools, which requires some ' + "DEV-mode only tricks. It's possible that these don't work in " + 'your browser. Try triggering the error in production mode, ' + 'or switching to a modern browser. If you suspect that this is ' + 'actually an issue with React, please file an issue.');
13420
+ } else if (isCrossOriginError) {
13421
+ error = new Error("A cross-origin error was thrown. React doesn't have access to " + 'the actual error object in development. ' + 'See https://reactjs.org/link/crossorigin-error for more information.');
13422
+ }
13423
+
13424
+ this.onError(error);
13425
+ } // Remove our event listeners
13426
+
13427
+
13428
+ window.removeEventListener('error', handleWindowError);
13429
+
13430
+ if (!didCall) {
13431
+ // Something went really wrong, and our event was not dispatched.
13432
+ // https://github.com/facebook/react/issues/16734
13433
+ // https://github.com/facebook/react/issues/16585
13434
+ // Fall back to the production implementation.
13435
+ restoreAfterDispatch();
13436
+ return invokeGuardedCallbackProd.apply(this, arguments);
13437
+ }
13438
+ };
13439
+ }
13440
+ }
13441
+
13442
+ var invokeGuardedCallbackImpl$1 = invokeGuardedCallbackImpl;
13443
+
13444
+ var hasError = false;
13445
+ var caughtError = null; // Used by event system to capture/rethrow the first error.
13446
+
13447
+ var hasRethrowError = false;
13448
+ var rethrowError = null;
13449
+ var reporter = {
13450
+ onError: function (error) {
13451
+ hasError = true;
13452
+ caughtError = error;
13453
+ }
13454
+ };
13455
+ /**
13456
+ * Call a function while guarding against errors that happens within it.
13457
+ * Returns an error if it throws, otherwise null.
13458
+ *
13459
+ * In production, this is implemented using a try-catch. The reason we don't
13460
+ * use a try-catch directly is so that we can swap out a different
13461
+ * implementation in DEV mode.
13462
+ *
13463
+ * @param {String} name of the guard to use for logging or debugging
13464
+ * @param {Function} func The function to invoke
13465
+ * @param {*} context The context to use when calling the function
13466
+ * @param {...*} args Arguments for function
13467
+ */
13468
+
13469
+ function invokeGuardedCallback(name, func, context, a, b, c, d, e, f) {
13470
+ hasError = false;
13471
+ caughtError = null;
13472
+ invokeGuardedCallbackImpl$1.apply(reporter, arguments);
13473
+ }
13474
+ /**
13475
+ * Same as invokeGuardedCallback, but instead of returning an error, it stores
13476
+ * it in a global so it can be rethrown by `rethrowCaughtError` later.
13477
+ * TODO: See if caughtError and rethrowError can be unified.
13478
+ *
13479
+ * @param {String} name of the guard to use for logging or debugging
13480
+ * @param {Function} func The function to invoke
13481
+ * @param {*} context The context to use when calling the function
13482
+ * @param {...*} args Arguments for function
13483
+ */
13484
+
13485
+ function invokeGuardedCallbackAndCatchFirstError(name, func, context, a, b, c, d, e, f) {
13486
+ invokeGuardedCallback.apply(this, arguments);
13487
+
13488
+ if (hasError) {
13489
+ var error = clearCaughtError();
13490
+
13491
+ if (!hasRethrowError) {
13492
+ hasRethrowError = true;
13493
+ rethrowError = error;
13494
+ }
13495
+ }
13496
+ }
13497
+ /**
13498
+ * During execution of guarded functions we will capture the first error which
13499
+ * we will rethrow to be handled by the top level error handler.
13500
+ */
13501
+
13502
+ function rethrowCaughtError() {
13503
+ if (hasRethrowError) {
13504
+ var error = rethrowError;
13505
+ hasRethrowError = false;
13506
+ rethrowError = null;
13507
+ throw error;
13508
+ }
13509
+ }
13510
+ function hasCaughtError() {
13511
+ return hasError;
13512
+ }
13513
+ function clearCaughtError() {
13514
+ if (hasError) {
13515
+ var error = caughtError;
13516
+ hasError = false;
13517
+ caughtError = null;
13518
+ return error;
13519
+ } else {
13520
+ {
13521
+ {
13522
+ throw Error( "clearCaughtError was called but no error was captured. This error is likely caused by a bug in React. Please file an issue." );
13523
+ }
13524
+ }
13525
+ }
13526
+ }
13527
+
13528
+ /**
13529
+ * `ReactInstanceMap` maintains a mapping from a public facing stateful
13530
+ * instance (key) and the internal representation (value). This allows public
13531
+ * methods to accept the user facing instance as an argument and map them back
13532
+ * to internal methods.
13533
+ *
13534
+ * Note that this module is currently shared and assumed to be stateless.
13535
+ * If this becomes an actual Map, that will break.
13536
+ */
13537
+ function get(key) {
13538
+ return key._reactInternals;
13539
+ }
13540
+ function has(key) {
13541
+ return key._reactInternals !== undefined;
13542
+ }
13543
+ function set(key, value) {
13544
+ key._reactInternals = value;
13545
+ }
13546
+
13547
+ // Don't change these two values. They're used by React Dev Tools.
13548
+ var NoFlags =
13549
+ /* */
13550
+ 0;
13551
+ var PerformedWork =
13552
+ /* */
13553
+ 1; // You can change the rest (and add more).
13554
+
13555
+ var Placement =
13556
+ /* */
13557
+ 2;
13558
+ var Update =
13559
+ /* */
13560
+ 4;
13561
+ var PlacementAndUpdate =
13562
+ /* */
13563
+ 6;
13564
+ var Deletion =
13565
+ /* */
13566
+ 8;
13567
+ var ContentReset =
13568
+ /* */
13569
+ 16;
13570
+ var Callback =
13571
+ /* */
13572
+ 32;
13573
+ var DidCapture =
13574
+ /* */
13575
+ 64;
13576
+ var Ref =
13577
+ /* */
13578
+ 128;
13579
+ var Snapshot =
13580
+ /* */
13581
+ 256;
13582
+ var Passive =
13583
+ /* */
13584
+ 512; // TODO (effects) Remove this bit once the new reconciler is synced to the old.
13585
+
13586
+ var PassiveUnmountPendingDev =
13587
+ /* */
13588
+ 8192;
13589
+ var Hydrating =
13590
+ /* */
13591
+ 1024;
13592
+ var HydratingAndUpdate =
13593
+ /* */
13594
+ 1028; // Passive & Update & Callback & Ref & Snapshot
13595
+
13596
+ var LifecycleEffectMask =
13597
+ /* */
13598
+ 932; // Union of all host effects
13599
+
13600
+ var HostEffectMask =
13601
+ /* */
13602
+ 2047; // These are not really side effects, but we still reuse this field.
13603
+
13604
+ var Incomplete =
13605
+ /* */
13606
+ 2048;
13607
+ var ShouldCapture =
13608
+ /* */
13609
+ 4096;
13610
+ var ForceUpdateForLegacySuspense =
13611
+ /* */
13612
+ 16384; // Static tags describe aspects of a fiber that are not specific to a render,
13613
+
13614
+ var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
13615
+ function getNearestMountedFiber(fiber) {
13616
+ var node = fiber;
13617
+ var nearestMounted = fiber;
13618
+
13619
+ if (!fiber.alternate) {
13620
+ // If there is no alternate, this might be a new tree that isn't inserted
13621
+ // yet. If it is, then it will have a pending insertion effect on it.
13622
+ var nextNode = node;
13623
+
13624
+ do {
13625
+ node = nextNode;
13626
+
13627
+ if ((node.flags & (Placement | Hydrating)) !== NoFlags) {
13628
+ // This is an insertion or in-progress hydration. The nearest possible
13629
+ // mounted fiber is the parent but we need to continue to figure out
13630
+ // if that one is still mounted.
13631
+ nearestMounted = node.return;
13632
+ }
13633
+
13634
+ nextNode = node.return;
13635
+ } while (nextNode);
13636
+ } else {
13637
+ while (node.return) {
13638
+ node = node.return;
13639
+ }
13640
+ }
13641
+
13642
+ if (node.tag === HostRoot) {
13643
+ // TODO: Check if this was a nested HostRoot when used with
13644
+ // renderContainerIntoSubtree.
13645
+ return nearestMounted;
13646
+ } // If we didn't hit the root, that means that we're in an disconnected tree
13647
+ // that has been unmounted.
13648
+
13649
+
13650
+ return null;
13651
+ }
13652
+ function getSuspenseInstanceFromFiber(fiber) {
13653
+ if (fiber.tag === SuspenseComponent) {
13654
+ var suspenseState = fiber.memoizedState;
13655
+
13656
+ if (suspenseState === null) {
13657
+ var current = fiber.alternate;
13658
+
13659
+ if (current !== null) {
13660
+ suspenseState = current.memoizedState;
13661
+ }
13662
+ }
13663
+
13664
+ if (suspenseState !== null) {
13665
+ return suspenseState.dehydrated;
13666
+ }
13667
+ }
13668
+
13669
+ return null;
13670
+ }
13671
+ function getContainerFromFiber(fiber) {
13672
+ return fiber.tag === HostRoot ? fiber.stateNode.containerInfo : null;
13673
+ }
13674
+ function isFiberMounted(fiber) {
13675
+ return getNearestMountedFiber(fiber) === fiber;
13676
+ }
13677
+ function isMounted(component) {
13678
+ {
13679
+ var owner = ReactCurrentOwner.current;
13680
+
13681
+ if (owner !== null && owner.tag === ClassComponent) {
13682
+ var ownerFiber = owner;
13683
+ var instance = ownerFiber.stateNode;
13684
+
13685
+ if (!instance._warnedAboutRefsInRender) {
13686
+ error('%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.', getComponentName(ownerFiber.type) || 'A component');
13687
+ }
13688
+
13689
+ instance._warnedAboutRefsInRender = true;
13690
+ }
13691
+ }
13692
+
13693
+ var fiber = get(component);
13694
+
13695
+ if (!fiber) {
13696
+ return false;
13697
+ }
13698
+
13699
+ return getNearestMountedFiber(fiber) === fiber;
13700
+ }
13701
+
13702
+ function assertIsMounted(fiber) {
13703
+ if (!(getNearestMountedFiber(fiber) === fiber)) {
13704
+ {
13705
+ throw Error( "Unable to find node on an unmounted component." );
13706
+ }
13707
+ }
13708
+ }
13709
+
13710
+ function findCurrentFiberUsingSlowPath(fiber) {
13711
+ var alternate = fiber.alternate;
13712
+
13713
+ if (!alternate) {
13714
+ // If there is no alternate, then we only need to check if it is mounted.
13715
+ var nearestMounted = getNearestMountedFiber(fiber);
13716
+
13717
+ if (!(nearestMounted !== null)) {
13718
+ {
13719
+ throw Error( "Unable to find node on an unmounted component." );
13720
+ }
13721
+ }
13722
+
13723
+ if (nearestMounted !== fiber) {
13724
+ return null;
13725
+ }
13726
+
13727
+ return fiber;
13728
+ } // If we have two possible branches, we'll walk backwards up to the root
13729
+ // to see what path the root points to. On the way we may hit one of the
13730
+ // special cases and we'll deal with them.
13731
+
13732
+
13733
+ var a = fiber;
13734
+ var b = alternate;
13735
+
13736
+ while (true) {
13737
+ var parentA = a.return;
13738
+
13739
+ if (parentA === null) {
13740
+ // We're at the root.
13741
+ break;
13742
+ }
13743
+
13744
+ var parentB = parentA.alternate;
13745
+
13746
+ if (parentB === null) {
13747
+ // There is no alternate. This is an unusual case. Currently, it only
13748
+ // happens when a Suspense component is hidden. An extra fragment fiber
13749
+ // is inserted in between the Suspense fiber and its children. Skip
13750
+ // over this extra fragment fiber and proceed to the next parent.
13751
+ var nextParent = parentA.return;
13752
+
13753
+ if (nextParent !== null) {
13754
+ a = b = nextParent;
13755
+ continue;
13756
+ } // If there's no parent, we're at the root.
13757
+
13758
+
13759
+ break;
13760
+ } // If both copies of the parent fiber point to the same child, we can
13761
+ // assume that the child is current. This happens when we bailout on low
13762
+ // priority: the bailed out fiber's child reuses the current child.
13763
+
13764
+
13765
+ if (parentA.child === parentB.child) {
13766
+ var child = parentA.child;
13767
+
13768
+ while (child) {
13769
+ if (child === a) {
13770
+ // We've determined that A is the current branch.
13771
+ assertIsMounted(parentA);
13772
+ return fiber;
13773
+ }
13774
+
13775
+ if (child === b) {
13776
+ // We've determined that B is the current branch.
13777
+ assertIsMounted(parentA);
13778
+ return alternate;
13779
+ }
13780
+
13781
+ child = child.sibling;
13782
+ } // We should never have an alternate for any mounting node. So the only
13783
+ // way this could possibly happen is if this was unmounted, if at all.
13784
+
13785
+
13786
+ {
13787
+ {
13788
+ throw Error( "Unable to find node on an unmounted component." );
13789
+ }
13790
+ }
13791
+ }
13792
+
13793
+ if (a.return !== b.return) {
13794
+ // The return pointer of A and the return pointer of B point to different
13795
+ // fibers. We assume that return pointers never criss-cross, so A must
13796
+ // belong to the child set of A.return, and B must belong to the child
13797
+ // set of B.return.
13798
+ a = parentA;
13799
+ b = parentB;
13800
+ } else {
13801
+ // The return pointers point to the same fiber. We'll have to use the
13802
+ // default, slow path: scan the child sets of each parent alternate to see
13803
+ // which child belongs to which set.
13804
+ //
13805
+ // Search parent A's child set
13806
+ var didFindChild = false;
13807
+ var _child = parentA.child;
13808
+
13809
+ while (_child) {
13810
+ if (_child === a) {
13811
+ didFindChild = true;
13812
+ a = parentA;
13813
+ b = parentB;
13814
+ break;
13815
+ }
13816
+
13817
+ if (_child === b) {
13818
+ didFindChild = true;
13819
+ b = parentA;
13820
+ a = parentB;
13821
+ break;
13822
+ }
13823
+
13824
+ _child = _child.sibling;
13825
+ }
13826
+
13827
+ if (!didFindChild) {
13828
+ // Search parent B's child set
13829
+ _child = parentB.child;
13830
+
13831
+ while (_child) {
13832
+ if (_child === a) {
13833
+ didFindChild = true;
13834
+ a = parentB;
13835
+ b = parentA;
13836
+ break;
13837
+ }
13838
+
13839
+ if (_child === b) {
13840
+ didFindChild = true;
13841
+ b = parentB;
13842
+ a = parentA;
13843
+ break;
13844
+ }
13845
+
13846
+ _child = _child.sibling;
13847
+ }
13848
+
13849
+ if (!didFindChild) {
13850
+ {
13851
+ throw Error( "Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue." );
13852
+ }
13853
+ }
13854
+ }
13855
+ }
13856
+
13857
+ if (!(a.alternate === b)) {
13858
+ {
13859
+ throw Error( "Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue." );
13860
+ }
13861
+ }
13862
+ } // If the root is not a host container, we're in a disconnected tree. I.e.
13863
+ // unmounted.
13864
+
13865
+
13866
+ if (!(a.tag === HostRoot)) {
13867
+ {
13868
+ throw Error( "Unable to find node on an unmounted component." );
13869
+ }
13870
+ }
13871
+
13872
+ if (a.stateNode.current === a) {
13873
+ // We've determined that A is the current branch.
13874
+ return fiber;
13875
+ } // Otherwise B has to be current branch.
13876
+
13877
+
13878
+ return alternate;
13879
+ }
13880
+ function findCurrentHostFiber(parent) {
13881
+ var currentParent = findCurrentFiberUsingSlowPath(parent);
13882
+
13883
+ if (!currentParent) {
13884
+ return null;
13885
+ } // Next we'll drill down this component to find the first HostComponent/Text.
13886
+
13887
+
13888
+ var node = currentParent;
13889
+
13890
+ while (true) {
13891
+ if (node.tag === HostComponent || node.tag === HostText) {
13892
+ return node;
13893
+ } else if (node.child) {
13894
+ node.child.return = node;
13895
+ node = node.child;
13896
+ continue;
13897
+ }
13898
+
13899
+ if (node === currentParent) {
13900
+ return null;
13901
+ }
13902
+
13903
+ while (!node.sibling) {
13904
+ if (!node.return || node.return === currentParent) {
13905
+ return null;
13906
+ }
13907
+
13908
+ node = node.return;
13909
+ }
13910
+
13911
+ node.sibling.return = node.return;
13912
+ node = node.sibling;
13913
+ } // Flow needs the return null here, but ESLint complains about it.
13914
+ // eslint-disable-next-line no-unreachable
13915
+
13916
+
13917
+ return null;
13918
+ }
13919
+ function findCurrentHostFiberWithNoPortals(parent) {
13920
+ var currentParent = findCurrentFiberUsingSlowPath(parent);
13921
+
13922
+ if (!currentParent) {
13923
+ return null;
13924
+ } // Next we'll drill down this component to find the first HostComponent/Text.
13925
+
13926
+
13927
+ var node = currentParent;
13928
+
13929
+ while (true) {
13930
+ if (node.tag === HostComponent || node.tag === HostText || enableFundamentalAPI ) {
13931
+ return node;
13932
+ } else if (node.child && node.tag !== HostPortal) {
13933
+ node.child.return = node;
13934
+ node = node.child;
13935
+ continue;
13936
+ }
13937
+
13938
+ if (node === currentParent) {
13939
+ return null;
13940
+ }
13941
+
13942
+ while (!node.sibling) {
13943
+ if (!node.return || node.return === currentParent) {
13944
+ return null;
13945
+ }
13946
+
13947
+ node = node.return;
13948
+ }
13949
+
13950
+ node.sibling.return = node.return;
13951
+ node = node.sibling;
13952
+ } // Flow needs the return null here, but ESLint complains about it.
13953
+ // eslint-disable-next-line no-unreachable
13954
+
13955
+
13956
+ return null;
13957
+ }
13958
+ function doesFiberContain(parentFiber, childFiber) {
13959
+ var node = childFiber;
13960
+ var parentFiberAlternate = parentFiber.alternate;
13961
+
13962
+ while (node !== null) {
13963
+ if (node === parentFiber || node === parentFiberAlternate) {
13964
+ return true;
13965
+ }
13966
+
13967
+ node = node.return;
13968
+ }
13969
+
13970
+ return false;
13971
+ }
13972
+
13973
+ var attemptUserBlockingHydration;
13974
+ function setAttemptUserBlockingHydration(fn) {
13975
+ attemptUserBlockingHydration = fn;
13976
+ }
13977
+ var attemptContinuousHydration;
13978
+ function setAttemptContinuousHydration(fn) {
13979
+ attemptContinuousHydration = fn;
13980
+ }
13981
+ var attemptHydrationAtCurrentPriority;
13982
+ function setAttemptHydrationAtCurrentPriority(fn) {
13983
+ attemptHydrationAtCurrentPriority = fn;
13984
+ }
13985
+ var attemptHydrationAtPriority;
13986
+ function setAttemptHydrationAtPriority(fn) {
13987
+ attemptHydrationAtPriority = fn;
13988
+ } // TODO: Upgrade this definition once we're on a newer version of Flow that
13989
+ var hasScheduledReplayAttempt = false; // The queue of discrete events to be replayed.
13990
+
13991
+ var queuedDiscreteEvents = []; // Indicates if any continuous event targets are non-null for early bailout.
13992
+ // if the last target was dehydrated.
13993
+
13994
+ var queuedFocus = null;
13995
+ var queuedDrag = null;
13996
+ var queuedMouse = null; // For pointer events there can be one latest event per pointerId.
13997
+
13998
+ var queuedPointers = new Map();
13999
+ var queuedPointerCaptures = new Map(); // We could consider replaying selectionchange and touchmoves too.
14000
+
14001
+ var queuedExplicitHydrationTargets = [];
14002
+ function hasQueuedDiscreteEvents() {
14003
+ return queuedDiscreteEvents.length > 0;
14004
+ }
14005
+ var discreteReplayableEvents = ['mousedown', 'mouseup', 'touchcancel', 'touchend', 'touchstart', 'auxclick', 'dblclick', 'pointercancel', 'pointerdown', 'pointerup', 'dragend', 'dragstart', 'drop', 'compositionend', 'compositionstart', 'keydown', 'keypress', 'keyup', 'input', 'textInput', // Intentionally camelCase
14006
+ 'copy', 'cut', 'paste', 'click', 'change', 'contextmenu', 'reset', 'submit'];
14007
+ function isReplayableDiscreteEvent(eventType) {
14008
+ return discreteReplayableEvents.indexOf(eventType) > -1;
14009
+ }
14010
+
14011
+ function createQueuedReplayableEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent) {
14012
+ return {
14013
+ blockedOn: blockedOn,
14014
+ domEventName: domEventName,
14015
+ eventSystemFlags: eventSystemFlags | IS_REPLAYED,
14016
+ nativeEvent: nativeEvent,
14017
+ targetContainers: [targetContainer]
14018
+ };
14019
+ }
14020
+
14021
+ function queueDiscreteEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent) {
14022
+ var queuedEvent = createQueuedReplayableEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent);
14023
+ queuedDiscreteEvents.push(queuedEvent);
14024
+ } // Resets the replaying for this type of continuous event to no event.
14025
+
14026
+ function clearIfContinuousEvent(domEventName, nativeEvent) {
14027
+ switch (domEventName) {
14028
+ case 'focusin':
14029
+ case 'focusout':
14030
+ queuedFocus = null;
14031
+ break;
14032
+
14033
+ case 'dragenter':
14034
+ case 'dragleave':
14035
+ queuedDrag = null;
14036
+ break;
14037
+
14038
+ case 'mouseover':
14039
+ case 'mouseout':
14040
+ queuedMouse = null;
14041
+ break;
14042
+
14043
+ case 'pointerover':
14044
+ case 'pointerout':
14045
+ {
14046
+ var pointerId = nativeEvent.pointerId;
14047
+ queuedPointers.delete(pointerId);
14048
+ break;
14049
+ }
14050
+
14051
+ case 'gotpointercapture':
14052
+ case 'lostpointercapture':
14053
+ {
14054
+ var _pointerId = nativeEvent.pointerId;
14055
+ queuedPointerCaptures.delete(_pointerId);
14056
+ break;
14057
+ }
14058
+ }
14059
+ }
14060
+
14061
+ function accumulateOrCreateContinuousQueuedReplayableEvent(existingQueuedEvent, blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent) {
14062
+ if (existingQueuedEvent === null || existingQueuedEvent.nativeEvent !== nativeEvent) {
14063
+ var queuedEvent = createQueuedReplayableEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent);
14064
+
14065
+ if (blockedOn !== null) {
14066
+ var _fiber2 = getInstanceFromNode(blockedOn);
14067
+
14068
+ if (_fiber2 !== null) {
14069
+ // Attempt to increase the priority of this target.
14070
+ attemptContinuousHydration(_fiber2);
14071
+ }
14072
+ }
14073
+
14074
+ return queuedEvent;
14075
+ } // If we have already queued this exact event, then it's because
14076
+ // the different event systems have different DOM event listeners.
14077
+ // We can accumulate the flags, and the targetContainers, and
14078
+ // store a single event to be replayed.
14079
+
14080
+
14081
+ existingQueuedEvent.eventSystemFlags |= eventSystemFlags;
14082
+ var targetContainers = existingQueuedEvent.targetContainers;
14083
+
14084
+ if (targetContainer !== null && targetContainers.indexOf(targetContainer) === -1) {
14085
+ targetContainers.push(targetContainer);
14086
+ }
14087
+
14088
+ return existingQueuedEvent;
14089
+ }
14090
+
14091
+ function queueIfContinuousEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent) {
14092
+ // These set relatedTarget to null because the replayed event will be treated as if we
14093
+ // moved from outside the window (no target) onto the target once it hydrates.
14094
+ // Instead of mutating we could clone the event.
14095
+ switch (domEventName) {
14096
+ case 'focusin':
14097
+ {
14098
+ var focusEvent = nativeEvent;
14099
+ queuedFocus = accumulateOrCreateContinuousQueuedReplayableEvent(queuedFocus, blockedOn, domEventName, eventSystemFlags, targetContainer, focusEvent);
14100
+ return true;
14101
+ }
14102
+
14103
+ case 'dragenter':
14104
+ {
14105
+ var dragEvent = nativeEvent;
14106
+ queuedDrag = accumulateOrCreateContinuousQueuedReplayableEvent(queuedDrag, blockedOn, domEventName, eventSystemFlags, targetContainer, dragEvent);
14107
+ return true;
14108
+ }
14109
+
14110
+ case 'mouseover':
14111
+ {
14112
+ var mouseEvent = nativeEvent;
14113
+ queuedMouse = accumulateOrCreateContinuousQueuedReplayableEvent(queuedMouse, blockedOn, domEventName, eventSystemFlags, targetContainer, mouseEvent);
14114
+ return true;
14115
+ }
14116
+
14117
+ case 'pointerover':
14118
+ {
14119
+ var pointerEvent = nativeEvent;
14120
+ var pointerId = pointerEvent.pointerId;
14121
+ queuedPointers.set(pointerId, accumulateOrCreateContinuousQueuedReplayableEvent(queuedPointers.get(pointerId) || null, blockedOn, domEventName, eventSystemFlags, targetContainer, pointerEvent));
14122
+ return true;
14123
+ }
14124
+
14125
+ case 'gotpointercapture':
14126
+ {
14127
+ var _pointerEvent = nativeEvent;
14128
+ var _pointerId2 = _pointerEvent.pointerId;
14129
+ queuedPointerCaptures.set(_pointerId2, accumulateOrCreateContinuousQueuedReplayableEvent(queuedPointerCaptures.get(_pointerId2) || null, blockedOn, domEventName, eventSystemFlags, targetContainer, _pointerEvent));
14130
+ return true;
14131
+ }
14132
+ }
14133
+
14134
+ return false;
14135
+ } // Check if this target is unblocked. Returns true if it's unblocked.
14136
+
14137
+ function attemptExplicitHydrationTarget(queuedTarget) {
14138
+ // TODO: This function shares a lot of logic with attemptToDispatchEvent.
14139
+ // Try to unify them. It's a bit tricky since it would require two return
14140
+ // values.
14141
+ var targetInst = getClosestInstanceFromNode(queuedTarget.target);
14142
+
14143
+ if (targetInst !== null) {
14144
+ var nearestMounted = getNearestMountedFiber(targetInst);
14145
+
14146
+ if (nearestMounted !== null) {
14147
+ var tag = nearestMounted.tag;
14148
+
14149
+ if (tag === SuspenseComponent) {
14150
+ var instance = getSuspenseInstanceFromFiber(nearestMounted);
14151
+
14152
+ if (instance !== null) {
14153
+ // We're blocked on hydrating this boundary.
14154
+ // Increase its priority.
14155
+ queuedTarget.blockedOn = instance;
14156
+ attemptHydrationAtPriority(queuedTarget.lanePriority, function () {
14157
+ Scheduler.unstable_runWithPriority(queuedTarget.priority, function () {
14158
+ attemptHydrationAtCurrentPriority(nearestMounted);
14159
+ });
14160
+ });
14161
+ return;
14162
+ }
14163
+ } else if (tag === HostRoot) {
14164
+ var root = nearestMounted.stateNode;
14165
+
14166
+ if (root.hydrate) {
14167
+ queuedTarget.blockedOn = getContainerFromFiber(nearestMounted); // We don't currently have a way to increase the priority of
14168
+ // a root other than sync.
14169
+
14170
+ return;
14171
+ }
14172
+ }
14173
+ }
14174
+ }
14175
+
14176
+ queuedTarget.blockedOn = null;
14177
+ }
14178
+
14179
+ function attemptReplayContinuousQueuedEvent(queuedEvent) {
14180
+ if (queuedEvent.blockedOn !== null) {
14181
+ return false;
14182
+ }
14183
+
14184
+ var targetContainers = queuedEvent.targetContainers;
14185
+
14186
+ while (targetContainers.length > 0) {
14187
+ var targetContainer = targetContainers[0];
14188
+ var nextBlockedOn = attemptToDispatchEvent(queuedEvent.domEventName, queuedEvent.eventSystemFlags, targetContainer, queuedEvent.nativeEvent);
14189
+
14190
+ if (nextBlockedOn !== null) {
14191
+ // We're still blocked. Try again later.
14192
+ var _fiber3 = getInstanceFromNode(nextBlockedOn);
14193
+
14194
+ if (_fiber3 !== null) {
14195
+ attemptContinuousHydration(_fiber3);
14196
+ }
14197
+
14198
+ queuedEvent.blockedOn = nextBlockedOn;
14199
+ return false;
14200
+ } // This target container was successfully dispatched. Try the next.
14201
+
14202
+
14203
+ targetContainers.shift();
14204
+ }
14205
+
14206
+ return true;
14207
+ }
14208
+
14209
+ function attemptReplayContinuousQueuedEventInMap(queuedEvent, key, map) {
14210
+ if (attemptReplayContinuousQueuedEvent(queuedEvent)) {
14211
+ map.delete(key);
14212
+ }
14213
+ }
14214
+
14215
+ function replayUnblockedEvents() {
14216
+ hasScheduledReplayAttempt = false; // First replay discrete events.
14217
+
14218
+ while (queuedDiscreteEvents.length > 0) {
14219
+ var nextDiscreteEvent = queuedDiscreteEvents[0];
14220
+
14221
+ if (nextDiscreteEvent.blockedOn !== null) {
14222
+ // We're still blocked.
14223
+ // Increase the priority of this boundary to unblock
14224
+ // the next discrete event.
14225
+ var _fiber4 = getInstanceFromNode(nextDiscreteEvent.blockedOn);
14226
+
14227
+ if (_fiber4 !== null) {
14228
+ attemptUserBlockingHydration(_fiber4);
14229
+ }
14230
+
14231
+ break;
14232
+ }
14233
+
14234
+ var targetContainers = nextDiscreteEvent.targetContainers;
14235
+
14236
+ while (targetContainers.length > 0) {
14237
+ var targetContainer = targetContainers[0];
14238
+ var nextBlockedOn = attemptToDispatchEvent(nextDiscreteEvent.domEventName, nextDiscreteEvent.eventSystemFlags, targetContainer, nextDiscreteEvent.nativeEvent);
14239
+
14240
+ if (nextBlockedOn !== null) {
14241
+ // We're still blocked. Try again later.
14242
+ nextDiscreteEvent.blockedOn = nextBlockedOn;
14243
+ break;
14244
+ } // This target container was successfully dispatched. Try the next.
14245
+
14246
+
14247
+ targetContainers.shift();
14248
+ }
14249
+
14250
+ if (nextDiscreteEvent.blockedOn === null) {
14251
+ // We've successfully replayed the first event. Let's try the next one.
14252
+ queuedDiscreteEvents.shift();
14253
+ }
14254
+ } // Next replay any continuous events.
14255
+
14256
+
14257
+ if (queuedFocus !== null && attemptReplayContinuousQueuedEvent(queuedFocus)) {
14258
+ queuedFocus = null;
14259
+ }
14260
+
14261
+ if (queuedDrag !== null && attemptReplayContinuousQueuedEvent(queuedDrag)) {
14262
+ queuedDrag = null;
14263
+ }
14264
+
14265
+ if (queuedMouse !== null && attemptReplayContinuousQueuedEvent(queuedMouse)) {
14266
+ queuedMouse = null;
14267
+ }
14268
+
14269
+ queuedPointers.forEach(attemptReplayContinuousQueuedEventInMap);
14270
+ queuedPointerCaptures.forEach(attemptReplayContinuousQueuedEventInMap);
14271
+ }
14272
+
14273
+ function scheduleCallbackIfUnblocked(queuedEvent, unblocked) {
14274
+ if (queuedEvent.blockedOn === unblocked) {
14275
+ queuedEvent.blockedOn = null;
14276
+
14277
+ if (!hasScheduledReplayAttempt) {
14278
+ hasScheduledReplayAttempt = true; // Schedule a callback to attempt replaying as many events as are
14279
+ // now unblocked. This first might not actually be unblocked yet.
14280
+ // We could check it early to avoid scheduling an unnecessary callback.
14281
+
14282
+ Scheduler.unstable_scheduleCallback(Scheduler.unstable_NormalPriority, replayUnblockedEvents);
14283
+ }
14284
+ }
14285
+ }
14286
+
14287
+ function retryIfBlockedOn(unblocked) {
14288
+ // Mark anything that was blocked on this as no longer blocked
14289
+ // and eligible for a replay.
14290
+ if (queuedDiscreteEvents.length > 0) {
14291
+ scheduleCallbackIfUnblocked(queuedDiscreteEvents[0], unblocked); // This is a exponential search for each boundary that commits. I think it's
14292
+ // worth it because we expect very few discrete events to queue up and once
14293
+ // we are actually fully unblocked it will be fast to replay them.
14294
+
14295
+ for (var i = 1; i < queuedDiscreteEvents.length; i++) {
14296
+ var queuedEvent = queuedDiscreteEvents[i];
14297
+
14298
+ if (queuedEvent.blockedOn === unblocked) {
14299
+ queuedEvent.blockedOn = null;
14300
+ }
14301
+ }
14302
+ }
14303
+
14304
+ if (queuedFocus !== null) {
14305
+ scheduleCallbackIfUnblocked(queuedFocus, unblocked);
14306
+ }
14307
+
14308
+ if (queuedDrag !== null) {
14309
+ scheduleCallbackIfUnblocked(queuedDrag, unblocked);
14310
+ }
14311
+
14312
+ if (queuedMouse !== null) {
14313
+ scheduleCallbackIfUnblocked(queuedMouse, unblocked);
14314
+ }
14315
+
14316
+ var unblock = function (queuedEvent) {
14317
+ return scheduleCallbackIfUnblocked(queuedEvent, unblocked);
14318
+ };
14319
+
14320
+ queuedPointers.forEach(unblock);
14321
+ queuedPointerCaptures.forEach(unblock);
14322
+
14323
+ for (var _i = 0; _i < queuedExplicitHydrationTargets.length; _i++) {
14324
+ var queuedTarget = queuedExplicitHydrationTargets[_i];
14325
+
14326
+ if (queuedTarget.blockedOn === unblocked) {
14327
+ queuedTarget.blockedOn = null;
14328
+ }
14329
+ }
14330
+
14331
+ while (queuedExplicitHydrationTargets.length > 0) {
14332
+ var nextExplicitTarget = queuedExplicitHydrationTargets[0];
14333
+
14334
+ if (nextExplicitTarget.blockedOn !== null) {
14335
+ // We're still blocked.
14336
+ break;
14337
+ } else {
14338
+ attemptExplicitHydrationTarget(nextExplicitTarget);
14339
+
14340
+ if (nextExplicitTarget.blockedOn === null) {
14341
+ // We're unblocked.
14342
+ queuedExplicitHydrationTargets.shift();
14343
+ }
14344
+ }
14345
+ }
14346
+ }
14347
+
14348
+ var DiscreteEvent = 0;
14349
+ var UserBlockingEvent = 1;
14350
+ var ContinuousEvent = 2;
14351
+
14352
+ /**
14353
+ * Generate a mapping of standard vendor prefixes using the defined style property and event name.
14354
+ *
14355
+ * @param {string} styleProp
14356
+ * @param {string} eventName
14357
+ * @returns {object}
14358
+ */
14359
+
14360
+ function makePrefixMap(styleProp, eventName) {
14361
+ var prefixes = {};
14362
+ prefixes[styleProp.toLowerCase()] = eventName.toLowerCase();
14363
+ prefixes['Webkit' + styleProp] = 'webkit' + eventName;
14364
+ prefixes['Moz' + styleProp] = 'moz' + eventName;
14365
+ return prefixes;
14366
+ }
14367
+ /**
14368
+ * A list of event names to a configurable list of vendor prefixes.
14369
+ */
14370
+
14371
+
14372
+ var vendorPrefixes = {
14373
+ animationend: makePrefixMap('Animation', 'AnimationEnd'),
14374
+ animationiteration: makePrefixMap('Animation', 'AnimationIteration'),
14375
+ animationstart: makePrefixMap('Animation', 'AnimationStart'),
14376
+ transitionend: makePrefixMap('Transition', 'TransitionEnd')
14377
+ };
14378
+ /**
14379
+ * Event names that have already been detected and prefixed (if applicable).
14380
+ */
14381
+
14382
+ var prefixedEventNames = {};
14383
+ /**
14384
+ * Element to check for prefixes on.
14385
+ */
14386
+
14387
+ var style = {};
14388
+ /**
14389
+ * Bootstrap if a DOM exists.
14390
+ */
14391
+
14392
+ if (canUseDOM) {
14393
+ style = document.createElement('div').style; // On some platforms, in particular some releases of Android 4.x,
14394
+ // the un-prefixed "animation" and "transition" properties are defined on the
14395
+ // style object but the events that fire will still be prefixed, so we need
14396
+ // to check if the un-prefixed events are usable, and if not remove them from the map.
14397
+
14398
+ if (!('AnimationEvent' in window)) {
14399
+ delete vendorPrefixes.animationend.animation;
14400
+ delete vendorPrefixes.animationiteration.animation;
14401
+ delete vendorPrefixes.animationstart.animation;
14402
+ } // Same as above
14403
+
14404
+
14405
+ if (!('TransitionEvent' in window)) {
14406
+ delete vendorPrefixes.transitionend.transition;
14407
+ }
14408
+ }
14409
+ /**
14410
+ * Attempts to determine the correct vendor prefixed event name.
14411
+ *
14412
+ * @param {string} eventName
14413
+ * @returns {string}
14414
+ */
14415
+
14416
+
14417
+ function getVendorPrefixedEventName(eventName) {
14418
+ if (prefixedEventNames[eventName]) {
14419
+ return prefixedEventNames[eventName];
14420
+ } else if (!vendorPrefixes[eventName]) {
14421
+ return eventName;
14422
+ }
14423
+
14424
+ var prefixMap = vendorPrefixes[eventName];
14425
+
14426
+ for (var styleProp in prefixMap) {
14427
+ if (prefixMap.hasOwnProperty(styleProp) && styleProp in style) {
14428
+ return prefixedEventNames[eventName] = prefixMap[styleProp];
14429
+ }
14430
+ }
14431
+
14432
+ return eventName;
14433
+ }
14434
+
14435
+ var ANIMATION_END = getVendorPrefixedEventName('animationend');
14436
+ var ANIMATION_ITERATION = getVendorPrefixedEventName('animationiteration');
14437
+ var ANIMATION_START = getVendorPrefixedEventName('animationstart');
14438
+ var TRANSITION_END = getVendorPrefixedEventName('transitionend');
14439
+
14440
+ var topLevelEventsToReactNames = new Map();
14441
+ var eventPriorities = new Map(); // We store most of the events in this module in pairs of two strings so we can re-use
14442
+ // the code required to apply the same logic for event prioritization and that of the
14443
+ // SimpleEventPlugin. This complicates things slightly, but the aim is to reduce code
14444
+ // duplication (for which there would be quite a bit). For the events that are not needed
14445
+ // for the SimpleEventPlugin (otherDiscreteEvents) we process them separately as an
14446
+ // array of top level events.
14447
+ // Lastly, we ignore prettier so we can keep the formatting sane.
14448
+ // prettier-ignore
14449
+
14450
+ var discreteEventPairsForSimpleEventPlugin = ['cancel', 'cancel', 'click', 'click', 'close', 'close', 'contextmenu', 'contextMenu', 'copy', 'copy', 'cut', 'cut', 'auxclick', 'auxClick', 'dblclick', 'doubleClick', // Careful!
14451
+ 'dragend', 'dragEnd', 'dragstart', 'dragStart', 'drop', 'drop', 'focusin', 'focus', // Careful!
14452
+ 'focusout', 'blur', // Careful!
14453
+ 'input', 'input', 'invalid', 'invalid', 'keydown', 'keyDown', 'keypress', 'keyPress', 'keyup', 'keyUp', 'mousedown', 'mouseDown', 'mouseup', 'mouseUp', 'paste', 'paste', 'pause', 'pause', 'play', 'play', 'pointercancel', 'pointerCancel', 'pointerdown', 'pointerDown', 'pointerup', 'pointerUp', 'ratechange', 'rateChange', 'reset', 'reset', 'seeked', 'seeked', 'submit', 'submit', 'touchcancel', 'touchCancel', 'touchend', 'touchEnd', 'touchstart', 'touchStart', 'volumechange', 'volumeChange'];
14454
+ var otherDiscreteEvents = ['change', 'selectionchange', 'textInput', 'compositionstart', 'compositionend', 'compositionupdate'];
14455
+
14456
+
14457
+ var userBlockingPairsForSimpleEventPlugin = ['drag', 'drag', 'dragenter', 'dragEnter', 'dragexit', 'dragExit', 'dragleave', 'dragLeave', 'dragover', 'dragOver', 'mousemove', 'mouseMove', 'mouseout', 'mouseOut', 'mouseover', 'mouseOver', 'pointermove', 'pointerMove', 'pointerout', 'pointerOut', 'pointerover', 'pointerOver', 'scroll', 'scroll', 'toggle', 'toggle', 'touchmove', 'touchMove', 'wheel', 'wheel']; // prettier-ignore
14458
+
14459
+ var continuousPairsForSimpleEventPlugin = ['abort', 'abort', ANIMATION_END, 'animationEnd', ANIMATION_ITERATION, 'animationIteration', ANIMATION_START, 'animationStart', 'canplay', 'canPlay', 'canplaythrough', 'canPlayThrough', 'durationchange', 'durationChange', 'emptied', 'emptied', 'encrypted', 'encrypted', 'ended', 'ended', 'error', 'error', 'gotpointercapture', 'gotPointerCapture', 'load', 'load', 'loadeddata', 'loadedData', 'loadedmetadata', 'loadedMetadata', 'loadstart', 'loadStart', 'lostpointercapture', 'lostPointerCapture', 'playing', 'playing', 'progress', 'progress', 'seeking', 'seeking', 'stalled', 'stalled', 'suspend', 'suspend', 'timeupdate', 'timeUpdate', TRANSITION_END, 'transitionEnd', 'waiting', 'waiting'];
14460
+ /**
14461
+ * Turns
14462
+ * ['abort', ...]
14463
+ *
14464
+ * into
14465
+ *
14466
+ * topLevelEventsToReactNames = new Map([
14467
+ * ['abort', 'onAbort'],
14468
+ * ]);
14469
+ *
14470
+ * and registers them.
14471
+ */
14472
+
14473
+ function registerSimplePluginEventsAndSetTheirPriorities(eventTypes, priority) {
14474
+ // As the event types are in pairs of two, we need to iterate
14475
+ // through in twos. The events are in pairs of two to save code
14476
+ // and improve init perf of processing this array, as it will
14477
+ // result in far fewer object allocations and property accesses
14478
+ // if we only use three arrays to process all the categories of
14479
+ // instead of tuples.
14480
+ for (var i = 0; i < eventTypes.length; i += 2) {
14481
+ var topEvent = eventTypes[i];
14482
+ var event = eventTypes[i + 1];
14483
+ var capitalizedEvent = event[0].toUpperCase() + event.slice(1);
14484
+ var reactName = 'on' + capitalizedEvent;
14485
+ eventPriorities.set(topEvent, priority);
14486
+ topLevelEventsToReactNames.set(topEvent, reactName);
14487
+ registerTwoPhaseEvent(reactName, [topEvent]);
14488
+ }
14489
+ }
14490
+
14491
+ function setEventPriorities(eventTypes, priority) {
14492
+ for (var i = 0; i < eventTypes.length; i++) {
14493
+ eventPriorities.set(eventTypes[i], priority);
14494
+ }
14495
+ }
14496
+
14497
+ function getEventPriorityForPluginSystem(domEventName) {
14498
+ var priority = eventPriorities.get(domEventName); // Default to a ContinuousEvent. Note: we might
14499
+ // want to warn if we can't detect the priority
14500
+ // for the event.
14501
+
14502
+ return priority === undefined ? ContinuousEvent : priority;
14503
+ }
14504
+ function registerSimpleEvents() {
14505
+ registerSimplePluginEventsAndSetTheirPriorities(discreteEventPairsForSimpleEventPlugin, DiscreteEvent);
14506
+ registerSimplePluginEventsAndSetTheirPriorities(userBlockingPairsForSimpleEventPlugin, UserBlockingEvent);
14507
+ registerSimplePluginEventsAndSetTheirPriorities(continuousPairsForSimpleEventPlugin, ContinuousEvent);
14508
+ setEventPriorities(otherDiscreteEvents, DiscreteEvent);
14509
+ }
14510
+
14511
+ var Scheduler_now = Scheduler.unstable_now;
14512
+
14513
+ {
14514
+ // Provide explicit error message when production+profiling bundle of e.g.
14515
+ // react-dom is used with production (non-profiling) bundle of
14516
+ // scheduler/tracing
14517
+ if (!(tracing.__interactionsRef != null && tracing.__interactionsRef.current != null)) {
14518
+ {
14519
+ throw Error( "It is not supported to run the profiling version of a renderer (for example, `react-dom/profiling`) without also replacing the `scheduler/tracing` module with `scheduler/tracing-profiling`. Your bundler might have a setting for aliasing both modules. Learn more at https://reactjs.org/link/profiling" );
14520
+ }
14521
+ }
14522
+ }
14523
+ // ascending numbers so we can compare them like numbers. They start at 90 to
14524
+ // avoid clashing with Scheduler's priorities.
14525
+
14526
+ var ImmediatePriority = 99;
14527
+ var UserBlockingPriority = 98;
14528
+ var NormalPriority = 97;
14529
+ var LowPriority = 96;
14530
+ var IdlePriority = 95; // NoPriority is the absence of priority. Also React-only.
14531
+
14532
+ var NoPriority = 90;
14533
+ var initialTimeMs = Scheduler_now(); // If the initial timestamp is reasonably small, use Scheduler's `now` directly.
14534
+
14535
+ var SyncLanePriority = 15;
14536
+ var SyncBatchedLanePriority = 14;
14537
+ var InputDiscreteHydrationLanePriority = 13;
14538
+ var InputDiscreteLanePriority = 12;
14539
+ var InputContinuousHydrationLanePriority = 11;
14540
+ var InputContinuousLanePriority = 10;
14541
+ var DefaultHydrationLanePriority = 9;
14542
+ var DefaultLanePriority = 8;
14543
+ var TransitionHydrationPriority = 7;
14544
+ var TransitionPriority = 6;
14545
+ var RetryLanePriority = 5;
14546
+ var SelectiveHydrationLanePriority = 4;
14547
+ var IdleHydrationLanePriority = 3;
14548
+ var IdleLanePriority = 2;
14549
+ var OffscreenLanePriority = 1;
14550
+ var NoLanePriority = 0;
14551
+ var TotalLanes = 31;
14552
+ var NoLanes =
14553
+ /* */
14554
+ 0;
14555
+ var NoLane =
14556
+ /* */
14557
+ 0;
14558
+ var SyncLane =
14559
+ /* */
14560
+ 1;
14561
+ var SyncBatchedLane =
14562
+ /* */
14563
+ 2;
14564
+ var InputDiscreteHydrationLane =
14565
+ /* */
14566
+ 4;
14567
+ var InputDiscreteLanes =
14568
+ /* */
14569
+ 24;
14570
+ var InputContinuousHydrationLane =
14571
+ /* */
14572
+ 32;
14573
+ var InputContinuousLanes =
14574
+ /* */
14575
+ 192;
14576
+ var DefaultHydrationLane =
14577
+ /* */
14578
+ 256;
14579
+ var DefaultLanes =
14580
+ /* */
14581
+ 3584;
14582
+ var TransitionHydrationLane =
14583
+ /* */
14584
+ 4096;
14585
+ var TransitionLanes =
14586
+ /* */
14587
+ 4186112;
14588
+ var RetryLanes =
14589
+ /* */
14590
+ 62914560;
14591
+ var SomeRetryLane =
14592
+ /* */
14593
+ 33554432;
14594
+ var SelectiveHydrationLane =
14595
+ /* */
14596
+ 67108864;
14597
+ var NonIdleLanes =
14598
+ /* */
14599
+ 134217727;
14600
+ var IdleHydrationLane =
14601
+ /* */
14602
+ 134217728;
14603
+ var IdleLanes =
14604
+ /* */
14605
+ 805306368;
14606
+ var OffscreenLane =
14607
+ /* */
14608
+ 1073741824;
14609
+ var NoTimestamp = -1;
14610
+ function setCurrentUpdateLanePriority(newLanePriority) {
14611
+ } // "Registers" used to "return" multiple values
14612
+ // Used by getHighestPriorityLanes and getNextLanes:
14613
+
14614
+ var return_highestLanePriority = DefaultLanePriority;
14615
+
14616
+ function getHighestPriorityLanes(lanes) {
14617
+ if ((SyncLane & lanes) !== NoLanes) {
14618
+ return_highestLanePriority = SyncLanePriority;
14619
+ return SyncLane;
14620
+ }
14621
+
14622
+ if ((SyncBatchedLane & lanes) !== NoLanes) {
14623
+ return_highestLanePriority = SyncBatchedLanePriority;
14624
+ return SyncBatchedLane;
14625
+ }
14626
+
14627
+ if ((InputDiscreteHydrationLane & lanes) !== NoLanes) {
14628
+ return_highestLanePriority = InputDiscreteHydrationLanePriority;
14629
+ return InputDiscreteHydrationLane;
14630
+ }
14631
+
14632
+ var inputDiscreteLanes = InputDiscreteLanes & lanes;
14633
+
14634
+ if (inputDiscreteLanes !== NoLanes) {
14635
+ return_highestLanePriority = InputDiscreteLanePriority;
14636
+ return inputDiscreteLanes;
14637
+ }
14638
+
14639
+ if ((lanes & InputContinuousHydrationLane) !== NoLanes) {
14640
+ return_highestLanePriority = InputContinuousHydrationLanePriority;
14641
+ return InputContinuousHydrationLane;
14642
+ }
14643
+
14644
+ var inputContinuousLanes = InputContinuousLanes & lanes;
14645
+
14646
+ if (inputContinuousLanes !== NoLanes) {
14647
+ return_highestLanePriority = InputContinuousLanePriority;
14648
+ return inputContinuousLanes;
14649
+ }
14650
+
14651
+ if ((lanes & DefaultHydrationLane) !== NoLanes) {
14652
+ return_highestLanePriority = DefaultHydrationLanePriority;
14653
+ return DefaultHydrationLane;
14654
+ }
14655
+
14656
+ var defaultLanes = DefaultLanes & lanes;
14657
+
14658
+ if (defaultLanes !== NoLanes) {
14659
+ return_highestLanePriority = DefaultLanePriority;
14660
+ return defaultLanes;
14661
+ }
14662
+
14663
+ if ((lanes & TransitionHydrationLane) !== NoLanes) {
14664
+ return_highestLanePriority = TransitionHydrationPriority;
14665
+ return TransitionHydrationLane;
14666
+ }
14667
+
14668
+ var transitionLanes = TransitionLanes & lanes;
14669
+
14670
+ if (transitionLanes !== NoLanes) {
14671
+ return_highestLanePriority = TransitionPriority;
14672
+ return transitionLanes;
14673
+ }
14674
+
14675
+ var retryLanes = RetryLanes & lanes;
14676
+
14677
+ if (retryLanes !== NoLanes) {
14678
+ return_highestLanePriority = RetryLanePriority;
14679
+ return retryLanes;
14680
+ }
14681
+
14682
+ if (lanes & SelectiveHydrationLane) {
14683
+ return_highestLanePriority = SelectiveHydrationLanePriority;
14684
+ return SelectiveHydrationLane;
14685
+ }
14686
+
14687
+ if ((lanes & IdleHydrationLane) !== NoLanes) {
14688
+ return_highestLanePriority = IdleHydrationLanePriority;
14689
+ return IdleHydrationLane;
14690
+ }
14691
+
14692
+ var idleLanes = IdleLanes & lanes;
14693
+
14694
+ if (idleLanes !== NoLanes) {
14695
+ return_highestLanePriority = IdleLanePriority;
14696
+ return idleLanes;
14697
+ }
14698
+
14699
+ if ((OffscreenLane & lanes) !== NoLanes) {
14700
+ return_highestLanePriority = OffscreenLanePriority;
14701
+ return OffscreenLane;
14702
+ }
14703
+
14704
+ {
14705
+ error('Should have found matching lanes. This is a bug in React.');
14706
+ } // This shouldn't be reachable, but as a fallback, return the entire bitmask.
14707
+
14708
+
14709
+ return_highestLanePriority = DefaultLanePriority;
14710
+ return lanes;
14711
+ }
14712
+
14713
+ function schedulerPriorityToLanePriority(schedulerPriorityLevel) {
14714
+ switch (schedulerPriorityLevel) {
14715
+ case ImmediatePriority:
14716
+ return SyncLanePriority;
14717
+
14718
+ case UserBlockingPriority:
14719
+ return InputContinuousLanePriority;
14720
+
14721
+ case NormalPriority:
14722
+ case LowPriority:
14723
+ // TODO: Handle LowSchedulerPriority, somehow. Maybe the same lane as hydration.
14724
+ return DefaultLanePriority;
14725
+
14726
+ case IdlePriority:
14727
+ return IdleLanePriority;
14728
+
14729
+ default:
14730
+ return NoLanePriority;
14731
+ }
14732
+ }
14733
+ function lanePriorityToSchedulerPriority(lanePriority) {
14734
+ switch (lanePriority) {
14735
+ case SyncLanePriority:
14736
+ case SyncBatchedLanePriority:
14737
+ return ImmediatePriority;
14738
+
14739
+ case InputDiscreteHydrationLanePriority:
14740
+ case InputDiscreteLanePriority:
14741
+ case InputContinuousHydrationLanePriority:
14742
+ case InputContinuousLanePriority:
14743
+ return UserBlockingPriority;
14744
+
14745
+ case DefaultHydrationLanePriority:
14746
+ case DefaultLanePriority:
14747
+ case TransitionHydrationPriority:
14748
+ case TransitionPriority:
14749
+ case SelectiveHydrationLanePriority:
14750
+ case RetryLanePriority:
14751
+ return NormalPriority;
14752
+
14753
+ case IdleHydrationLanePriority:
14754
+ case IdleLanePriority:
14755
+ case OffscreenLanePriority:
14756
+ return IdlePriority;
14757
+
14758
+ case NoLanePriority:
14759
+ return NoPriority;
14760
+
14761
+ default:
14762
+ {
14763
+ {
14764
+ throw Error( "Invalid update priority: " + lanePriority + ". This is a bug in React." );
14765
+ }
14766
+ }
14767
+
14768
+ }
14769
+ }
14770
+ function getNextLanes(root, wipLanes) {
14771
+ // Early bailout if there's no pending work left.
14772
+ var pendingLanes = root.pendingLanes;
14773
+
14774
+ if (pendingLanes === NoLanes) {
14775
+ return_highestLanePriority = NoLanePriority;
14776
+ return NoLanes;
14777
+ }
14778
+
14779
+ var nextLanes = NoLanes;
14780
+ var nextLanePriority = NoLanePriority;
14781
+ var expiredLanes = root.expiredLanes;
14782
+ var suspendedLanes = root.suspendedLanes;
14783
+ var pingedLanes = root.pingedLanes; // Check if any work has expired.
14784
+
14785
+ if (expiredLanes !== NoLanes) {
14786
+ nextLanes = expiredLanes;
14787
+ nextLanePriority = return_highestLanePriority = SyncLanePriority;
14788
+ } else {
14789
+ // Do not work on any idle work until all the non-idle work has finished,
14790
+ // even if the work is suspended.
14791
+ var nonIdlePendingLanes = pendingLanes & NonIdleLanes;
14792
+
14793
+ if (nonIdlePendingLanes !== NoLanes) {
14794
+ var nonIdleUnblockedLanes = nonIdlePendingLanes & ~suspendedLanes;
14795
+
14796
+ if (nonIdleUnblockedLanes !== NoLanes) {
14797
+ nextLanes = getHighestPriorityLanes(nonIdleUnblockedLanes);
14798
+ nextLanePriority = return_highestLanePriority;
14799
+ } else {
14800
+ var nonIdlePingedLanes = nonIdlePendingLanes & pingedLanes;
14801
+
14802
+ if (nonIdlePingedLanes !== NoLanes) {
14803
+ nextLanes = getHighestPriorityLanes(nonIdlePingedLanes);
14804
+ nextLanePriority = return_highestLanePriority;
14805
+ }
14806
+ }
14807
+ } else {
14808
+ // The only remaining work is Idle.
14809
+ var unblockedLanes = pendingLanes & ~suspendedLanes;
14810
+
14811
+ if (unblockedLanes !== NoLanes) {
14812
+ nextLanes = getHighestPriorityLanes(unblockedLanes);
14813
+ nextLanePriority = return_highestLanePriority;
14814
+ } else {
14815
+ if (pingedLanes !== NoLanes) {
14816
+ nextLanes = getHighestPriorityLanes(pingedLanes);
14817
+ nextLanePriority = return_highestLanePriority;
14818
+ }
14819
+ }
14820
+ }
14821
+ }
14822
+
14823
+ if (nextLanes === NoLanes) {
14824
+ // This should only be reachable if we're suspended
14825
+ // TODO: Consider warning in this path if a fallback timer is not scheduled.
14826
+ return NoLanes;
14827
+ } // If there are higher priority lanes, we'll include them even if they
14828
+ // are suspended.
14829
+
14830
+
14831
+ nextLanes = pendingLanes & getEqualOrHigherPriorityLanes(nextLanes); // If we're already in the middle of a render, switching lanes will interrupt
14832
+ // it and we'll lose our progress. We should only do this if the new lanes are
14833
+ // higher priority.
14834
+
14835
+ if (wipLanes !== NoLanes && wipLanes !== nextLanes && // If we already suspended with a delay, then interrupting is fine. Don't
14836
+ // bother waiting until the root is complete.
14837
+ (wipLanes & suspendedLanes) === NoLanes) {
14838
+ getHighestPriorityLanes(wipLanes);
14839
+ var wipLanePriority = return_highestLanePriority;
14840
+
14841
+ if (nextLanePriority <= wipLanePriority) {
14842
+ return wipLanes;
14843
+ } else {
14844
+ return_highestLanePriority = nextLanePriority;
14845
+ }
14846
+ } // Check for entangled lanes and add them to the batch.
14847
+ //
14848
+ // A lane is said to be entangled with another when it's not allowed to render
14849
+ // in a batch that does not also include the other lane. Typically we do this
14850
+ // when multiple updates have the same source, and we only want to respond to
14851
+ // the most recent event from that source.
14852
+ //
14853
+ // Note that we apply entanglements *after* checking for partial work above.
14854
+ // This means that if a lane is entangled during an interleaved event while
14855
+ // it's already rendering, we won't interrupt it. This is intentional, since
14856
+ // entanglement is usually "best effort": we'll try our best to render the
14857
+ // lanes in the same batch, but it's not worth throwing out partially
14858
+ // completed work in order to do it.
14859
+ //
14860
+ // For those exceptions where entanglement is semantically important, like
14861
+ // useMutableSource, we should ensure that there is no partial work at the
14862
+ // time we apply the entanglement.
14863
+
14864
+
14865
+ var entangledLanes = root.entangledLanes;
14866
+
14867
+ if (entangledLanes !== NoLanes) {
14868
+ var entanglements = root.entanglements;
14869
+ var lanes = nextLanes & entangledLanes;
14870
+
14871
+ while (lanes > 0) {
14872
+ var index = pickArbitraryLaneIndex(lanes);
14873
+ var lane = 1 << index;
14874
+ nextLanes |= entanglements[index];
14875
+ lanes &= ~lane;
14876
+ }
14877
+ }
14878
+
14879
+ return nextLanes;
14880
+ }
14881
+ function getMostRecentEventTime(root, lanes) {
14882
+ var eventTimes = root.eventTimes;
14883
+ var mostRecentEventTime = NoTimestamp;
14884
+
14885
+ while (lanes > 0) {
14886
+ var index = pickArbitraryLaneIndex(lanes);
14887
+ var lane = 1 << index;
14888
+ var eventTime = eventTimes[index];
14889
+
14890
+ if (eventTime > mostRecentEventTime) {
14891
+ mostRecentEventTime = eventTime;
14892
+ }
14893
+
14894
+ lanes &= ~lane;
14895
+ }
14896
+
14897
+ return mostRecentEventTime;
14898
+ }
14899
+
14900
+ function computeExpirationTime(lane, currentTime) {
14901
+ // TODO: Expiration heuristic is constant per lane, so could use a map.
14902
+ getHighestPriorityLanes(lane);
14903
+ var priority = return_highestLanePriority;
14904
+
14905
+ if (priority >= InputContinuousLanePriority) {
14906
+ // User interactions should expire slightly more quickly.
14907
+ //
14908
+ // NOTE: This is set to the corresponding constant as in Scheduler.js. When
14909
+ // we made it larger, a product metric in www regressed, suggesting there's
14910
+ // a user interaction that's being starved by a series of synchronous
14911
+ // updates. If that theory is correct, the proper solution is to fix the
14912
+ // starvation. However, this scenario supports the idea that expiration
14913
+ // times are an important safeguard when starvation does happen.
14914
+ //
14915
+ // Also note that, in the case of user input specifically, this will soon no
14916
+ // longer be an issue because we plan to make user input synchronous by
14917
+ // default (until you enter `startTransition`, of course.)
14918
+ //
14919
+ // If weren't planning to make these updates synchronous soon anyway, I
14920
+ // would probably make this number a configurable parameter.
14921
+ return currentTime + 250;
14922
+ } else if (priority >= TransitionPriority) {
14923
+ return currentTime + 5000;
14924
+ } else {
14925
+ // Anything idle priority or lower should never expire.
14926
+ return NoTimestamp;
14927
+ }
14928
+ }
14929
+
14930
+ function markStarvedLanesAsExpired(root, currentTime) {
14931
+ // TODO: This gets called every time we yield. We can optimize by storing
14932
+ // the earliest expiration time on the root. Then use that to quickly bail out
14933
+ // of this function.
14934
+ var pendingLanes = root.pendingLanes;
14935
+ var suspendedLanes = root.suspendedLanes;
14936
+ var pingedLanes = root.pingedLanes;
14937
+ var expirationTimes = root.expirationTimes; // Iterate through the pending lanes and check if we've reached their
14938
+ // expiration time. If so, we'll assume the update is being starved and mark
14939
+ // it as expired to force it to finish.
14940
+
14941
+ var lanes = pendingLanes;
14942
+
14943
+ while (lanes > 0) {
14944
+ var index = pickArbitraryLaneIndex(lanes);
14945
+ var lane = 1 << index;
14946
+ var expirationTime = expirationTimes[index];
14947
+
14948
+ if (expirationTime === NoTimestamp) {
14949
+ // Found a pending lane with no expiration time. If it's not suspended, or
14950
+ // if it's pinged, assume it's CPU-bound. Compute a new expiration time
14951
+ // using the current time.
14952
+ if ((lane & suspendedLanes) === NoLanes || (lane & pingedLanes) !== NoLanes) {
14953
+ // Assumes timestamps are monotonically increasing.
14954
+ expirationTimes[index] = computeExpirationTime(lane, currentTime);
14955
+ }
14956
+ } else if (expirationTime <= currentTime) {
14957
+ // This lane expired
14958
+ root.expiredLanes |= lane;
14959
+ }
14960
+
14961
+ lanes &= ~lane;
14962
+ }
14963
+ } // This returns the highest priority pending lanes regardless of whether they
14964
+ function getLanesToRetrySynchronouslyOnError(root) {
14965
+ var everythingButOffscreen = root.pendingLanes & ~OffscreenLane;
14966
+
14967
+ if (everythingButOffscreen !== NoLanes) {
14968
+ return everythingButOffscreen;
14969
+ }
14970
+
14971
+ if (everythingButOffscreen & OffscreenLane) {
14972
+ return OffscreenLane;
14973
+ }
14974
+
14975
+ return NoLanes;
14976
+ }
14977
+ function returnNextLanesPriority() {
14978
+ return return_highestLanePriority;
14979
+ }
14980
+ function includesNonIdleWork(lanes) {
14981
+ return (lanes & NonIdleLanes) !== NoLanes;
14982
+ }
14983
+ function includesOnlyRetries(lanes) {
14984
+ return (lanes & RetryLanes) === lanes;
14985
+ }
14986
+ function includesOnlyTransitions(lanes) {
14987
+ return (lanes & TransitionLanes) === lanes;
14988
+ } // To ensure consistency across multiple updates in the same event, this should
14989
+ // be a pure function, so that it always returns the same lane for given inputs.
14990
+
14991
+ function findUpdateLane(lanePriority, wipLanes) {
14992
+ switch (lanePriority) {
14993
+ case NoLanePriority:
14994
+ break;
14995
+
14996
+ case SyncLanePriority:
14997
+ return SyncLane;
14998
+
14999
+ case SyncBatchedLanePriority:
15000
+ return SyncBatchedLane;
15001
+
15002
+ case InputDiscreteLanePriority:
15003
+ {
15004
+ var _lane = pickArbitraryLane(InputDiscreteLanes & ~wipLanes);
15005
+
15006
+ if (_lane === NoLane) {
15007
+ // Shift to the next priority level
15008
+ return findUpdateLane(InputContinuousLanePriority, wipLanes);
15009
+ }
15010
+
15011
+ return _lane;
15012
+ }
15013
+
15014
+ case InputContinuousLanePriority:
15015
+ {
15016
+ var _lane2 = pickArbitraryLane(InputContinuousLanes & ~wipLanes);
15017
+
15018
+ if (_lane2 === NoLane) {
15019
+ // Shift to the next priority level
15020
+ return findUpdateLane(DefaultLanePriority, wipLanes);
15021
+ }
15022
+
15023
+ return _lane2;
15024
+ }
15025
+
15026
+ case DefaultLanePriority:
15027
+ {
15028
+ var _lane3 = pickArbitraryLane(DefaultLanes & ~wipLanes);
15029
+
15030
+ if (_lane3 === NoLane) {
15031
+ // If all the default lanes are already being worked on, look for a
15032
+ // lane in the transition range.
15033
+ _lane3 = pickArbitraryLane(TransitionLanes & ~wipLanes);
15034
+
15035
+ if (_lane3 === NoLane) {
15036
+ // All the transition lanes are taken, too. This should be very
15037
+ // rare, but as a last resort, pick a default lane. This will have
15038
+ // the effect of interrupting the current work-in-progress render.
15039
+ _lane3 = pickArbitraryLane(DefaultLanes);
15040
+ }
15041
+ }
15042
+
15043
+ return _lane3;
15044
+ }
15045
+
15046
+ case TransitionPriority: // Should be handled by findTransitionLane instead
15047
+
15048
+ case RetryLanePriority:
15049
+ // Should be handled by findRetryLane instead
15050
+ break;
15051
+
15052
+ case IdleLanePriority:
15053
+ var lane = pickArbitraryLane(IdleLanes & ~wipLanes);
15054
+
15055
+ if (lane === NoLane) {
15056
+ lane = pickArbitraryLane(IdleLanes);
15057
+ }
15058
+
15059
+ return lane;
15060
+ }
15061
+
15062
+ {
15063
+ {
15064
+ throw Error( "Invalid update priority: " + lanePriority + ". This is a bug in React." );
15065
+ }
15066
+ }
15067
+ } // To ensure consistency across multiple updates in the same event, this should
15068
+ // be pure function, so that it always returns the same lane for given inputs.
15069
+
15070
+ function findTransitionLane(wipLanes, pendingLanes) {
15071
+ // First look for lanes that are completely unclaimed, i.e. have no
15072
+ // pending work.
15073
+ var lane = pickArbitraryLane(TransitionLanes & ~pendingLanes);
15074
+
15075
+ if (lane === NoLane) {
15076
+ // If all lanes have pending work, look for a lane that isn't currently
15077
+ // being worked on.
15078
+ lane = pickArbitraryLane(TransitionLanes & ~wipLanes);
15079
+
15080
+ if (lane === NoLane) {
15081
+ // If everything is being worked on, pick any lane. This has the
15082
+ // effect of interrupting the current work-in-progress.
15083
+ lane = pickArbitraryLane(TransitionLanes);
15084
+ }
15085
+ }
15086
+
15087
+ return lane;
15088
+ } // To ensure consistency across multiple updates in the same event, this should
15089
+ // be pure function, so that it always returns the same lane for given inputs.
15090
+
15091
+ function findRetryLane(wipLanes) {
15092
+ // This is a fork of `findUpdateLane` designed specifically for Suspense
15093
+ // "retries" — a special update that attempts to flip a Suspense boundary
15094
+ // from its placeholder state to its primary/resolved state.
15095
+ var lane = pickArbitraryLane(RetryLanes & ~wipLanes);
15096
+
15097
+ if (lane === NoLane) {
15098
+ lane = pickArbitraryLane(RetryLanes);
15099
+ }
15100
+
15101
+ return lane;
15102
+ }
15103
+
15104
+ function getHighestPriorityLane(lanes) {
15105
+ return lanes & -lanes;
15106
+ }
15107
+
15108
+ function getLowestPriorityLane(lanes) {
15109
+ // This finds the most significant non-zero bit.
15110
+ var index = 31 - clz32(lanes);
15111
+ return index < 0 ? NoLanes : 1 << index;
15112
+ }
15113
+
15114
+ function getEqualOrHigherPriorityLanes(lanes) {
15115
+ return (getLowestPriorityLane(lanes) << 1) - 1;
15116
+ }
15117
+
15118
+ function pickArbitraryLane(lanes) {
15119
+ // This wrapper function gets inlined. Only exists so to communicate that it
15120
+ // doesn't matter which bit is selected; you can pick any bit without
15121
+ // affecting the algorithms where its used. Here I'm using
15122
+ // getHighestPriorityLane because it requires the fewest operations.
15123
+ return getHighestPriorityLane(lanes);
15124
+ }
15125
+
15126
+ function pickArbitraryLaneIndex(lanes) {
15127
+ return 31 - clz32(lanes);
15128
+ }
15129
+
15130
+ function laneToIndex(lane) {
15131
+ return pickArbitraryLaneIndex(lane);
15132
+ }
15133
+
15134
+ function includesSomeLane(a, b) {
15135
+ return (a & b) !== NoLanes;
15136
+ }
15137
+ function isSubsetOfLanes(set, subset) {
15138
+ return (set & subset) === subset;
15139
+ }
15140
+ function mergeLanes(a, b) {
15141
+ return a | b;
15142
+ }
15143
+ function removeLanes(set, subset) {
15144
+ return set & ~subset;
15145
+ } // Seems redundant, but it changes the type from a single lane (used for
15146
+ // updates) to a group of lanes (used for flushing work).
15147
+
15148
+ function laneToLanes(lane) {
15149
+ return lane;
15150
+ }
15151
+ function higherPriorityLane(a, b) {
15152
+ // This works because the bit ranges decrease in priority as you go left.
15153
+ return a !== NoLane && a < b ? a : b;
15154
+ }
15155
+ function createLaneMap(initial) {
15156
+ // Intentionally pushing one by one.
15157
+ // https://v8.dev/blog/elements-kinds#avoid-creating-holes
15158
+ var laneMap = [];
15159
+
15160
+ for (var i = 0; i < TotalLanes; i++) {
15161
+ laneMap.push(initial);
15162
+ }
15163
+
15164
+ return laneMap;
15165
+ }
15166
+ function markRootUpdated(root, updateLane, eventTime) {
15167
+ root.pendingLanes |= updateLane; // TODO: Theoretically, any update to any lane can unblock any other lane. But
15168
+ // it's not practical to try every single possible combination. We need a
15169
+ // heuristic to decide which lanes to attempt to render, and in which batches.
15170
+ // For now, we use the same heuristic as in the old ExpirationTimes model:
15171
+ // retry any lane at equal or lower priority, but don't try updates at higher
15172
+ // priority without also including the lower priority updates. This works well
15173
+ // when considering updates across different priority levels, but isn't
15174
+ // sufficient for updates within the same priority, since we want to treat
15175
+ // those updates as parallel.
15176
+ // Unsuspend any update at equal or lower priority.
15177
+
15178
+ var higherPriorityLanes = updateLane - 1; // Turns 0b1000 into 0b0111
15179
+
15180
+ root.suspendedLanes &= higherPriorityLanes;
15181
+ root.pingedLanes &= higherPriorityLanes;
15182
+ var eventTimes = root.eventTimes;
15183
+ var index = laneToIndex(updateLane); // We can always overwrite an existing timestamp because we prefer the most
15184
+ // recent event, and we assume time is monotonically increasing.
15185
+
15186
+ eventTimes[index] = eventTime;
15187
+ }
15188
+ function markRootSuspended(root, suspendedLanes) {
15189
+ root.suspendedLanes |= suspendedLanes;
15190
+ root.pingedLanes &= ~suspendedLanes; // The suspended lanes are no longer CPU-bound. Clear their expiration times.
15191
+
15192
+ var expirationTimes = root.expirationTimes;
15193
+ var lanes = suspendedLanes;
15194
+
15195
+ while (lanes > 0) {
15196
+ var index = pickArbitraryLaneIndex(lanes);
15197
+ var lane = 1 << index;
15198
+ expirationTimes[index] = NoTimestamp;
15199
+ lanes &= ~lane;
15200
+ }
15201
+ }
15202
+ function markRootPinged(root, pingedLanes, eventTime) {
15203
+ root.pingedLanes |= root.suspendedLanes & pingedLanes;
15204
+ }
15205
+ function markDiscreteUpdatesExpired(root) {
15206
+ root.expiredLanes |= InputDiscreteLanes & root.pendingLanes;
15207
+ }
15208
+ function hasDiscreteLanes(lanes) {
15209
+ return (lanes & InputDiscreteLanes) !== NoLanes;
15210
+ }
15211
+ function markRootMutableRead(root, updateLane) {
15212
+ root.mutableReadLanes |= updateLane & root.pendingLanes;
15213
+ }
15214
+ function markRootFinished(root, remainingLanes) {
15215
+ var noLongerPendingLanes = root.pendingLanes & ~remainingLanes;
15216
+ root.pendingLanes = remainingLanes; // Let's try everything again
15217
+
15218
+ root.suspendedLanes = 0;
15219
+ root.pingedLanes = 0;
15220
+ root.expiredLanes &= remainingLanes;
15221
+ root.mutableReadLanes &= remainingLanes;
15222
+ root.entangledLanes &= remainingLanes;
15223
+ var entanglements = root.entanglements;
15224
+ var eventTimes = root.eventTimes;
15225
+ var expirationTimes = root.expirationTimes; // Clear the lanes that no longer have pending work
15226
+
15227
+ var lanes = noLongerPendingLanes;
15228
+
15229
+ while (lanes > 0) {
15230
+ var index = pickArbitraryLaneIndex(lanes);
15231
+ var lane = 1 << index;
15232
+ entanglements[index] = NoLanes;
15233
+ eventTimes[index] = NoTimestamp;
15234
+ expirationTimes[index] = NoTimestamp;
15235
+ lanes &= ~lane;
15236
+ }
15237
+ }
15238
+ function markRootEntangled(root, entangledLanes) {
15239
+ root.entangledLanes |= entangledLanes;
15240
+ var entanglements = root.entanglements;
15241
+ var lanes = entangledLanes;
15242
+
15243
+ while (lanes > 0) {
15244
+ var index = pickArbitraryLaneIndex(lanes);
15245
+ var lane = 1 << index;
15246
+ entanglements[index] |= entangledLanes;
15247
+ lanes &= ~lane;
15248
+ }
15249
+ }
15250
+ var clz32 = Math.clz32 ? Math.clz32 : clz32Fallback; // Count leading zeros. Only used on lanes, so assume input is an integer.
15251
+ // Based on:
15252
+ // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/clz32
15253
+
15254
+ var log = Math.log;
15255
+ var LN2 = Math.LN2;
15256
+
15257
+ function clz32Fallback(lanes) {
15258
+ if (lanes === 0) {
15259
+ return 32;
15260
+ }
15261
+
15262
+ return 31 - (log(lanes) / LN2 | 0) | 0;
15263
+ }
15264
+
15265
+ // Intentionally not named imports because Rollup would use dynamic dispatch for
15266
+ var UserBlockingPriority$1 = Scheduler.unstable_UserBlockingPriority,
15267
+ runWithPriority = Scheduler.unstable_runWithPriority; // TODO: can we stop exporting these?
15268
+
15269
+ var _enabled = true; // This is exported in FB builds for use by legacy FB layer infra.
15270
+ // We'd like to remove this but it's not clear if this is safe.
15271
+
15272
+ function setEnabled(enabled) {
15273
+ _enabled = !!enabled;
15274
+ }
15275
+ function isEnabled() {
15276
+ return _enabled;
15277
+ }
15278
+ function createEventListenerWrapperWithPriority(targetContainer, domEventName, eventSystemFlags) {
15279
+ var eventPriority = getEventPriorityForPluginSystem(domEventName);
15280
+ var listenerWrapper;
15281
+
15282
+ switch (eventPriority) {
15283
+ case DiscreteEvent:
15284
+ listenerWrapper = dispatchDiscreteEvent;
15285
+ break;
15286
+
15287
+ case UserBlockingEvent:
15288
+ listenerWrapper = dispatchUserBlockingUpdate;
15289
+ break;
15290
+
15291
+ case ContinuousEvent:
15292
+ default:
15293
+ listenerWrapper = dispatchEvent;
15294
+ break;
15295
+ }
15296
+
15297
+ return listenerWrapper.bind(null, domEventName, eventSystemFlags, targetContainer);
15298
+ }
15299
+
15300
+ function dispatchDiscreteEvent(domEventName, eventSystemFlags, container, nativeEvent) {
15301
+ {
15302
+ flushDiscreteUpdatesIfNeeded(nativeEvent.timeStamp);
15303
+ }
15304
+
15305
+ discreteUpdates(dispatchEvent, domEventName, eventSystemFlags, container, nativeEvent);
15306
+ }
15307
+
15308
+ function dispatchUserBlockingUpdate(domEventName, eventSystemFlags, container, nativeEvent) {
15309
+ {
15310
+ runWithPriority(UserBlockingPriority$1, dispatchEvent.bind(null, domEventName, eventSystemFlags, container, nativeEvent));
15311
+ }
15312
+ }
15313
+
15314
+ function dispatchEvent(domEventName, eventSystemFlags, targetContainer, nativeEvent) {
15315
+ if (!_enabled) {
15316
+ return;
15317
+ }
15318
+
15319
+ var allowReplay = true;
15320
+
15321
+ {
15322
+ // TODO: replaying capture phase events is currently broken
15323
+ // because we used to do it during top-level native bubble handlers
15324
+ // but now we use different bubble and capture handlers.
15325
+ // In eager mode, we attach capture listeners early, so we need
15326
+ // to filter them out until we fix the logic to handle them correctly.
15327
+ // This could've been outside the flag but I put it inside to reduce risk.
15328
+ allowReplay = (eventSystemFlags & IS_CAPTURE_PHASE) === 0;
15329
+ }
15330
+
15331
+ if (allowReplay && hasQueuedDiscreteEvents() && isReplayableDiscreteEvent(domEventName)) {
15332
+ // If we already have a queue of discrete events, and this is another discrete
15333
+ // event, then we can't dispatch it regardless of its target, since they
15334
+ // need to dispatch in order.
15335
+ queueDiscreteEvent(null, // Flags that we're not actually blocked on anything as far as we know.
15336
+ domEventName, eventSystemFlags, targetContainer, nativeEvent);
15337
+ return;
15338
+ }
15339
+
15340
+ var blockedOn = attemptToDispatchEvent(domEventName, eventSystemFlags, targetContainer, nativeEvent);
15341
+
15342
+ if (blockedOn === null) {
15343
+ // We successfully dispatched this event.
15344
+ if (allowReplay) {
15345
+ clearIfContinuousEvent(domEventName, nativeEvent);
15346
+ }
15347
+
15348
+ return;
15349
+ }
15350
+
15351
+ if (allowReplay) {
15352
+ if (isReplayableDiscreteEvent(domEventName)) {
15353
+ // This this to be replayed later once the target is available.
15354
+ queueDiscreteEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent);
15355
+ return;
15356
+ }
15357
+
15358
+ if (queueIfContinuousEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent)) {
15359
+ return;
15360
+ } // We need to clear only if we didn't queue because
15361
+ // queueing is accummulative.
15362
+
15363
+
15364
+ clearIfContinuousEvent(domEventName, nativeEvent);
15365
+ } // This is not replayable so we'll invoke it but without a target,
15366
+ // in case the event system needs to trace it.
15367
+
15368
+
15369
+ dispatchEventForPluginEventSystem(domEventName, eventSystemFlags, nativeEvent, null, targetContainer);
15370
+ } // Attempt dispatching an event. Returns a SuspenseInstance or Container if it's blocked.
15371
+
15372
+ function attemptToDispatchEvent(domEventName, eventSystemFlags, targetContainer, nativeEvent) {
15373
+ // TODO: Warn if _enabled is false.
15374
+ var nativeEventTarget = getEventTarget(nativeEvent);
15375
+ var targetInst = getClosestInstanceFromNode(nativeEventTarget);
15376
+
15377
+ if (targetInst !== null) {
15378
+ var nearestMounted = getNearestMountedFiber(targetInst);
15379
+
15380
+ if (nearestMounted === null) {
15381
+ // This tree has been unmounted already. Dispatch without a target.
15382
+ targetInst = null;
15383
+ } else {
15384
+ var tag = nearestMounted.tag;
15385
+
15386
+ if (tag === SuspenseComponent) {
15387
+ var instance = getSuspenseInstanceFromFiber(nearestMounted);
15388
+
15389
+ if (instance !== null) {
15390
+ // Queue the event to be replayed later. Abort dispatching since we
15391
+ // don't want this event dispatched twice through the event system.
15392
+ // TODO: If this is the first discrete event in the queue. Schedule an increased
15393
+ // priority for this boundary.
15394
+ return instance;
15395
+ } // This shouldn't happen, something went wrong but to avoid blocking
15396
+ // the whole system, dispatch the event without a target.
15397
+ // TODO: Warn.
15398
+
15399
+
15400
+ targetInst = null;
15401
+ } else if (tag === HostRoot) {
15402
+ var root = nearestMounted.stateNode;
15403
+
15404
+ if (root.hydrate) {
15405
+ // If this happens during a replay something went wrong and it might block
15406
+ // the whole system.
15407
+ return getContainerFromFiber(nearestMounted);
15408
+ }
15409
+
15410
+ targetInst = null;
15411
+ } else if (nearestMounted !== targetInst) {
15412
+ // If we get an event (ex: img onload) before committing that
15413
+ // component's mount, ignore it for now (that is, treat it as if it was an
15414
+ // event on a non-React tree). We might also consider queueing events and
15415
+ // dispatching them after the mount.
15416
+ targetInst = null;
15417
+ }
15418
+ }
15419
+ }
15420
+
15421
+ dispatchEventForPluginEventSystem(domEventName, eventSystemFlags, nativeEvent, targetInst, targetContainer); // We're not blocked on anything.
15422
+
15423
+ return null;
15424
+ }
15425
+
15426
+ function addEventBubbleListener(target, eventType, listener) {
15427
+ target.addEventListener(eventType, listener, false);
15428
+ return listener;
15429
+ }
15430
+ function addEventCaptureListener(target, eventType, listener) {
15431
+ target.addEventListener(eventType, listener, true);
15432
+ return listener;
15433
+ }
15434
+ function addEventCaptureListenerWithPassiveFlag(target, eventType, listener, passive) {
15435
+ target.addEventListener(eventType, listener, {
15436
+ capture: true,
15437
+ passive: passive
15438
+ });
15439
+ return listener;
15440
+ }
15441
+ function addEventBubbleListenerWithPassiveFlag(target, eventType, listener, passive) {
15442
+ target.addEventListener(eventType, listener, {
15443
+ passive: passive
15444
+ });
15445
+ return listener;
15446
+ }
15447
+
15448
+ /**
15449
+ * These variables store information about text content of a target node,
15450
+ * allowing comparison of content before and after a given event.
15451
+ *
15452
+ * Identify the node where selection currently begins, then observe
15453
+ * both its text content and its current position in the DOM. Since the
15454
+ * browser may natively replace the target node during composition, we can
15455
+ * use its position to find its replacement.
15456
+ *
15457
+ *
15458
+ */
15459
+ var root = null;
15460
+ var startText = null;
15461
+ var fallbackText = null;
15462
+ function initialize(nativeEventTarget) {
15463
+ root = nativeEventTarget;
15464
+ startText = getText();
15465
+ return true;
15466
+ }
15467
+ function reset() {
15468
+ root = null;
15469
+ startText = null;
15470
+ fallbackText = null;
15471
+ }
15472
+ function getData() {
15473
+ if (fallbackText) {
15474
+ return fallbackText;
15475
+ }
15476
+
15477
+ var start;
15478
+ var startValue = startText;
15479
+ var startLength = startValue.length;
15480
+ var end;
15481
+ var endValue = getText();
15482
+ var endLength = endValue.length;
15483
+
15484
+ for (start = 0; start < startLength; start++) {
15485
+ if (startValue[start] !== endValue[start]) {
15486
+ break;
15487
+ }
15488
+ }
15489
+
15490
+ var minEnd = startLength - start;
15491
+
15492
+ for (end = 1; end <= minEnd; end++) {
15493
+ if (startValue[startLength - end] !== endValue[endLength - end]) {
15494
+ break;
15495
+ }
15496
+ }
15497
+
15498
+ var sliceTail = end > 1 ? 1 - end : undefined;
15499
+ fallbackText = endValue.slice(start, sliceTail);
15500
+ return fallbackText;
15501
+ }
15502
+ function getText() {
15503
+ if ('value' in root) {
15504
+ return root.value;
15505
+ }
15506
+
15507
+ return root.textContent;
15508
+ }
15509
+
15510
+ /**
15511
+ * `charCode` represents the actual "character code" and is safe to use with
15512
+ * `String.fromCharCode`. As such, only keys that correspond to printable
15513
+ * characters produce a valid `charCode`, the only exception to this is Enter.
15514
+ * The Tab-key is considered non-printable and does not have a `charCode`,
15515
+ * presumably because it does not produce a tab-character in browsers.
15516
+ *
15517
+ * @param {object} nativeEvent Native browser event.
15518
+ * @return {number} Normalized `charCode` property.
15519
+ */
15520
+ function getEventCharCode(nativeEvent) {
15521
+ var charCode;
15522
+ var keyCode = nativeEvent.keyCode;
15523
+
15524
+ if ('charCode' in nativeEvent) {
15525
+ charCode = nativeEvent.charCode; // FF does not set `charCode` for the Enter-key, check against `keyCode`.
15526
+
15527
+ if (charCode === 0 && keyCode === 13) {
15528
+ charCode = 13;
15529
+ }
15530
+ } else {
15531
+ // IE8 does not implement `charCode`, but `keyCode` has the correct value.
15532
+ charCode = keyCode;
15533
+ } // IE and Edge (on Windows) and Chrome / Safari (on Windows and Linux)
15534
+ // report Enter as charCode 10 when ctrl is pressed.
15535
+
15536
+
15537
+ if (charCode === 10) {
15538
+ charCode = 13;
15539
+ } // Some non-printable keys are reported in `charCode`/`keyCode`, discard them.
15540
+ // Must not discard the (non-)printable Enter-key.
15541
+
15542
+
15543
+ if (charCode >= 32 || charCode === 13) {
15544
+ return charCode;
15545
+ }
15546
+
15547
+ return 0;
15548
+ }
15549
+
15550
+ function functionThatReturnsTrue() {
15551
+ return true;
15552
+ }
15553
+
15554
+ function functionThatReturnsFalse() {
15555
+ return false;
15556
+ } // This is intentionally a factory so that we have different returned constructors.
15557
+ // If we had a single constructor, it would be megamorphic and engines would deopt.
15558
+
15559
+
15560
+ function createSyntheticEvent(Interface) {
15561
+ /**
15562
+ * Synthetic events are dispatched by event plugins, typically in response to a
15563
+ * top-level event delegation handler.
15564
+ *
15565
+ * These systems should generally use pooling to reduce the frequency of garbage
15566
+ * collection. The system should check `isPersistent` to determine whether the
15567
+ * event should be released into the pool after being dispatched. Users that
15568
+ * need a persisted event should invoke `persist`.
15569
+ *
15570
+ * Synthetic events (and subclasses) implement the DOM Level 3 Events API by
15571
+ * normalizing browser quirks. Subclasses do not necessarily have to implement a
15572
+ * DOM interface; custom application-specific events can also subclass this.
15573
+ */
15574
+ function SyntheticBaseEvent(reactName, reactEventType, targetInst, nativeEvent, nativeEventTarget) {
15575
+ this._reactName = reactName;
15576
+ this._targetInst = targetInst;
15577
+ this.type = reactEventType;
15578
+ this.nativeEvent = nativeEvent;
15579
+ this.target = nativeEventTarget;
15580
+ this.currentTarget = null;
15581
+
15582
+ for (var _propName in Interface) {
15583
+ if (!Interface.hasOwnProperty(_propName)) {
15584
+ continue;
15585
+ }
15586
+
15587
+ var normalize = Interface[_propName];
15588
+
15589
+ if (normalize) {
15590
+ this[_propName] = normalize(nativeEvent);
15591
+ } else {
15592
+ this[_propName] = nativeEvent[_propName];
15593
+ }
15594
+ }
15595
+
15596
+ var defaultPrevented = nativeEvent.defaultPrevented != null ? nativeEvent.defaultPrevented : nativeEvent.returnValue === false;
15597
+
15598
+ if (defaultPrevented) {
15599
+ this.isDefaultPrevented = functionThatReturnsTrue;
15600
+ } else {
15601
+ this.isDefaultPrevented = functionThatReturnsFalse;
15602
+ }
15603
+
15604
+ this.isPropagationStopped = functionThatReturnsFalse;
15605
+ return this;
15606
+ }
15607
+
15608
+ _assign(SyntheticBaseEvent.prototype, {
15609
+ preventDefault: function () {
15610
+ this.defaultPrevented = true;
15611
+ var event = this.nativeEvent;
15612
+
15613
+ if (!event) {
15614
+ return;
15615
+ }
15616
+
15617
+ if (event.preventDefault) {
15618
+ event.preventDefault(); // $FlowFixMe - flow is not aware of `unknown` in IE
15619
+ } else if (typeof event.returnValue !== 'unknown') {
15620
+ event.returnValue = false;
15621
+ }
15622
+
15623
+ this.isDefaultPrevented = functionThatReturnsTrue;
15624
+ },
15625
+ stopPropagation: function () {
15626
+ var event = this.nativeEvent;
15627
+
15628
+ if (!event) {
15629
+ return;
15630
+ }
15631
+
15632
+ if (event.stopPropagation) {
15633
+ event.stopPropagation(); // $FlowFixMe - flow is not aware of `unknown` in IE
15634
+ } else if (typeof event.cancelBubble !== 'unknown') {
15635
+ // The ChangeEventPlugin registers a "propertychange" event for
15636
+ // IE. This event does not support bubbling or cancelling, and
15637
+ // any references to cancelBubble throw "Member not found". A
15638
+ // typeof check of "unknown" circumvents this issue (and is also
15639
+ // IE specific).
15640
+ event.cancelBubble = true;
15641
+ }
15642
+
15643
+ this.isPropagationStopped = functionThatReturnsTrue;
15644
+ },
15645
+
15646
+ /**
15647
+ * We release all dispatched `SyntheticEvent`s after each event loop, adding
15648
+ * them back into the pool. This allows a way to hold onto a reference that
15649
+ * won't be added back into the pool.
15650
+ */
15651
+ persist: function () {// Modern event system doesn't use pooling.
15652
+ },
15653
+
15654
+ /**
15655
+ * Checks if this event should be released back into the pool.
15656
+ *
15657
+ * @return {boolean} True if this should not be released, false otherwise.
15658
+ */
15659
+ isPersistent: functionThatReturnsTrue
15660
+ });
15661
+
15662
+ return SyntheticBaseEvent;
15663
+ }
15664
+ /**
15665
+ * @interface Event
15666
+ * @see http://www.w3.org/TR/DOM-Level-3-Events/
15667
+ */
15668
+
15669
+
15670
+ var EventInterface = {
15671
+ eventPhase: 0,
15672
+ bubbles: 0,
15673
+ cancelable: 0,
15674
+ timeStamp: function (event) {
15675
+ return event.timeStamp || Date.now();
15676
+ },
15677
+ defaultPrevented: 0,
15678
+ isTrusted: 0
15679
+ };
15680
+ var SyntheticEvent = createSyntheticEvent(EventInterface);
15681
+
15682
+ var UIEventInterface = _assign({}, EventInterface, {
15683
+ view: 0,
15684
+ detail: 0
15685
+ });
15686
+
15687
+ var SyntheticUIEvent = createSyntheticEvent(UIEventInterface);
15688
+ var lastMovementX;
15689
+ var lastMovementY;
15690
+ var lastMouseEvent;
15691
+
15692
+ function updateMouseMovementPolyfillState(event) {
15693
+ if (event !== lastMouseEvent) {
15694
+ if (lastMouseEvent && event.type === 'mousemove') {
15695
+ lastMovementX = event.screenX - lastMouseEvent.screenX;
15696
+ lastMovementY = event.screenY - lastMouseEvent.screenY;
15697
+ } else {
15698
+ lastMovementX = 0;
15699
+ lastMovementY = 0;
15700
+ }
15701
+
15702
+ lastMouseEvent = event;
15703
+ }
15704
+ }
15705
+ /**
15706
+ * @interface MouseEvent
15707
+ * @see http://www.w3.org/TR/DOM-Level-3-Events/
15708
+ */
15709
+
15710
+
15711
+ var MouseEventInterface = _assign({}, UIEventInterface, {
15712
+ screenX: 0,
15713
+ screenY: 0,
15714
+ clientX: 0,
15715
+ clientY: 0,
15716
+ pageX: 0,
15717
+ pageY: 0,
15718
+ ctrlKey: 0,
15719
+ shiftKey: 0,
15720
+ altKey: 0,
15721
+ metaKey: 0,
15722
+ getModifierState: getEventModifierState,
15723
+ button: 0,
15724
+ buttons: 0,
15725
+ relatedTarget: function (event) {
15726
+ if (event.relatedTarget === undefined) return event.fromElement === event.srcElement ? event.toElement : event.fromElement;
15727
+ return event.relatedTarget;
15728
+ },
15729
+ movementX: function (event) {
15730
+ if ('movementX' in event) {
15731
+ return event.movementX;
15732
+ }
15733
+
15734
+ updateMouseMovementPolyfillState(event);
15735
+ return lastMovementX;
15736
+ },
15737
+ movementY: function (event) {
15738
+ if ('movementY' in event) {
15739
+ return event.movementY;
15740
+ } // Don't need to call updateMouseMovementPolyfillState() here
15741
+ // because it's guaranteed to have already run when movementX
15742
+ // was copied.
15743
+
15744
+
15745
+ return lastMovementY;
15746
+ }
15747
+ });
15748
+
15749
+ var SyntheticMouseEvent = createSyntheticEvent(MouseEventInterface);
15750
+ /**
15751
+ * @interface DragEvent
15752
+ * @see http://www.w3.org/TR/DOM-Level-3-Events/
15753
+ */
15754
+
15755
+ var DragEventInterface = _assign({}, MouseEventInterface, {
15756
+ dataTransfer: 0
15757
+ });
15758
+
15759
+ var SyntheticDragEvent = createSyntheticEvent(DragEventInterface);
15760
+ /**
15761
+ * @interface FocusEvent
15762
+ * @see http://www.w3.org/TR/DOM-Level-3-Events/
15763
+ */
15764
+
15765
+ var FocusEventInterface = _assign({}, UIEventInterface, {
15766
+ relatedTarget: 0
15767
+ });
15768
+
15769
+ var SyntheticFocusEvent = createSyntheticEvent(FocusEventInterface);
15770
+ /**
15771
+ * @interface Event
15772
+ * @see http://www.w3.org/TR/css3-animations/#AnimationEvent-interface
15773
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/AnimationEvent
15774
+ */
15775
+
15776
+ var AnimationEventInterface = _assign({}, EventInterface, {
15777
+ animationName: 0,
15778
+ elapsedTime: 0,
15779
+ pseudoElement: 0
15780
+ });
15781
+
15782
+ var SyntheticAnimationEvent = createSyntheticEvent(AnimationEventInterface);
15783
+ /**
15784
+ * @interface Event
15785
+ * @see http://www.w3.org/TR/clipboard-apis/
15786
+ */
15787
+
15788
+ var ClipboardEventInterface = _assign({}, EventInterface, {
15789
+ clipboardData: function (event) {
15790
+ return 'clipboardData' in event ? event.clipboardData : window.clipboardData;
15791
+ }
15792
+ });
15793
+
15794
+ var SyntheticClipboardEvent = createSyntheticEvent(ClipboardEventInterface);
15795
+ /**
15796
+ * @interface Event
15797
+ * @see http://www.w3.org/TR/DOM-Level-3-Events/#events-compositionevents
15798
+ */
15799
+
15800
+ var CompositionEventInterface = _assign({}, EventInterface, {
15801
+ data: 0
15802
+ });
15803
+
15804
+ var SyntheticCompositionEvent = createSyntheticEvent(CompositionEventInterface);
15805
+ /**
15806
+ * @interface Event
15807
+ * @see http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105
15808
+ * /#events-inputevents
15809
+ */
15810
+ // Happens to share the same list for now.
15811
+
15812
+ var SyntheticInputEvent = SyntheticCompositionEvent;
15813
+ /**
15814
+ * Normalization of deprecated HTML5 `key` values
15815
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names
15816
+ */
15817
+
15818
+ var normalizeKey = {
15819
+ Esc: 'Escape',
15820
+ Spacebar: ' ',
15821
+ Left: 'ArrowLeft',
15822
+ Up: 'ArrowUp',
15823
+ Right: 'ArrowRight',
15824
+ Down: 'ArrowDown',
15825
+ Del: 'Delete',
15826
+ Win: 'OS',
15827
+ Menu: 'ContextMenu',
15828
+ Apps: 'ContextMenu',
15829
+ Scroll: 'ScrollLock',
15830
+ MozPrintableKey: 'Unidentified'
15831
+ };
15832
+ /**
15833
+ * Translation from legacy `keyCode` to HTML5 `key`
15834
+ * Only special keys supported, all others depend on keyboard layout or browser
15835
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names
15836
+ */
15837
+
15838
+ var translateToKey = {
15839
+ '8': 'Backspace',
15840
+ '9': 'Tab',
15841
+ '12': 'Clear',
15842
+ '13': 'Enter',
15843
+ '16': 'Shift',
15844
+ '17': 'Control',
15845
+ '18': 'Alt',
15846
+ '19': 'Pause',
15847
+ '20': 'CapsLock',
15848
+ '27': 'Escape',
15849
+ '32': ' ',
15850
+ '33': 'PageUp',
15851
+ '34': 'PageDown',
15852
+ '35': 'End',
15853
+ '36': 'Home',
15854
+ '37': 'ArrowLeft',
15855
+ '38': 'ArrowUp',
15856
+ '39': 'ArrowRight',
15857
+ '40': 'ArrowDown',
15858
+ '45': 'Insert',
15859
+ '46': 'Delete',
15860
+ '112': 'F1',
15861
+ '113': 'F2',
15862
+ '114': 'F3',
15863
+ '115': 'F4',
15864
+ '116': 'F5',
15865
+ '117': 'F6',
15866
+ '118': 'F7',
15867
+ '119': 'F8',
15868
+ '120': 'F9',
15869
+ '121': 'F10',
15870
+ '122': 'F11',
15871
+ '123': 'F12',
15872
+ '144': 'NumLock',
15873
+ '145': 'ScrollLock',
15874
+ '224': 'Meta'
15875
+ };
15876
+ /**
15877
+ * @param {object} nativeEvent Native browser event.
15878
+ * @return {string} Normalized `key` property.
15879
+ */
15880
+
15881
+ function getEventKey(nativeEvent) {
15882
+ if (nativeEvent.key) {
15883
+ // Normalize inconsistent values reported by browsers due to
15884
+ // implementations of a working draft specification.
15885
+ // FireFox implements `key` but returns `MozPrintableKey` for all
15886
+ // printable characters (normalized to `Unidentified`), ignore it.
15887
+ var key = normalizeKey[nativeEvent.key] || nativeEvent.key;
15888
+
15889
+ if (key !== 'Unidentified') {
15890
+ return key;
15891
+ }
15892
+ } // Browser does not implement `key`, polyfill as much of it as we can.
15893
+
15894
+
15895
+ if (nativeEvent.type === 'keypress') {
15896
+ var charCode = getEventCharCode(nativeEvent); // The enter-key is technically both printable and non-printable and can
15897
+ // thus be captured by `keypress`, no other non-printable key should.
15898
+
15899
+ return charCode === 13 ? 'Enter' : String.fromCharCode(charCode);
15900
+ }
15901
+
15902
+ if (nativeEvent.type === 'keydown' || nativeEvent.type === 'keyup') {
15903
+ // While user keyboard layout determines the actual meaning of each
15904
+ // `keyCode` value, almost all function keys have a universal value.
15905
+ return translateToKey[nativeEvent.keyCode] || 'Unidentified';
15906
+ }
15907
+
15908
+ return '';
15909
+ }
15910
+ /**
15911
+ * Translation from modifier key to the associated property in the event.
15912
+ * @see http://www.w3.org/TR/DOM-Level-3-Events/#keys-Modifiers
15913
+ */
15914
+
15915
+
15916
+ var modifierKeyToProp = {
15917
+ Alt: 'altKey',
15918
+ Control: 'ctrlKey',
15919
+ Meta: 'metaKey',
15920
+ Shift: 'shiftKey'
15921
+ }; // Older browsers (Safari <= 10, iOS Safari <= 10.2) do not support
15922
+ // getModifierState. If getModifierState is not supported, we map it to a set of
15923
+ // modifier keys exposed by the event. In this case, Lock-keys are not supported.
15924
+
15925
+ function modifierStateGetter(keyArg) {
15926
+ var syntheticEvent = this;
15927
+ var nativeEvent = syntheticEvent.nativeEvent;
15928
+
15929
+ if (nativeEvent.getModifierState) {
15930
+ return nativeEvent.getModifierState(keyArg);
15931
+ }
15932
+
15933
+ var keyProp = modifierKeyToProp[keyArg];
15934
+ return keyProp ? !!nativeEvent[keyProp] : false;
15935
+ }
15936
+
15937
+ function getEventModifierState(nativeEvent) {
15938
+ return modifierStateGetter;
15939
+ }
15940
+ /**
15941
+ * @interface KeyboardEvent
15942
+ * @see http://www.w3.org/TR/DOM-Level-3-Events/
15943
+ */
15944
+
15945
+
15946
+ var KeyboardEventInterface = _assign({}, UIEventInterface, {
15947
+ key: getEventKey,
15948
+ code: 0,
15949
+ location: 0,
15950
+ ctrlKey: 0,
15951
+ shiftKey: 0,
15952
+ altKey: 0,
15953
+ metaKey: 0,
15954
+ repeat: 0,
15955
+ locale: 0,
15956
+ getModifierState: getEventModifierState,
15957
+ // Legacy Interface
15958
+ charCode: function (event) {
15959
+ // `charCode` is the result of a KeyPress event and represents the value of
15960
+ // the actual printable character.
15961
+ // KeyPress is deprecated, but its replacement is not yet final and not
15962
+ // implemented in any major browser. Only KeyPress has charCode.
15963
+ if (event.type === 'keypress') {
15964
+ return getEventCharCode(event);
15965
+ }
15966
+
15967
+ return 0;
15968
+ },
15969
+ keyCode: function (event) {
15970
+ // `keyCode` is the result of a KeyDown/Up event and represents the value of
15971
+ // physical keyboard key.
15972
+ // The actual meaning of the value depends on the users' keyboard layout
15973
+ // which cannot be detected. Assuming that it is a US keyboard layout
15974
+ // provides a surprisingly accurate mapping for US and European users.
15975
+ // Due to this, it is left to the user to implement at this time.
15976
+ if (event.type === 'keydown' || event.type === 'keyup') {
15977
+ return event.keyCode;
15978
+ }
15979
+
15980
+ return 0;
15981
+ },
15982
+ which: function (event) {
15983
+ // `which` is an alias for either `keyCode` or `charCode` depending on the
15984
+ // type of the event.
15985
+ if (event.type === 'keypress') {
15986
+ return getEventCharCode(event);
15987
+ }
15988
+
15989
+ if (event.type === 'keydown' || event.type === 'keyup') {
15990
+ return event.keyCode;
15991
+ }
15992
+
15993
+ return 0;
15994
+ }
15995
+ });
15996
+
15997
+ var SyntheticKeyboardEvent = createSyntheticEvent(KeyboardEventInterface);
15998
+ /**
15999
+ * @interface PointerEvent
16000
+ * @see http://www.w3.org/TR/pointerevents/
16001
+ */
16002
+
16003
+ var PointerEventInterface = _assign({}, MouseEventInterface, {
16004
+ pointerId: 0,
16005
+ width: 0,
16006
+ height: 0,
16007
+ pressure: 0,
16008
+ tangentialPressure: 0,
16009
+ tiltX: 0,
16010
+ tiltY: 0,
16011
+ twist: 0,
16012
+ pointerType: 0,
16013
+ isPrimary: 0
16014
+ });
16015
+
16016
+ var SyntheticPointerEvent = createSyntheticEvent(PointerEventInterface);
16017
+ /**
16018
+ * @interface TouchEvent
16019
+ * @see http://www.w3.org/TR/touch-events/
16020
+ */
16021
+
16022
+ var TouchEventInterface = _assign({}, UIEventInterface, {
16023
+ touches: 0,
16024
+ targetTouches: 0,
16025
+ changedTouches: 0,
16026
+ altKey: 0,
16027
+ metaKey: 0,
16028
+ ctrlKey: 0,
16029
+ shiftKey: 0,
16030
+ getModifierState: getEventModifierState
16031
+ });
16032
+
16033
+ var SyntheticTouchEvent = createSyntheticEvent(TouchEventInterface);
16034
+ /**
16035
+ * @interface Event
16036
+ * @see http://www.w3.org/TR/2009/WD-css3-transitions-20090320/#transition-events-
16037
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/TransitionEvent
16038
+ */
16039
+
16040
+ var TransitionEventInterface = _assign({}, EventInterface, {
16041
+ propertyName: 0,
16042
+ elapsedTime: 0,
16043
+ pseudoElement: 0
16044
+ });
16045
+
16046
+ var SyntheticTransitionEvent = createSyntheticEvent(TransitionEventInterface);
16047
+ /**
16048
+ * @interface WheelEvent
16049
+ * @see http://www.w3.org/TR/DOM-Level-3-Events/
16050
+ */
16051
+
16052
+ var WheelEventInterface = _assign({}, MouseEventInterface, {
16053
+ deltaX: function (event) {
16054
+ return 'deltaX' in event ? event.deltaX : // Fallback to `wheelDeltaX` for Webkit and normalize (right is positive).
16055
+ 'wheelDeltaX' in event ? -event.wheelDeltaX : 0;
16056
+ },
16057
+ deltaY: function (event) {
16058
+ return 'deltaY' in event ? event.deltaY : // Fallback to `wheelDeltaY` for Webkit and normalize (down is positive).
16059
+ 'wheelDeltaY' in event ? -event.wheelDeltaY : // Fallback to `wheelDelta` for IE<9 and normalize (down is positive).
16060
+ 'wheelDelta' in event ? -event.wheelDelta : 0;
16061
+ },
16062
+ deltaZ: 0,
16063
+ // Browsers without "deltaMode" is reporting in raw wheel delta where one
16064
+ // notch on the scroll is always +/- 120, roughly equivalent to pixels.
16065
+ // A good approximation of DOM_DELTA_LINE (1) is 5% of viewport size or
16066
+ // ~40 pixels, for DOM_DELTA_SCREEN (2) it is 87.5% of viewport size.
16067
+ deltaMode: 0
16068
+ });
16069
+
16070
+ var SyntheticWheelEvent = createSyntheticEvent(WheelEventInterface);
16071
+
16072
+ var END_KEYCODES = [9, 13, 27, 32]; // Tab, Return, Esc, Space
16073
+
16074
+ var START_KEYCODE = 229;
16075
+ var canUseCompositionEvent = canUseDOM && 'CompositionEvent' in window;
16076
+ var documentMode = null;
16077
+
16078
+ if (canUseDOM && 'documentMode' in document) {
16079
+ documentMode = document.documentMode;
16080
+ } // Webkit offers a very useful `textInput` event that can be used to
16081
+ // directly represent `beforeInput`. The IE `textinput` event is not as
16082
+ // useful, so we don't use it.
16083
+
16084
+
16085
+ var canUseTextInputEvent = canUseDOM && 'TextEvent' in window && !documentMode; // In IE9+, we have access to composition events, but the data supplied
16086
+ // by the native compositionend event may be incorrect. Japanese ideographic
16087
+ // spaces, for instance (\u3000) are not recorded correctly.
16088
+
16089
+ var useFallbackCompositionData = canUseDOM && (!canUseCompositionEvent || documentMode && documentMode > 8 && documentMode <= 11);
16090
+ var SPACEBAR_CODE = 32;
16091
+ var SPACEBAR_CHAR = String.fromCharCode(SPACEBAR_CODE);
16092
+
16093
+ function registerEvents() {
16094
+ registerTwoPhaseEvent('onBeforeInput', ['compositionend', 'keypress', 'textInput', 'paste']);
16095
+ registerTwoPhaseEvent('onCompositionEnd', ['compositionend', 'focusout', 'keydown', 'keypress', 'keyup', 'mousedown']);
16096
+ registerTwoPhaseEvent('onCompositionStart', ['compositionstart', 'focusout', 'keydown', 'keypress', 'keyup', 'mousedown']);
16097
+ registerTwoPhaseEvent('onCompositionUpdate', ['compositionupdate', 'focusout', 'keydown', 'keypress', 'keyup', 'mousedown']);
16098
+ } // Track whether we've ever handled a keypress on the space key.
16099
+
16100
+
16101
+ var hasSpaceKeypress = false;
16102
+ /**
16103
+ * Return whether a native keypress event is assumed to be a command.
16104
+ * This is required because Firefox fires `keypress` events for key commands
16105
+ * (cut, copy, select-all, etc.) even though no character is inserted.
16106
+ */
16107
+
16108
+ function isKeypressCommand(nativeEvent) {
16109
+ return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) && // ctrlKey && altKey is equivalent to AltGr, and is not a command.
16110
+ !(nativeEvent.ctrlKey && nativeEvent.altKey);
16111
+ }
16112
+ /**
16113
+ * Translate native top level events into event types.
16114
+ */
16115
+
16116
+
16117
+ function getCompositionEventType(domEventName) {
16118
+ switch (domEventName) {
16119
+ case 'compositionstart':
16120
+ return 'onCompositionStart';
16121
+
16122
+ case 'compositionend':
16123
+ return 'onCompositionEnd';
16124
+
16125
+ case 'compositionupdate':
16126
+ return 'onCompositionUpdate';
16127
+ }
16128
+ }
16129
+ /**
16130
+ * Does our fallback best-guess model think this event signifies that
16131
+ * composition has begun?
16132
+ */
16133
+
16134
+
16135
+ function isFallbackCompositionStart(domEventName, nativeEvent) {
16136
+ return domEventName === 'keydown' && nativeEvent.keyCode === START_KEYCODE;
16137
+ }
16138
+ /**
16139
+ * Does our fallback mode think that this event is the end of composition?
16140
+ */
16141
+
16142
+
16143
+ function isFallbackCompositionEnd(domEventName, nativeEvent) {
16144
+ switch (domEventName) {
16145
+ case 'keyup':
16146
+ // Command keys insert or clear IME input.
16147
+ return END_KEYCODES.indexOf(nativeEvent.keyCode) !== -1;
16148
+
16149
+ case 'keydown':
16150
+ // Expect IME keyCode on each keydown. If we get any other
16151
+ // code we must have exited earlier.
16152
+ return nativeEvent.keyCode !== START_KEYCODE;
16153
+
16154
+ case 'keypress':
16155
+ case 'mousedown':
16156
+ case 'focusout':
16157
+ // Events are not possible without cancelling IME.
16158
+ return true;
16159
+
16160
+ default:
16161
+ return false;
16162
+ }
16163
+ }
16164
+ /**
16165
+ * Google Input Tools provides composition data via a CustomEvent,
16166
+ * with the `data` property populated in the `detail` object. If this
16167
+ * is available on the event object, use it. If not, this is a plain
16168
+ * composition event and we have nothing special to extract.
16169
+ *
16170
+ * @param {object} nativeEvent
16171
+ * @return {?string}
16172
+ */
16173
+
16174
+
16175
+ function getDataFromCustomEvent(nativeEvent) {
16176
+ var detail = nativeEvent.detail;
16177
+
16178
+ if (typeof detail === 'object' && 'data' in detail) {
16179
+ return detail.data;
16180
+ }
16181
+
16182
+ return null;
16183
+ }
16184
+ /**
16185
+ * Check if a composition event was triggered by Korean IME.
16186
+ * Our fallback mode does not work well with IE's Korean IME,
16187
+ * so just use native composition events when Korean IME is used.
16188
+ * Although CompositionEvent.locale property is deprecated,
16189
+ * it is available in IE, where our fallback mode is enabled.
16190
+ *
16191
+ * @param {object} nativeEvent
16192
+ * @return {boolean}
16193
+ */
16194
+
16195
+
16196
+ function isUsingKoreanIME(nativeEvent) {
16197
+ return nativeEvent.locale === 'ko';
16198
+ } // Track the current IME composition status, if any.
16199
+
16200
+
16201
+ var isComposing = false;
16202
+ /**
16203
+ * @return {?object} A SyntheticCompositionEvent.
16204
+ */
16205
+
16206
+ function extractCompositionEvent(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget) {
16207
+ var eventType;
16208
+ var fallbackData;
16209
+
16210
+ if (canUseCompositionEvent) {
16211
+ eventType = getCompositionEventType(domEventName);
16212
+ } else if (!isComposing) {
16213
+ if (isFallbackCompositionStart(domEventName, nativeEvent)) {
16214
+ eventType = 'onCompositionStart';
16215
+ }
16216
+ } else if (isFallbackCompositionEnd(domEventName, nativeEvent)) {
16217
+ eventType = 'onCompositionEnd';
16218
+ }
16219
+
16220
+ if (!eventType) {
16221
+ return null;
16222
+ }
16223
+
16224
+ if (useFallbackCompositionData && !isUsingKoreanIME(nativeEvent)) {
16225
+ // The current composition is stored statically and must not be
16226
+ // overwritten while composition continues.
16227
+ if (!isComposing && eventType === 'onCompositionStart') {
16228
+ isComposing = initialize(nativeEventTarget);
16229
+ } else if (eventType === 'onCompositionEnd') {
16230
+ if (isComposing) {
16231
+ fallbackData = getData();
16232
+ }
16233
+ }
16234
  }
 
16235
 
16236
+ var listeners = accumulateTwoPhaseListeners(targetInst, eventType);
16237
 
16238
+ if (listeners.length > 0) {
16239
+ var event = new SyntheticCompositionEvent(eventType, domEventName, null, nativeEvent, nativeEventTarget);
16240
+ dispatchQueue.push({
16241
+ event: event,
16242
+ listeners: listeners
16243
+ });
16244
 
16245
+ if (fallbackData) {
16246
+ // Inject data generated from fallback path into the synthetic event.
16247
+ // This matches the property of native CompositionEventInterface.
16248
+ event.data = fallbackData;
16249
+ } else {
16250
+ var customData = getDataFromCustomEvent(nativeEvent);
16251
+
16252
+ if (customData !== null) {
16253
+ event.data = customData;
16254
+ }
16255
+ }
16256
+ }
16257
+ }
16258
+
16259
+ function getNativeBeforeInputChars(domEventName, nativeEvent) {
16260
+ switch (domEventName) {
16261
+ case 'compositionend':
16262
+ return getDataFromCustomEvent(nativeEvent);
16263
+
16264
+ case 'keypress':
16265
+ /**
16266
+ * If native `textInput` events are available, our goal is to make
16267
+ * use of them. However, there is a special case: the spacebar key.
16268
+ * In Webkit, preventing default on a spacebar `textInput` event
16269
+ * cancels character insertion, but it *also* causes the browser
16270
+ * to fall back to its default spacebar behavior of scrolling the
16271
+ * page.
16272
+ *
16273
+ * Tracking at:
16274
+ * https://code.google.com/p/chromium/issues/detail?id=355103
16275
+ *
16276
+ * To avoid this issue, use the keypress event as if no `textInput`
16277
+ * event is available.
16278
+ */
16279
+ var which = nativeEvent.which;
16280
+
16281
+ if (which !== SPACEBAR_CODE) {
16282
+ return null;
16283
+ }
16284
+
16285
+ hasSpaceKeypress = true;
16286
+ return SPACEBAR_CHAR;
16287
+
16288
+ case 'textInput':
16289
+ // Record the characters to be added to the DOM.
16290
+ var chars = nativeEvent.data; // If it's a spacebar character, assume that we have already handled
16291
+ // it at the keypress level and bail immediately. Android Chrome
16292
+ // doesn't give us keycodes, so we need to ignore it.
16293
+
16294
+ if (chars === SPACEBAR_CHAR && hasSpaceKeypress) {
16295
+ return null;
16296
+ }
16297
+
16298
+ return chars;
16299
+
16300
+ default:
16301
+ // For other native event types, do nothing.
16302
+ return null;
16303
+ }
16304
+ }
16305
  /**
16306
+ * For browsers that do not provide the `textInput` event, extract the
16307
+ * appropriate string to use for SyntheticInputEvent.
 
16308
  */
 
 
 
 
 
 
 
 
 
 
16309
 
16310
+
16311
+ function getFallbackBeforeInputChars(domEventName, nativeEvent) {
16312
+ // If we are currently composing (IME) and using a fallback to do so,
16313
+ // try to extract the composed characters from the fallback object.
16314
+ // If composition event is available, we extract a string only at
16315
+ // compositionevent, otherwise extract it at fallback events.
16316
+ if (isComposing) {
16317
+ if (domEventName === 'compositionend' || !canUseCompositionEvent && isFallbackCompositionEnd(domEventName, nativeEvent)) {
16318
+ var chars = getData();
16319
+ reset();
16320
+ isComposing = false;
16321
+ return chars;
16322
+ }
16323
+
16324
+ return null;
16325
+ }
16326
+
16327
+ switch (domEventName) {
16328
+ case 'paste':
16329
+ // If a paste event occurs after a keypress, throw out the input
16330
+ // chars. Paste events should not lead to BeforeInput events.
16331
+ return null;
16332
+
16333
+ case 'keypress':
16334
+ /**
16335
+ * As of v27, Firefox may fire keypress events even when no character
16336
+ * will be inserted. A few possibilities:
16337
+ *
16338
+ * - `which` is `0`. Arrow keys, Esc key, etc.
16339
+ *
16340
+ * - `which` is the pressed key code, but no char is available.
16341
+ * Ex: 'AltGr + d` in Polish. There is no modified character for
16342
+ * this key combination and no character is inserted into the
16343
+ * document, but FF fires the keypress for char code `100` anyway.
16344
+ * No `input` event will occur.
16345
+ *
16346
+ * - `which` is the pressed key code, but a command combination is
16347
+ * being used. Ex: `Cmd+C`. No character is inserted, and no
16348
+ * `input` event will occur.
16349
+ */
16350
+ if (!isKeypressCommand(nativeEvent)) {
16351
+ // IE fires the `keypress` event when a user types an emoji via
16352
+ // Touch keyboard of Windows. In such a case, the `char` property
16353
+ // holds an emoji character like `\uD83D\uDE0A`. Because its length
16354
+ // is 2, the property `which` does not represent an emoji correctly.
16355
+ // In such a case, we directly return the `char` property instead of
16356
+ // using `which`.
16357
+ if (nativeEvent.char && nativeEvent.char.length > 1) {
16358
+ return nativeEvent.char;
16359
+ } else if (nativeEvent.which) {
16360
+ return String.fromCharCode(nativeEvent.which);
16361
  }
 
 
 
 
 
 
 
16362
  }
16363
+
16364
+ return null;
16365
+
16366
+ case 'compositionend':
16367
+ return useFallbackCompositionData && !isUsingKoreanIME(nativeEvent) ? null : nativeEvent.data;
16368
+
16369
+ default:
16370
+ return null;
16371
+ }
16372
+ }
16373
+ /**
16374
+ * Extract a SyntheticInputEvent for `beforeInput`, based on either native
16375
+ * `textInput` or fallback behavior.
16376
+ *
16377
+ * @return {?object} A SyntheticInputEvent.
16378
+ */
16379
+
16380
+
16381
+ function extractBeforeInputEvent(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget) {
16382
+ var chars;
16383
+
16384
+ if (canUseTextInputEvent) {
16385
+ chars = getNativeBeforeInputChars(domEventName, nativeEvent);
16386
+ } else {
16387
+ chars = getFallbackBeforeInputChars(domEventName, nativeEvent);
16388
+ } // If no characters are being inserted, no BeforeInput event should
16389
+ // be fired.
16390
+
16391
+
16392
+ if (!chars) {
16393
+ return null;
16394
+ }
16395
+
16396
+ var listeners = accumulateTwoPhaseListeners(targetInst, 'onBeforeInput');
16397
+
16398
+ if (listeners.length > 0) {
16399
+ var event = new SyntheticInputEvent('onBeforeInput', 'beforeinput', null, nativeEvent, nativeEventTarget);
16400
+ dispatchQueue.push({
16401
+ event: event,
16402
+ listeners: listeners
16403
  });
16404
+ event.data = chars;
16405
+ }
16406
+ }
16407
+ /**
16408
+ * Create an `onBeforeInput` event to match
16409
+ * http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105/#events-inputevents.
16410
+ *
16411
+ * This event plugin is based on the native `textInput` event
16412
+ * available in Chrome, Safari, Opera, and IE. This event fires after
16413
+ * `onKeyPress` and `onCompositionEnd`, but before `onInput`.
16414
+ *
16415
+ * `beforeInput` is spec'd but not implemented in any browsers, and
16416
+ * the `input` event does not provide any useful information about what has
16417
+ * actually been added, contrary to the spec. Thus, `textInput` is the best
16418
+ * available event to identify the characters that have actually been inserted
16419
+ * into the target node.
16420
+ *
16421
+ * This plugin is also responsible for emitting `composition` events, thus
16422
+ * allowing us to share composition fallback code for both `beforeInput` and
16423
+ * `composition` event types.
16424
+ */
16425
 
 
 
16426
 
16427
+ function extractEvents(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {
16428
+ extractCompositionEvent(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);
16429
+ extractBeforeInputEvent(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);
16430
+ }
16431
 
16432
+ /**
16433
+ * @see http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary
16434
+ */
16435
+ var supportedInputTypes = {
16436
+ color: true,
16437
+ date: true,
16438
+ datetime: true,
16439
+ 'datetime-local': true,
16440
+ email: true,
16441
+ month: true,
16442
+ number: true,
16443
+ password: true,
16444
+ range: true,
16445
+ search: true,
16446
+ tel: true,
16447
+ text: true,
16448
+ time: true,
16449
+ url: true,
16450
+ week: true
16451
+ };
16452
 
16453
+ function isTextInputElement(elem) {
16454
+ var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();
16455
 
16456
+ if (nodeName === 'input') {
16457
+ return !!supportedInputTypes[elem.type];
16458
+ }
16459
 
16460
+ if (nodeName === 'textarea') {
16461
+ return true;
16462
+ }
16463
 
16464
+ return false;
16465
+ }
 
 
 
 
16466
 
16467
+ /**
16468
+ * Checks if an event is supported in the current execution environment.
16469
+ *
16470
+ * NOTE: This will not work correctly for non-generic events such as `change`,
16471
+ * `reset`, `load`, `error`, and `select`.
16472
+ *
16473
+ * Borrows from Modernizr.
16474
+ *
16475
+ * @param {string} eventNameSuffix Event name, e.g. "click".
16476
+ * @return {boolean} True if the event is supported.
16477
+ * @internal
16478
+ * @license Modernizr 3.0.0pre (Custom Build) | MIT
16479
  */
16480
 
16481
+ function isEventSupported(eventNameSuffix) {
16482
+ if (!canUseDOM) {
16483
+ return false;
16484
+ }
16485
 
16486
+ var eventName = 'on' + eventNameSuffix;
16487
+ var isSupported = (eventName in document);
16488
+
16489
+ if (!isSupported) {
16490
+ var element = document.createElement('div');
16491
+ element.setAttribute(eventName, 'return;');
16492
+ isSupported = typeof element[eventName] === 'function';
16493
+ }
16494
+
16495
+ return isSupported;
16496
+ }
16497
+
16498
+ function registerEvents$1() {
16499
+ registerTwoPhaseEvent('onChange', ['change', 'click', 'focusin', 'focusout', 'input', 'keydown', 'keyup', 'selectionchange']);
16500
+ }
16501
+
16502
+ function createAndAccumulateChangeEvent(dispatchQueue, inst, nativeEvent, target) {
16503
+ // Flag this event loop as needing state restore.
16504
+ enqueueStateRestore(target);
16505
+ var listeners = accumulateTwoPhaseListeners(inst, 'onChange');
16506
+
16507
+ if (listeners.length > 0) {
16508
+ var event = new SyntheticEvent('onChange', 'change', null, nativeEvent, target);
16509
+ dispatchQueue.push({
16510
+ event: event,
16511
+ listeners: listeners
16512
+ });
16513
+ }
16514
+ }
16515
+ /**
16516
+ * For IE shims
16517
+ */
16518
 
 
 
16519
 
16520
+ var activeElement = null;
16521
+ var activeElementInst = null;
16522
+ /**
16523
+ * SECTION: handle `change` event
16524
+ */
16525
 
16526
+ function shouldUseChangeEvent(elem) {
16527
+ var nodeName = elem.nodeName && elem.nodeName.toLowerCase();
16528
+ return nodeName === 'select' || nodeName === 'input' && elem.type === 'file';
 
 
 
16529
  }
16530
 
16531
+ function manualDispatchChangeEvent(nativeEvent) {
16532
+ var dispatchQueue = [];
16533
+ createAndAccumulateChangeEvent(dispatchQueue, activeElementInst, nativeEvent, getEventTarget(nativeEvent)); // If change and propertychange bubbled, we'd just bind to it like all the
16534
+ // other events and have it go through ReactBrowserEventEmitter. Since it
16535
+ // doesn't, we manually listen for the events and so we have to enqueue and
16536
+ // process the abstract event manually.
16537
+ //
16538
+ // Batching is necessary here in order to ensure that all event handlers run
16539
+ // before the next rerender (including event handlers attached to ancestor
16540
+ // elements instead of directly on the input). Without this, controlled
16541
+ // components don't work properly in conjunction with event bubbling because
16542
+ // the component is rerendered and the value reverted before all the event
16543
+ // handlers can run. See https://github.com/facebook/react/issues/708.
16544
 
16545
+ batchedUpdates(runEventInBatch, dispatchQueue);
16546
+ }
 
 
16547
 
16548
+ function runEventInBatch(dispatchQueue) {
16549
+ processDispatchQueue(dispatchQueue, 0);
16550
+ }
16551
 
16552
+ function getInstIfValueChanged(targetInst) {
16553
+ var targetNode = getNodeFromInstance(targetInst);
 
 
 
 
 
 
 
 
 
 
 
 
16554
 
16555
+ if (updateValueIfChanged(targetNode)) {
16556
+ return targetInst;
16557
+ }
16558
+ }
16559
 
16560
+ function getTargetInstForChangeEvent(domEventName, targetInst) {
16561
+ if (domEventName === 'change') {
16562
+ return targetInst;
 
 
 
 
 
 
 
 
 
16563
  }
 
16564
  }
16565
+ /**
16566
+ * SECTION: handle `input` event
16567
+ */
16568
 
 
16569
 
16570
+ var isInputEventSupported = false;
16571
+
16572
+ if (canUseDOM) {
16573
+ // IE9 claims to support the input event but fails to trigger it when
16574
+ // deleting text, so we ignore its input events.
16575
+ isInputEventSupported = isEventSupported('input') && (!document.documentMode || document.documentMode > 9);
16576
+ }
16577
  /**
16578
+ * (For IE <=9) Starts tracking propertychange events on the passed-in element
16579
+ * and override the value property so that we can distinguish user events from
16580
+ * value changes in JS.
16581
  */
 
 
 
 
 
 
 
 
 
16582
 
 
16583
 
16584
+ function startWatchingForValueChange(target, targetInst) {
16585
+ activeElement = target;
16586
+ activeElementInst = targetInst;
16587
+ activeElement.attachEvent('onpropertychange', handlePropertyChange);
16588
+ }
16589
+ /**
16590
+ * (For IE <=9) Removes the event listeners from the currently-tracked element,
16591
+ * if any exists.
16592
+ */
16593
 
 
16594
 
16595
+ function stopWatchingForValueChange() {
16596
+ if (!activeElement) {
16597
+ return;
16598
+ }
16599
+
16600
+ activeElement.detachEvent('onpropertychange', handlePropertyChange);
16601
+ activeElement = null;
16602
+ activeElementInst = null;
16603
+ }
16604
  /**
16605
+ * (For IE <=9) Handles a propertychange event, sending a `change` event if
16606
+ * the value of the active element has changed.
 
16607
  */
16608
+
16609
+
16610
+ function handlePropertyChange(nativeEvent) {
16611
+ if (nativeEvent.propertyName !== 'value') {
16612
  return;
16613
  }
 
16614
 
16615
+ if (getInstIfValueChanged(activeElementInst)) {
16616
+ manualDispatchChangeEvent(nativeEvent);
16617
+ }
16618
+ }
16619
 
16620
+ function handleEventsForInputEventPolyfill(domEventName, target, targetInst) {
16621
+ if (domEventName === 'focusin') {
16622
+ // In IE9, propertychange fires for most input events but is buggy and
16623
+ // doesn't fire when text is deleted, but conveniently, selectionchange
16624
+ // appears to fire in all of the remaining cases so we catch those and
16625
+ // forward the event if the value has changed
16626
+ // In either case, we don't want to call the event handler if the value
16627
+ // is changed from JS so we redefine a setter for `.value` that updates
16628
+ // our activeElementValue variable, allowing us to ignore those changes
16629
+ //
16630
+ // stopWatching() should be a noop here but we call it just in case we
16631
+ // missed a blur event somehow.
16632
+ stopWatchingForValueChange();
16633
+ startWatchingForValueChange(target, targetInst);
16634
+ } else if (domEventName === 'focusout') {
16635
+ stopWatchingForValueChange();
16636
+ }
16637
+ } // For IE8 and IE9.
16638
 
 
 
 
 
 
 
16639
 
16640
+ function getTargetInstForInputEventPolyfill(domEventName, targetInst) {
16641
+ if (domEventName === 'selectionchange' || domEventName === 'keyup' || domEventName === 'keydown') {
16642
+ // On the selectionchange event, the target is just document which isn't
16643
+ // helpful for us so just check activeElement instead.
16644
+ //
16645
+ // 99% of the time, keydown and keyup aren't necessary. IE8 fails to fire
16646
+ // propertychange on the first input event after setting `value` from a
16647
+ // script and fires only keydown, keypress, keyup. Catching keyup usually
16648
+ // gets it and catching keydown lets us fire an event for the first
16649
+ // keystroke if user does a key repeat (it'll be a little delayed: right
16650
+ // before the second keystroke). Other input methods (e.g., paste) seem to
16651
+ // fire selectionchange normally.
16652
+ return getInstIfValueChanged(activeElementInst);
16653
+ }
16654
  }
16655
+ /**
16656
+ * SECTION: handle `click` event
16657
+ */
16658
 
 
16659
 
16660
+ function shouldUseClickEvent(elem) {
16661
+ // Use the `click` event to detect changes to checkbox and radio inputs.
16662
+ // This approach works across all browsers, whereas `change` does not fire
16663
+ // until `blur` in IE8.
16664
+ var nodeName = elem.nodeName;
16665
+ return nodeName && nodeName.toLowerCase() === 'input' && (elem.type === 'checkbox' || elem.type === 'radio');
16666
+ }
16667
 
16668
+ function getTargetInstForClickEvent(domEventName, targetInst) {
16669
+ if (domEventName === 'click') {
16670
+ return getInstIfValueChanged(targetInst);
16671
  }
16672
+ }
16673
 
16674
+ function getTargetInstForInputOrChangeEvent(domEventName, targetInst) {
16675
+ if (domEventName === 'input' || domEventName === 'change') {
16676
+ return getInstIfValueChanged(targetInst);
16677
  }
16678
+ }
16679
 
16680
+ function handleControlledInputBlur(node) {
16681
+ var state = node._wrapperState;
16682
 
16683
+ if (!state || !state.controlled || node.type !== 'number') {
16684
+ return;
 
16685
  }
16686
 
16687
+ {
16688
+ // If controlled, assign the value attribute to the current value on blur
16689
+ setDefaultValue(node, 'number', node.value);
 
 
 
 
 
 
 
 
 
 
16690
  }
16691
+ }
16692
+ /**
16693
+ * This plugin creates an `onChange` event that normalizes change events
16694
+ * across form elements. This event fires at a time when it's possible to
16695
+ * change the element's value without seeing a flicker.
16696
+ *
16697
+ * Supported elements are:
16698
+ * - input (see `isTextInputElement`)
16699
+ * - textarea
16700
+ * - select
16701
+ */
16702
 
 
 
 
 
 
 
16703
 
16704
+ function extractEvents$1(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {
16705
+ var targetNode = targetInst ? getNodeFromInstance(targetInst) : window;
16706
+ var getTargetInstFunc, handleEventFunc;
16707
 
16708
+ if (shouldUseChangeEvent(targetNode)) {
16709
+ getTargetInstFunc = getTargetInstForChangeEvent;
16710
+ } else if (isTextInputElement(targetNode)) {
16711
+ if (isInputEventSupported) {
16712
+ getTargetInstFunc = getTargetInstForInputOrChangeEvent;
16713
+ } else {
16714
+ getTargetInstFunc = getTargetInstForInputEventPolyfill;
16715
+ handleEventFunc = handleEventsForInputEventPolyfill;
16716
+ }
16717
+ } else if (shouldUseClickEvent(targetNode)) {
16718
+ getTargetInstFunc = getTargetInstForClickEvent;
16719
  }
16720
 
16721
+ if (getTargetInstFunc) {
16722
+ var inst = getTargetInstFunc(domEventName, targetInst);
16723
+
16724
+ if (inst) {
16725
+ createAndAccumulateChangeEvent(dispatchQueue, inst, nativeEvent, nativeEventTarget);
16726
+ return;
16727
+ }
16728
  }
16729
 
16730
+ if (handleEventFunc) {
16731
+ handleEventFunc(domEventName, targetNode, targetInst);
16732
+ } // When blurring, set the value attribute for number inputs
16733
+
16734
 
16735
+ if (domEventName === 'focusout') {
16736
+ handleControlledInputBlur(targetNode);
16737
+ }
16738
+ }
16739
 
16740
+ function registerEvents$2() {
16741
+ registerDirectEvent('onMouseEnter', ['mouseout', 'mouseover']);
16742
+ registerDirectEvent('onMouseLeave', ['mouseout', 'mouseover']);
16743
+ registerDirectEvent('onPointerEnter', ['pointerout', 'pointerover']);
16744
+ registerDirectEvent('onPointerLeave', ['pointerout', 'pointerover']);
16745
  }
16746
+ /**
16747
+ * For almost every interaction we care about, there will be both a top-level
16748
+ * `mouseover` and `mouseout` event that occurs. Only use `mouseout` so that
16749
+ * we do not extract duplicate events. However, moving the mouse into the
16750
+ * browser from outside will not fire a `mouseout` event. In this case, we use
16751
+ * the `mouseover` top-level event.
16752
+ */
16753
 
 
16754
 
16755
+ function extractEvents$2(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {
16756
+ var isOverEvent = domEventName === 'mouseover' || domEventName === 'pointerover';
16757
+ var isOutEvent = domEventName === 'mouseout' || domEventName === 'pointerout';
16758
 
16759
+ if (isOverEvent && (eventSystemFlags & IS_REPLAYED) === 0) {
16760
+ // If this is an over event with a target, we might have already dispatched
16761
+ // the event in the out event of the other target. If this is replayed,
16762
+ // then it's because we couldn't dispatch against this target previously
16763
+ // so we have to do it now instead.
16764
+ var related = nativeEvent.relatedTarget || nativeEvent.fromElement;
16765
 
16766
+ if (related) {
16767
+ // If the related node is managed by React, we can assume that we have
16768
+ // already dispatched the corresponding events during its mouseout.
16769
+ if (getClosestInstanceFromNode(related) || isContainerMarkedAsRoot(related)) {
16770
+ return;
16771
+ }
16772
+ }
16773
+ }
16774
 
16775
+ if (!isOutEvent && !isOverEvent) {
16776
+ // Must not be a mouse or pointer in or out - ignoring.
16777
+ return;
16778
+ }
 
 
16779
 
16780
+ var win; // TODO: why is this nullable in the types but we read from it?
 
 
 
 
16781
 
16782
+ if (nativeEventTarget.window === nativeEventTarget) {
16783
+ // `nativeEventTarget` is probably a window object.
16784
+ win = nativeEventTarget;
16785
+ } else {
16786
+ // TODO: Figure out why `ownerDocument` is sometimes undefined in IE8.
16787
+ var doc = nativeEventTarget.ownerDocument;
16788
 
16789
+ if (doc) {
16790
+ win = doc.defaultView || doc.parentWindow;
16791
+ } else {
16792
+ win = window;
16793
+ }
16794
+ }
16795
 
16796
+ var from;
16797
+ var to;
 
 
 
 
 
 
 
16798
 
16799
+ if (isOutEvent) {
16800
+ var _related = nativeEvent.relatedTarget || nativeEvent.toElement;
16801
 
16802
+ from = targetInst;
16803
+ to = _related ? getClosestInstanceFromNode(_related) : null;
16804
 
16805
+ if (to !== null) {
16806
+ var nearestMounted = getNearestMountedFiber(to);
16807
 
16808
+ if (to !== nearestMounted || to.tag !== HostComponent && to.tag !== HostText) {
16809
+ to = null;
16810
+ }
16811
+ }
16812
+ } else {
16813
+ // Moving to a node from outside the window.
16814
+ from = null;
16815
+ to = targetInst;
16816
+ }
16817
 
16818
+ if (from === to) {
16819
+ // Nothing pertains to our managed components.
16820
+ return;
16821
+ }
16822
 
16823
+ var SyntheticEventCtor = SyntheticMouseEvent;
16824
+ var leaveEventType = 'onMouseLeave';
16825
+ var enterEventType = 'onMouseEnter';
16826
+ var eventTypePrefix = 'mouse';
16827
 
16828
+ if (domEventName === 'pointerout' || domEventName === 'pointerover') {
16829
+ SyntheticEventCtor = SyntheticPointerEvent;
16830
+ leaveEventType = 'onPointerLeave';
16831
+ enterEventType = 'onPointerEnter';
16832
+ eventTypePrefix = 'pointer';
16833
  }
 
 
16834
 
16835
+ var fromNode = from == null ? win : getNodeFromInstance(from);
16836
+ var toNode = to == null ? win : getNodeFromInstance(to);
16837
+ var leave = new SyntheticEventCtor(leaveEventType, eventTypePrefix + 'leave', from, nativeEvent, nativeEventTarget);
16838
+ leave.target = fromNode;
16839
+ leave.relatedTarget = toNode;
16840
+ var enter = null; // We should only process this nativeEvent if we are processing
16841
+ // the first ancestor. Next time, we will ignore the event.
16842
+
16843
+ var nativeTargetInst = getClosestInstanceFromNode(nativeEventTarget);
16844
+
16845
+ if (nativeTargetInst === targetInst) {
16846
+ var enterEvent = new SyntheticEventCtor(enterEventType, eventTypePrefix + 'enter', to, nativeEvent, nativeEventTarget);
16847
+ enterEvent.target = toNode;
16848
+ enterEvent.relatedTarget = fromNode;
16849
+ enter = enterEvent;
16850
  }
 
 
16851
 
16852
+ accumulateEnterLeaveTwoPhaseListeners(dispatchQueue, leave, enter, from, to);
16853
+ }
16854
 
16855
  /**
16856
+ * inlined Object.is polyfill to avoid requiring consumers ship their own
16857
+ * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
 
16858
  */
16859
+ function is(x, y) {
16860
+ return x === y && (x !== 0 || 1 / x === 1 / y) || x !== x && y !== y // eslint-disable-line no-self-compare
16861
+ ;
16862
+ }
 
 
 
 
 
16863
 
16864
+ var objectIs = typeof Object.is === 'function' ? Object.is : is;
 
16865
 
16866
+ var hasOwnProperty$2 = Object.prototype.hasOwnProperty;
16867
+ /**
16868
+ * Performs equality by iterating through keys on an object and returning false
16869
+ * when any key has values which are not strictly equal between the arguments.
16870
+ * Returns true when the values of all keys are strictly equal.
16871
+ */
16872
 
16873
+ function shallowEqual(objA, objB) {
16874
+ if (objectIs(objA, objB)) {
16875
+ return true;
16876
  }
16877
 
16878
+ if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {
16879
+ return false;
 
 
 
16880
  }
16881
 
16882
+ var keysA = Object.keys(objA);
16883
+ var keysB = Object.keys(objB);
 
 
 
16884
 
16885
+ if (keysA.length !== keysB.length) {
16886
+ return false;
16887
+ } // Test for A's keys different from B.
16888
 
 
16889
 
16890
+ for (var i = 0; i < keysA.length; i++) {
16891
+ if (!hasOwnProperty$2.call(objB, keysA[i]) || !objectIs(objA[keysA[i]], objB[keysA[i]])) {
16892
+ return false;
16893
+ }
16894
+ }
16895
 
16896
+ return true;
16897
+ }
 
16898
 
16899
  /**
16900
+ * Given any node return the first leaf node without children.
16901
+ *
16902
+ * @param {DOMElement|DOMTextNode} node
16903
+ * @return {DOMElement|DOMTextNode}
16904
  */
 
 
 
 
 
 
 
 
 
16905
 
16906
+ function getLeafNode(node) {
16907
+ while (node && node.firstChild) {
16908
+ node = node.firstChild;
 
 
 
 
 
 
 
 
16909
  }
16910
 
16911
+ return node;
16912
+ }
16913
+ /**
16914
+ * Get the next sibling within a container. This will walk up the
16915
+ * DOM if a node's siblings have been exhausted.
16916
+ *
16917
+ * @param {DOMElement|DOMTextNode} node
16918
+ * @return {?DOMElement|DOMTextNode}
16919
+ */
16920
+
16921
+
16922
+ function getSiblingNode(node) {
16923
+ while (node) {
16924
+ if (node.nextSibling) {
16925
+ return node.nextSibling;
16926
  }
16927
+
16928
+ node = node.parentNode;
16929
  }
16930
+ }
16931
+ /**
16932
+ * Get object describing the nodes which contain characters at offset.
16933
+ *
16934
+ * @param {DOMElement|DOMTextNode} root
16935
+ * @param {number} offset
16936
+ * @return {?object}
16937
+ */
16938
 
 
 
 
 
 
16939
 
16940
+ function getNodeForCharacterOffset(root, offset) {
16941
+ var node = getLeafNode(root);
16942
+ var nodeStart = 0;
16943
+ var nodeEnd = 0;
16944
+
16945
+ while (node) {
16946
+ if (node.nodeType === TEXT_NODE) {
16947
+ nodeEnd = nodeStart + node.textContent.length;
16948
+
16949
+ if (nodeStart <= offset && nodeEnd >= offset) {
16950
+ return {
16951
+ node: node,
16952
+ offset: offset - nodeStart
16953
+ };
16954
+ }
16955
+
16956
+ nodeStart = nodeEnd;
16957
  }
16958
+
16959
+ node = getLeafNode(getSiblingNode(node));
16960
  }
16961
+ }
16962
 
16963
  /**
16964
+ * @param {DOMElement} outerNode
16965
+ * @return {?object}
16966
  */
 
 
 
 
 
 
 
 
 
16967
 
16968
+ function getOffsets(outerNode) {
16969
+ var ownerDocument = outerNode.ownerDocument;
16970
+ var win = ownerDocument && ownerDocument.defaultView || window;
16971
+ var selection = win.getSelection && win.getSelection();
 
 
 
 
 
16972
 
16973
+ if (!selection || selection.rangeCount === 0) {
16974
+ return null;
 
 
 
16975
  }
16976
 
16977
+ var anchorNode = selection.anchorNode,
16978
+ anchorOffset = selection.anchorOffset,
16979
+ focusNode = selection.focusNode,
16980
+ focusOffset = selection.focusOffset; // In Firefox, anchorNode and focusNode can be "anonymous divs", e.g. the
16981
+ // up/down buttons on an <input type="number">. Anonymous divs do not seem to
16982
+ // expose properties, triggering a "Permission denied error" if any of its
16983
+ // properties are accessed. The only seemingly possible way to avoid erroring
16984
+ // is to access a property that typically works for non-anonymous divs and
16985
+ // catch any error that may otherwise arise. See
16986
+ // https://bugzilla.mozilla.org/show_bug.cgi?id=208427
16987
 
16988
+ try {
16989
+ /* eslint-disable no-unused-expressions */
16990
+ anchorNode.nodeType;
16991
+ focusNode.nodeType;
16992
+ /* eslint-enable no-unused-expressions */
16993
+ } catch (e) {
16994
+ return null;
 
 
 
 
16995
  }
16996
 
16997
+ return getModernOffsetsFromPoints(outerNode, anchorNode, anchorOffset, focusNode, focusOffset);
16998
+ }
16999
+ /**
17000
+ * Returns {start, end} where `start` is the character/codepoint index of
17001
+ * (anchorNode, anchorOffset) within the textContent of `outerNode`, and
17002
+ * `end` is the index of (focusNode, focusOffset).
17003
+ *
17004
+ * Returns null if you pass in garbage input but we should probably just crash.
17005
+ *
17006
+ * Exported only for testing.
17007
+ */
17008
 
17009
+ function getModernOffsetsFromPoints(outerNode, anchorNode, anchorOffset, focusNode, focusOffset) {
17010
+ var length = 0;
17011
+ var start = -1;
17012
+ var end = -1;
17013
+ var indexWithinAnchor = 0;
17014
+ var indexWithinFocus = 0;
17015
+ var node = outerNode;
17016
+ var parentNode = null;
 
 
17017
 
17018
+ outer: while (true) {
17019
+ var next = null;
17020
 
17021
+ while (true) {
17022
+ if (node === anchorNode && (anchorOffset === 0 || node.nodeType === TEXT_NODE)) {
17023
+ start = length + anchorOffset;
17024
+ }
17025
 
17026
+ if (node === focusNode && (focusOffset === 0 || node.nodeType === TEXT_NODE)) {
17027
+ end = length + focusOffset;
17028
+ }
17029
 
17030
+ if (node.nodeType === TEXT_NODE) {
17031
+ length += node.nodeValue.length;
17032
+ }
 
 
 
 
 
 
17033
 
17034
+ if ((next = node.firstChild) === null) {
17035
+ break;
17036
+ } // Moving from `node` to its first child `next`.
 
 
 
 
 
 
17037
 
 
 
 
17038
 
17039
+ parentNode = node;
17040
+ node = next;
17041
+ }
 
17042
 
17043
+ while (true) {
17044
+ if (node === outerNode) {
17045
+ // If `outerNode` has children, this is always the second time visiting
17046
+ // it. If it has no children, this is still the first loop, and the only
17047
+ // valid selection is anchorNode and focusNode both equal to this node
17048
+ // and both offsets 0, in which case we will have handled above.
17049
+ break outer;
17050
+ }
17051
 
17052
+ if (parentNode === anchorNode && ++indexWithinAnchor === anchorOffset) {
17053
+ start = length;
17054
+ }
 
 
 
 
17055
 
17056
+ if (parentNode === focusNode && ++indexWithinFocus === focusOffset) {
17057
+ end = length;
17058
+ }
 
17059
 
17060
+ if ((next = node.nextSibling) !== null) {
17061
+ break;
17062
+ }
 
17063
 
17064
+ node = parentNode;
17065
+ parentNode = node.parentNode;
17066
+ } // Moving from `node` to its next sibling `next`.
 
 
 
17067
 
 
17068
 
17069
+ node = next;
17070
+ }
17071
+
17072
+ if (start === -1 || end === -1) {
17073
+ // This should never happen. (Would happen if the anchor/focus nodes aren't
17074
+ // actually inside the passed-in node.)
17075
+ return null;
17076
+ }
17077
+
17078
+ return {
17079
+ start: start,
17080
+ end: end
17081
+ };
17082
  }
17083
+ /**
17084
+ * In modern non-IE browsers, we can support both forward and backward
17085
+ * selections.
17086
+ *
17087
+ * Note: IE10+ supports the Selection object, but it does not support
17088
+ * the `extend` method, which means that even in modern IE, it's not possible
17089
+ * to programmatically create a backward selection. Thus, for all IE
17090
+ * versions, we use the old IE API to create our selections.
17091
+ *
17092
+ * @param {DOMElement|DOMTextNode} node
17093
+ * @param {object} offsets
17094
+ */
17095
 
17096
+ function setOffsets(node, offsets) {
17097
+ var doc = node.ownerDocument || document;
17098
+ var win = doc && doc.defaultView || window; // Edge fails with "Object expected" in some scenarios.
17099
+ // (For instance: TinyMCE editor used in a list component that supports pasting to add more,
17100
+ // fails when pasting 100+ items)
17101
 
17102
+ if (!win.getSelection) {
17103
+ return;
 
 
 
 
 
 
 
17104
  }
 
17105
 
17106
+ var selection = win.getSelection();
17107
+ var length = node.textContent.length;
17108
+ var start = Math.min(offsets.start, length);
17109
+ var end = offsets.end === undefined ? start : Math.min(offsets.end, length); // IE 11 uses modern selection, but doesn't support the extend method.
17110
+ // Flip backward selections, so we can set with a single range.
17111
 
17112
+ if (!selection.extend && start > end) {
17113
+ var temp = end;
17114
+ end = start;
17115
+ start = temp;
17116
+ }
17117
 
17118
+ var startMarker = getNodeForCharacterOffset(node, start);
17119
+ var endMarker = getNodeForCharacterOffset(node, end);
17120
 
17121
+ if (startMarker && endMarker) {
17122
+ if (selection.rangeCount === 1 && selection.anchorNode === startMarker.node && selection.anchorOffset === startMarker.offset && selection.focusNode === endMarker.node && selection.focusOffset === endMarker.offset) {
17123
+ return;
17124
+ }
17125
+
17126
+ var range = doc.createRange();
17127
+ range.setStart(startMarker.node, startMarker.offset);
17128
+ selection.removeAllRanges();
17129
+
17130
+ if (start > end) {
17131
+ selection.addRange(range);
17132
+ selection.extend(endMarker.node, endMarker.offset);
17133
+ } else {
17134
+ range.setEnd(endMarker.node, endMarker.offset);
17135
+ selection.addRange(range);
17136
+ }
17137
  }
17138
+ }
 
 
 
 
 
 
 
 
 
17139
 
17140
+ function isTextNode(node) {
17141
+ return node && node.nodeType === TEXT_NODE;
17142
+ }
17143
 
17144
+ function containsNode(outerNode, innerNode) {
17145
+ if (!outerNode || !innerNode) {
17146
+ return false;
17147
+ } else if (outerNode === innerNode) {
17148
+ return true;
17149
+ } else if (isTextNode(outerNode)) {
17150
+ return false;
17151
+ } else if (isTextNode(innerNode)) {
17152
+ return containsNode(outerNode, innerNode.parentNode);
17153
+ } else if ('contains' in outerNode) {
17154
+ return outerNode.contains(innerNode);
17155
+ } else if (outerNode.compareDocumentPosition) {
17156
+ return !!(outerNode.compareDocumentPosition(innerNode) & 16);
17157
+ } else {
17158
+ return false;
17159
+ }
17160
+ }
17161
 
17162
+ function isInDocument(node) {
17163
+ return node && node.ownerDocument && containsNode(node.ownerDocument.documentElement, node);
17164
+ }
17165
 
17166
+ function isSameOriginFrame(iframe) {
17167
+ try {
17168
+ // Accessing the contentDocument of a HTMLIframeElement can cause the browser
17169
+ // to throw, e.g. if it has a cross-origin src attribute.
17170
+ // Safari will show an error in the console when the access results in "Blocked a frame with origin". e.g:
17171
+ // iframe.contentDocument.defaultView;
17172
+ // A safety way is to access one of the cross origin properties: Window or Location
17173
+ // Which might result in "SecurityError" DOM Exception and it is compatible to Safari.
17174
+ // https://html.spec.whatwg.org/multipage/browsers.html#integration-with-idl
17175
+ return typeof iframe.contentWindow.location.href === 'string';
17176
+ } catch (err) {
17177
+ return false;
17178
+ }
17179
+ }
17180
 
17181
+ function getActiveElementDeep() {
17182
+ var win = window;
17183
+ var element = getActiveElement();
17184
 
17185
+ while (element instanceof win.HTMLIFrameElement) {
17186
+ if (isSameOriginFrame(element)) {
17187
+ win = element.contentWindow;
17188
+ } else {
17189
+ return element;
17190
+ }
17191
 
17192
+ element = getActiveElement(win.document);
17193
+ }
17194
+
17195
+ return element;
17196
+ }
17197
+ /**
17198
+ * @ReactInputSelection: React input selection module. Based on Selection.js,
17199
+ * but modified to be suitable for react and has a couple of bug fixes (doesn't
17200
+ * assume buttons have range selections allowed).
17201
+ * Input selection module for React.
17202
  */
17203
 
17204
+ /**
17205
+ * @hasSelectionCapabilities: we get the element types that support selection
17206
+ * from https://html.spec.whatwg.org/#do-not-apply, looking at `selectionStart`
17207
+ * and `selectionEnd` rows.
17208
+ */
 
 
 
 
 
 
 
 
17209
 
 
17210
 
17211
+ function hasSelectionCapabilities(elem) {
17212
+ var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();
17213
+ return nodeName && (nodeName === 'input' && (elem.type === 'text' || elem.type === 'search' || elem.type === 'tel' || elem.type === 'url' || elem.type === 'password') || nodeName === 'textarea' || elem.contentEditable === 'true');
17214
+ }
17215
+ function getSelectionInformation() {
17216
+ var focusedElem = getActiveElementDeep();
17217
+ return {
17218
+ focusedElem: focusedElem,
17219
+ selectionRange: hasSelectionCapabilities(focusedElem) ? getSelection(focusedElem) : null
17220
+ };
17221
+ }
17222
+ /**
17223
+ * @restoreSelection: If any selection information was potentially lost,
17224
+ * restore it. This is useful when performing operations that could remove dom
17225
+ * nodes and place them back in, resulting in focus being lost.
17226
+ */
17227
 
17228
+ function restoreSelection(priorSelectionInformation) {
17229
+ var curFocusedElem = getActiveElementDeep();
17230
+ var priorFocusedElem = priorSelectionInformation.focusedElem;
17231
+ var priorSelectionRange = priorSelectionInformation.selectionRange;
17232
 
17233
+ if (curFocusedElem !== priorFocusedElem && isInDocument(priorFocusedElem)) {
17234
+ if (priorSelectionRange !== null && hasSelectionCapabilities(priorFocusedElem)) {
17235
+ setSelection(priorFocusedElem, priorSelectionRange);
17236
+ } // Focusing a node can change the scroll position, which is undesirable
17237
 
 
17238
 
17239
+ var ancestors = [];
17240
+ var ancestor = priorFocusedElem;
 
 
 
17241
 
17242
+ while (ancestor = ancestor.parentNode) {
17243
+ if (ancestor.nodeType === ELEMENT_NODE) {
17244
+ ancestors.push({
17245
+ element: ancestor,
17246
+ left: ancestor.scrollLeft,
17247
+ top: ancestor.scrollTop
17248
+ });
17249
+ }
17250
  }
17251
 
17252
+ if (typeof priorFocusedElem.focus === 'function') {
17253
+ priorFocusedElem.focus();
17254
+ }
17255
 
17256
+ for (var i = 0; i < ancestors.length; i++) {
17257
+ var info = ancestors[i];
17258
+ info.element.scrollLeft = info.left;
17259
+ info.element.scrollTop = info.top;
 
 
 
 
 
 
17260
  }
17261
+ }
17262
+ }
17263
+ /**
17264
+ * @getSelection: Gets the selection bounds of a focused textarea, input or
17265
+ * contentEditable node.
17266
+ * -@input: Look up selection bounds of this input
17267
+ * -@return {start: selectionStart, end: selectionEnd}
17268
+ */
17269
 
17270
+ function getSelection(input) {
17271
+ var selection;
17272
 
17273
+ if ('selectionStart' in input) {
17274
+ // Modern browser with input or textarea.
17275
+ selection = {
17276
+ start: input.selectionStart,
17277
+ end: input.selectionEnd
17278
+ };
17279
+ } else {
17280
+ // Content editable or old IE textarea.
17281
+ selection = getOffsets(input);
17282
+ }
17283
 
17284
+ return selection || {
17285
+ start: 0,
17286
+ end: 0
 
 
 
 
 
17287
  };
17288
+ }
17289
+ /**
17290
+ * @setSelection: Sets the selection bounds of a textarea or input and focuses
17291
+ * the input.
17292
+ * -@input Set selection bounds of this input or textarea
17293
+ * -@offsets Object of same form that is returned from get*
17294
+ */
17295
 
17296
+ function setSelection(input, offsets) {
17297
+ var start = offsets.start;
17298
+ var end = offsets.end;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17299
 
17300
+ if (end === undefined) {
17301
+ end = start;
17302
+ }
17303
 
17304
+ if ('selectionStart' in input) {
17305
+ input.selectionStart = start;
17306
+ input.selectionEnd = Math.min(end, input.value.length);
17307
+ } else {
17308
+ setOffsets(input, offsets);
17309
+ }
17310
+ }
17311
+
17312
+ var skipSelectionChangeEvent = canUseDOM && 'documentMode' in document && document.documentMode <= 11;
17313
+
17314
+ function registerEvents$3() {
17315
+ registerTwoPhaseEvent('onSelect', ['focusout', 'contextmenu', 'dragend', 'focusin', 'keydown', 'keyup', 'mousedown', 'mouseup', 'selectionchange']);
17316
+ }
17317
+
17318
+ var activeElement$1 = null;
17319
+ var activeElementInst$1 = null;
17320
+ var lastSelection = null;
17321
+ var mouseDown = false;
17322
+ /**
17323
+ * Get an object which is a unique representation of the current selection.
17324
+ *
17325
+ * The return value will not be consistent across nodes or browsers, but
17326
+ * two identical selections on the same node will return identical objects.
17327
+ */
17328
 
17329
+ function getSelection$1(node) {
17330
+ if ('selectionStart' in node && hasSelectionCapabilities(node)) {
17331
  return {
17332
+ start: node.selectionStart,
17333
+ end: node.selectionEnd
17334
  };
17335
+ } else {
17336
+ var win = node.ownerDocument && node.ownerDocument.defaultView || window;
17337
+ var selection = win.getSelection();
17338
+ return {
17339
+ anchorNode: selection.anchorNode,
17340
+ anchorOffset: selection.anchorOffset,
17341
+ focusNode: selection.focusNode,
17342
+ focusOffset: selection.focusOffset
17343
+ };
17344
+ }
17345
+ }
17346
+ /**
17347
+ * Get document associated with the event target.
17348
+ */
17349
 
 
 
 
 
 
 
 
 
 
17350
 
17351
+ function getEventTargetDocument(eventTarget) {
17352
+ return eventTarget.window === eventTarget ? eventTarget.document : eventTarget.nodeType === DOCUMENT_NODE ? eventTarget : eventTarget.ownerDocument;
17353
+ }
17354
+ /**
17355
+ * Poll selection to see whether it's changed.
17356
+ *
17357
+ * @param {object} nativeEvent
17358
+ * @param {object} nativeEventTarget
17359
+ * @return {?SyntheticEvent}
17360
+ */
17361
 
 
 
 
 
 
 
 
 
 
17362
 
17363
+ function constructSelectEvent(dispatchQueue, nativeEvent, nativeEventTarget) {
17364
+ // Ensure we have the right element, and that the user is not dragging a
17365
+ // selection (this matches native `select` event behavior). In HTML5, select
17366
+ // fires only on input and textarea thus if there's no focused element we
17367
+ // won't dispatch.
17368
+ var doc = getEventTargetDocument(nativeEventTarget);
 
 
 
17369
 
17370
+ if (mouseDown || activeElement$1 == null || activeElement$1 !== getActiveElement(doc)) {
17371
+ return;
17372
+ } // Only fire when selection has actually changed.
 
 
17373
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17374
 
17375
+ var currentSelection = getSelection$1(activeElement$1);
 
 
 
 
 
 
17376
 
17377
+ if (!lastSelection || !shallowEqual(lastSelection, currentSelection)) {
17378
+ lastSelection = currentSelection;
17379
+ var listeners = accumulateTwoPhaseListeners(activeElementInst$1, 'onSelect');
 
 
17380
 
17381
+ if (listeners.length > 0) {
17382
+ var event = new SyntheticEvent('onSelect', 'select', null, nativeEvent, nativeEventTarget);
17383
+ dispatchQueue.push({
17384
+ event: event,
17385
+ listeners: listeners
17386
+ });
17387
+ event.target = activeElement$1;
17388
  }
17389
+ }
17390
+ }
17391
+ /**
17392
+ * This plugin creates an `onSelect` event that normalizes select events
17393
+ * across form elements.
17394
+ *
17395
+ * Supported elements are:
17396
+ * - input (see `isTextInputElement`)
17397
+ * - textarea
17398
+ * - contentEditable
17399
+ *
17400
+ * This differs from native browser implementations in the following ways:
17401
+ * - Fires on contentEditable fields as well as inputs.
17402
+ * - Fires for collapsed selection.
17403
+ * - Fires after user input.
17404
+ */
17405
 
 
 
17406
 
17407
+ function extractEvents$3(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {
17408
+
17409
+ var targetNode = targetInst ? getNodeFromInstance(targetInst) : window;
17410
+
17411
+ switch (domEventName) {
17412
+ // Track the input node that has focus.
17413
+ case 'focusin':
17414
+ if (isTextInputElement(targetNode) || targetNode.contentEditable === 'true') {
17415
+ activeElement$1 = targetNode;
17416
+ activeElementInst$1 = targetInst;
17417
+ lastSelection = null;
17418
  }
 
 
 
 
 
17419
 
17420
+ break;
 
 
 
 
17421
 
17422
+ case 'focusout':
17423
+ activeElement$1 = null;
17424
+ activeElementInst$1 = null;
17425
+ lastSelection = null;
17426
+ break;
17427
+ // Don't fire the event while the user is dragging. This matches the
17428
+ // semantics of the native select event.
17429
 
17430
+ case 'mousedown':
17431
+ mouseDown = true;
17432
+ break;
17433
 
17434
+ case 'contextmenu':
17435
+ case 'mouseup':
17436
+ case 'dragend':
17437
+ mouseDown = false;
17438
+ constructSelectEvent(dispatchQueue, nativeEvent, nativeEventTarget);
17439
+ break;
17440
+ // Chrome and IE fire non-standard event when selection is changed (and
17441
+ // sometimes when it hasn't). IE's event fires out of order with respect
17442
+ // to key and input events on deletion, so we discard it.
17443
+ //
17444
+ // Firefox doesn't support selectionchange, so check selection status
17445
+ // after each key entry. The selection changes after keydown and before
17446
+ // keyup, but we check on keydown as well in the case of holding down a
17447
+ // key, when multiple keydown events are fired but only one keyup is.
17448
+ // This is also our approach for IE handling, for the reason above.
17449
+
17450
+ case 'selectionchange':
17451
+ if (skipSelectionChangeEvent) {
17452
+ break;
17453
+ }
17454
 
17455
+ // falls through
17456
 
17457
+ case 'keydown':
17458
+ case 'keyup':
17459
+ constructSelectEvent(dispatchQueue, nativeEvent, nativeEventTarget);
17460
+ }
17461
+ }
 
17462
 
17463
+ function extractEvents$4(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {
17464
+ var reactName = topLevelEventsToReactNames.get(domEventName);
 
 
 
 
17465
 
17466
+ if (reactName === undefined) {
17467
+ return;
17468
+ }
17469
 
17470
+ var SyntheticEventCtor = SyntheticEvent;
17471
+ var reactEventType = domEventName;
 
 
17472
 
17473
+ switch (domEventName) {
17474
+ case 'keypress':
17475
+ // Firefox creates a keypress event for function keys too. This removes
17476
+ // the unwanted keypress events. Enter is however both printable and
17477
+ // non-printable. One would expect Tab to be as well (but it isn't).
17478
+ if (getEventCharCode(nativeEvent) === 0) {
17479
+ return;
17480
+ }
17481
 
17482
+ /* falls through */
 
17483
 
17484
+ case 'keydown':
17485
+ case 'keyup':
17486
+ SyntheticEventCtor = SyntheticKeyboardEvent;
17487
+ break;
 
17488
 
17489
+ case 'focusin':
17490
+ reactEventType = 'focus';
17491
+ SyntheticEventCtor = SyntheticFocusEvent;
17492
+ break;
17493
 
17494
+ case 'focusout':
17495
+ reactEventType = 'blur';
17496
+ SyntheticEventCtor = SyntheticFocusEvent;
17497
+ break;
 
 
17498
 
17499
+ case 'beforeblur':
17500
+ case 'afterblur':
17501
+ SyntheticEventCtor = SyntheticFocusEvent;
17502
+ break;
 
 
 
 
 
 
 
17503
 
17504
+ case 'click':
17505
+ // Firefox creates a click event on right mouse clicks. This removes the
17506
+ // unwanted click events.
17507
+ if (nativeEvent.button === 2) {
17508
+ return;
17509
+ }
 
 
 
17510
 
17511
+ /* falls through */
 
 
 
 
 
17512
 
17513
+ case 'auxclick':
17514
+ case 'dblclick':
17515
+ case 'mousedown':
17516
+ case 'mousemove':
17517
+ case 'mouseup': // TODO: Disabled elements should not respond to mouse events
17518
 
17519
+ /* falls through */
 
17520
 
17521
+ case 'mouseout':
17522
+ case 'mouseover':
17523
+ case 'contextmenu':
17524
+ SyntheticEventCtor = SyntheticMouseEvent;
17525
+ break;
17526
 
17527
+ case 'drag':
17528
+ case 'dragend':
17529
+ case 'dragenter':
17530
+ case 'dragexit':
17531
+ case 'dragleave':
17532
+ case 'dragover':
17533
+ case 'dragstart':
17534
+ case 'drop':
17535
+ SyntheticEventCtor = SyntheticDragEvent;
17536
+ break;
17537
 
17538
+ case 'touchcancel':
17539
+ case 'touchend':
17540
+ case 'touchmove':
17541
+ case 'touchstart':
17542
+ SyntheticEventCtor = SyntheticTouchEvent;
17543
+ break;
17544
 
17545
+ case ANIMATION_END:
17546
+ case ANIMATION_ITERATION:
17547
+ case ANIMATION_START:
17548
+ SyntheticEventCtor = SyntheticAnimationEvent;
17549
+ break;
17550
 
17551
+ case TRANSITION_END:
17552
+ SyntheticEventCtor = SyntheticTransitionEvent;
17553
+ break;
17554
 
17555
+ case 'scroll':
17556
+ SyntheticEventCtor = SyntheticUIEvent;
17557
+ break;
 
 
 
17558
 
17559
+ case 'wheel':
17560
+ SyntheticEventCtor = SyntheticWheelEvent;
17561
+ break;
17562
 
17563
+ case 'copy':
17564
+ case 'cut':
17565
+ case 'paste':
17566
+ SyntheticEventCtor = SyntheticClipboardEvent;
17567
+ break;
 
 
 
 
 
 
 
 
17568
 
17569
+ case 'gotpointercapture':
17570
+ case 'lostpointercapture':
17571
+ case 'pointercancel':
17572
+ case 'pointerdown':
17573
+ case 'pointermove':
17574
+ case 'pointerout':
17575
+ case 'pointerover':
17576
+ case 'pointerup':
17577
+ SyntheticEventCtor = SyntheticPointerEvent;
17578
+ break;
17579
+ }
17580
 
17581
+ var inCapturePhase = (eventSystemFlags & IS_CAPTURE_PHASE) !== 0;
17582
 
17583
+ {
17584
+ // Some events don't bubble in the browser.
17585
+ // In the past, React has always bubbled them, but this can be surprising.
17586
+ // We're going to try aligning closer to the browser behavior by not bubbling
17587
+ // them in React either. We'll start by not bubbling onScroll, and then expand.
17588
+ var accumulateTargetOnly = !inCapturePhase && // TODO: ideally, we'd eventually add all events from
17589
+ // nonDelegatedEvents list in DOMPluginEventSystem.
17590
+ // Then we can remove this special list.
17591
+ // This is a breaking change that can wait until React 18.
17592
+ domEventName === 'scroll';
17593
+
17594
+ var _listeners = accumulateSinglePhaseListeners(targetInst, reactName, nativeEvent.type, inCapturePhase, accumulateTargetOnly);
17595
+
17596
+ if (_listeners.length > 0) {
17597
+ // Intentionally create event lazily.
17598
+ var _event = new SyntheticEventCtor(reactName, reactEventType, null, nativeEvent, nativeEventTarget);
17599
+
17600
+ dispatchQueue.push({
17601
+ event: _event,
17602
+ listeners: _listeners
17603
+ });
17604
+ }
17605
  }
 
 
17606
  }
17607
 
17608
+ // TODO: remove top-level side effect.
17609
+ registerSimpleEvents();
17610
+ registerEvents$2();
17611
+ registerEvents$1();
17612
+ registerEvents$3();
17613
+ registerEvents();
17614
+
17615
+ function extractEvents$5(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {
17616
+ // TODO: we should remove the concept of a "SimpleEventPlugin".
17617
+ // This is the basic functionality of the event system. All
17618
+ // the other plugins are essentially polyfills. So the plugin
17619
+ // should probably be inlined somewhere and have its logic
17620
+ // be core the to event system. This would potentially allow
17621
+ // us to ship builds of React without the polyfilled plugins below.
17622
+ extractEvents$4(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags);
17623
+ var shouldProcessPolyfillPlugins = (eventSystemFlags & SHOULD_NOT_PROCESS_POLYFILL_EVENT_PLUGINS) === 0; // We don't process these events unless we are in the
17624
+ // event's native "bubble" phase, which means that we're
17625
+ // not in the capture phase. That's because we emulate
17626
+ // the capture phase here still. This is a trade-off,
17627
+ // because in an ideal world we would not emulate and use
17628
+ // the phases properly, like we do with the SimpleEvent
17629
+ // plugin. However, the plugins below either expect
17630
+ // emulation (EnterLeave) or use state localized to that
17631
+ // plugin (BeforeInput, Change, Select). The state in
17632
+ // these modules complicates things, as you'll essentially
17633
+ // get the case where the capture phase event might change
17634
+ // state, only for the following bubble event to come in
17635
+ // later and not trigger anything as the state now
17636
+ // invalidates the heuristics of the event plugin. We
17637
+ // could alter all these plugins to work in such ways, but
17638
+ // that might cause other unknown side-effects that we
17639
+ // can't forsee right now.
17640
+
17641
+ if (shouldProcessPolyfillPlugins) {
17642
+ extractEvents$2(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags);
17643
+ extractEvents$1(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);
17644
+ extractEvents$3(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);
17645
+ extractEvents(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);
17646
+ }
17647
+ } // List of events that need to be individually attached to media elements.
17648
+
17649
+
17650
+ var mediaEventTypes = ['abort', 'canplay', 'canplaythrough', 'durationchange', 'emptied', 'encrypted', 'ended', 'error', 'loadeddata', 'loadedmetadata', 'loadstart', 'pause', 'play', 'playing', 'progress', 'ratechange', 'seeked', 'seeking', 'stalled', 'suspend', 'timeupdate', 'volumechange', 'waiting']; // We should not delegate these events to the container, but rather
17651
+ // set them on the actual target element itself. This is primarily
17652
+ // because these events do not consistently bubble in the DOM.
17653
+
17654
+ var nonDelegatedEvents = new Set(['cancel', 'close', 'invalid', 'load', 'scroll', 'toggle'].concat(mediaEventTypes));
17655
+
17656
+ function executeDispatch(event, listener, currentTarget) {
17657
+ var type = event.type || 'unknown-event';
17658
+ event.currentTarget = currentTarget;
17659
+ invokeGuardedCallbackAndCatchFirstError(type, listener, undefined, event);
17660
+ event.currentTarget = null;
17661
+ }
17662
 
17663
+ function processDispatchQueueItemsInOrder(event, dispatchListeners, inCapturePhase) {
17664
+ var previousInstance;
17665
 
17666
+ if (inCapturePhase) {
17667
+ for (var i = dispatchListeners.length - 1; i >= 0; i--) {
17668
+ var _dispatchListeners$i = dispatchListeners[i],
17669
+ instance = _dispatchListeners$i.instance,
17670
+ currentTarget = _dispatchListeners$i.currentTarget,
17671
+ listener = _dispatchListeners$i.listener;
17672
 
17673
+ if (instance !== previousInstance && event.isPropagationStopped()) {
17674
+ return;
17675
+ }
 
17676
 
17677
+ executeDispatch(event, listener, currentTarget);
17678
+ previousInstance = instance;
17679
+ }
17680
+ } else {
17681
+ for (var _i = 0; _i < dispatchListeners.length; _i++) {
17682
+ var _dispatchListeners$_i = dispatchListeners[_i],
17683
+ _instance = _dispatchListeners$_i.instance,
17684
+ _currentTarget = _dispatchListeners$_i.currentTarget,
17685
+ _listener = _dispatchListeners$_i.listener;
17686
 
17687
+ if (_instance !== previousInstance && event.isPropagationStopped()) {
17688
+ return;
17689
+ }
17690
 
17691
+ executeDispatch(event, _listener, _currentTarget);
17692
+ previousInstance = _instance;
17693
+ }
17694
  }
 
 
 
 
 
 
 
 
 
 
17695
  }
17696
 
17697
+ function processDispatchQueue(dispatchQueue, eventSystemFlags) {
17698
+ var inCapturePhase = (eventSystemFlags & IS_CAPTURE_PHASE) !== 0;
 
17699
 
17700
+ for (var i = 0; i < dispatchQueue.length; i++) {
17701
+ var _dispatchQueue$i = dispatchQueue[i],
17702
+ event = _dispatchQueue$i.event,
17703
+ listeners = _dispatchQueue$i.listeners;
17704
+ processDispatchQueueItemsInOrder(event, listeners, inCapturePhase); // event system doesn't use pooling.
17705
+ } // This would be a good time to rethrow if any of the event handlers threw.
 
17706
 
 
 
 
 
17707
 
17708
+ rethrowCaughtError();
17709
+ }
 
 
 
 
 
17710
 
17711
+ function dispatchEventsForPlugins(domEventName, eventSystemFlags, nativeEvent, targetInst, targetContainer) {
17712
+ var nativeEventTarget = getEventTarget(nativeEvent);
17713
+ var dispatchQueue = [];
17714
+ extractEvents$5(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags);
17715
+ processDispatchQueue(dispatchQueue, eventSystemFlags);
17716
+ }
17717
 
17718
+ function listenToNonDelegatedEvent(domEventName, targetElement) {
17719
+ var isCapturePhaseListener = false;
17720
+ var listenerSet = getEventListenerSet(targetElement);
17721
+ var listenerSetKey = getListenerSetKey(domEventName, isCapturePhaseListener);
 
 
17722
 
17723
+ if (!listenerSet.has(listenerSetKey)) {
17724
+ addTrappedEventListener(targetElement, domEventName, IS_NON_DELEGATED, isCapturePhaseListener);
17725
+ listenerSet.add(listenerSetKey);
 
17726
  }
17727
+ }
17728
+ var listeningMarker = '_reactListening' + Math.random().toString(36).slice(2);
17729
+ function listenToAllSupportedEvents(rootContainerElement) {
17730
+ {
17731
+ if (rootContainerElement[listeningMarker]) {
17732
+ // Performance optimization: don't iterate through events
17733
+ // for the same portal container or root node more than once.
17734
+ // TODO: once we remove the flag, we may be able to also
17735
+ // remove some of the bookkeeping maps used for laziness.
17736
+ return;
17737
+ }
17738
 
17739
+ rootContainerElement[listeningMarker] = true;
17740
+ allNativeEvents.forEach(function (domEventName) {
17741
+ if (!nonDelegatedEvents.has(domEventName)) {
17742
+ listenToNativeEvent(domEventName, false, rootContainerElement, null);
17743
+ }
17744
+
17745
+ listenToNativeEvent(domEventName, true, rootContainerElement, null);
17746
+ });
 
 
 
 
 
17747
  }
17748
+ }
17749
+ function listenToNativeEvent(domEventName, isCapturePhaseListener, rootContainerElement, targetElement) {
17750
+ var eventSystemFlags = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
17751
+ var target = rootContainerElement; // selectionchange needs to be attached to the document
17752
+ // otherwise it won't capture incoming events that are only
17753
+ // triggered on the document directly.
17754
+
17755
+ if (domEventName === 'selectionchange' && rootContainerElement.nodeType !== DOCUMENT_NODE) {
17756
+ target = rootContainerElement.ownerDocument;
17757
+ } // If the event can be delegated (or is capture phase), we can
17758
+ // register it to the root container. Otherwise, we should
17759
+ // register the event to the target element and mark it as
17760
+ // a non-delegated event.
17761
+
17762
+
17763
+ if (targetElement !== null && !isCapturePhaseListener && nonDelegatedEvents.has(domEventName)) {
17764
+ // For all non-delegated events, apart from scroll, we attach
17765
+ // their event listeners to the respective elements that their
17766
+ // events fire on. That means we can skip this step, as event
17767
+ // listener has already been added previously. However, we
17768
+ // special case the scroll event because the reality is that any
17769
+ // element can scroll.
17770
+ // TODO: ideally, we'd eventually apply the same logic to all
17771
+ // events from the nonDelegatedEvents list. Then we can remove
17772
+ // this special case and use the same logic for all events.
17773
+ if (domEventName !== 'scroll') {
17774
+ return;
17775
+ }
17776
+
17777
+ eventSystemFlags |= IS_NON_DELEGATED;
17778
+ target = targetElement;
17779
  }
 
 
 
 
 
 
17780
 
17781
+ var listenerSet = getEventListenerSet(target);
17782
+ var listenerSetKey = getListenerSetKey(domEventName, isCapturePhaseListener); // If the listener entry is empty or we should upgrade, then
17783
+ // we need to trap an event listener onto the target.
17784
 
17785
+ if (!listenerSet.has(listenerSetKey)) {
17786
+ if (isCapturePhaseListener) {
17787
+ eventSystemFlags |= IS_CAPTURE_PHASE;
17788
+ }
 
 
17789
 
17790
+ addTrappedEventListener(target, domEventName, eventSystemFlags, isCapturePhaseListener);
17791
+ listenerSet.add(listenerSetKey);
17792
+ }
17793
+ }
17794
 
17795
+ function addTrappedEventListener(targetContainer, domEventName, eventSystemFlags, isCapturePhaseListener, isDeferredListenerForLegacyFBSupport) {
17796
+ var listener = createEventListenerWrapperWithPriority(targetContainer, domEventName, eventSystemFlags); // If passive option is not supported, then the event will be
17797
+ // active and not passive.
 
 
17798
 
17799
+ var isPassiveListener = undefined;
 
 
 
17800
 
17801
+ if (passiveBrowserEventsSupported) {
17802
+ // Browsers introduced an intervention, making these events
17803
+ // passive by default on document. React doesn't bind them
17804
+ // to document anymore, but changing this now would undo
17805
+ // the performance wins from the change. So we emulate
17806
+ // the existing behavior manually on the roots now.
17807
+ // https://github.com/facebook/react/issues/19651
17808
+ if (domEventName === 'touchstart' || domEventName === 'touchmove' || domEventName === 'wheel') {
17809
+ isPassiveListener = true;
17810
+ }
17811
+ }
17812
 
17813
+ targetContainer = targetContainer;
17814
+ var unsubscribeListener; // When legacyFBSupport is enabled, it's for when we
 
17815
 
 
 
 
 
 
17816
 
17817
+ if (isCapturePhaseListener) {
17818
+ if (isPassiveListener !== undefined) {
17819
+ unsubscribeListener = addEventCaptureListenerWithPassiveFlag(targetContainer, domEventName, listener, isPassiveListener);
17820
+ } else {
17821
+ unsubscribeListener = addEventCaptureListener(targetContainer, domEventName, listener);
17822
+ }
17823
+ } else {
17824
+ if (isPassiveListener !== undefined) {
17825
+ unsubscribeListener = addEventBubbleListenerWithPassiveFlag(targetContainer, domEventName, listener, isPassiveListener);
17826
+ } else {
17827
+ unsubscribeListener = addEventBubbleListener(targetContainer, domEventName, listener);
17828
+ }
17829
+ }
17830
+ }
17831
 
17832
+ function isMatchingRootContainer(grandContainer, targetContainer) {
17833
+ return grandContainer === targetContainer || grandContainer.nodeType === COMMENT_NODE && grandContainer.parentNode === targetContainer;
17834
+ }
 
 
17835
 
17836
+ function dispatchEventForPluginEventSystem(domEventName, eventSystemFlags, nativeEvent, targetInst, targetContainer) {
17837
+ var ancestorInst = targetInst;
17838
 
17839
+ if ((eventSystemFlags & IS_EVENT_HANDLE_NON_MANAGED_NODE) === 0 && (eventSystemFlags & IS_NON_DELEGATED) === 0) {
17840
+ var targetContainerNode = targetContainer; // If we are using the legacy FB support flag, we
17841
 
17842
+ if (targetInst !== null) {
17843
+ // The below logic attempts to work out if we need to change
17844
+ // the target fiber to a different ancestor. We had similar logic
17845
+ // in the legacy event system, except the big difference between
17846
+ // systems is that the modern event system now has an event listener
17847
+ // attached to each React Root and React Portal Root. Together,
17848
+ // the DOM nodes representing these roots are the "rootContainer".
17849
+ // To figure out which ancestor instance we should use, we traverse
17850
+ // up the fiber tree from the target instance and attempt to find
17851
+ // root boundaries that match that of our current "rootContainer".
17852
+ // If we find that "rootContainer", we find the parent fiber
17853
+ // sub-tree for that root and make that our ancestor instance.
17854
+ var node = targetInst;
17855
 
17856
+ mainLoop: while (true) {
17857
+ if (node === null) {
17858
+ return;
17859
+ }
17860
 
17861
+ var nodeTag = node.tag;
 
 
 
 
 
 
 
17862
 
17863
+ if (nodeTag === HostRoot || nodeTag === HostPortal) {
17864
+ var container = node.stateNode.containerInfo;
 
 
 
 
 
 
17865
 
17866
+ if (isMatchingRootContainer(container, targetContainerNode)) {
17867
+ break;
17868
+ }
 
 
17869
 
17870
+ if (nodeTag === HostPortal) {
17871
+ // The target is a portal, but it's not the rootContainer we're looking for.
17872
+ // Normally portals handle their own events all the way down to the root.
17873
+ // So we should be able to stop now. However, we don't know if this portal
17874
+ // was part of *our* root.
17875
+ var grandNode = node.return;
17876
 
17877
+ while (grandNode !== null) {
17878
+ var grandTag = grandNode.tag;
 
 
17879
 
17880
+ if (grandTag === HostRoot || grandTag === HostPortal) {
17881
+ var grandContainer = grandNode.stateNode.containerInfo;
17882
 
17883
+ if (isMatchingRootContainer(grandContainer, targetContainerNode)) {
17884
+ // This is the rootContainer we're looking for and we found it as
17885
+ // a parent of the Portal. That means we can ignore it because the
17886
+ // Portal will bubble through to us.
17887
+ return;
17888
+ }
17889
+ }
17890
 
17891
+ grandNode = grandNode.return;
17892
+ }
17893
+ } // Now we need to find it's corresponding host fiber in the other
17894
+ // tree. To do this we can use getClosestInstanceFromNode, but we
17895
+ // need to validate that the fiber is a host instance, otherwise
17896
+ // we need to traverse up through the DOM till we find the correct
17897
+ // node that is from the other tree.
 
 
 
17898
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17899
 
17900
+ while (container !== null) {
17901
+ var parentNode = getClosestInstanceFromNode(container);
 
 
 
 
 
 
 
 
 
 
 
17902
 
17903
+ if (parentNode === null) {
17904
+ return;
17905
+ }
 
 
 
 
 
 
 
 
 
17906
 
17907
+ var parentTag = parentNode.tag;
17908
 
17909
+ if (parentTag === HostComponent || parentTag === HostText) {
17910
+ node = ancestorInst = parentNode;
17911
+ continue mainLoop;
17912
+ }
17913
 
17914
+ container = container.parentNode;
17915
+ }
17916
+ }
17917
+
17918
+ node = node.return;
17919
+ }
17920
+ }
17921
+ }
17922
+
17923
+ batchedEventUpdates(function () {
17924
+ return dispatchEventsForPlugins(domEventName, eventSystemFlags, nativeEvent, ancestorInst);
17925
  });
17926
  }
17927
 
17928
+ function createDispatchListener(instance, listener, currentTarget) {
17929
+ return {
17930
+ instance: instance,
17931
+ listener: listener,
17932
+ currentTarget: currentTarget
17933
+ };
17934
+ }
17935
 
17936
+ function accumulateSinglePhaseListeners(targetFiber, reactName, nativeEventType, inCapturePhase, accumulateTargetOnly) {
17937
+ var captureName = reactName !== null ? reactName + 'Capture' : null;
17938
+ var reactEventName = inCapturePhase ? captureName : reactName;
17939
+ var listeners = [];
17940
+ var instance = targetFiber;
17941
+ var lastHostComponent = null; // Accumulate all instances and listeners via the target -> root path.
17942
 
17943
+ while (instance !== null) {
17944
+ var _instance2 = instance,
17945
+ stateNode = _instance2.stateNode,
17946
+ tag = _instance2.tag; // Handle listeners that are on HostComponents (i.e. <div>)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17947
 
17948
+ if (tag === HostComponent && stateNode !== null) {
17949
+ lastHostComponent = stateNode; // createEventHandle listeners
17950
 
 
 
 
17951
 
17952
+ if (reactEventName !== null) {
17953
+ var listener = getListener(instance, reactEventName);
 
17954
 
17955
+ if (listener != null) {
17956
+ listeners.push(createDispatchListener(instance, listener, lastHostComponent));
17957
+ }
17958
+ }
17959
+ } // If we are only accumulating events for the target, then we don't
17960
+ // continue to propagate through the React fiber tree to find other
17961
+ // listeners.
17962
 
 
 
 
 
 
 
 
 
17963
 
17964
+ if (accumulateTargetOnly) {
17965
+ break;
17966
+ }
17967
+
17968
+ instance = instance.return;
 
17969
  }
17970
+
17971
+ return listeners;
17972
+ } // We should only use this function for:
17973
+ // - BeforeInputEventPlugin
17974
+ // - ChangeEventPlugin
17975
+ // - SelectEventPlugin
17976
+ // This is because we only process these plugins
17977
+ // in the bubble phase, so we need to accumulate two
17978
+ // phase event listeners (via emulation).
17979
+
17980
+ function accumulateTwoPhaseListeners(targetFiber, reactName) {
17981
+ var captureName = reactName + 'Capture';
17982
+ var listeners = [];
17983
+ var instance = targetFiber; // Accumulate all instances and listeners via the target -> root path.
17984
+
17985
+ while (instance !== null) {
17986
+ var _instance3 = instance,
17987
+ stateNode = _instance3.stateNode,
17988
+ tag = _instance3.tag; // Handle listeners that are on HostComponents (i.e. <div>)
17989
+
17990
+ if (tag === HostComponent && stateNode !== null) {
17991
+ var currentTarget = stateNode;
17992
+ var captureListener = getListener(instance, captureName);
17993
+
17994
+ if (captureListener != null) {
17995
+ listeners.unshift(createDispatchListener(instance, captureListener, currentTarget));
17996
+ }
17997
+
17998
+ var bubbleListener = getListener(instance, reactName);
17999
+
18000
+ if (bubbleListener != null) {
18001
+ listeners.push(createDispatchListener(instance, bubbleListener, currentTarget));
18002
+ }
18003
+ }
18004
+
18005
+ instance = instance.return;
18006
  }
18007
+
18008
+ return listeners;
18009
+ }
18010
+
18011
+ function getParent(inst) {
18012
+ if (inst === null) {
18013
+ return null;
18014
  }
18015
 
18016
+ do {
18017
+ inst = inst.return; // TODO: If this is a HostRoot we might want to bail out.
18018
+ // That is depending on if we want nested subtrees (layers) to bubble
18019
+ // events to their parent. We could also go through parentNode on the
18020
+ // host node but that wouldn't work for React Native and doesn't let us
18021
+ // do the portal feature.
18022
+ } while (inst && inst.tag !== HostComponent);
18023
 
18024
+ if (inst) {
18025
+ return inst;
18026
+ }
 
 
18027
 
18028
+ return null;
18029
+ }
18030
  /**
18031
+ * Return the lowest common ancestor of A and B, or null if they are in
18032
+ * different trees.
18033
+ */
18034
+
18035
+
18036
+ function getLowestCommonAncestor(instA, instB) {
18037
+ var nodeA = instA;
18038
+ var nodeB = instB;
18039
+ var depthA = 0;
18040
+
18041
+ for (var tempA = nodeA; tempA; tempA = getParent(tempA)) {
18042
+ depthA++;
18043
  }
 
 
18044
 
18045
+ var depthB = 0;
 
 
 
 
18046
 
18047
+ for (var tempB = nodeB; tempB; tempB = getParent(tempB)) {
18048
+ depthB++;
18049
+ } // If A is deeper, crawl up.
 
18050
 
 
18051
 
18052
+ while (depthA - depthB > 0) {
18053
+ nodeA = getParent(nodeA);
18054
+ depthA--;
18055
+ } // If B is deeper, crawl up.
18056
 
 
18057
 
18058
+ while (depthB - depthA > 0) {
18059
+ nodeB = getParent(nodeB);
18060
+ depthB--;
18061
+ } // Walk in lockstep until we find a match.
 
 
 
18062
 
18063
+
18064
+ var depth = depthA;
18065
+
18066
+ while (depth--) {
18067
+ if (nodeA === nodeB || nodeB !== null && nodeA === nodeB.alternate) {
18068
+ return nodeA;
18069
+ }
18070
+
18071
+ nodeA = getParent(nodeA);
18072
+ nodeB = getParent(nodeB);
18073
  }
18074
 
18075
+ return null;
18076
+ }
 
 
 
 
18077
 
18078
+ function accumulateEnterLeaveListenersForEvent(dispatchQueue, event, target, common, inCapturePhase) {
18079
+ var registrationName = event._reactName;
18080
+ var listeners = [];
18081
+ var instance = target;
18082
 
18083
+ while (instance !== null) {
18084
+ if (instance === common) {
18085
+ break;
18086
+ }
18087
 
18088
+ var _instance4 = instance,
18089
+ alternate = _instance4.alternate,
18090
+ stateNode = _instance4.stateNode,
18091
+ tag = _instance4.tag;
18092
 
18093
+ if (alternate !== null && alternate === common) {
18094
+ break;
18095
+ }
 
 
 
 
18096
 
18097
+ if (tag === HostComponent && stateNode !== null) {
18098
+ var currentTarget = stateNode;
 
 
 
 
 
18099
 
18100
+ if (inCapturePhase) {
18101
+ var captureListener = getListener(instance, registrationName);
18102
+
18103
+ if (captureListener != null) {
18104
+ listeners.unshift(createDispatchListener(instance, captureListener, currentTarget));
18105
+ }
18106
+ } else if (!inCapturePhase) {
18107
+ var bubbleListener = getListener(instance, registrationName);
18108
+
18109
+ if (bubbleListener != null) {
18110
+ listeners.push(createDispatchListener(instance, bubbleListener, currentTarget));
18111
+ }
18112
+ }
18113
+ }
18114
+
18115
+ instance = instance.return;
18116
  }
 
18117
 
18118
+ if (listeners.length !== 0) {
18119
+ dispatchQueue.push({
18120
+ event: event,
18121
+ listeners: listeners
18122
+ });
18123
+ }
18124
+ } // We should only use this function for:
18125
+ // - EnterLeaveEventPlugin
18126
+ // This is because we only process this plugin
18127
+ // in the bubble phase, so we need to accumulate two
18128
+ // phase event listeners.
18129
 
 
18130
 
18131
+ function accumulateEnterLeaveTwoPhaseListeners(dispatchQueue, leaveEvent, enterEvent, from, to) {
18132
+ var common = from && to ? getLowestCommonAncestor(from, to) : null;
 
18133
 
18134
+ if (from !== null) {
18135
+ accumulateEnterLeaveListenersForEvent(dispatchQueue, leaveEvent, from, common, false);
18136
+ }
 
 
 
 
 
18137
 
18138
+ if (to !== null && enterEvent !== null) {
18139
+ accumulateEnterLeaveListenersForEvent(dispatchQueue, enterEvent, to, common, true);
 
 
 
 
18140
  }
18141
+ }
18142
+ function getListenerSetKey(domEventName, capture) {
18143
+ return domEventName + "__" + (capture ? 'capture' : 'bubble');
18144
+ }
18145
 
18146
+ var didWarnInvalidHydration = false;
18147
+ var DANGEROUSLY_SET_INNER_HTML = 'dangerouslySetInnerHTML';
18148
+ var SUPPRESS_CONTENT_EDITABLE_WARNING = 'suppressContentEditableWarning';
18149
+ var SUPPRESS_HYDRATION_WARNING = 'suppressHydrationWarning';
18150
+ var AUTOFOCUS = 'autoFocus';
18151
+ var CHILDREN = 'children';
18152
+ var STYLE = 'style';
18153
+ var HTML$1 = '__html';
18154
+ var HTML_NAMESPACE$1 = Namespaces.html;
18155
+ var warnedUnknownTags;
18156
+ var suppressHydrationWarning;
18157
+ var validatePropertiesInDevelopment;
18158
+ var warnForTextDifference;
18159
+ var warnForPropDifference;
18160
+ var warnForExtraAttributes;
18161
+ var warnForInvalidEventListener;
18162
+ var canDiffStyleForHydrationWarning;
18163
+ var normalizeMarkupForTextOrAttribute;
18164
+ var normalizeHTML;
18165
+
18166
+ {
18167
+ warnedUnknownTags = {
18168
+ // There are working polyfills for <dialog>. Let people use it.
18169
+ dialog: true,
18170
+ // Electron ships a custom <webview> tag to display external web content in
18171
+ // an isolated frame and process.
18172
+ // This tag is not present in non Electron environments such as JSDom which
18173
+ // is often used for testing purposes.
18174
+ // @see https://electronjs.org/docs/api/webview-tag
18175
+ webview: true
18176
+ };
18177
 
18178
+ validatePropertiesInDevelopment = function (type, props) {
18179
+ validateProperties(type, props);
18180
+ validateProperties$1(type, props);
18181
+ validateProperties$2(type, props, {
18182
+ registrationNameDependencies: registrationNameDependencies,
18183
+ possibleRegistrationNames: possibleRegistrationNames
18184
+ });
18185
+ }; // IE 11 parses & normalizes the style attribute as opposed to other
18186
+ // browsers. It adds spaces and sorts the properties in some
18187
+ // non-alphabetical order. Handling that would require sorting CSS
18188
+ // properties in the client & server versions or applying
18189
+ // `expectedStyle` to a temporary DOM node to read its `style` attribute
18190
+ // normalized. Since it only affects IE, we're skipping style warnings
18191
+ // in that browser completely in favor of doing all that work.
18192
+ // See https://github.com/facebook/react/issues/11807
18193
+
18194
+
18195
+ canDiffStyleForHydrationWarning = canUseDOM && !document.documentMode; // HTML parsing normalizes CR and CRLF to LF.
18196
+ // It also can turn \u0000 into \uFFFD inside attributes.
18197
+ // https://www.w3.org/TR/html5/single-page.html#preprocessing-the-input-stream
18198
+ // If we have a mismatch, it might be caused by that.
18199
+ // We will still patch up in this case but not fire the warning.
18200
+
18201
+ var NORMALIZE_NEWLINES_REGEX = /\r\n?/g;
18202
+ var NORMALIZE_NULL_AND_REPLACEMENT_REGEX = /\u0000|\uFFFD/g;
18203
+
18204
+ normalizeMarkupForTextOrAttribute = function (markup) {
18205
+ var markupString = typeof markup === 'string' ? markup : '' + markup;
18206
+ return markupString.replace(NORMALIZE_NEWLINES_REGEX, '\n').replace(NORMALIZE_NULL_AND_REPLACEMENT_REGEX, '');
18207
+ };
18208
 
18209
+ warnForTextDifference = function (serverText, clientText) {
18210
+ if (didWarnInvalidHydration) {
18211
+ return;
18212
+ }
18213
 
18214
+ var normalizedClientText = normalizeMarkupForTextOrAttribute(clientText);
18215
+ var normalizedServerText = normalizeMarkupForTextOrAttribute(serverText);
18216
 
18217
+ if (normalizedServerText === normalizedClientText) {
18218
+ return;
18219
+ }
18220
 
18221
+ didWarnInvalidHydration = true;
 
 
 
 
 
18222
 
18223
+ error('Text content did not match. Server: "%s" Client: "%s"', normalizedServerText, normalizedClientText);
18224
+ };
 
 
 
18225
 
18226
+ warnForPropDifference = function (propName, serverValue, clientValue) {
18227
+ if (didWarnInvalidHydration) {
18228
+ return;
18229
+ }
 
 
 
 
 
 
 
 
 
 
 
 
18230
 
18231
+ var normalizedClientValue = normalizeMarkupForTextOrAttribute(clientValue);
18232
+ var normalizedServerValue = normalizeMarkupForTextOrAttribute(serverValue);
18233
 
18234
+ if (normalizedServerValue === normalizedClientValue) {
18235
+ return;
18236
+ }
18237
 
18238
+ didWarnInvalidHydration = true;
 
 
18239
 
18240
+ error('Prop `%s` did not match. Server: %s Client: %s', propName, JSON.stringify(normalizedServerValue), JSON.stringify(normalizedClientValue));
18241
+ };
18242
 
18243
+ warnForExtraAttributes = function (attributeNames) {
18244
+ if (didWarnInvalidHydration) {
18245
+ return;
18246
+ }
18247
 
18248
+ didWarnInvalidHydration = true;
18249
+ var names = [];
18250
+ attributeNames.forEach(function (name) {
18251
+ names.push(name);
18252
+ });
18253
 
18254
+ error('Extra attributes from the server: %s', names);
18255
+ };
18256
+
18257
+ warnForInvalidEventListener = function (registrationName, listener) {
18258
+ if (listener === false) {
18259
+ error('Expected `%s` listener to be a function, instead got `false`.\n\n' + 'If you used to conditionally omit it with %s={condition && value}, ' + 'pass %s={condition ? value : undefined} instead.', registrationName, registrationName, registrationName);
18260
+ } else {
18261
+ error('Expected `%s` listener to be a function, instead got a value of `%s` type.', registrationName, typeof listener);
 
 
 
18262
  }
18263
+ }; // Parse the HTML and read it back to normalize the HTML string so that it
18264
+ // can be used for comparison.
18265
+
18266
+
18267
+ normalizeHTML = function (parent, html) {
18268
+ // We could have created a separate document here to avoid
18269
+ // re-initializing custom elements if they exist. But this breaks
18270
+ // how <noscript> is being handled. So we use the same document.
18271
+ // See the discussion in https://github.com/facebook/react/pull/11157.
18272
+ var testElement = parent.namespaceURI === HTML_NAMESPACE$1 ? parent.ownerDocument.createElement(parent.tagName) : parent.ownerDocument.createElementNS(parent.namespaceURI, parent.tagName);
18273
+ testElement.innerHTML = html;
18274
+ return testElement.innerHTML;
18275
+ };
18276
+ }
18277
+
18278
+ function getOwnerDocumentFromRootContainer(rootContainerElement) {
18279
+ return rootContainerElement.nodeType === DOCUMENT_NODE ? rootContainerElement : rootContainerElement.ownerDocument;
18280
+ }
18281
 
18282
+ function noop() {}
 
 
18283
 
18284
+ function trapClickOnNonInteractiveElement(node) {
18285
+ // Mobile Safari does not fire properly bubble click events on
18286
+ // non-interactive elements, which means delegated click listeners do not
18287
+ // fire. The workaround for this bug involves attaching an empty click
18288
+ // listener on the target node.
18289
+ // https://www.quirksmode.org/blog/archives/2010/09/click_event_del.html
18290
+ // Just set it using the onclick property so that we don't have to manage any
18291
+ // bookkeeping for it. Not sure if we need to clear it when the listener is
18292
+ // removed.
18293
+ // TODO: Only do this for the relevant Safaris maybe?
18294
+ node.onclick = noop;
18295
+ }
18296
+
18297
+ function setInitialDOMProperties(tag, domElement, rootContainerElement, nextProps, isCustomComponentTag) {
18298
+ for (var propKey in nextProps) {
18299
+ if (!nextProps.hasOwnProperty(propKey)) {
18300
+ continue;
18301
+ }
18302
 
18303
+ var nextProp = nextProps[propKey];
 
18304
 
18305
+ if (propKey === STYLE) {
18306
+ {
18307
+ if (nextProp) {
18308
+ // Freeze the next style object so that we can assume it won't be
18309
+ // mutated. We have already warned for this in the past.
18310
+ Object.freeze(nextProp);
18311
+ }
18312
+ } // Relies on `updateStylesByID` not mutating `styleUpdates`.
18313
 
 
 
 
18314
 
18315
+ setValueForStyles(domElement, nextProp);
18316
+ } else if (propKey === DANGEROUSLY_SET_INNER_HTML) {
18317
+ var nextHtml = nextProp ? nextProp[HTML$1] : undefined;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
18318
 
18319
+ if (nextHtml != null) {
18320
+ setInnerHTML(domElement, nextHtml);
18321
+ }
18322
+ } else if (propKey === CHILDREN) {
18323
+ if (typeof nextProp === 'string') {
18324
+ // Avoid setting initial textContent when the text is empty. In IE11 setting
18325
+ // textContent on a <textarea> will cause the placeholder to not
18326
+ // show within the <textarea> until it has been focused and blurred again.
18327
+ // https://github.com/facebook/react/issues/6731#issuecomment-254874553
18328
+ var canSetTextContent = tag !== 'textarea' || nextProp !== '';
18329
 
18330
+ if (canSetTextContent) {
18331
+ setTextContent(domElement, nextProp);
18332
+ }
18333
+ } else if (typeof nextProp === 'number') {
18334
+ setTextContent(domElement, '' + nextProp);
18335
+ }
18336
+ } else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING) ; else if (propKey === AUTOFOCUS) ; else if (registrationNameDependencies.hasOwnProperty(propKey)) {
18337
+ if (nextProp != null) {
18338
+ if ( typeof nextProp !== 'function') {
18339
+ warnForInvalidEventListener(propKey, nextProp);
18340
+ }
18341
 
18342
+ if (propKey === 'onScroll') {
18343
+ listenToNonDelegatedEvent('scroll', domElement);
18344
+ }
18345
+ }
18346
+ } else if (nextProp != null) {
18347
+ setValueForProperty(domElement, propKey, nextProp, isCustomComponentTag);
18348
+ }
18349
+ }
18350
+ }
18351
 
18352
+ function updateDOMProperties(domElement, updatePayload, wasCustomComponentTag, isCustomComponentTag) {
18353
+ // TODO: Handle wasCustomComponentTag
18354
+ for (var i = 0; i < updatePayload.length; i += 2) {
18355
+ var propKey = updatePayload[i];
18356
+ var propValue = updatePayload[i + 1];
 
 
 
 
 
18357
 
18358
+ if (propKey === STYLE) {
18359
+ setValueForStyles(domElement, propValue);
18360
+ } else if (propKey === DANGEROUSLY_SET_INNER_HTML) {
18361
+ setInnerHTML(domElement, propValue);
18362
+ } else if (propKey === CHILDREN) {
18363
+ setTextContent(domElement, propValue);
18364
+ } else {
18365
+ setValueForProperty(domElement, propKey, propValue, isCustomComponentTag);
18366
+ }
18367
+ }
18368
+ }
18369
 
18370
+ function createElement(type, props, rootContainerElement, parentNamespace) {
18371
+ var isCustomComponentTag; // We create tags in the namespace of their parent container, except HTML
18372
+ // tags get no namespace.
18373
+
18374
+ var ownerDocument = getOwnerDocumentFromRootContainer(rootContainerElement);
18375
+ var domElement;
18376
+ var namespaceURI = parentNamespace;
18377
+
18378
+ if (namespaceURI === HTML_NAMESPACE$1) {
18379
+ namespaceURI = getIntrinsicNamespace(type);
18380
  }
 
18381
 
18382
+ if (namespaceURI === HTML_NAMESPACE$1) {
18383
+ {
18384
+ isCustomComponentTag = isCustomComponent(type, props); // Should this check be gated by parent namespace? Not sure we want to
18385
+ // allow <SVG> or <mATH>.
 
18386
 
18387
+ if (!isCustomComponentTag && type !== type.toLowerCase()) {
18388
+ error('<%s /> is using incorrect casing. ' + 'Use PascalCase for React components, ' + 'or lowercase for HTML elements.', type);
18389
+ }
18390
+ }
18391
 
18392
+ if (type === 'script') {
18393
+ // Create the script via .innerHTML so its "parser-inserted" flag is
18394
+ // set to true and it does not execute
18395
+ var div = ownerDocument.createElement('div');
 
 
18396
 
18397
+ div.innerHTML = '<script><' + '/script>'; // eslint-disable-line
18398
+ // This is guaranteed to yield a script element.
18399
 
18400
+ var firstChild = div.firstChild;
18401
+ domElement = div.removeChild(firstChild);
18402
+ } else if (typeof props.is === 'string') {
18403
+ // $FlowIssue `createElement` should be updated for Web Components
18404
+ domElement = ownerDocument.createElement(type, {
18405
+ is: props.is
18406
+ });
18407
+ } else {
18408
+ // Separate else branch instead of using `props.is || undefined` above because of a Firefox bug.
18409
+ // See discussion in https://github.com/facebook/react/pull/6896
18410
+ // and discussion in https://bugzilla.mozilla.org/show_bug.cgi?id=1276240
18411
+ domElement = ownerDocument.createElement(type); // Normally attributes are assigned in `setInitialDOMProperties`, however the `multiple` and `size`
18412
+ // attributes on `select`s needs to be added before `option`s are inserted.
18413
+ // This prevents:
18414
+ // - a bug where the `select` does not scroll to the correct option because singular
18415
+ // `select` elements automatically pick the first item #13222
18416
+ // - a bug where the `select` set the first item as selected despite the `size` attribute #14239
18417
+ // See https://github.com/facebook/react/issues/13222
18418
+ // and https://github.com/facebook/react/issues/14239
18419
+
18420
+ if (type === 'select') {
18421
+ var node = domElement;
18422
+
18423
+ if (props.multiple) {
18424
+ node.multiple = true;
18425
+ } else if (props.size) {
18426
+ // Setting a size greater than 1 causes a select to behave like `multiple=true`, where
18427
+ // it is possible that no option is selected.
18428
+ //
18429
+ // This is only necessary when a select in "single selection mode".
18430
+ node.size = props.size;
18431
+ }
18432
+ }
18433
+ }
18434
+ } else {
18435
+ domElement = ownerDocument.createElementNS(namespaceURI, type);
18436
  }
18437
 
18438
+ {
18439
+ if (namespaceURI === HTML_NAMESPACE$1) {
18440
+ if (!isCustomComponentTag && Object.prototype.toString.call(domElement) === '[object HTMLUnknownElement]' && !Object.prototype.hasOwnProperty.call(warnedUnknownTags, type)) {
18441
+ warnedUnknownTags[type] = true;
18442
 
18443
+ error('The tag <%s> is unrecognized in this browser. ' + 'If you meant to render a React component, start its name with ' + 'an uppercase letter.', type);
18444
+ }
18445
+ }
18446
+ }
 
 
 
 
18447
 
18448
+ return domElement;
18449
+ }
18450
+ function createTextNode(text, rootContainerElement) {
18451
+ return getOwnerDocumentFromRootContainer(rootContainerElement).createTextNode(text);
18452
+ }
18453
+ function setInitialProperties(domElement, tag, rawProps, rootContainerElement) {
18454
+ var isCustomComponentTag = isCustomComponent(tag, rawProps);
 
 
18455
 
18456
+ {
18457
+ validatePropertiesInDevelopment(tag, rawProps);
18458
+ } // TODO: Make sure that we check isMounted before firing any of these events.
18459
 
 
 
 
 
 
 
18460
 
18461
+ var props;
 
 
 
 
18462
 
18463
+ switch (tag) {
18464
+ case 'dialog':
18465
+ listenToNonDelegatedEvent('cancel', domElement);
18466
+ listenToNonDelegatedEvent('close', domElement);
18467
+ props = rawProps;
18468
+ break;
18469
 
18470
+ case 'iframe':
18471
+ case 'object':
18472
+ case 'embed':
18473
+ // We listen to this event in case to ensure emulated bubble
18474
+ // listeners still fire for the load event.
18475
+ listenToNonDelegatedEvent('load', domElement);
18476
+ props = rawProps;
18477
+ break;
18478
 
18479
+ case 'video':
18480
+ case 'audio':
18481
+ // We listen to these events in case to ensure emulated bubble
18482
+ // listeners still fire for all the media events.
18483
+ for (var i = 0; i < mediaEventTypes.length; i++) {
18484
+ listenToNonDelegatedEvent(mediaEventTypes[i], domElement);
18485
+ }
18486
 
18487
+ props = rawProps;
18488
+ break;
18489
 
18490
+ case 'source':
18491
+ // We listen to this event in case to ensure emulated bubble
18492
+ // listeners still fire for the error event.
18493
+ listenToNonDelegatedEvent('error', domElement);
18494
+ props = rawProps;
18495
+ break;
18496
 
18497
+ case 'img':
18498
+ case 'image':
18499
+ case 'link':
18500
+ // We listen to these events in case to ensure emulated bubble
18501
+ // listeners still fire for error and load events.
18502
+ listenToNonDelegatedEvent('error', domElement);
18503
+ listenToNonDelegatedEvent('load', domElement);
18504
+ props = rawProps;
18505
+ break;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
18506
 
18507
+ case 'details':
18508
+ // We listen to this event in case to ensure emulated bubble
18509
+ // listeners still fire for the toggle event.
18510
+ listenToNonDelegatedEvent('toggle', domElement);
18511
+ props = rawProps;
18512
+ break;
18513
 
18514
+ case 'input':
18515
+ initWrapperState(domElement, rawProps);
18516
+ props = getHostProps(domElement, rawProps); // We listen to this event in case to ensure emulated bubble
18517
+ // listeners still fire for the invalid event.
18518
 
18519
+ listenToNonDelegatedEvent('invalid', domElement);
 
18520
 
18521
+ break;
 
 
 
 
 
 
 
 
 
 
18522
 
18523
+ case 'option':
18524
+ validateProps(domElement, rawProps);
18525
+ props = getHostProps$1(domElement, rawProps);
18526
+ break;
 
 
 
18527
 
18528
+ case 'select':
18529
+ initWrapperState$1(domElement, rawProps);
18530
+ props = getHostProps$2(domElement, rawProps); // We listen to this event in case to ensure emulated bubble
18531
+ // listeners still fire for the invalid event.
18532
 
18533
+ listenToNonDelegatedEvent('invalid', domElement);
18534
 
18535
+ break;
 
 
 
 
 
 
 
18536
 
18537
+ case 'textarea':
18538
+ initWrapperState$2(domElement, rawProps);
18539
+ props = getHostProps$3(domElement, rawProps); // We listen to this event in case to ensure emulated bubble
18540
+ // listeners still fire for the invalid event.
18541
 
18542
+ listenToNonDelegatedEvent('invalid', domElement);
 
 
 
 
 
 
 
 
 
 
18543
 
18544
+ break;
 
 
 
 
 
 
 
 
 
 
 
18545
 
18546
+ default:
18547
+ props = rawProps;
 
 
 
 
18548
  }
 
 
 
18549
 
18550
+ assertValidProps(tag, props);
18551
+ setInitialDOMProperties(tag, domElement, rootContainerElement, props, isCustomComponentTag);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
18552
 
18553
+ switch (tag) {
18554
+ case 'input':
18555
+ // TODO: Make sure we check if this is still unmounted or do any clean
18556
+ // up necessary since we never stop tracking anymore.
18557
+ track(domElement);
18558
+ postMountWrapper(domElement, rawProps, false);
18559
+ break;
18560
 
18561
+ case 'textarea':
18562
+ // TODO: Make sure we check if this is still unmounted or do any clean
18563
+ // up necessary since we never stop tracking anymore.
18564
+ track(domElement);
18565
+ postMountWrapper$3(domElement);
18566
+ break;
 
 
 
 
 
18567
 
18568
+ case 'option':
18569
+ postMountWrapper$1(domElement, rawProps);
18570
+ break;
 
 
 
 
18571
 
18572
+ case 'select':
18573
+ postMountWrapper$2(domElement, rawProps);
18574
+ break;
18575
+
18576
+ default:
18577
+ if (typeof props.onClick === 'function') {
18578
+ // TODO: This cast may not be sound for SVG, MathML or custom elements.
18579
+ trapClickOnNonInteractiveElement(domElement);
18580
+ }
18581
+
18582
+ break;
18583
  }
18584
+ } // Calculate the diff between the two objects.
18585
 
18586
+ function diffProperties(domElement, tag, lastRawProps, nextRawProps, rootContainerElement) {
18587
+ {
18588
+ validatePropertiesInDevelopment(tag, nextRawProps);
 
 
 
 
18589
  }
18590
 
18591
+ var updatePayload = null;
18592
+ var lastProps;
18593
+ var nextProps;
18594
 
18595
+ switch (tag) {
18596
+ case 'input':
18597
+ lastProps = getHostProps(domElement, lastRawProps);
18598
+ nextProps = getHostProps(domElement, nextRawProps);
18599
+ updatePayload = [];
18600
+ break;
 
 
 
 
18601
 
18602
+ case 'option':
18603
+ lastProps = getHostProps$1(domElement, lastRawProps);
18604
+ nextProps = getHostProps$1(domElement, nextRawProps);
18605
+ updatePayload = [];
18606
+ break;
18607
 
18608
+ case 'select':
18609
+ lastProps = getHostProps$2(domElement, lastRawProps);
18610
+ nextProps = getHostProps$2(domElement, nextRawProps);
18611
+ updatePayload = [];
18612
+ break;
 
 
18613
 
18614
+ case 'textarea':
18615
+ lastProps = getHostProps$3(domElement, lastRawProps);
18616
+ nextProps = getHostProps$3(domElement, nextRawProps);
18617
+ updatePayload = [];
18618
+ break;
18619
 
18620
+ default:
18621
+ lastProps = lastRawProps;
18622
+ nextProps = nextRawProps;
 
 
 
 
 
 
 
18623
 
18624
+ if (typeof lastProps.onClick !== 'function' && typeof nextProps.onClick === 'function') {
18625
+ // TODO: This cast may not be sound for SVG, MathML or custom elements.
18626
+ trapClickOnNonInteractiveElement(domElement);
18627
+ }
18628
+
18629
+ break;
 
 
 
 
 
 
18630
  }
 
18631
 
18632
+ assertValidProps(tag, nextProps);
18633
+ var propKey;
18634
+ var styleName;
18635
+ var styleUpdates = null;
18636
 
18637
+ for (propKey in lastProps) {
18638
+ if (nextProps.hasOwnProperty(propKey) || !lastProps.hasOwnProperty(propKey) || lastProps[propKey] == null) {
18639
+ continue;
18640
+ }
18641
 
18642
+ if (propKey === STYLE) {
18643
+ var lastStyle = lastProps[propKey];
 
 
 
 
 
 
 
 
 
18644
 
18645
+ for (styleName in lastStyle) {
18646
+ if (lastStyle.hasOwnProperty(styleName)) {
18647
+ if (!styleUpdates) {
18648
+ styleUpdates = {};
18649
+ }
 
 
 
 
 
18650
 
18651
+ styleUpdates[styleName] = '';
18652
+ }
18653
+ }
18654
+ } else if (propKey === DANGEROUSLY_SET_INNER_HTML || propKey === CHILDREN) ; else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING) ; else if (propKey === AUTOFOCUS) ; else if (registrationNameDependencies.hasOwnProperty(propKey)) {
18655
+ // This is a special case. If any listener updates we need to ensure
18656
+ // that the "current" fiber pointer gets updated so we need a commit
18657
+ // to update this element.
18658
+ if (!updatePayload) {
18659
+ updatePayload = [];
18660
+ }
18661
+ } else {
18662
+ // For all other deleted properties we add it to the queue. We use
18663
+ // the allowed property list in the commit phase instead.
18664
+ (updatePayload = updatePayload || []).push(propKey, null);
18665
+ }
18666
  }
18667
 
18668
+ for (propKey in nextProps) {
18669
+ var nextProp = nextProps[propKey];
18670
+ var lastProp = lastProps != null ? lastProps[propKey] : undefined;
 
18671
 
18672
+ if (!nextProps.hasOwnProperty(propKey) || nextProp === lastProp || nextProp == null && lastProp == null) {
18673
+ continue;
18674
+ }
 
 
 
 
 
 
18675
 
18676
+ if (propKey === STYLE) {
18677
+ {
18678
+ if (nextProp) {
18679
+ // Freeze the next style object so that we can assume it won't be
18680
+ // mutated. We have already warned for this in the past.
18681
+ Object.freeze(nextProp);
18682
+ }
18683
+ }
18684
 
18685
+ if (lastProp) {
18686
+ // Unset styles on `lastProp` but not on `nextProp`.
18687
+ for (styleName in lastProp) {
18688
+ if (lastProp.hasOwnProperty(styleName) && (!nextProp || !nextProp.hasOwnProperty(styleName))) {
18689
+ if (!styleUpdates) {
18690
+ styleUpdates = {};
18691
+ }
 
 
 
 
 
 
 
 
 
18692
 
18693
+ styleUpdates[styleName] = '';
18694
+ }
18695
+ } // Update styles that changed since `lastProp`.
 
18696
 
 
18697
 
18698
+ for (styleName in nextProp) {
18699
+ if (nextProp.hasOwnProperty(styleName) && lastProp[styleName] !== nextProp[styleName]) {
18700
+ if (!styleUpdates) {
18701
+ styleUpdates = {};
18702
+ }
18703
 
18704
+ styleUpdates[styleName] = nextProp[styleName];
18705
+ }
18706
+ }
18707
+ } else {
18708
+ // Relies on `updateStylesByID` not mutating `styleUpdates`.
18709
+ if (!styleUpdates) {
18710
+ if (!updatePayload) {
18711
+ updatePayload = [];
18712
+ }
 
 
 
18713
 
18714
+ updatePayload.push(propKey, styleUpdates);
18715
+ }
 
 
18716
 
18717
+ styleUpdates = nextProp;
18718
+ }
18719
+ } else if (propKey === DANGEROUSLY_SET_INNER_HTML) {
18720
+ var nextHtml = nextProp ? nextProp[HTML$1] : undefined;
18721
+ var lastHtml = lastProp ? lastProp[HTML$1] : undefined;
 
 
 
 
 
 
 
 
 
 
 
 
18722
 
18723
+ if (nextHtml != null) {
18724
+ if (lastHtml !== nextHtml) {
18725
+ (updatePayload = updatePayload || []).push(propKey, nextHtml);
18726
+ }
18727
+ }
18728
+ } else if (propKey === CHILDREN) {
18729
+ if (typeof nextProp === 'string' || typeof nextProp === 'number') {
18730
+ (updatePayload = updatePayload || []).push(propKey, '' + nextProp);
18731
+ }
18732
+ } else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING) ; else if (registrationNameDependencies.hasOwnProperty(propKey)) {
18733
+ if (nextProp != null) {
18734
+ // We eagerly listen to this even though we haven't committed yet.
18735
+ if ( typeof nextProp !== 'function') {
18736
+ warnForInvalidEventListener(propKey, nextProp);
18737
+ }
18738
 
18739
+ if (propKey === 'onScroll') {
18740
+ listenToNonDelegatedEvent('scroll', domElement);
18741
+ }
18742
+ }
18743
 
18744
+ if (!updatePayload && lastProp !== nextProp) {
18745
+ // This is a special case. If any listener updates we need to ensure
18746
+ // that the "current" props pointer gets updated so we need a commit
18747
+ // to update this element.
18748
+ updatePayload = [];
18749
+ }
18750
+ } else if (typeof nextProp === 'object' && nextProp !== null && nextProp.$$typeof === REACT_OPAQUE_ID_TYPE) {
18751
+ // If we encounter useOpaqueReference's opaque object, this means we are hydrating.
18752
+ // In this case, call the opaque object's toString function which generates a new client
18753
+ // ID so client and server IDs match and throws to rerender.
18754
+ nextProp.toString();
18755
+ } else {
18756
+ // For any other property we always add it to the queue and then we
18757
+ // filter it out using the allowed property list during the commit.
18758
+ (updatePayload = updatePayload || []).push(propKey, nextProp);
18759
+ }
18760
+ }
18761
 
18762
+ if (styleUpdates) {
18763
+ {
18764
+ validateShorthandPropertyCollisionInDev(styleUpdates, nextProps[STYLE]);
18765
+ }
 
 
 
18766
 
18767
+ (updatePayload = updatePayload || []).push(STYLE, styleUpdates);
18768
+ }
 
18769
 
18770
+ return updatePayload;
18771
+ } // Apply the diff.
18772
 
18773
+ function updateProperties(domElement, updatePayload, tag, lastRawProps, nextRawProps) {
18774
+ // Update checked *before* name.
18775
+ // In the middle of an update, it is possible to have multiple checked.
18776
+ // When a checked radio tries to change name, browser makes another radio's checked false.
18777
+ if (tag === 'input' && nextRawProps.type === 'radio' && nextRawProps.name != null) {
18778
+ updateChecked(domElement, nextRawProps);
18779
  }
18780
 
18781
+ var wasCustomComponentTag = isCustomComponent(tag, lastRawProps);
18782
+ var isCustomComponentTag = isCustomComponent(tag, nextRawProps); // Apply the diff.
18783
 
18784
+ updateDOMProperties(domElement, updatePayload, wasCustomComponentTag, isCustomComponentTag); // TODO: Ensure that an update gets scheduled if any of the special props
18785
+ // changed.
 
 
 
 
 
 
 
 
 
18786
 
18787
+ switch (tag) {
18788
+ case 'input':
18789
+ // Update the wrapper around inputs *after* updating props. This has to
18790
+ // happen after `updateDOMProperties`. Otherwise HTML5 input validations
18791
+ // raise warnings and prevent the new value from being assigned.
18792
+ updateWrapper(domElement, nextRawProps);
18793
+ break;
18794
 
18795
+ case 'textarea':
18796
+ updateWrapper$1(domElement, nextRawProps);
18797
+ break;
 
 
 
 
 
 
 
 
 
 
18798
 
18799
+ case 'select':
18800
+ // <select> value update needs to occur after <option> children
18801
+ // reconciliation
18802
+ postUpdateWrapper(domElement, nextRawProps);
18803
+ break;
 
 
 
18804
  }
18805
+ }
 
 
 
18806
 
18807
+ function getPossibleStandardName(propName) {
18808
+ {
18809
+ var lowerCasedName = propName.toLowerCase();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
18810
 
18811
+ if (!possibleStandardNames.hasOwnProperty(lowerCasedName)) {
18812
+ return null;
18813
+ }
 
 
 
 
 
 
 
 
 
 
 
 
18814
 
18815
+ return possibleStandardNames[lowerCasedName] || null;
 
 
 
 
 
 
 
18816
  }
18817
+ }
 
 
 
 
 
18818
 
18819
+ function diffHydratedProperties(domElement, tag, rawProps, parentNamespace, rootContainerElement) {
18820
+ var isCustomComponentTag;
18821
+ var extraAttributeNames;
 
 
 
 
 
18822
 
18823
+ {
18824
+ suppressHydrationWarning = rawProps[SUPPRESS_HYDRATION_WARNING] === true;
18825
+ isCustomComponentTag = isCustomComponent(tag, rawProps);
18826
+ validatePropertiesInDevelopment(tag, rawProps);
18827
+ } // TODO: Make sure that we check isMounted before firing any of these events.
 
 
 
18828
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
18829
 
18830
+ switch (tag) {
18831
+ case 'dialog':
18832
+ listenToNonDelegatedEvent('cancel', domElement);
18833
+ listenToNonDelegatedEvent('close', domElement);
18834
+ break;
 
 
 
 
 
 
 
 
 
18835
 
18836
+ case 'iframe':
18837
+ case 'object':
18838
+ case 'embed':
18839
+ // We listen to this event in case to ensure emulated bubble
18840
+ // listeners still fire for the load event.
18841
+ listenToNonDelegatedEvent('load', domElement);
18842
+ break;
18843
 
18844
+ case 'video':
18845
+ case 'audio':
18846
+ // We listen to these events in case to ensure emulated bubble
18847
+ // listeners still fire for all the media events.
18848
+ for (var i = 0; i < mediaEventTypes.length; i++) {
18849
+ listenToNonDelegatedEvent(mediaEventTypes[i], domElement);
18850
+ }
18851
+
18852
+ break;
18853
+
18854
+ case 'source':
18855
+ // We listen to this event in case to ensure emulated bubble
18856
+ // listeners still fire for the error event.
18857
+ listenToNonDelegatedEvent('error', domElement);
18858
+ break;
18859
 
18860
+ case 'img':
18861
+ case 'image':
18862
+ case 'link':
18863
+ // We listen to these events in case to ensure emulated bubble
18864
+ // listeners still fire for error and load events.
18865
+ listenToNonDelegatedEvent('error', domElement);
18866
+ listenToNonDelegatedEvent('load', domElement);
18867
+ break;
18868
 
18869
+ case 'details':
18870
+ // We listen to this event in case to ensure emulated bubble
18871
+ // listeners still fire for the toggle event.
18872
+ listenToNonDelegatedEvent('toggle', domElement);
18873
+ break;
18874
 
18875
+ case 'input':
18876
+ initWrapperState(domElement, rawProps); // We listen to this event in case to ensure emulated bubble
18877
+ // listeners still fire for the invalid event.
 
 
 
18878
 
18879
+ listenToNonDelegatedEvent('invalid', domElement);
18880
 
18881
+ break;
 
 
 
 
 
 
 
 
 
 
18882
 
18883
+ case 'option':
18884
+ validateProps(domElement, rawProps);
18885
+ break;
18886
 
18887
+ case 'select':
18888
+ initWrapperState$1(domElement, rawProps); // We listen to this event in case to ensure emulated bubble
18889
+ // listeners still fire for the invalid event.
 
 
 
 
18890
 
18891
+ listenToNonDelegatedEvent('invalid', domElement);
18892
 
18893
+ break;
18894
 
18895
+ case 'textarea':
18896
+ initWrapperState$2(domElement, rawProps); // We listen to this event in case to ensure emulated bubble
18897
+ // listeners still fire for the invalid event.
 
 
 
 
 
 
 
18898
 
18899
+ listenToNonDelegatedEvent('invalid', domElement);
18900
 
18901
+ break;
18902
+ }
18903
 
18904
+ assertValidProps(tag, rawProps);
 
 
 
 
 
 
 
 
 
 
18905
 
18906
+ {
18907
+ extraAttributeNames = new Set();
18908
+ var attributes = domElement.attributes;
18909
 
18910
+ for (var _i = 0; _i < attributes.length; _i++) {
18911
+ var name = attributes[_i].name.toLowerCase();
18912
 
18913
+ switch (name) {
18914
+ // Built-in SSR attribute is allowed
18915
+ case 'data-reactroot':
18916
+ break;
18917
+ // Controlled attributes are not validated
18918
+ // TODO: Only ignore them on controlled tags.
18919
 
18920
+ case 'value':
18921
+ break;
18922
 
18923
+ case 'checked':
18924
+ break;
18925
 
18926
+ case 'selected':
18927
+ break;
18928
 
18929
+ default:
18930
+ // Intentionally use the original name.
18931
+ // See discussion in https://github.com/facebook/react/pull/10676.
18932
+ extraAttributeNames.add(attributes[_i].name);
18933
+ }
18934
+ }
18935
  }
18936
 
18937
+ var updatePayload = null;
 
18938
 
18939
+ for (var propKey in rawProps) {
18940
+ if (!rawProps.hasOwnProperty(propKey)) {
18941
+ continue;
18942
+ }
18943
 
18944
+ var nextProp = rawProps[propKey];
18945
+
18946
+ if (propKey === CHILDREN) {
18947
+ // For text content children we compare against textContent. This
18948
+ // might match additional HTML that is hidden when we read it using
18949
+ // textContent. E.g. "foo" will match "f<span>oo</span>" but that still
18950
+ // satisfies our requirement. Our requirement is not to produce perfect
18951
+ // HTML and attributes. Ideally we should preserve structure but it's
18952
+ // ok not to if the visible content is still enough to indicate what
18953
+ // even listeners these nodes might be wired up to.
18954
+ // TODO: Warn if there is more than a single textNode as a child.
18955
+ // TODO: Should we use domElement.firstChild.nodeValue to compare?
18956
+ if (typeof nextProp === 'string') {
18957
+ if (domElement.textContent !== nextProp) {
18958
+ if ( !suppressHydrationWarning) {
18959
+ warnForTextDifference(domElement.textContent, nextProp);
18960
+ }
18961
 
18962
+ updatePayload = [CHILDREN, nextProp];
18963
+ }
18964
+ } else if (typeof nextProp === 'number') {
18965
+ if (domElement.textContent !== '' + nextProp) {
18966
+ if ( !suppressHydrationWarning) {
18967
+ warnForTextDifference(domElement.textContent, nextProp);
18968
+ }
18969
 
18970
+ updatePayload = [CHILDREN, '' + nextProp];
18971
+ }
18972
+ }
18973
+ } else if (registrationNameDependencies.hasOwnProperty(propKey)) {
18974
+ if (nextProp != null) {
18975
+ if ( typeof nextProp !== 'function') {
18976
+ warnForInvalidEventListener(propKey, nextProp);
18977
+ }
18978
 
18979
+ if (propKey === 'onScroll') {
18980
+ listenToNonDelegatedEvent('scroll', domElement);
18981
+ }
18982
+ }
18983
+ } else if ( // Convince Flow we've calculated it (it's DEV-only in this method.)
18984
+ typeof isCustomComponentTag === 'boolean') {
18985
+ // Validate that the properties correspond to their expected values.
18986
+ var serverValue = void 0;
18987
+ var propertyInfo = getPropertyInfo(propKey);
18988
 
18989
+ if (suppressHydrationWarning) ; else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING || // Controlled attributes are not validated
18990
+ // TODO: Only ignore them on controlled tags.
18991
+ propKey === 'value' || propKey === 'checked' || propKey === 'selected') ; else if (propKey === DANGEROUSLY_SET_INNER_HTML) {
18992
+ var serverHTML = domElement.innerHTML;
18993
+ var nextHtml = nextProp ? nextProp[HTML$1] : undefined;
 
 
 
 
 
 
 
 
 
 
 
18994
 
18995
+ if (nextHtml != null) {
18996
+ var expectedHTML = normalizeHTML(domElement, nextHtml);
18997
 
18998
+ if (expectedHTML !== serverHTML) {
18999
+ warnForPropDifference(propKey, serverHTML, expectedHTML);
19000
+ }
19001
+ }
19002
+ } else if (propKey === STYLE) {
19003
+ // $FlowFixMe - Should be inferred as not undefined.
19004
+ extraAttributeNames.delete(propKey);
19005
 
19006
+ if (canDiffStyleForHydrationWarning) {
19007
+ var expectedStyle = createDangerousStringForStyles(nextProp);
19008
+ serverValue = domElement.getAttribute('style');
19009
 
19010
+ if (expectedStyle !== serverValue) {
19011
+ warnForPropDifference(propKey, serverValue, expectedStyle);
19012
+ }
19013
+ }
19014
+ } else if (isCustomComponentTag) {
19015
+ // $FlowFixMe - Should be inferred as not undefined.
19016
+ extraAttributeNames.delete(propKey.toLowerCase());
19017
+ serverValue = getValueForAttribute(domElement, propKey, nextProp);
19018
 
19019
+ if (nextProp !== serverValue) {
19020
+ warnForPropDifference(propKey, serverValue, nextProp);
19021
+ }
19022
+ } else if (!shouldIgnoreAttribute(propKey, propertyInfo, isCustomComponentTag) && !shouldRemoveAttribute(propKey, nextProp, propertyInfo, isCustomComponentTag)) {
19023
+ var isMismatchDueToBadCasing = false;
19024
 
19025
+ if (propertyInfo !== null) {
19026
+ // $FlowFixMe - Should be inferred as not undefined.
19027
+ extraAttributeNames.delete(propertyInfo.attributeName);
19028
+ serverValue = getValueForProperty(domElement, propKey, nextProp, propertyInfo);
19029
+ } else {
19030
+ var ownNamespace = parentNamespace;
19031
 
19032
+ if (ownNamespace === HTML_NAMESPACE$1) {
19033
+ ownNamespace = getIntrinsicNamespace(tag);
19034
+ }
 
 
 
19035
 
19036
+ if (ownNamespace === HTML_NAMESPACE$1) {
19037
+ // $FlowFixMe - Should be inferred as not undefined.
19038
+ extraAttributeNames.delete(propKey.toLowerCase());
19039
+ } else {
19040
+ var standardName = getPossibleStandardName(propKey);
19041
 
19042
+ if (standardName !== null && standardName !== propKey) {
19043
+ // If an SVG prop is supplied with bad casing, it will
19044
+ // be successfully parsed from HTML, but will produce a mismatch
19045
+ // (and would be incorrectly rendered on the client).
19046
+ // However, we already warn about bad casing elsewhere.
19047
+ // So we'll skip the misleading extra mismatch warning in this case.
19048
+ isMismatchDueToBadCasing = true; // $FlowFixMe - Should be inferred as not undefined.
19049
 
19050
+ extraAttributeNames.delete(standardName);
19051
+ } // $FlowFixMe - Should be inferred as not undefined.
19052
 
19053
+
19054
+ extraAttributeNames.delete(propKey);
19055
+ }
19056
+
19057
+ serverValue = getValueForAttribute(domElement, propKey, nextProp);
 
 
 
 
 
 
 
19058
  }
19059
+
19060
+ if (nextProp !== serverValue && !isMismatchDueToBadCasing) {
19061
+ warnForPropDifference(propKey, serverValue, nextProp);
 
 
 
 
 
19062
  }
19063
+ }
 
 
 
 
 
 
 
 
 
 
 
 
19064
  }
19065
+ }
19066
+
19067
+ {
19068
+ // $FlowFixMe - Should be inferred as not undefined.
19069
+ if (extraAttributeNames.size > 0 && !suppressHydrationWarning) {
19070
+ // $FlowFixMe - Should be inferred as not undefined.
19071
+ warnForExtraAttributes(extraAttributeNames);
 
 
 
 
19072
  }
19073
+ }
19074
+
19075
+ switch (tag) {
19076
+ case 'input':
19077
+ // TODO: Make sure we check if this is still unmounted or do any clean
19078
+ // up necessary since we never stop tracking anymore.
19079
+ track(domElement);
19080
+ postMountWrapper(domElement, rawProps, true);
19081
+ break;
19082
+
19083
+ case 'textarea':
19084
+ // TODO: Make sure we check if this is still unmounted or do any clean
19085
+ // up necessary since we never stop tracking anymore.
19086
+ track(domElement);
19087
+ postMountWrapper$3(domElement);
19088
+ break;
19089
+
19090
+ case 'select':
19091
+ case 'option':
19092
+ // For input and textarea we current always set the value property at
19093
+ // post mount to force it to diverge from attributes. However, for
19094
+ // option and select we don't quite do the same thing and select
19095
+ // is not resilient to the DOM state changing so we don't do that here.
19096
+ // TODO: Consider not doing this for input and textarea.
19097
+ break;
19098
 
19099
+ default:
19100
+ if (typeof rawProps.onClick === 'function') {
19101
+ // TODO: This cast may not be sound for SVG, MathML or custom elements.
19102
+ trapClickOnNonInteractiveElement(domElement);
19103
+ }
19104
+
19105
+ break;
19106
+ }
19107
 
19108
+ return updatePayload;
19109
  }
19110
+ function diffHydratedText(textNode, text) {
19111
+ var isDifferent = textNode.nodeValue !== text;
19112
+ return isDifferent;
19113
+ }
19114
+ function warnForUnmatchedText(textNode, text) {
19115
+ {
19116
+ warnForTextDifference(textNode.nodeValue, text);
19117
+ }
19118
+ }
19119
+ function warnForDeletedHydratableElement(parentNode, child) {
19120
+ {
19121
+ if (didWarnInvalidHydration) {
19122
+ return;
19123
  }
19124
+
19125
+ didWarnInvalidHydration = true;
19126
+
19127
+ error('Did not expect server HTML to contain a <%s> in <%s>.', child.nodeName.toLowerCase(), parentNode.nodeName.toLowerCase());
19128
+ }
19129
+ }
19130
+ function warnForDeletedHydratableText(parentNode, child) {
19131
+ {
19132
+ if (didWarnInvalidHydration) {
19133
+ return;
19134
  }
19135
+
19136
+ didWarnInvalidHydration = true;
19137
+
19138
+ error('Did not expect server HTML to contain the text node "%s" in <%s>.', child.nodeValue, parentNode.nodeName.toLowerCase());
19139
+ }
19140
+ }
19141
+ function warnForInsertedHydratedElement(parentNode, tag, props) {
19142
+ {
19143
+ if (didWarnInvalidHydration) {
19144
+ return;
 
 
19145
  }
19146
 
19147
+ didWarnInvalidHydration = true;
19148
 
19149
+ error('Expected server HTML to contain a matching <%s> in <%s>.', tag, parentNode.nodeName.toLowerCase());
19150
+ }
19151
  }
19152
+ function warnForInsertedHydratedText(parentNode, text) {
19153
+ {
19154
+ if (text === '') {
19155
+ // We expect to insert empty text nodes since they're not represented in
19156
+ // the HTML.
19157
+ // TODO: Remove this special case if we can just avoid inserting empty
19158
+ // text nodes.
19159
+ return;
 
 
 
 
 
 
 
 
 
19160
  }
 
19161
 
19162
+ if (didWarnInvalidHydration) {
19163
+ return;
 
19164
  }
 
 
19165
 
19166
+ didWarnInvalidHydration = true;
19167
+
19168
+ error('Expected server HTML to contain a matching text node for "%s" in <%s>.', text, parentNode.nodeName.toLowerCase());
19169
+ }
 
 
 
 
 
 
 
 
 
 
 
19170
  }
19171
+ function restoreControlledState$3(domElement, tag, props) {
19172
+ switch (tag) {
19173
+ case 'input':
19174
+ restoreControlledState(domElement, props);
19175
+ return;
19176
 
19177
+ case 'textarea':
19178
+ restoreControlledState$2(domElement, props);
19179
+ return;
 
 
 
 
 
 
 
 
 
19180
 
19181
+ case 'select':
19182
+ restoreControlledState$1(domElement, props);
19183
+ return;
19184
+ }
19185
  }
 
 
 
 
 
 
 
 
 
19186
 
19187
+ var validateDOMNesting = function () {};
19188
 
19189
+ var updatedAncestorInfo = function () {};
 
 
 
 
 
 
 
 
19190
 
19191
+ {
19192
+ // This validation code was written based on the HTML5 parsing spec:
19193
+ // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-scope
19194
+ //
19195
+ // Note: this does not catch all invalid nesting, nor does it try to (as it's
19196
+ // not clear what practical benefit doing so provides); instead, we warn only
19197
+ // for cases where the parser will give a parse tree differing from what React
19198
+ // intended. For example, <b><div></div></b> is invalid but we don't warn
19199
+ // because it still parses correctly; we do warn for other cases like nested
19200
+ // <p> tags where the beginning of the second element implicitly closes the
19201
+ // first, causing a confusing mess.
19202
+ // https://html.spec.whatwg.org/multipage/syntax.html#special
19203
+ 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']; // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-scope
19204
 
19205
+ var inScopeTags = ['applet', 'caption', 'html', 'table', 'td', 'th', 'marquee', 'object', 'template', // https://html.spec.whatwg.org/multipage/syntax.html#html-integration-point
19206
+ // TODO: Distinguish by namespace here -- for <title>, including it here
19207
+ // errs on the side of fewer warnings
19208
+ 'foreignObject', 'desc', 'title']; // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-button-scope
19209
 
19210
+ var buttonScopeTags = inScopeTags.concat(['button']); // https://html.spec.whatwg.org/multipage/syntax.html#generate-implied-end-tags
 
 
 
 
19211
 
19212
+ var impliedEndTags = ['dd', 'dt', 'li', 'option', 'optgroup', 'p', 'rp', 'rt'];
19213
+ var emptyAncestorInfo = {
19214
+ current: null,
19215
+ formTag: null,
19216
+ aTagInScope: null,
19217
+ buttonTagInScope: null,
19218
+ nobrTagInScope: null,
19219
+ pTagInButtonScope: null,
19220
+ listItemTagAutoclosing: null,
19221
+ dlItemTagAutoclosing: null
19222
+ };
19223
 
19224
+ updatedAncestorInfo = function (oldInfo, tag) {
19225
+ var ancestorInfo = _assign({}, oldInfo || emptyAncestorInfo);
19226
 
19227
+ var info = {
19228
+ tag: tag
19229
+ };
 
 
 
19230
 
19231
+ if (inScopeTags.indexOf(tag) !== -1) {
19232
+ ancestorInfo.aTagInScope = null;
19233
+ ancestorInfo.buttonTagInScope = null;
19234
+ ancestorInfo.nobrTagInScope = null;
19235
+ }
 
 
19236
 
19237
+ if (buttonScopeTags.indexOf(tag) !== -1) {
19238
+ ancestorInfo.pTagInButtonScope = null;
19239
+ } // See rules for 'li', 'dd', 'dt' start tags in
19240
+ // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody
19241
 
19242
 
19243
+ if (specialTags.indexOf(tag) !== -1 && tag !== 'address' && tag !== 'div' && tag !== 'p') {
19244
+ ancestorInfo.listItemTagAutoclosing = null;
19245
+ ancestorInfo.dlItemTagAutoclosing = null;
19246
+ }
 
 
19247
 
19248
+ ancestorInfo.current = info;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19249
 
19250
+ if (tag === 'form') {
19251
+ ancestorInfo.formTag = info;
19252
+ }
19253
 
19254
+ if (tag === 'a') {
19255
+ ancestorInfo.aTagInScope = info;
 
19256
  }
 
 
19257
 
19258
+ if (tag === 'button') {
19259
+ ancestorInfo.buttonTagInScope = info;
19260
+ }
19261
 
19262
+ if (tag === 'nobr') {
19263
+ ancestorInfo.nobrTagInScope = info;
19264
+ }
19265
 
19266
+ if (tag === 'p') {
19267
+ ancestorInfo.pTagInButtonScope = info;
19268
+ }
19269
 
19270
+ if (tag === 'li') {
19271
+ ancestorInfo.listItemTagAutoclosing = info;
19272
+ }
 
 
 
19273
 
19274
+ if (tag === 'dd' || tag === 'dt') {
19275
+ ancestorInfo.dlItemTagAutoclosing = info;
19276
+ }
 
 
 
 
19277
 
19278
+ return ancestorInfo;
19279
+ };
19280
+ /**
19281
+ * Returns whether
19282
+ */
19283
 
19284
 
19285
+ var isTagValidWithParent = function (tag, parentTag) {
19286
+ // First, let's check if we're in an unusual parsing mode...
19287
+ switch (parentTag) {
19288
+ // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inselect
19289
+ case 'select':
19290
+ return tag === 'option' || tag === 'optgroup' || tag === '#text';
 
 
 
 
19291
 
19292
+ case 'optgroup':
19293
+ return tag === 'option' || tag === '#text';
19294
+ // Strictly speaking, seeing an <option> doesn't mean we're in a <select>
19295
+ // but
19296
 
19297
+ case 'option':
19298
+ return tag === '#text';
19299
+ // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intd
19300
+ // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-incaption
19301
+ // No special behavior since these rules fall back to "in body" mode for
19302
+ // all except special table nodes which cause bad parsing behavior anyway.
19303
+ // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intr
19304
 
19305
+ case 'tr':
19306
+ return tag === 'th' || tag === 'td' || tag === 'style' || tag === 'script' || tag === 'template';
19307
+ // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intbody
 
 
 
19308
 
19309
+ case 'tbody':
19310
+ case 'thead':
19311
+ case 'tfoot':
19312
+ return tag === 'tr' || tag === 'style' || tag === 'script' || tag === 'template';
19313
+ // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-incolgroup
19314
+
19315
+ case 'colgroup':
19316
+ return tag === 'col' || tag === 'template';
19317
+ // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intable
19318
+
19319
+ case 'table':
19320
+ return tag === 'caption' || tag === 'colgroup' || tag === 'tbody' || tag === 'tfoot' || tag === 'thead' || tag === 'style' || tag === 'script' || tag === 'template';
19321
+ // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inhead
19322
+
19323
+ case 'head':
19324
+ return tag === 'base' || tag === 'basefont' || tag === 'bgsound' || tag === 'link' || tag === 'meta' || tag === 'title' || tag === 'noscript' || tag === 'noframes' || tag === 'style' || tag === 'script' || tag === 'template';
19325
+ // https://html.spec.whatwg.org/multipage/semantics.html#the-html-element
19326
+
19327
+ case 'html':
19328
+ return tag === 'head' || tag === 'body' || tag === 'frameset';
19329
 
19330
+ case 'frameset':
19331
+ return tag === 'frame';
19332
 
19333
+ case '#document':
19334
+ return tag === 'html';
19335
+ } // Probably in the "in body" parsing mode, so we outlaw only tag combos
19336
+ // where the parsing rules cause implicit opens or closes to be added.
19337
+ // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody
19338
 
 
 
 
 
19339
 
19340
+ switch (tag) {
19341
+ case 'h1':
19342
+ case 'h2':
19343
+ case 'h3':
19344
+ case 'h4':
19345
+ case 'h5':
19346
+ case 'h6':
19347
+ return parentTag !== 'h1' && parentTag !== 'h2' && parentTag !== 'h3' && parentTag !== 'h4' && parentTag !== 'h5' && parentTag !== 'h6';
19348
 
19349
+ case 'rp':
19350
+ case 'rt':
19351
+ return impliedEndTags.indexOf(parentTag) === -1;
 
19352
 
19353
+ case 'body':
19354
+ case 'caption':
19355
+ case 'col':
19356
+ case 'colgroup':
19357
+ case 'frameset':
19358
+ case 'frame':
19359
+ case 'head':
19360
+ case 'html':
19361
+ case 'tbody':
19362
+ case 'td':
19363
+ case 'tfoot':
19364
+ case 'th':
19365
+ case 'thead':
19366
+ case 'tr':
19367
+ // These tags are only valid with a few parents that have special child
19368
+ // parsing rules -- if we're down here, then none of those matched and
19369
+ // so we allow it only if we don't know what the parent is, as all other
19370
+ // cases are invalid.
19371
+ return parentTag == null;
19372
  }
 
19373
 
19374
+ return true;
19375
+ };
19376
  /**
19377
+ * Returns whether
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19378
  */
19379
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19380
 
19381
+ var findInvalidAncestorForTag = function (tag, ancestorInfo) {
19382
+ switch (tag) {
19383
+ case 'address':
19384
+ case 'article':
19385
+ case 'aside':
19386
+ case 'blockquote':
19387
+ case 'center':
19388
+ case 'details':
19389
+ case 'dialog':
19390
+ case 'dir':
19391
+ case 'div':
19392
+ case 'dl':
19393
+ case 'fieldset':
19394
+ case 'figcaption':
19395
+ case 'figure':
19396
+ case 'footer':
19397
+ case 'header':
19398
+ case 'hgroup':
19399
+ case 'main':
19400
+ case 'menu':
19401
+ case 'nav':
19402
+ case 'ol':
19403
+ case 'p':
19404
+ case 'section':
19405
+ case 'summary':
19406
+ case 'ul':
19407
+ case 'pre':
19408
+ case 'listing':
19409
+ case 'table':
19410
+ case 'hr':
19411
+ case 'xmp':
19412
+ case 'h1':
19413
+ case 'h2':
19414
+ case 'h3':
19415
+ case 'h4':
19416
+ case 'h5':
19417
+ case 'h6':
19418
+ return ancestorInfo.pTagInButtonScope;
19419
 
19420
+ case 'form':
19421
+ return ancestorInfo.formTag || ancestorInfo.pTagInButtonScope;
 
 
 
 
 
 
 
 
 
 
 
19422
 
19423
+ case 'li':
19424
+ return ancestorInfo.listItemTagAutoclosing;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19425
 
19426
+ case 'dd':
19427
+ case 'dt':
19428
+ return ancestorInfo.dlItemTagAutoclosing;
19429
 
19430
+ case 'button':
19431
+ return ancestorInfo.buttonTagInScope;
19432
 
19433
+ case 'a':
19434
+ // Spec says something about storing a list of markers, but it sounds
19435
+ // equivalent to this check.
19436
+ return ancestorInfo.aTagInScope;
 
 
 
 
 
19437
 
19438
+ case 'nobr':
19439
+ return ancestorInfo.nobrTagInScope;
 
19440
  }
 
 
19441
 
19442
+ return null;
19443
+ };
 
19444
 
19445
+ var didWarn$1 = {};
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19446
 
19447
+ validateDOMNesting = function (childTag, childText, ancestorInfo) {
19448
+ ancestorInfo = ancestorInfo || emptyAncestorInfo;
19449
+ var parentInfo = ancestorInfo.current;
19450
+ var parentTag = parentInfo && parentInfo.tag;
 
 
 
 
 
 
 
19451
 
19452
+ if (childText != null) {
19453
+ if (childTag != null) {
19454
+ error('validateDOMNesting: when childText is passed, childTag should be null');
 
 
 
19455
  }
 
 
 
 
19456
 
19457
+ childTag = '#text';
 
 
 
19458
  }
19459
 
19460
+ var invalidParent = isTagValidWithParent(childTag, parentTag) ? null : parentInfo;
19461
+ var invalidAncestor = invalidParent ? null : findInvalidAncestorForTag(childTag, ancestorInfo);
19462
+ var invalidParentOrAncestor = invalidParent || invalidAncestor;
 
 
 
 
19463
 
19464
+ if (!invalidParentOrAncestor) {
19465
+ return;
19466
  }
 
 
19467
 
19468
+ var ancestorTag = invalidParentOrAncestor.tag;
19469
+ var warnKey = !!invalidParent + '|' + childTag + '|' + ancestorTag;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19470
 
19471
+ if (didWarn$1[warnKey]) {
19472
+ return;
 
 
19473
  }
19474
 
19475
+ didWarn$1[warnKey] = true;
19476
+ var tagDisplayName = childTag;
19477
+ var whitespaceInfo = '';
 
 
 
 
 
 
 
 
 
 
19478
 
19479
+ if (childTag === '#text') {
19480
+ if (/\S/.test(childText)) {
19481
+ tagDisplayName = 'Text nodes';
19482
+ } else {
19483
+ tagDisplayName = 'Whitespace text nodes';
19484
+ whitespaceInfo = " Make sure you don't have any extra whitespace between tags on " + 'each line of your source code.';
19485
  }
19486
+ } else {
19487
+ tagDisplayName = '<' + childTag + '>';
19488
  }
 
 
19489
 
19490
+ if (invalidParent) {
19491
+ var info = '';
 
 
 
 
 
 
 
19492
 
19493
+ if (ancestorTag === 'table' && childTag === 'tr') {
19494
+ info += ' Add a <tbody>, <thead> or <tfoot> to your code to match the DOM tree generated by ' + 'the browser.';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19495
  }
 
 
 
 
19496
 
19497
+ error('validateDOMNesting(...): %s cannot appear as a child of <%s>.%s%s', tagDisplayName, ancestorTag, whitespaceInfo, info);
19498
+ } else {
19499
+ error('validateDOMNesting(...): %s cannot appear as a descendant of ' + '<%s>.', tagDisplayName, ancestorTag);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19500
  }
19501
+ };
19502
+ }
19503
 
19504
+ var SUPPRESS_HYDRATION_WARNING$1;
 
19505
 
19506
+ {
19507
+ SUPPRESS_HYDRATION_WARNING$1 = 'suppressHydrationWarning';
19508
+ }
 
 
 
 
 
 
 
 
 
 
 
 
19509
 
19510
+ var SUSPENSE_START_DATA = '$';
19511
+ var SUSPENSE_END_DATA = '/$';
19512
+ var SUSPENSE_PENDING_START_DATA = '$?';
19513
+ var SUSPENSE_FALLBACK_START_DATA = '$!';
19514
+ var STYLE$1 = 'style';
19515
+ var eventsEnabled = null;
19516
+ var selectionInformation = null;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19517
 
19518
+ function shouldAutoFocusHostComponent(type, props) {
19519
+ switch (type) {
19520
+ case 'button':
19521
+ case 'input':
19522
+ case 'select':
19523
+ case 'textarea':
19524
+ return !!props.autoFocus;
19525
  }
19526
 
19527
+ return false;
19528
+ }
19529
+ function getRootHostContext(rootContainerInstance) {
19530
+ var type;
19531
+ var namespace;
19532
+ var nodeType = rootContainerInstance.nodeType;
19533
+
19534
+ switch (nodeType) {
19535
+ case DOCUMENT_NODE:
19536
+ case DOCUMENT_FRAGMENT_NODE:
19537
+ {
19538
+ type = nodeType === DOCUMENT_NODE ? '#document' : '#fragment';
19539
+ var root = rootContainerInstance.documentElement;
19540
+ namespace = root ? root.namespaceURI : getChildNamespace(null, '');
19541
+ break;
19542
+ }
19543
 
19544
+ default:
19545
+ {
19546
+ var container = nodeType === COMMENT_NODE ? rootContainerInstance.parentNode : rootContainerInstance;
19547
+ var ownNamespace = container.namespaceURI || null;
19548
+ type = container.tagName;
19549
+ namespace = getChildNamespace(ownNamespace, type);
19550
+ break;
19551
+ }
19552
  }
19553
 
19554
+ {
19555
+ var validatedTag = type.toLowerCase();
19556
+ var ancestorInfo = updatedAncestorInfo(null, validatedTag);
19557
+ return {
19558
+ namespace: namespace,
19559
+ ancestorInfo: ancestorInfo
19560
+ };
19561
+ }
19562
+ }
19563
+ function getChildHostContext(parentHostContext, type, rootContainerInstance) {
19564
+ {
19565
+ var parentHostContextDev = parentHostContext;
19566
+ var namespace = getChildNamespace(parentHostContextDev.namespace, type);
19567
+ var ancestorInfo = updatedAncestorInfo(parentHostContextDev.ancestorInfo, type);
19568
+ return {
19569
+ namespace: namespace,
19570
+ ancestorInfo: ancestorInfo
19571
+ };
19572
  }
19573
+ }
19574
+ function getPublicInstance(instance) {
19575
+ return instance;
19576
+ }
19577
+ function prepareForCommit(containerInfo) {
19578
+ eventsEnabled = isEnabled();
19579
+ selectionInformation = getSelectionInformation();
19580
+ var activeInstance = null;
19581
+
19582
+ setEnabled(false);
19583
+ return activeInstance;
19584
+ }
19585
+ function resetAfterCommit(containerInfo) {
19586
+ restoreSelection(selectionInformation);
19587
+ setEnabled(eventsEnabled);
19588
+ eventsEnabled = null;
19589
+ selectionInformation = null;
19590
+ }
19591
+ function createInstance(type, props, rootContainerInstance, hostContext, internalInstanceHandle) {
19592
+ var parentNamespace;
19593
+
19594
+ {
19595
+ // TODO: take namespace into account when validating.
19596
+ var hostContextDev = hostContext;
19597
+ validateDOMNesting(type, null, hostContextDev.ancestorInfo);
19598
 
19599
+ if (typeof props.children === 'string' || typeof props.children === 'number') {
19600
+ var string = '' + props.children;
19601
+ var ownAncestorInfo = updatedAncestorInfo(hostContextDev.ancestorInfo, type);
19602
+ validateDOMNesting(null, string, ownAncestorInfo);
 
 
 
 
 
 
 
 
 
19603
  }
19604
+
19605
+ parentNamespace = hostContextDev.namespace;
19606
  }
19607
 
19608
+ var domElement = createElement(type, props, rootContainerInstance, parentNamespace);
19609
+ precacheFiberNode(internalInstanceHandle, domElement);
19610
+ updateFiberProps(domElement, props);
19611
+ return domElement;
19612
+ }
19613
+ function appendInitialChild(parentInstance, child) {
19614
+ parentInstance.appendChild(child);
19615
+ }
19616
+ function finalizeInitialChildren(domElement, type, props, rootContainerInstance, hostContext) {
19617
+ setInitialProperties(domElement, type, props, rootContainerInstance);
19618
+ return shouldAutoFocusHostComponent(type, props);
19619
+ }
19620
+ function prepareUpdate(domElement, type, oldProps, newProps, rootContainerInstance, hostContext) {
19621
+ {
19622
+ var hostContextDev = hostContext;
19623
+
19624
+ if (typeof newProps.children !== typeof oldProps.children && (typeof newProps.children === 'string' || typeof newProps.children === 'number')) {
19625
+ var string = '' + newProps.children;
19626
+ var ownAncestorInfo = updatedAncestorInfo(hostContextDev.ancestorInfo, type);
19627
+ validateDOMNesting(null, string, ownAncestorInfo);
19628
  }
19629
  }
19630
 
19631
+ return diffProperties(domElement, type, oldProps, newProps);
19632
+ }
19633
+ function shouldSetTextContent(type, props) {
19634
+ return type === 'textarea' || type === 'option' || type === 'noscript' || typeof props.children === 'string' || typeof props.children === 'number' || typeof props.dangerouslySetInnerHTML === 'object' && props.dangerouslySetInnerHTML !== null && props.dangerouslySetInnerHTML.__html != null;
19635
+ }
19636
+ function createTextInstance(text, rootContainerInstance, hostContext, internalInstanceHandle) {
19637
+ {
19638
+ var hostContextDev = hostContext;
19639
+ validateDOMNesting(null, text, hostContextDev.ancestorInfo);
19640
  }
19641
 
19642
+ var textNode = createTextNode(text, rootContainerInstance);
19643
+ precacheFiberNode(internalInstanceHandle, textNode);
19644
+ return textNode;
19645
+ }
19646
+ // if a component just imports ReactDOM (e.g. for findDOMNode).
19647
+ // Some environments might not have setTimeout or clearTimeout.
19648
 
19649
+ var scheduleTimeout = typeof setTimeout === 'function' ? setTimeout : undefined;
19650
+ var cancelTimeout = typeof clearTimeout === 'function' ? clearTimeout : undefined;
19651
+ var noTimeout = -1; // -------------------
19652
+ function commitMount(domElement, type, newProps, internalInstanceHandle) {
19653
+ // Despite the naming that might imply otherwise, this method only
19654
+ // fires if there is an `Update` effect scheduled during mounting.
19655
+ // This happens if `finalizeInitialChildren` returns `true` (which it
19656
+ // does to implement the `autoFocus` attribute on the client). But
19657
+ // there are also other cases when this might happen (such as patching
19658
+ // up text content during hydration mismatch). So we'll check this again.
19659
+ if (shouldAutoFocusHostComponent(type, newProps)) {
19660
+ domElement.focus();
19661
+ }
19662
+ }
19663
+ function commitUpdate(domElement, updatePayload, type, oldProps, newProps, internalInstanceHandle) {
19664
+ // Update the props handle so that we know which props are the ones with
19665
+ // with current event handlers.
19666
+ updateFiberProps(domElement, newProps); // Apply the diff to the DOM node.
19667
 
19668
+ updateProperties(domElement, updatePayload, type, oldProps, newProps);
19669
+ }
19670
+ function resetTextContent(domElement) {
19671
+ setTextContent(domElement, '');
19672
+ }
19673
+ function commitTextUpdate(textInstance, oldText, newText) {
19674
+ textInstance.nodeValue = newText;
19675
+ }
19676
+ function appendChild(parentInstance, child) {
19677
+ parentInstance.appendChild(child);
19678
+ }
19679
+ function appendChildToContainer(container, child) {
19680
+ var parentNode;
19681
 
19682
+ if (container.nodeType === COMMENT_NODE) {
19683
+ parentNode = container.parentNode;
19684
+ parentNode.insertBefore(child, container);
19685
+ } else {
19686
+ parentNode = container;
19687
+ parentNode.appendChild(child);
19688
+ } // This container might be used for a portal.
19689
+ // If something inside a portal is clicked, that click should bubble
19690
+ // through the React tree. However, on Mobile Safari the click would
19691
+ // never bubble through the *DOM* tree unless an ancestor with onclick
19692
+ // event exists. So we wouldn't see it and dispatch it.
19693
+ // This is why we ensure that non React root containers have inline onclick
19694
+ // defined.
19695
+ // https://github.com/facebook/react/issues/11918
19696
 
 
 
 
 
 
 
19697
 
19698
+ var reactRootContainer = container._reactRootContainer;
 
 
 
 
 
 
19699
 
19700
+ if ((reactRootContainer === null || reactRootContainer === undefined) && parentNode.onclick === null) {
19701
+ // TODO: This cast may not be sound for SVG, MathML or custom elements.
19702
+ trapClickOnNonInteractiveElement(parentNode);
19703
+ }
19704
+ }
19705
+ function insertBefore(parentInstance, child, beforeChild) {
19706
+ parentInstance.insertBefore(child, beforeChild);
19707
+ }
19708
+ function insertInContainerBefore(container, child, beforeChild) {
19709
+ if (container.nodeType === COMMENT_NODE) {
19710
+ container.parentNode.insertBefore(child, beforeChild);
19711
+ } else {
19712
+ container.insertBefore(child, beforeChild);
19713
+ }
19714
+ }
19715
 
19716
+ function removeChild(parentInstance, child) {
19717
+ parentInstance.removeChild(child);
19718
+ }
19719
+ function removeChildFromContainer(container, child) {
19720
+ if (container.nodeType === COMMENT_NODE) {
19721
+ container.parentNode.removeChild(child);
19722
+ } else {
19723
+ container.removeChild(child);
19724
+ }
19725
+ }
19726
+ function hideInstance(instance) {
19727
+ // TODO: Does this work for all element types? What about MathML? Should we
19728
+ // pass host context to this method?
19729
+ instance = instance;
19730
+ var style = instance.style;
19731
 
19732
+ if (typeof style.setProperty === 'function') {
19733
+ style.setProperty('display', 'none', 'important');
19734
+ } else {
19735
+ style.display = 'none';
19736
+ }
19737
+ }
19738
+ function hideTextInstance(textInstance) {
19739
+ textInstance.nodeValue = '';
19740
+ }
19741
+ function unhideInstance(instance, props) {
19742
+ instance = instance;
19743
+ var styleProp = props[STYLE$1];
19744
+ var display = styleProp !== undefined && styleProp !== null && styleProp.hasOwnProperty('display') ? styleProp.display : null;
19745
+ instance.style.display = dangerousStyleValue('display', display);
19746
+ }
19747
+ function unhideTextInstance(textInstance, text) {
19748
+ textInstance.nodeValue = text;
19749
+ }
19750
+ function clearContainer(container) {
19751
+ if (container.nodeType === ELEMENT_NODE) {
19752
+ container.textContent = '';
19753
+ } else if (container.nodeType === DOCUMENT_NODE) {
19754
+ var body = container.body;
19755
 
19756
+ if (body != null) {
19757
+ body.textContent = '';
19758
+ }
19759
+ }
19760
+ } // -------------------
19761
+ function canHydrateInstance(instance, type, props) {
19762
+ if (instance.nodeType !== ELEMENT_NODE || type.toLowerCase() !== instance.nodeName.toLowerCase()) {
19763
+ return null;
19764
+ } // This has now been refined to an element node.
19765
 
19766
 
19767
+ return instance;
19768
+ }
19769
+ function canHydrateTextInstance(instance, text) {
19770
+ if (text === '' || instance.nodeType !== TEXT_NODE) {
19771
+ // Empty strings are not parsed by HTML so there won't be a correct match here.
19772
+ return null;
19773
+ } // This has now been refined to a text node.
19774
 
 
 
 
 
 
 
19775
 
19776
+ return instance;
19777
+ }
19778
+ function isSuspenseInstancePending(instance) {
19779
+ return instance.data === SUSPENSE_PENDING_START_DATA;
19780
+ }
19781
+ function isSuspenseInstanceFallback(instance) {
19782
+ return instance.data === SUSPENSE_FALLBACK_START_DATA;
19783
+ }
19784
 
19785
+ function getNextHydratable(node) {
19786
+ // Skip non-hydratable nodes.
19787
+ for (; node != null; node = node.nextSibling) {
19788
+ var nodeType = node.nodeType;
19789
 
19790
+ if (nodeType === ELEMENT_NODE || nodeType === TEXT_NODE) {
19791
+ break;
19792
+ }
19793
+ }
19794
 
19795
+ return node;
19796
+ }
19797
 
19798
+ function getNextHydratableSibling(instance) {
19799
+ return getNextHydratable(instance.nextSibling);
19800
+ }
19801
+ function getFirstHydratableChild(parentInstance) {
19802
+ return getNextHydratable(parentInstance.firstChild);
19803
+ }
19804
+ function hydrateInstance(instance, type, props, rootContainerInstance, hostContext, internalInstanceHandle) {
19805
+ precacheFiberNode(internalInstanceHandle, instance); // TODO: Possibly defer this until the commit phase where all the events
19806
+ // get attached.
19807
 
19808
+ updateFiberProps(instance, props);
19809
+ var parentNamespace;
 
 
 
 
19810
 
19811
+ {
19812
+ var hostContextDev = hostContext;
19813
+ parentNamespace = hostContextDev.namespace;
19814
+ }
 
 
 
 
19815
 
19816
+ return diffHydratedProperties(instance, type, props, parentNamespace);
19817
+ }
19818
+ function hydrateTextInstance(textInstance, text, internalInstanceHandle) {
19819
+ precacheFiberNode(internalInstanceHandle, textInstance);
19820
+ return diffHydratedText(textInstance, text);
19821
+ }
19822
+ function getNextHydratableInstanceAfterSuspenseInstance(suspenseInstance) {
19823
+ var node = suspenseInstance.nextSibling; // Skip past all nodes within this suspense boundary.
19824
+ // There might be nested nodes so we need to keep track of how
19825
+ // deep we are and only break out when we're back on top.
19826
 
19827
+ var depth = 0;
19828
 
19829
+ while (node) {
19830
+ if (node.nodeType === COMMENT_NODE) {
19831
+ var data = node.data;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19832
 
19833
+ if (data === SUSPENSE_END_DATA) {
19834
+ if (depth === 0) {
19835
+ return getNextHydratableSibling(node);
19836
+ } else {
19837
+ depth--;
19838
+ }
19839
+ } else if (data === SUSPENSE_START_DATA || data === SUSPENSE_FALLBACK_START_DATA || data === SUSPENSE_PENDING_START_DATA) {
19840
+ depth++;
19841
+ }
19842
+ }
19843
 
19844
+ node = node.nextSibling;
19845
+ } // TODO: Warn, we didn't find the end comment boundary.
19846
 
 
 
 
 
 
 
19847
 
19848
+ return null;
19849
+ } // Returns the SuspenseInstance if this node is a direct child of a
19850
+ // SuspenseInstance. I.e. if its previous sibling is a Comment with
19851
+ // SUSPENSE_x_START_DATA. Otherwise, null.
 
 
 
 
19852
 
19853
+ function getParentSuspenseInstance(targetInstance) {
19854
+ var node = targetInstance.previousSibling; // Skip past all nodes within this suspense boundary.
19855
+ // There might be nested nodes so we need to keep track of how
19856
+ // deep we are and only break out when we're back on top.
19857
 
19858
+ var depth = 0;
19859
 
19860
+ while (node) {
19861
+ if (node.nodeType === COMMENT_NODE) {
19862
+ var data = node.data;
19863
 
19864
+ if (data === SUSPENSE_START_DATA || data === SUSPENSE_FALLBACK_START_DATA || data === SUSPENSE_PENDING_START_DATA) {
19865
+ if (depth === 0) {
19866
+ return node;
19867
+ } else {
19868
+ depth--;
19869
+ }
19870
+ } else if (data === SUSPENSE_END_DATA) {
19871
+ depth++;
19872
+ }
19873
+ }
19874
 
19875
+ node = node.previousSibling;
 
 
19876
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19877
 
19878
+ return null;
 
 
 
 
 
 
 
 
 
 
 
 
 
19879
  }
19880
+ function commitHydratedContainer(container) {
19881
+ // Retry if any event replaying was blocked on this.
19882
+ retryIfBlockedOn(container);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19883
  }
19884
+ function commitHydratedSuspenseInstance(suspenseInstance) {
19885
+ // Retry if any event replaying was blocked on this.
19886
+ retryIfBlockedOn(suspenseInstance);
19887
+ }
19888
+ function didNotMatchHydratedContainerTextInstance(parentContainer, textInstance, text) {
19889
+ {
19890
+ warnForUnmatchedText(textInstance, text);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19891
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19892
  }
19893
+ function didNotMatchHydratedTextInstance(parentType, parentProps, parentInstance, textInstance, text) {
19894
+ if ( parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) {
19895
+ warnForUnmatchedText(textInstance, text);
 
 
 
 
 
 
 
 
 
 
 
 
19896
  }
19897
  }
19898
+ function didNotHydrateContainerInstance(parentContainer, instance) {
19899
+ {
19900
+ if (instance.nodeType === ELEMENT_NODE) {
19901
+ warnForDeletedHydratableElement(parentContainer, instance);
19902
+ } else if (instance.nodeType === COMMENT_NODE) ; else {
19903
+ warnForDeletedHydratableText(parentContainer, instance);
19904
+ }
19905
+ }
 
 
 
19906
  }
19907
+ function didNotHydrateInstance(parentType, parentProps, parentInstance, instance) {
19908
+ if ( parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) {
19909
+ if (instance.nodeType === ELEMENT_NODE) {
19910
+ warnForDeletedHydratableElement(parentInstance, instance);
19911
+ } else if (instance.nodeType === COMMENT_NODE) ; else {
19912
+ warnForDeletedHydratableText(parentInstance, instance);
19913
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19914
  }
19915
  }
19916
+ function didNotFindHydratableContainerInstance(parentContainer, type, props) {
19917
+ {
19918
+ warnForInsertedHydratedElement(parentContainer, type);
 
 
 
 
 
 
 
 
 
 
 
19919
  }
 
19920
  }
19921
+ function didNotFindHydratableContainerTextInstance(parentContainer, text) {
19922
+ {
19923
+ warnForInsertedHydratedText(parentContainer, text);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19924
  }
19925
+ }
19926
+ function didNotFindHydratableInstance(parentType, parentProps, parentInstance, type, props) {
19927
+ if ( parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) {
19928
+ warnForInsertedHydratedElement(parentInstance, type);
19929
+ }
19930
+ }
19931
+ function didNotFindHydratableTextInstance(parentType, parentProps, parentInstance, text) {
19932
+ if ( parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) {
19933
+ warnForInsertedHydratedText(parentInstance, text);
19934
+ }
19935
+ }
19936
+ function didNotFindHydratableSuspenseInstance(parentType, parentProps, parentInstance) {
19937
+ if ( parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) ;
19938
+ }
19939
+ var clientId = 0;
19940
+ function makeClientIdInDEV(warnOnAccessInDEV) {
19941
+ var id = 'r:' + (clientId++).toString(36);
19942
+ return {
19943
+ toString: function () {
19944
+ warnOnAccessInDEV();
19945
+ return id;
19946
+ },
19947
+ valueOf: function () {
19948
+ warnOnAccessInDEV();
19949
+ return id;
19950
+ }
19951
+ };
19952
+ }
19953
+ function isOpaqueHydratingObject(value) {
19954
+ return value !== null && typeof value === 'object' && value.$$typeof === REACT_OPAQUE_ID_TYPE;
19955
+ }
19956
+ function makeOpaqueHydratingObject(attemptToReadValue) {
19957
+ return {
19958
+ $$typeof: REACT_OPAQUE_ID_TYPE,
19959
+ toString: attemptToReadValue,
19960
+ valueOf: attemptToReadValue
19961
+ };
19962
+ }
19963
+ function preparePortalMount(portalInstance) {
19964
+ {
19965
+ listenToAllSupportedEvents(portalInstance);
19966
  }
19967
+ }
19968
 
19969
+ var randomKey = Math.random().toString(36).slice(2);
19970
+ var internalInstanceKey = '__reactFiber$' + randomKey;
19971
+ var internalPropsKey = '__reactProps$' + randomKey;
19972
+ var internalContainerInstanceKey = '__reactContainer$' + randomKey;
19973
+ var internalEventHandlersKey = '__reactEvents$' + randomKey;
19974
+ function precacheFiberNode(hostInst, node) {
19975
+ node[internalInstanceKey] = hostInst;
19976
+ }
19977
+ function markContainerAsRoot(hostRoot, node) {
19978
+ node[internalContainerInstanceKey] = hostRoot;
19979
+ }
19980
+ function unmarkContainerAsRoot(node) {
19981
+ node[internalContainerInstanceKey] = null;
19982
+ }
19983
+ function isContainerMarkedAsRoot(node) {
19984
+ return !!node[internalContainerInstanceKey];
19985
+ } // Given a DOM node, return the closest HostComponent or HostText fiber ancestor.
19986
+ // If the target node is part of a hydrated or not yet rendered subtree, then
19987
+ // this may also return a SuspenseComponent or HostRoot to indicate that.
19988
+ // Conceptually the HostRoot fiber is a child of the Container node. So if you
19989
+ // pass the Container node as the targetNode, you will not actually get the
19990
+ // HostRoot back. To get to the HostRoot, you need to pass a child of it.
19991
+ // The same thing applies to Suspense boundaries.
19992
 
19993
+ function getClosestInstanceFromNode(targetNode) {
19994
+ var targetInst = targetNode[internalInstanceKey];
19995
 
19996
+ if (targetInst) {
19997
+ // Don't return HostRoot or SuspenseComponent here.
19998
+ return targetInst;
19999
+ } // If the direct event target isn't a React owned DOM node, we need to look
20000
+ // to see if one of its parents is a React owned DOM node.
20001
+
20002
+
20003
+ var parentNode = targetNode.parentNode;
20004
+
20005
+ while (parentNode) {
20006
+ // We'll check if this is a container root that could include
20007
+ // React nodes in the future. We need to check this first because
20008
+ // if we're a child of a dehydrated container, we need to first
20009
+ // find that inner container before moving on to finding the parent
20010
+ // instance. Note that we don't check this field on the targetNode
20011
+ // itself because the fibers are conceptually between the container
20012
+ // node and the first child. It isn't surrounding the container node.
20013
+ // If it's not a container, we check if it's an instance.
20014
+ targetInst = parentNode[internalContainerInstanceKey] || parentNode[internalInstanceKey];
20015
+
20016
+ if (targetInst) {
20017
+ // Since this wasn't the direct target of the event, we might have
20018
+ // stepped past dehydrated DOM nodes to get here. However they could
20019
+ // also have been non-React nodes. We need to answer which one.
20020
+ // If we the instance doesn't have any children, then there can't be
20021
+ // a nested suspense boundary within it. So we can use this as a fast
20022
+ // bailout. Most of the time, when people add non-React children to
20023
+ // the tree, it is using a ref to a child-less DOM node.
20024
+ // Normally we'd only need to check one of the fibers because if it
20025
+ // has ever gone from having children to deleting them or vice versa
20026
+ // it would have deleted the dehydrated boundary nested inside already.
20027
+ // However, since the HostRoot starts out with an alternate it might
20028
+ // have one on the alternate so we need to check in case this was a
20029
+ // root.
20030
+ var alternate = targetInst.alternate;
20031
+
20032
+ if (targetInst.child !== null || alternate !== null && alternate.child !== null) {
20033
+ // Next we need to figure out if the node that skipped past is
20034
+ // nested within a dehydrated boundary and if so, which one.
20035
+ var suspenseInstance = getParentSuspenseInstance(targetNode);
20036
+
20037
+ while (suspenseInstance !== null) {
20038
+ // We found a suspense instance. That means that we haven't
20039
+ // hydrated it yet. Even though we leave the comments in the
20040
+ // DOM after hydrating, and there are boundaries in the DOM
20041
+ // that could already be hydrated, we wouldn't have found them
20042
+ // through this pass since if the target is hydrated it would
20043
+ // have had an internalInstanceKey on it.
20044
+ // Let's get the fiber associated with the SuspenseComponent
20045
+ // as the deepest instance.
20046
+ var targetSuspenseInst = suspenseInstance[internalInstanceKey];
20047
+
20048
+ if (targetSuspenseInst) {
20049
+ return targetSuspenseInst;
20050
+ } // If we don't find a Fiber on the comment, it might be because
20051
+ // we haven't gotten to hydrate it yet. There might still be a
20052
+ // parent boundary that hasn't above this one so we need to find
20053
+ // the outer most that is known.
20054
+
20055
+
20056
+ suspenseInstance = getParentSuspenseInstance(suspenseInstance); // If we don't find one, then that should mean that the parent
20057
+ // host component also hasn't hydrated yet. We can return it
20058
+ // below since it will bail out on the isMounted check later.
20059
+ }
20060
+ }
20061
+
20062
+ return targetInst;
20063
  }
20064
+
20065
+ targetNode = parentNode;
20066
+ parentNode = targetNode.parentNode;
20067
  }
20068
 
20069
+ return null;
 
20070
  }
 
20071
  /**
20072
+ * Given a DOM node, return the ReactDOMComponent or ReactDOMTextComponent
20073
+ * instance, or null if the node was not rendered by this React.
 
20074
  */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
20075
 
20076
+ function getInstanceFromNode(node) {
20077
+ var inst = node[internalInstanceKey] || node[internalContainerInstanceKey];
20078
 
20079
+ if (inst) {
20080
+ if (inst.tag === HostComponent || inst.tag === HostText || inst.tag === SuspenseComponent || inst.tag === HostRoot) {
20081
+ return inst;
20082
+ } else {
20083
  return null;
20084
+ }
20085
  }
 
20086
 
20087
+ return null;
20088
+ }
20089
  /**
20090
+ * Given a ReactDOMComponent or ReactDOMTextComponent, return the corresponding
20091
+ * DOM node.
 
 
 
 
20092
  */
20093
+
20094
+ function getNodeFromInstance(inst) {
20095
+ if (inst.tag === HostComponent || inst.tag === HostText) {
20096
+ // In Fiber this, is just the state node right now. We assume it will be
20097
+ // a host component or host text.
20098
+ return inst.stateNode;
20099
+ } // Without this first invariant, passing a non-DOM-component triggers the next
20100
+ // invariant for a missing parent, which is super confusing.
20101
+
20102
+
20103
+ {
20104
+ {
20105
+ throw Error( "getNodeFromInstance: Invalid argument." );
20106
  }
 
20107
  }
20108
+ }
20109
+ function getFiberCurrentPropsFromNode(node) {
20110
+ return node[internalPropsKey] || null;
20111
+ }
20112
+ function updateFiberProps(node, props) {
20113
+ node[internalPropsKey] = props;
20114
+ }
20115
+ function getEventListenerSet(node) {
20116
+ var elementListenerSet = node[internalEventHandlersKey];
20117
 
20118
+ if (elementListenerSet === undefined) {
20119
+ elementListenerSet = node[internalEventHandlersKey] = new Set();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
20120
  }
 
20121
 
20122
+ return elementListenerSet;
20123
+ }
 
 
 
 
 
 
20124
 
20125
+ var loggedTypeFailures = {};
20126
+ var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
 
 
 
20127
 
20128
+ function setCurrentlyValidatingElement(element) {
20129
+ {
20130
+ if (element) {
20131
+ var owner = element._owner;
20132
+ var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
20133
+ ReactDebugCurrentFrame$1.setExtraStackFrame(stack);
20134
+ } else {
20135
+ ReactDebugCurrentFrame$1.setExtraStackFrame(null);
20136
+ }
20137
  }
20138
+ }
20139
 
20140
+ function checkPropTypes(typeSpecs, values, location, componentName, element) {
20141
+ {
20142
+ // $FlowFixMe This is okay but Flow doesn't know it.
20143
+ var has = Function.call.bind(Object.prototype.hasOwnProperty);
20144
 
20145
+ for (var typeSpecName in typeSpecs) {
20146
+ if (has(typeSpecs, typeSpecName)) {
20147
+ var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to
20148
+ // fail the render phase where it didn't fail before. So we log it.
20149
+ // After these have been cleaned up, we'll let them throw.
20150
 
20151
+ try {
20152
+ // This is intentionally an invariant that gets caught. It's the same
20153
+ // behavior as without this statement except with a better message.
20154
+ if (typeof typeSpecs[typeSpecName] !== 'function') {
20155
+ var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.');
20156
+ err.name = 'Invariant Violation';
20157
+ throw err;
20158
+ }
 
 
 
 
 
 
 
 
 
 
 
 
20159
 
20160
+ error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');
20161
+ } catch (ex) {
20162
+ error$1 = ex;
20163
+ }
20164
 
20165
+ if (error$1 && !(error$1 instanceof Error)) {
20166
+ setCurrentlyValidatingElement(element);
20167
 
20168
+ 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', location, typeSpecName, typeof error$1);
20169
 
20170
+ setCurrentlyValidatingElement(null);
20171
+ }
 
 
 
 
20172
 
20173
+ if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
20174
+ // Only monitor this failure once because there tends to be a lot of the
20175
+ // same error.
20176
+ loggedTypeFailures[error$1.message] = true;
20177
+ setCurrentlyValidatingElement(element);
 
 
 
20178
 
20179
+ error('Failed %s type: %s', location, error$1.message);
20180
 
20181
+ setCurrentlyValidatingElement(null);
20182
+ }
20183
+ }
20184
+ }
20185
+ }
20186
+ }
20187
 
20188
+ var valueStack = [];
20189
+ var fiberStack;
 
20190
 
20191
+ {
20192
+ fiberStack = [];
20193
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
20194
 
20195
+ var index = -1;
 
 
 
 
 
 
 
 
 
20196
 
20197
+ function createCursor(defaultValue) {
20198
+ return {
20199
+ current: defaultValue
20200
+ };
 
 
 
 
20201
  }
20202
 
20203
+ function pop(cursor, fiber) {
20204
+ if (index < 0) {
20205
+ {
20206
+ error('Unexpected pop.');
20207
+ }
20208
 
20209
+ return;
20210
+ }
20211
+
20212
+ {
20213
+ if (fiber !== fiberStack[index]) {
20214
+ error('Unexpected Fiber popped.');
20215
+ }
20216
+ }
20217
+
20218
+ cursor.current = valueStack[index];
20219
+ valueStack[index] = null;
20220
+
20221
+ {
20222
+ fiberStack[index] = null;
20223
+ }
20224
 
20225
+ index--;
20226
+ }
20227
+
20228
+ function push(cursor, value, fiber) {
20229
+ index++;
20230
+ valueStack[index] = cursor.current;
20231
+
20232
+ {
20233
+ fiberStack[index] = fiber;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
20234
  }
 
20235
 
20236
+ cursor.current = value;
20237
+ }
 
 
20238
 
20239
+ var warnedAboutMissingGetChildContext;
20240
 
20241
+ {
20242
+ warnedAboutMissingGetChildContext = {};
20243
+ }
20244
 
20245
+ var emptyContextObject = {};
 
 
 
 
 
20246
 
20247
+ {
20248
+ Object.freeze(emptyContextObject);
20249
+ } // A cursor to the current merged context object on the stack.
 
 
 
 
 
20250
 
20251
 
20252
+ var contextStackCursor = createCursor(emptyContextObject); // A cursor to a boolean indicating whether the context has changed.
20253
 
20254
+ var didPerformWorkStackCursor = createCursor(false); // Keep track of the previous context object that was on the stack.
20255
+ // We use this to get access to the parent context after we have already
20256
+ // pushed the next context provider, and now need to merge their contexts.
20257
 
20258
+ var previousContext = emptyContextObject;
 
 
 
 
20259
 
20260
+ function getUnmaskedContext(workInProgress, Component, didPushOwnContextIfProvider) {
20261
+ {
20262
+ if (didPushOwnContextIfProvider && isContextProvider(Component)) {
20263
+ // If the fiber is a context provider itself, when we read its context
20264
+ // we may have already pushed its own child context on the stack. A context
20265
+ // provider should not "see" its own child context. Therefore we read the
20266
+ // previous (parent) context instead for a context provider.
20267
+ return previousContext;
20268
+ }
20269
 
20270
+ return contextStackCursor.current;
 
 
 
 
 
 
 
 
20271
  }
20272
+ }
20273
+
20274
+ function cacheContext(workInProgress, unmaskedContext, maskedContext) {
20275
+ {
20276
+ var instance = workInProgress.stateNode;
20277
+ instance.__reactInternalMemoizedUnmaskedChildContext = unmaskedContext;
20278
+ instance.__reactInternalMemoizedMaskedChildContext = maskedContext;
20279
  }
20280
  }
20281
 
20282
+ function getMaskedContext(workInProgress, unmaskedContext) {
20283
+ {
20284
+ var type = workInProgress.type;
20285
+ var contextTypes = type.contextTypes;
20286
 
20287
+ if (!contextTypes) {
20288
+ return emptyContextObject;
20289
+ } // Avoid recreating masked context unless unmasked context has changed.
20290
+ // Failing to do this will result in unnecessary calls to componentWillReceiveProps.
20291
+ // This may trigger infinite loops if componentWillReceiveProps calls setState.
20292
 
 
 
 
20293
 
20294
+ var instance = workInProgress.stateNode;
20295
+
20296
+ if (instance && instance.__reactInternalMemoizedUnmaskedChildContext === unmaskedContext) {
20297
+ return instance.__reactInternalMemoizedMaskedChildContext;
20298
  }
20299
 
20300
+ var context = {};
 
 
20301
 
20302
+ for (var key in contextTypes) {
20303
+ context[key] = unmaskedContext[key];
 
20304
  }
20305
 
20306
+ {
20307
+ var name = getComponentName(type) || 'Unknown';
20308
+ checkPropTypes(contextTypes, context, 'context', name);
20309
+ } // Cache unmasked context so we can avoid recreating masked context unless necessary.
20310
+ // Context is created before the class component is instantiated so check for instance.
20311
 
20312
+
20313
+ if (instance) {
20314
+ cacheContext(workInProgress, unmaskedContext, context);
20315
  }
20316
 
20317
+ return context;
20318
+ }
20319
+ }
20320
 
20321
+ function hasContextChanged() {
20322
+ {
20323
+ return didPerformWorkStackCursor.current;
20324
+ }
20325
+ }
20326
+
20327
+ function isContextProvider(type) {
20328
+ {
20329
+ var childContextTypes = type.childContextTypes;
20330
+ return childContextTypes !== null && childContextTypes !== undefined;
20331
+ }
20332
+ }
20333
+
20334
+ function popContext(fiber) {
20335
+ {
20336
+ pop(didPerformWorkStackCursor, fiber);
20337
+ pop(contextStackCursor, fiber);
20338
+ }
20339
+ }
20340
+
20341
+ function popTopLevelContextObject(fiber) {
20342
+ {
20343
+ pop(didPerformWorkStackCursor, fiber);
20344
+ pop(contextStackCursor, fiber);
20345
+ }
20346
+ }
20347
+
20348
+ function pushTopLevelContextObject(fiber, context, didChange) {
20349
+ {
20350
+ if (!(contextStackCursor.current === emptyContextObject)) {
20351
+ {
20352
+ throw Error( "Unexpected context found on stack. This error is likely caused by a bug in React. Please file an issue." );
20353
+ }
20354
  }
20355
 
20356
+ push(contextStackCursor, context, fiber);
20357
+ push(didPerformWorkStackCursor, didChange, fiber);
20358
+ }
20359
+ }
20360
 
20361
+ function processChildContext(fiber, type, parentContext) {
20362
+ {
20363
+ var instance = fiber.stateNode;
20364
+ var childContextTypes = type.childContextTypes; // TODO (bvaughn) Replace this behavior with an invariant() in the future.
20365
+ // It has only been added in Fiber to match the (unintentional) behavior in Stack.
20366
+
20367
+ if (typeof instance.getChildContext !== 'function') {
20368
+ {
20369
+ var componentName = getComponentName(type) || 'Unknown';
20370
+
20371
+ if (!warnedAboutMissingGetChildContext[componentName]) {
20372
+ warnedAboutMissingGetChildContext[componentName] = true;
20373
+
20374
+ error('%s.childContextTypes is specified but there is no getChildContext() method ' + 'on the instance. You can either define getChildContext() on %s or remove ' + 'childContextTypes from it.', componentName, componentName);
20375
+ }
20376
  }
20377
+
20378
+ return parentContext;
20379
  }
 
 
20380
 
20381
+ var childContext = instance.getChildContext();
20382
+
20383
+ for (var contextKey in childContext) {
20384
+ if (!(contextKey in childContextTypes)) {
20385
+ {
20386
+ throw Error( (getComponentName(type) || 'Unknown') + ".getChildContext(): key \"" + contextKey + "\" is not defined in childContextTypes." );
20387
+ }
20388
+ }
 
20389
  }
20390
+
20391
+ {
20392
+ var name = getComponentName(type) || 'Unknown';
20393
+ checkPropTypes(childContextTypes, childContext, 'child context', name);
 
 
20394
  }
20395
 
20396
+ return _assign({}, parentContext, childContext);
20397
+ }
20398
+ }
20399
+
20400
+ function pushContextProvider(workInProgress) {
20401
+ {
20402
+ var instance = workInProgress.stateNode; // We push the context as early as possible to ensure stack integrity.
20403
+ // If the instance does not exist yet, we will push null at first,
20404
+ // and replace it on the stack later when invalidating the context.
20405
+
20406
+ var memoizedMergedChildContext = instance && instance.__reactInternalMemoizedMergedChildContext || emptyContextObject; // Remember the parent context so we can merge with it later.
20407
+ // Inherit the parent's did-perform-work value to avoid inadvertently blocking updates.
20408
+
20409
+ previousContext = contextStackCursor.current;
20410
+ push(contextStackCursor, memoizedMergedChildContext, workInProgress);
20411
+ push(didPerformWorkStackCursor, didPerformWorkStackCursor.current, workInProgress);
20412
+ return true;
20413
+ }
20414
+ }
20415
+
20416
+ function invalidateContextProvider(workInProgress, type, didChange) {
20417
+ {
20418
+ var instance = workInProgress.stateNode;
20419
+
20420
+ if (!instance) {
20421
+ {
20422
+ throw Error( "Expected to have an instance by this point. This error is likely caused by a bug in React. Please file an issue." );
20423
+ }
20424
  }
20425
+
20426
+ if (didChange) {
20427
+ // Merge parent and own context.
20428
+ // Skip this if we're not updating due to sCU.
20429
+ // This avoids unnecessarily recomputing memoized values.
20430
+ var mergedContext = processChildContext(workInProgress, type, previousContext);
20431
+ instance.__reactInternalMemoizedMergedChildContext = mergedContext; // Replace the old (or empty) context with the new one.
20432
+ // It is important to unwind the context in the reverse order.
20433
+
20434
+ pop(didPerformWorkStackCursor, workInProgress);
20435
+ pop(contextStackCursor, workInProgress); // Now push the new context and mark that it has changed.
20436
+
20437
+ push(contextStackCursor, mergedContext, workInProgress);
20438
+ push(didPerformWorkStackCursor, didChange, workInProgress);
20439
+ } else {
20440
+ pop(didPerformWorkStackCursor, workInProgress);
20441
+ push(didPerformWorkStackCursor, didChange, workInProgress);
20442
+ }
20443
+ }
20444
  }
20445
 
20446
+ function findCurrentUnmaskedContext(fiber) {
20447
+ {
20448
+ // Currently this is only used with renderSubtreeIntoContainer; not sure if it
20449
+ // makes sense elsewhere
20450
+ if (!(isFiberMounted(fiber) && fiber.tag === ClassComponent)) {
20451
+ {
20452
+ throw Error( "Expected subtree parent to be a mounted class component. This error is likely caused by a bug in React. Please file an issue." );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
20453
  }
20454
+ }
20455
+
20456
+ var node = fiber;
20457
+
20458
+ do {
20459
+ switch (node.tag) {
20460
+ case HostRoot:
20461
+ return node.stateNode.context;
20462
+
20463
+ case ClassComponent:
20464
+ {
20465
+ var Component = node.type;
20466
+
20467
+ if (isContextProvider(Component)) {
20468
+ return node.stateNode.__reactInternalMemoizedMergedChildContext;
20469
+ }
20470
+
20471
+ break;
20472
+ }
20473
  }
20474
+
20475
+ node = node.return;
20476
+ } while (node !== null);
20477
+
20478
+ {
20479
+ {
20480
+ throw Error( "Found unexpected detached subtree parent. This error is likely caused by a bug in React. Please file an issue." );
20481
  }
20482
  }
20483
+ }
20484
+ }
20485
 
20486
+ var LegacyRoot = 0;
20487
+ var BlockingRoot = 1;
20488
+ var ConcurrentRoot = 2;
20489
+
20490
+ var rendererID = null;
20491
+ var injectedHook = null;
20492
+ var hasLoggedError = false;
20493
+ var isDevToolsPresent = typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined';
20494
+ function injectInternals(internals) {
20495
+ if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined') {
20496
+ // No DevTools
20497
+ return false;
20498
+ }
20499
+
20500
+ var hook = __REACT_DEVTOOLS_GLOBAL_HOOK__;
20501
+
20502
+ if (hook.isDisabled) {
20503
+ // This isn't a real property on the hook, but it can be set to opt out
20504
+ // of DevTools integration and associated warnings and logs.
20505
+ // https://github.com/facebook/react/issues/3877
20506
+ return true;
20507
+ }
20508
+
20509
+ if (!hook.supportsFiber) {
20510
+ {
20511
+ error('The installed version of React DevTools is too old and will not work ' + 'with the current version of React. Please update React DevTools. ' + 'https://reactjs.org/link/react-devtools');
20512
+ } // DevTools exists, even though it doesn't support Fiber.
20513
+
20514
+
20515
+ return true;
20516
+ }
20517
+
20518
+ try {
20519
+ rendererID = hook.inject(internals); // We have successfully injected, so now it is safe to set up hooks.
20520
+
20521
+ injectedHook = hook;
20522
+ } catch (err) {
20523
+ // Catch all errors because it is unsafe to throw during initialization.
20524
+ {
20525
+ error('React instrumentation encountered an error: %s.', err);
20526
  }
20527
+ } // DevTools exists
20528
 
20529
+
20530
+ return true;
20531
+ }
20532
+ function onScheduleRoot(root, children) {
20533
+ {
20534
+ if (injectedHook && typeof injectedHook.onScheduleFiberRoot === 'function') {
20535
+ try {
20536
+ injectedHook.onScheduleFiberRoot(rendererID, root, children);
20537
+ } catch (err) {
20538
+ if ( !hasLoggedError) {
20539
+ hasLoggedError = true;
20540
+
20541
+ error('React instrumentation encountered an error: %s', err);
20542
  }
20543
  }
20544
+ }
20545
+ }
20546
+ }
20547
+ function onCommitRoot(root, priorityLevel) {
20548
+ if (injectedHook && typeof injectedHook.onCommitFiberRoot === 'function') {
20549
+ try {
20550
+ var didError = (root.current.flags & DidCapture) === DidCapture;
20551
+
20552
+ if (enableProfilerTimer) {
20553
+ injectedHook.onCommitFiberRoot(rendererID, root, priorityLevel, didError);
20554
  } else {
20555
+ injectedHook.onCommitFiberRoot(rendererID, root, undefined, didError);
20556
+ }
20557
+ } catch (err) {
20558
+ {
20559
+ if (!hasLoggedError) {
20560
+ hasLoggedError = true;
20561
+
20562
+ error('React instrumentation encountered an error: %s', err);
20563
+ }
20564
+ }
20565
+ }
20566
+ }
20567
+ }
20568
+ function onCommitUnmount(fiber) {
20569
+ if (injectedHook && typeof injectedHook.onCommitFiberUnmount === 'function') {
20570
+ try {
20571
+ injectedHook.onCommitFiberUnmount(rendererID, fiber);
20572
+ } catch (err) {
20573
+ {
20574
+ if (!hasLoggedError) {
20575
+ hasLoggedError = true;
20576
+
20577
+ error('React instrumentation encountered an error: %s', err);
20578
  }
20579
  }
20580
  }
20581
  }
20582
+ }
20583
+
20584
+ var Scheduler_runWithPriority = Scheduler.unstable_runWithPriority,
20585
+ Scheduler_scheduleCallback = Scheduler.unstable_scheduleCallback,
20586
+ Scheduler_cancelCallback = Scheduler.unstable_cancelCallback,
20587
+ Scheduler_shouldYield = Scheduler.unstable_shouldYield,
20588
+ Scheduler_requestPaint = Scheduler.unstable_requestPaint,
20589
+ Scheduler_now$1 = Scheduler.unstable_now,
20590
+ Scheduler_getCurrentPriorityLevel = Scheduler.unstable_getCurrentPriorityLevel,
20591
+ Scheduler_ImmediatePriority = Scheduler.unstable_ImmediatePriority,
20592
+ Scheduler_UserBlockingPriority = Scheduler.unstable_UserBlockingPriority,
20593
+ Scheduler_NormalPriority = Scheduler.unstable_NormalPriority,
20594
+ Scheduler_LowPriority = Scheduler.unstable_LowPriority,
20595
+ Scheduler_IdlePriority = Scheduler.unstable_IdlePriority;
20596
+
20597
+ {
20598
+ // Provide explicit error message when production+profiling bundle of e.g.
20599
+ // react-dom is used with production (non-profiling) bundle of
20600
+ // scheduler/tracing
20601
+ if (!(tracing.__interactionsRef != null && tracing.__interactionsRef.current != null)) {
20602
+ {
20603
+ throw Error( "It is not supported to run the profiling version of a renderer (for example, `react-dom/profiling`) without also replacing the `scheduler/tracing` module with `scheduler/tracing-profiling`. Your bundler might have a setting for aliasing both modules. Learn more at https://reactjs.org/link/profiling" );
20604
+ }
20605
+ }
20606
+ }
20607
+
20608
+ var fakeCallbackNode = {}; // Except for NoPriority, these correspond to Scheduler priorities. We use
20609
+ // ascending numbers so we can compare them like numbers. They start at 90 to
20610
+ // avoid clashing with Scheduler's priorities.
20611
+
20612
+ var ImmediatePriority$1 = 99;
20613
+ var UserBlockingPriority$2 = 98;
20614
+ var NormalPriority$1 = 97;
20615
+ var LowPriority$1 = 96;
20616
+ var IdlePriority$1 = 95; // NoPriority is the absence of priority. Also React-only.
20617
+
20618
+ var NoPriority$1 = 90;
20619
+ var shouldYield = Scheduler_shouldYield;
20620
+ var requestPaint = // Fall back gracefully if we're running an older version of Scheduler.
20621
+ Scheduler_requestPaint !== undefined ? Scheduler_requestPaint : function () {};
20622
+ var syncQueue = null;
20623
+ var immediateQueueCallbackNode = null;
20624
+ var isFlushingSyncQueue = false;
20625
+ var initialTimeMs$1 = Scheduler_now$1(); // If the initial timestamp is reasonably small, use Scheduler's `now` directly.
20626
+ // This will be the case for modern browsers that support `performance.now`. In
20627
+ // older browsers, Scheduler falls back to `Date.now`, which returns a Unix
20628
+ // timestamp. In that case, subtract the module initialization time to simulate
20629
+ // the behavior of performance.now and keep our times small enough to fit
20630
+ // within 32 bits.
20631
+ // TODO: Consider lifting this into Scheduler.
20632
+
20633
+ var now = initialTimeMs$1 < 10000 ? Scheduler_now$1 : function () {
20634
+ return Scheduler_now$1() - initialTimeMs$1;
20635
  };
20636
+ function getCurrentPriorityLevel() {
20637
+ switch (Scheduler_getCurrentPriorityLevel()) {
20638
+ case Scheduler_ImmediatePriority:
20639
+ return ImmediatePriority$1;
20640
 
20641
+ case Scheduler_UserBlockingPriority:
20642
+ return UserBlockingPriority$2;
20643
 
20644
+ case Scheduler_NormalPriority:
20645
+ return NormalPriority$1;
20646
 
20647
+ case Scheduler_LowPriority:
20648
+ return LowPriority$1;
 
 
 
 
20649
 
20650
+ case Scheduler_IdlePriority:
20651
+ return IdlePriority$1;
20652
+
20653
+ default:
20654
+ {
20655
+ {
20656
+ throw Error( "Unknown priority level." );
20657
+ }
20658
+ }
20659
 
20660
+ }
20661
+ }
20662
+
20663
+ function reactPriorityToSchedulerPriority(reactPriorityLevel) {
20664
+ switch (reactPriorityLevel) {
20665
+ case ImmediatePriority$1:
20666
+ return Scheduler_ImmediatePriority;
20667
+
20668
+ case UserBlockingPriority$2:
20669
+ return Scheduler_UserBlockingPriority;
20670
+
20671
+ case NormalPriority$1:
20672
+ return Scheduler_NormalPriority;
20673
+
20674
+ case LowPriority$1:
20675
+ return Scheduler_LowPriority;
20676
+
20677
+ case IdlePriority$1:
20678
+ return Scheduler_IdlePriority;
20679
+
20680
+ default:
20681
+ {
20682
+ {
20683
+ throw Error( "Unknown priority level." );
20684
+ }
20685
+ }
20686
+
20687
+ }
20688
+ }
20689
 
20690
+ function runWithPriority$1(reactPriorityLevel, fn) {
20691
+ var priorityLevel = reactPriorityToSchedulerPriority(reactPriorityLevel);
20692
+ return Scheduler_runWithPriority(priorityLevel, fn);
20693
+ }
20694
+ function scheduleCallback(reactPriorityLevel, callback, options) {
20695
+ var priorityLevel = reactPriorityToSchedulerPriority(reactPriorityLevel);
20696
+ return Scheduler_scheduleCallback(priorityLevel, callback, options);
20697
+ }
20698
+ function scheduleSyncCallback(callback) {
20699
+ // Push this callback into an internal queue. We'll flush these either in
20700
+ // the next tick, or earlier if something calls `flushSyncCallbackQueue`.
20701
+ if (syncQueue === null) {
20702
+ syncQueue = [callback]; // Flush the queue in the next tick, at the earliest.
20703
 
20704
+ immediateQueueCallbackNode = Scheduler_scheduleCallback(Scheduler_ImmediatePriority, flushSyncCallbackQueueImpl);
20705
+ } else {
20706
+ // Push onto existing queue. Don't need to schedule a callback because
20707
+ // we already scheduled one when we created the queue.
20708
+ syncQueue.push(callback);
20709
+ }
20710
 
20711
+ return fakeCallbackNode;
20712
+ }
20713
+ function cancelCallback(callbackNode) {
20714
+ if (callbackNode !== fakeCallbackNode) {
20715
+ Scheduler_cancelCallback(callbackNode);
20716
+ }
20717
+ }
20718
+ function flushSyncCallbackQueue() {
20719
+ if (immediateQueueCallbackNode !== null) {
20720
+ var node = immediateQueueCallbackNode;
20721
+ immediateQueueCallbackNode = null;
20722
+ Scheduler_cancelCallback(node);
20723
+ }
20724
 
20725
+ flushSyncCallbackQueueImpl();
20726
+ }
20727
 
20728
+ function flushSyncCallbackQueueImpl() {
20729
+ if (!isFlushingSyncQueue && syncQueue !== null) {
20730
+ // Prevent re-entrancy.
20731
+ isFlushingSyncQueue = true;
20732
+ var i = 0;
20733
 
20734
+ {
20735
+ try {
20736
+ var _isSync2 = true;
20737
+ var _queue = syncQueue;
20738
+ runWithPriority$1(ImmediatePriority$1, function () {
20739
+ for (; i < _queue.length; i++) {
20740
+ var callback = _queue[i];
20741
+
20742
+ do {
20743
+ callback = callback(_isSync2);
20744
+ } while (callback !== null);
20745
+ }
20746
+ });
20747
+ syncQueue = null;
20748
+ } catch (error) {
20749
+ // If something throws, leave the remaining callbacks on the queue.
20750
+ if (syncQueue !== null) {
20751
+ syncQueue = syncQueue.slice(i + 1);
20752
+ } // Resume flushing in the next tick
20753
 
 
 
 
20754
 
20755
+ Scheduler_scheduleCallback(Scheduler_ImmediatePriority, flushSyncCallbackQueue);
20756
+ throw error;
20757
+ } finally {
20758
+ isFlushingSyncQueue = false;
20759
+ }
20760
+ }
20761
  }
20762
+ }
20763
 
20764
+ // TODO: this is special because it gets imported during build.
20765
+ var ReactVersion = '17.0.2';
 
 
 
 
 
20766
 
20767
+ var NoMode = 0;
20768
+ var StrictMode = 1; // TODO: Remove BlockingMode and ConcurrentMode by reading from the root
20769
+ // tag instead
20770
 
20771
+ var BlockingMode = 2;
20772
+ var ConcurrentMode = 4;
20773
+ var ProfileMode = 8;
20774
+ var DebugTracingMode = 16;
 
 
20775
 
20776
+ var ReactCurrentBatchConfig = ReactSharedInternals.ReactCurrentBatchConfig;
20777
+ var NoTransition = 0;
20778
+ function requestCurrentTransition() {
20779
+ return ReactCurrentBatchConfig.transition;
20780
+ }
20781
+
20782
+ var ReactStrictModeWarnings = {
20783
+ recordUnsafeLifecycleWarnings: function (fiber, instance) {},
20784
+ flushPendingUnsafeLifecycleWarnings: function () {},
20785
+ recordLegacyContextWarning: function (fiber, instance) {},
20786
+ flushLegacyContextWarning: function () {},
20787
+ discardPendingWarnings: function () {}
20788
+ };
20789
 
20790
+ {
20791
+ var findStrictRoot = function (fiber) {
20792
+ var maybeStrictRoot = null;
20793
+ var node = fiber;
20794
 
20795
+ while (node !== null) {
20796
+ if (node.mode & StrictMode) {
20797
+ maybeStrictRoot = node;
 
 
 
 
 
 
 
20798
  }
 
 
 
 
 
 
 
 
20799
 
20800
+ node = node.return;
 
 
 
20801
  }
 
 
 
 
 
 
 
 
20802
 
20803
+ return maybeStrictRoot;
 
 
20804
  };
20805
 
20806
+ var setToSortedString = function (set) {
20807
+ var array = [];
20808
+ set.forEach(function (value) {
20809
+ array.push(value);
20810
+ });
20811
+ return array.sort().join(', ');
20812
+ };
20813
 
20814
+ var pendingComponentWillMountWarnings = [];
20815
+ var pendingUNSAFE_ComponentWillMountWarnings = [];
20816
+ var pendingComponentWillReceivePropsWarnings = [];
20817
+ var pendingUNSAFE_ComponentWillReceivePropsWarnings = [];
20818
+ var pendingComponentWillUpdateWarnings = [];
20819
+ var pendingUNSAFE_ComponentWillUpdateWarnings = []; // Tracks components we have already warned about.
20820
 
20821
+ var didWarnAboutUnsafeLifecycles = new Set();
 
 
20822
 
20823
+ ReactStrictModeWarnings.recordUnsafeLifecycleWarnings = function (fiber, instance) {
20824
+ // Dedup strategy: Warn once per component.
20825
+ if (didWarnAboutUnsafeLifecycles.has(fiber.type)) {
20826
+ return;
20827
+ }
20828
 
20829
+ if (typeof instance.componentWillMount === 'function' && // Don't warn about react-lifecycles-compat polyfilled components.
20830
+ instance.componentWillMount.__suppressDeprecationWarning !== true) {
20831
+ pendingComponentWillMountWarnings.push(fiber);
20832
+ }
20833
 
20834
+ if (fiber.mode & StrictMode && typeof instance.UNSAFE_componentWillMount === 'function') {
20835
+ pendingUNSAFE_ComponentWillMountWarnings.push(fiber);
20836
+ }
20837
 
20838
+ if (typeof instance.componentWillReceiveProps === 'function' && instance.componentWillReceiveProps.__suppressDeprecationWarning !== true) {
20839
+ pendingComponentWillReceivePropsWarnings.push(fiber);
20840
+ }
 
 
 
20841
 
20842
+ if (fiber.mode & StrictMode && typeof instance.UNSAFE_componentWillReceiveProps === 'function') {
20843
+ pendingUNSAFE_ComponentWillReceivePropsWarnings.push(fiber);
20844
+ }
 
 
 
 
 
20845
 
20846
+ if (typeof instance.componentWillUpdate === 'function' && instance.componentWillUpdate.__suppressDeprecationWarning !== true) {
20847
+ pendingComponentWillUpdateWarnings.push(fiber);
20848
+ }
20849
 
20850
+ if (fiber.mode & StrictMode && typeof instance.UNSAFE_componentWillUpdate === 'function') {
20851
+ pendingUNSAFE_ComponentWillUpdateWarnings.push(fiber);
20852
+ }
20853
+ };
20854
 
20855
+ ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings = function () {
20856
+ // We do an initial pass to gather component names
20857
+ var componentWillMountUniqueNames = new Set();
 
 
 
20858
 
20859
+ if (pendingComponentWillMountWarnings.length > 0) {
20860
+ pendingComponentWillMountWarnings.forEach(function (fiber) {
20861
+ componentWillMountUniqueNames.add(getComponentName(fiber.type) || 'Component');
20862
+ didWarnAboutUnsafeLifecycles.add(fiber.type);
20863
+ });
20864
+ pendingComponentWillMountWarnings = [];
20865
+ }
20866
 
20867
+ var UNSAFE_componentWillMountUniqueNames = new Set();
 
 
 
 
 
 
 
 
20868
 
20869
+ if (pendingUNSAFE_ComponentWillMountWarnings.length > 0) {
20870
+ pendingUNSAFE_ComponentWillMountWarnings.forEach(function (fiber) {
20871
+ UNSAFE_componentWillMountUniqueNames.add(getComponentName(fiber.type) || 'Component');
20872
+ didWarnAboutUnsafeLifecycles.add(fiber.type);
20873
+ });
20874
+ pendingUNSAFE_ComponentWillMountWarnings = [];
20875
+ }
 
 
 
 
20876
 
20877
+ var componentWillReceivePropsUniqueNames = new Set();
 
 
 
 
 
 
20878
 
20879
+ if (pendingComponentWillReceivePropsWarnings.length > 0) {
20880
+ pendingComponentWillReceivePropsWarnings.forEach(function (fiber) {
20881
+ componentWillReceivePropsUniqueNames.add(getComponentName(fiber.type) || 'Component');
20882
+ didWarnAboutUnsafeLifecycles.add(fiber.type);
20883
+ });
20884
+ pendingComponentWillReceivePropsWarnings = [];
20885
+ }
20886
 
20887
+ var UNSAFE_componentWillReceivePropsUniqueNames = new Set();
 
20888
 
20889
+ if (pendingUNSAFE_ComponentWillReceivePropsWarnings.length > 0) {
20890
+ pendingUNSAFE_ComponentWillReceivePropsWarnings.forEach(function (fiber) {
20891
+ UNSAFE_componentWillReceivePropsUniqueNames.add(getComponentName(fiber.type) || 'Component');
20892
+ didWarnAboutUnsafeLifecycles.add(fiber.type);
20893
+ });
20894
+ pendingUNSAFE_ComponentWillReceivePropsWarnings = [];
20895
+ }
 
 
 
 
 
 
20896
 
20897
+ var componentWillUpdateUniqueNames = new Set();
 
 
 
20898
 
20899
+ if (pendingComponentWillUpdateWarnings.length > 0) {
20900
+ pendingComponentWillUpdateWarnings.forEach(function (fiber) {
20901
+ componentWillUpdateUniqueNames.add(getComponentName(fiber.type) || 'Component');
20902
+ didWarnAboutUnsafeLifecycles.add(fiber.type);
20903
+ });
20904
+ pendingComponentWillUpdateWarnings = [];
20905
+ }
20906
 
20907
+ var UNSAFE_componentWillUpdateUniqueNames = new Set();
 
 
 
 
 
 
 
20908
 
20909
+ if (pendingUNSAFE_ComponentWillUpdateWarnings.length > 0) {
20910
+ pendingUNSAFE_ComponentWillUpdateWarnings.forEach(function (fiber) {
20911
+ UNSAFE_componentWillUpdateUniqueNames.add(getComponentName(fiber.type) || 'Component');
20912
+ didWarnAboutUnsafeLifecycles.add(fiber.type);
20913
+ });
20914
+ pendingUNSAFE_ComponentWillUpdateWarnings = [];
20915
+ } // Finally, we flush all the warnings
20916
+ // UNSAFE_ ones before the deprecated ones, since they'll be 'louder'
20917
 
 
 
 
 
20918
 
20919
+ if (UNSAFE_componentWillMountUniqueNames.size > 0) {
20920
+ var sortedNames = setToSortedString(UNSAFE_componentWillMountUniqueNames);
 
 
 
20921
 
20922
+ error('Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. ' + 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n' + '* Move code with side effects to componentDidMount, and set initial state in the constructor.\n' + '\nPlease update the following components: %s', sortedNames);
20923
+ }
 
 
 
 
 
 
 
 
20924
 
20925
+ if (UNSAFE_componentWillReceivePropsUniqueNames.size > 0) {
20926
+ var _sortedNames = setToSortedString(UNSAFE_componentWillReceivePropsUniqueNames);
 
 
 
 
 
20927
 
20928
+ error('Using UNSAFE_componentWillReceiveProps in strict mode is not recommended ' + 'and may indicate bugs in your code. ' + 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n' + '* Move data fetching code or side effects to componentDidUpdate.\n' + "* If you're updating state whenever props change, " + 'refactor your code to use memoization techniques or move it to ' + 'static getDerivedStateFromProps. Learn more at: https://reactjs.org/link/derived-state\n' + '\nPlease update the following components: %s', _sortedNames);
20929
+ }
20930
 
20931
+ if (UNSAFE_componentWillUpdateUniqueNames.size > 0) {
20932
+ var _sortedNames2 = setToSortedString(UNSAFE_componentWillUpdateUniqueNames);
 
 
 
 
 
 
 
 
20933
 
20934
+ error('Using UNSAFE_componentWillUpdate in strict mode is not recommended ' + 'and may indicate bugs in your code. ' + 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n' + '* Move data fetching code or side effects to componentDidUpdate.\n' + '\nPlease update the following components: %s', _sortedNames2);
20935
+ }
 
 
 
 
 
 
 
20936
 
20937
+ if (componentWillMountUniqueNames.size > 0) {
20938
+ var _sortedNames3 = setToSortedString(componentWillMountUniqueNames);
 
20939
 
20940
+ warn('componentWillMount has been renamed, and is not recommended for use. ' + 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n' + '* Move code with side effects to componentDidMount, and set initial state in the constructor.\n' + '* Rename componentWillMount to UNSAFE_componentWillMount to suppress ' + 'this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. ' + 'To rename all deprecated lifecycles to their new names, you can run ' + '`npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n' + '\nPlease update the following components: %s', _sortedNames3);
20941
+ }
 
 
 
 
 
 
 
 
 
 
20942
 
20943
+ if (componentWillReceivePropsUniqueNames.size > 0) {
20944
+ var _sortedNames4 = setToSortedString(componentWillReceivePropsUniqueNames);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
20945
 
20946
+ warn('componentWillReceiveProps has been renamed, and is not recommended for use. ' + 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n' + '* Move data fetching code or side effects to componentDidUpdate.\n' + "* If you're updating state whenever props change, refactor your " + 'code to use memoization techniques or move it to ' + 'static getDerivedStateFromProps. Learn more at: https://reactjs.org/link/derived-state\n' + '* Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress ' + 'this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. ' + 'To rename all deprecated lifecycles to their new names, you can run ' + '`npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n' + '\nPlease update the following components: %s', _sortedNames4);
20947
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
20948
 
20949
+ if (componentWillUpdateUniqueNames.size > 0) {
20950
+ var _sortedNames5 = setToSortedString(componentWillUpdateUniqueNames);
 
 
 
 
 
 
 
 
20951
 
20952
+ warn('componentWillUpdate has been renamed, and is not recommended for use. ' + 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n' + '* Move data fetching code or side effects to componentDidUpdate.\n' + '* Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress ' + 'this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. ' + 'To rename all deprecated lifecycles to their new names, you can run ' + '`npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n' + '\nPlease update the following components: %s', _sortedNames5);
20953
+ }
20954
+ };
 
 
20955
 
20956
+ var pendingLegacyContextWarning = new Map(); // Tracks components we have already warned about.
 
 
 
 
20957
 
20958
+ var didWarnAboutLegacyContext = new Set();
 
 
 
 
20959
 
20960
+ ReactStrictModeWarnings.recordLegacyContextWarning = function (fiber, instance) {
20961
+ var strictRoot = findStrictRoot(fiber);
20962
 
20963
+ if (strictRoot === null) {
20964
+ error('Expected to find a StrictMode component in a strict mode tree. ' + 'This error is likely caused by a bug in React. Please file an issue.');
 
20965
 
20966
+ return;
20967
+ } // Dedup strategy: Warn once per component.
 
 
 
 
20968
 
 
 
 
 
 
 
 
 
 
 
 
 
20969
 
20970
+ if (didWarnAboutLegacyContext.has(fiber.type)) {
20971
+ return;
20972
+ }
20973
 
20974
+ var warningsForRoot = pendingLegacyContextWarning.get(strictRoot);
 
20975
 
20976
+ if (fiber.type.contextTypes != null || fiber.type.childContextTypes != null || instance !== null && typeof instance.getChildContext === 'function') {
20977
+ if (warningsForRoot === undefined) {
20978
+ warningsForRoot = [];
20979
+ pendingLegacyContextWarning.set(strictRoot, warningsForRoot);
 
 
 
 
 
 
 
 
 
20980
  }
20981
+
20982
+ warningsForRoot.push(fiber);
20983
  }
20984
+ };
20985
 
20986
+ ReactStrictModeWarnings.flushLegacyContextWarning = function () {
20987
+ pendingLegacyContextWarning.forEach(function (fiberArray, strictRoot) {
20988
+ if (fiberArray.length === 0) {
20989
+ return;
 
20990
  }
 
20991
 
20992
+ var firstFiber = fiberArray[0];
20993
+ var uniqueNames = new Set();
20994
+ fiberArray.forEach(function (fiber) {
20995
+ uniqueNames.add(getComponentName(fiber.type) || 'Component');
20996
+ didWarnAboutLegacyContext.add(fiber.type);
20997
+ });
20998
+ var sortedNames = setToSortedString(uniqueNames);
20999
 
21000
+ try {
21001
+ setCurrentFiber(firstFiber);
21002
+
21003
+ error('Legacy context API has been detected within a strict-mode tree.' + '\n\nThe old API will be supported in all 16.x releases, but applications ' + 'using it should migrate to the new version.' + '\n\nPlease update the following components: %s' + '\n\nLearn more about this warning here: https://reactjs.org/link/legacy-context', sortedNames);
21004
+ } finally {
21005
+ resetCurrentFiber();
21006
+ }
21007
+ });
21008
+ };
21009
 
21010
+ ReactStrictModeWarnings.discardPendingWarnings = function () {
21011
+ pendingComponentWillMountWarnings = [];
21012
+ pendingUNSAFE_ComponentWillMountWarnings = [];
21013
+ pendingComponentWillReceivePropsWarnings = [];
21014
+ pendingUNSAFE_ComponentWillReceivePropsWarnings = [];
21015
+ pendingComponentWillUpdateWarnings = [];
21016
+ pendingUNSAFE_ComponentWillUpdateWarnings = [];
21017
+ pendingLegacyContextWarning = new Map();
21018
+ };
21019
+ }
21020
 
21021
+ function resolveDefaultProps(Component, baseProps) {
21022
+ if (Component && Component.defaultProps) {
21023
+ // Resolve default props. Taken from ReactElement
21024
+ var props = _assign({}, baseProps);
21025
 
21026
+ var defaultProps = Component.defaultProps;
 
 
 
 
 
21027
 
21028
+ for (var propName in defaultProps) {
21029
+ if (props[propName] === undefined) {
21030
+ props[propName] = defaultProps[propName];
21031
+ }
21032
+ }
 
 
 
21033
 
21034
+ return props;
21035
+ }
21036
 
21037
+ return baseProps;
21038
+ }
21039
 
21040
+ // Max 31 bit integer. The max integer size in V8 for 32-bit systems.
21041
+ // Math.pow(2, 30) - 1
21042
+ // 0b111111111111111111111111111111
21043
+ var MAX_SIGNED_31_BIT_INT = 1073741823;
21044
 
21045
+ var valueCursor = createCursor(null);
21046
+ var rendererSigil;
 
21047
 
21048
+ {
21049
+ // Use this to detect multiple renderers using the same context
21050
+ rendererSigil = {};
 
 
 
 
21051
  }
21052
 
21053
+ var currentlyRenderingFiber = null;
21054
+ var lastContextDependency = null;
21055
+ var lastContextWithAllBitsObserved = null;
21056
+ var isDisallowedContextReadInDEV = false;
21057
+ function resetContextDependencies() {
21058
+ // This is called right before React yields execution, to ensure `readContext`
21059
+ // cannot be called outside the render phase.
21060
+ currentlyRenderingFiber = null;
21061
+ lastContextDependency = null;
21062
+ lastContextWithAllBitsObserved = null;
 
 
 
 
21063
 
21064
+ {
21065
+ isDisallowedContextReadInDEV = false;
21066
+ }
21067
  }
21068
+ function enterDisallowedContextReadInDEV() {
21069
+ {
21070
+ isDisallowedContextReadInDEV = true;
 
 
 
21071
  }
21072
  }
21073
+ function exitDisallowedContextReadInDEV() {
21074
+ {
21075
+ isDisallowedContextReadInDEV = false;
 
 
 
 
21076
  }
 
21077
  }
21078
+ function pushProvider(providerFiber, nextValue) {
21079
+ var context = providerFiber.type._context;
21080
 
21081
+ {
21082
+ push(valueCursor, context._currentValue, providerFiber);
21083
+ context._currentValue = nextValue;
21084
+
21085
+ {
21086
+ if (context._currentRenderer !== undefined && context._currentRenderer !== null && context._currentRenderer !== rendererSigil) {
21087
+ error('Detected multiple renderers concurrently rendering the ' + 'same context provider. This is currently unsupported.');
21088
+ }
21089
+
21090
+ context._currentRenderer = rendererSigil;
21091
  }
 
21092
  }
21093
  }
21094
+ function popProvider(providerFiber) {
21095
+ var currentValue = valueCursor.current;
21096
+ pop(valueCursor, providerFiber);
21097
+ var context = providerFiber.type._context;
21098
 
21099
+ {
21100
+ context._currentValue = currentValue;
 
 
 
 
 
 
 
21101
  }
21102
  }
21103
+ function calculateChangedBits(context, newValue, oldValue) {
21104
+ if (objectIs(oldValue, newValue)) {
21105
+ // No change
21106
+ return 0;
 
 
 
 
 
 
21107
  } else {
21108
+ var changedBits = typeof context._calculateChangedBits === 'function' ? context._calculateChangedBits(oldValue, newValue) : MAX_SIGNED_31_BIT_INT;
21109
+
21110
+ {
21111
+ if ((changedBits & MAX_SIGNED_31_BIT_INT) !== changedBits) {
21112
+ error('calculateChangedBits: Expected the return value to be a ' + '31-bit integer. Instead received: %s', changedBits);
21113
+ }
 
21114
  }
 
21115
 
21116
+ return changedBits | 0;
 
 
 
 
 
21117
  }
21118
  }
21119
+ function scheduleWorkOnParentPath(parent, renderLanes) {
21120
+ // Update the child lanes of all the ancestors, including the alternates.
21121
+ var node = parent;
21122
 
21123
+ while (node !== null) {
21124
+ var alternate = node.alternate;
21125
+
21126
+ if (!isSubsetOfLanes(node.childLanes, renderLanes)) {
21127
+ node.childLanes = mergeLanes(node.childLanes, renderLanes);
21128
+
21129
+ if (alternate !== null) {
21130
+ alternate.childLanes = mergeLanes(alternate.childLanes, renderLanes);
 
 
 
 
 
 
 
 
 
 
21131
  }
21132
+ } else if (alternate !== null && !isSubsetOfLanes(alternate.childLanes, renderLanes)) {
21133
+ alternate.childLanes = mergeLanes(alternate.childLanes, renderLanes);
21134
+ } else {
21135
+ // Neither alternate was updated, which means the rest of the
21136
+ // ancestor path already has sufficient priority.
21137
+ break;
21138
  }
21139
+
21140
+ node = node.return;
21141
+ }
21142
  }
21143
+ function propagateContextChange(workInProgress, context, changedBits, renderLanes) {
21144
+ var fiber = workInProgress.child;
21145
 
21146
+ if (fiber !== null) {
21147
+ // Set the return pointer of the child to the work-in-progress fiber.
21148
+ fiber.return = workInProgress;
21149
+ }
 
21150
 
21151
+ while (fiber !== null) {
21152
+ var nextFiber = void 0; // Visit this fiber.
21153
 
21154
+ var list = fiber.dependencies;
 
 
 
 
 
 
 
 
 
 
21155
 
21156
+ if (list !== null) {
21157
+ nextFiber = fiber.child;
21158
+ var dependency = list.firstContext;
21159
+
21160
+ while (dependency !== null) {
21161
+ // Check if the context matches.
21162
+ if (dependency.context === context && (dependency.observedBits & changedBits) !== 0) {
21163
+ // Match! Schedule an update on this fiber.
21164
+ if (fiber.tag === ClassComponent) {
21165
+ // Schedule a force update on the work-in-progress.
21166
+ var update = createUpdate(NoTimestamp, pickArbitraryLane(renderLanes));
21167
+ update.tag = ForceUpdate; // TODO: Because we don't have a work-in-progress, this will add the
21168
+ // update to the current fiber, too, which means it will persist even if
21169
+ // this render is thrown away. Since it's a race condition, not sure it's
21170
+ // worth fixing.
21171
+
21172
+ enqueueUpdate(fiber, update);
 
 
 
 
 
 
 
21173
  }
21174
+
21175
+ fiber.lanes = mergeLanes(fiber.lanes, renderLanes);
21176
+ var alternate = fiber.alternate;
21177
+
21178
+ if (alternate !== null) {
21179
+ alternate.lanes = mergeLanes(alternate.lanes, renderLanes);
 
 
 
21180
  }
21181
+
21182
+ scheduleWorkOnParentPath(fiber.return, renderLanes); // Mark the updated lanes on the list, too.
21183
+
21184
+ list.lanes = mergeLanes(list.lanes, renderLanes); // Since we already found a match, we can stop traversing the
21185
+ // dependency list.
21186
+
21187
  break;
21188
+ }
21189
+
21190
+ dependency = dependency.next;
21191
+ }
21192
+ } else if (fiber.tag === ContextProvider) {
21193
+ // Don't scan deeper if this is a matching provider
21194
+ nextFiber = fiber.type === workInProgress.type ? null : fiber.child;
21195
+ } else {
21196
+ // Traverse down.
21197
+ nextFiber = fiber.child;
21198
+ }
21199
+
21200
+ if (nextFiber !== null) {
21201
+ // Set the return pointer of the child to the work-in-progress fiber.
21202
+ nextFiber.return = fiber;
21203
+ } else {
21204
+ // No child. Traverse to next sibling.
21205
+ nextFiber = fiber;
21206
+
21207
+ while (nextFiber !== null) {
21208
+ if (nextFiber === workInProgress) {
21209
+ // We're back to the root of this subtree. Exit.
21210
+ nextFiber = null;
21211
  break;
21212
+ }
21213
+
21214
+ var sibling = nextFiber.sibling;
21215
+
21216
+ if (sibling !== null) {
21217
+ // Set the return pointer of the sibling to the work-in-progress fiber.
21218
+ sibling.return = nextFiber.return;
21219
+ nextFiber = sibling;
 
21220
  break;
21221
+ } // No more siblings. Traverse up.
21222
+
21223
+
21224
+ nextFiber = nextFiber.return;
21225
  }
21226
  }
 
 
21227
 
21228
+ fiber = nextFiber;
21229
+ }
21230
+ }
21231
+ function prepareToReadContext(workInProgress, renderLanes) {
21232
+ currentlyRenderingFiber = workInProgress;
21233
+ lastContextDependency = null;
21234
+ lastContextWithAllBitsObserved = null;
21235
+ var dependencies = workInProgress.dependencies;
21236
 
21237
+ if (dependencies !== null) {
21238
+ var firstContext = dependencies.firstContext;
21239
 
21240
+ if (firstContext !== null) {
21241
+ if (includesSomeLane(dependencies.lanes, renderLanes)) {
21242
+ // Context list has a pending update. Mark that this fiber performed work.
21243
+ markWorkInProgressReceivedUpdate();
21244
+ } // Reset the work-in-progress list
 
21245
 
 
 
 
 
 
 
 
 
21246
 
21247
+ dependencies.firstContext = null;
21248
+ }
21249
+ }
21250
+ }
21251
+ function readContext(context, observedBits) {
21252
+ {
21253
+ // This warning would fire if you read context inside a Hook like useMemo.
21254
+ // Unlike the class check below, it's not enforced in production for perf.
21255
+ if (isDisallowedContextReadInDEV) {
21256
+ error('Context can only be read while React is rendering. ' + 'In classes, you can read it in the render method or getDerivedStateFromProps. ' + 'In function components, you can read it directly in the function body, but not ' + 'inside Hooks like useReducer() or useMemo().');
21257
+ }
21258
+ }
21259
 
21260
+ if (lastContextWithAllBitsObserved === context) ; else if (observedBits === false || observedBits === 0) ; else {
21261
+ var resolvedObservedBits; // Avoid deopting on observable arguments or heterogeneous types.
21262
 
21263
+ if (typeof observedBits !== 'number' || observedBits === MAX_SIGNED_31_BIT_INT) {
21264
+ // Observe all updates.
21265
+ lastContextWithAllBitsObserved = context;
21266
+ resolvedObservedBits = MAX_SIGNED_31_BIT_INT;
21267
+ } else {
21268
+ resolvedObservedBits = observedBits;
21269
+ }
21270
 
21271
+ var contextItem = {
21272
+ context: context,
21273
+ observedBits: resolvedObservedBits,
21274
+ next: null
21275
+ };
21276
 
21277
+ if (lastContextDependency === null) {
21278
+ if (!(currentlyRenderingFiber !== null)) {
21279
+ {
21280
+ throw Error( "Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()." );
21281
+ }
21282
+ } // This is the first dependency for this component. Create a new list.
21283
 
 
 
 
 
 
 
 
 
 
 
 
 
21284
 
21285
+ lastContextDependency = contextItem;
21286
+ currentlyRenderingFiber.dependencies = {
21287
+ lanes: NoLanes,
21288
+ firstContext: contextItem,
21289
+ responders: null
21290
+ };
21291
+ } else {
21292
+ // Append a new context item.
21293
+ lastContextDependency = lastContextDependency.next = contextItem;
21294
  }
 
 
 
 
21295
  }
21296
+
21297
+ return context._currentValue ;
21298
  }
21299
 
21300
+ var UpdateState = 0;
21301
+ var ReplaceState = 1;
21302
+ var ForceUpdate = 2;
21303
+ var CaptureUpdate = 3; // Global state that is reset at the beginning of calling `processUpdateQueue`.
21304
+ // It should only be read right after calling `processUpdateQueue`, via
21305
+ // `checkHasForceUpdateAfterProcessing`.
21306
+
21307
+ var hasForceUpdate = false;
21308
+ var didWarnUpdateInsideUpdate;
21309
+ var currentlyProcessingQueue;
 
 
 
 
 
21310
 
21311
+ {
21312
+ didWarnUpdateInsideUpdate = false;
21313
+ currentlyProcessingQueue = null;
21314
  }
21315
 
21316
+ function initializeUpdateQueue(fiber) {
21317
+ var queue = {
21318
+ baseState: fiber.memoizedState,
21319
+ firstBaseUpdate: null,
21320
+ lastBaseUpdate: null,
21321
+ shared: {
21322
+ pending: null
21323
+ },
21324
+ effects: null
21325
+ };
21326
+ fiber.updateQueue = queue;
21327
+ }
21328
+ function cloneUpdateQueue(current, workInProgress) {
21329
+ // Clone the update queue from current. Unless it's already a clone.
21330
+ var queue = workInProgress.updateQueue;
21331
+ var currentQueue = current.updateQueue;
21332
+
21333
+ if (queue === currentQueue) {
21334
+ var clone = {
21335
+ baseState: currentQueue.baseState,
21336
+ firstBaseUpdate: currentQueue.firstBaseUpdate,
21337
+ lastBaseUpdate: currentQueue.lastBaseUpdate,
21338
+ shared: currentQueue.shared,
21339
+ effects: currentQueue.effects
21340
+ };
21341
+ workInProgress.updateQueue = clone;
21342
  }
21343
  }
21344
+ function createUpdate(eventTime, lane) {
21345
+ var update = {
21346
+ eventTime: eventTime,
21347
+ lane: lane,
21348
+ tag: UpdateState,
21349
+ payload: null,
21350
+ callback: null,
21351
+ next: null
21352
+ };
21353
+ return update;
21354
+ }
21355
+ function enqueueUpdate(fiber, update) {
21356
+ var updateQueue = fiber.updateQueue;
21357
 
21358
+ if (updateQueue === null) {
21359
+ // Only occurs if the fiber has been unmounted.
21360
+ return;
 
 
21361
  }
 
21362
 
21363
+ var sharedQueue = updateQueue.shared;
21364
+ var pending = sharedQueue.pending;
21365
+
21366
+ if (pending === null) {
21367
+ // This is the first update. Create a circular list.
21368
+ update.next = update;
21369
  } else {
21370
+ update.next = pending.next;
21371
+ pending.next = update;
21372
  }
 
21373
 
21374
+ sharedQueue.pending = update;
 
 
21375
 
21376
+ {
21377
+ if (currentlyProcessingQueue === sharedQueue && !didWarnUpdateInsideUpdate) {
21378
+ error('An update (setState, replaceState, or forceUpdate) was scheduled ' + 'from inside an update function. Update functions should be pure, ' + 'with zero side-effects. Consider using componentDidUpdate or a ' + 'callback.');
21379
+
21380
+ didWarnUpdateInsideUpdate = true;
21381
+ }
21382
+ }
21383
+ }
21384
+ function enqueueCapturedUpdate(workInProgress, capturedUpdate) {
21385
+ // Captured updates are updates that are thrown by a child during the render
21386
+ // phase. They should be discarded if the render is aborted. Therefore,
21387
+ // we should only put them on the work-in-progress queue, not the current one.
21388
+ var queue = workInProgress.updateQueue; // Check if the work-in-progress queue is a clone.
21389
+
21390
+ var current = workInProgress.alternate;
21391
+
21392
+ if (current !== null) {
21393
+ var currentQueue = current.updateQueue;
21394
+
21395
+ if (queue === currentQueue) {
21396
+ // The work-in-progress queue is the same as current. This happens when
21397
+ // we bail out on a parent fiber that then captures an error thrown by
21398
+ // a child. Since we want to append the update only to the work-in
21399
+ // -progress queue, we need to clone the updates. We usually clone during
21400
+ // processUpdateQueue, but that didn't happen in this case because we
21401
+ // skipped over the parent when we bailed out.
21402
+ var newFirst = null;
21403
+ var newLast = null;
21404
+ var firstBaseUpdate = queue.firstBaseUpdate;
21405
+
21406
+ if (firstBaseUpdate !== null) {
21407
+ // Loop through the updates and clone them.
21408
+ var update = firstBaseUpdate;
21409
+
21410
+ do {
21411
+ var clone = {
21412
+ eventTime: update.eventTime,
21413
+ lane: update.lane,
21414
+ tag: update.tag,
21415
+ payload: update.payload,
21416
+ callback: update.callback,
21417
+ next: null
21418
+ };
21419
+
21420
+ if (newLast === null) {
21421
+ newFirst = newLast = clone;
21422
+ } else {
21423
+ newLast.next = clone;
21424
+ newLast = clone;
21425
+ }
21426
 
21427
+ update = update.next;
21428
+ } while (update !== null); // Append the captured update the end of the cloned list.
 
 
 
21429
 
 
21430
 
21431
+ if (newLast === null) {
21432
+ newFirst = newLast = capturedUpdate;
21433
+ } else {
21434
+ newLast.next = capturedUpdate;
21435
+ newLast = capturedUpdate;
21436
+ }
21437
+ } else {
21438
+ // There are no base updates.
21439
+ newFirst = newLast = capturedUpdate;
21440
+ }
21441
 
21442
+ queue = {
21443
+ baseState: currentQueue.baseState,
21444
+ firstBaseUpdate: newFirst,
21445
+ lastBaseUpdate: newLast,
21446
+ shared: currentQueue.shared,
21447
+ effects: currentQueue.effects
21448
+ };
21449
+ workInProgress.updateQueue = queue;
21450
+ return;
21451
+ }
21452
+ } // Append the update to the end of the list.
21453
 
 
 
 
 
 
 
 
 
21454
 
21455
+ var lastBaseUpdate = queue.lastBaseUpdate;
21456
+
21457
+ if (lastBaseUpdate === null) {
21458
+ queue.firstBaseUpdate = capturedUpdate;
21459
+ } else {
21460
+ lastBaseUpdate.next = capturedUpdate;
21461
+ }
21462
 
21463
+ queue.lastBaseUpdate = capturedUpdate;
21464
+ }
21465
 
21466
+ function getStateFromUpdate(workInProgress, queue, update, prevState, nextProps, instance) {
21467
+ switch (update.tag) {
21468
+ case ReplaceState:
21469
+ {
21470
+ var payload = update.payload;
21471
 
21472
+ if (typeof payload === 'function') {
21473
+ // Updater function
21474
+ {
21475
+ enterDisallowedContextReadInDEV();
21476
+ }
21477
 
21478
+ var nextState = payload.call(instance, prevState, nextProps);
21479
 
21480
+ {
21481
+ if ( workInProgress.mode & StrictMode) {
21482
+ disableLogs();
 
 
 
21483
 
21484
+ try {
21485
+ payload.call(instance, prevState, nextProps);
21486
+ } finally {
21487
+ reenableLogs();
21488
+ }
21489
+ }
 
 
21490
 
21491
+ exitDisallowedContextReadInDEV();
21492
+ }
21493
 
21494
+ return nextState;
21495
+ } // State object
21496
 
 
21497
 
21498
+ return payload;
21499
+ }
21500
 
21501
+ case CaptureUpdate:
21502
+ {
21503
+ workInProgress.flags = workInProgress.flags & ~ShouldCapture | DidCapture;
21504
+ }
21505
+ // Intentional fallthrough
21506
 
21507
+ case UpdateState:
21508
+ {
21509
+ var _payload = update.payload;
21510
+ var partialState;
 
 
 
 
 
 
21511
 
21512
+ if (typeof _payload === 'function') {
21513
+ // Updater function
21514
+ {
21515
+ enterDisallowedContextReadInDEV();
21516
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21517
 
21518
+ partialState = _payload.call(instance, prevState, nextProps);
 
 
21519
 
21520
+ {
21521
+ if ( workInProgress.mode & StrictMode) {
21522
+ disableLogs();
21523
+
21524
+ try {
21525
+ _payload.call(instance, prevState, nextProps);
21526
+ } finally {
21527
+ reenableLogs();
21528
+ }
21529
+ }
21530
+
21531
+ exitDisallowedContextReadInDEV();
21532
+ }
21533
+ } else {
21534
+ // Partial state object
21535
+ partialState = _payload;
21536
  }
 
21537
 
21538
+ if (partialState === null || partialState === undefined) {
21539
+ // Null and undefined are treated as no-ops.
21540
+ return prevState;
21541
+ } // Merge the partial state and the previous state.
21542
 
21543
+
21544
+ return _assign({}, prevState, partialState);
21545
  }
21546
 
21547
+ case ForceUpdate:
21548
+ {
21549
+ hasForceUpdate = true;
21550
+ return prevState;
21551
  }
21552
+ }
21553
 
21554
+ return prevState;
21555
+ }
21556
+
21557
+ function processUpdateQueue(workInProgress, props, instance, renderLanes) {
21558
+ // This is always non-null on a ClassComponent or HostRoot
21559
+ var queue = workInProgress.updateQueue;
21560
+ hasForceUpdate = false;
21561
+
21562
+ {
21563
+ currentlyProcessingQueue = queue.shared;
21564
  }
 
21565
 
21566
+ var firstBaseUpdate = queue.firstBaseUpdate;
21567
+ var lastBaseUpdate = queue.lastBaseUpdate; // Check if there are pending updates. If so, transfer them to the base queue.
 
21568
 
21569
+ var pendingQueue = queue.shared.pending;
21570
+
21571
+ if (pendingQueue !== null) {
21572
+ queue.shared.pending = null; // The pending queue is circular. Disconnect the pointer between first
21573
+ // and last so that it's non-circular.
21574
+
21575
+ var lastPendingUpdate = pendingQueue;
21576
+ var firstPendingUpdate = lastPendingUpdate.next;
21577
+ lastPendingUpdate.next = null; // Append pending updates to base queue
21578
+
21579
+ if (lastBaseUpdate === null) {
21580
+ firstBaseUpdate = firstPendingUpdate;
21581
+ } else {
21582
+ lastBaseUpdate.next = firstPendingUpdate;
21583
+ }
 
21584
 
21585
+ lastBaseUpdate = lastPendingUpdate; // If there's a current queue, and it's different from the base queue, then
21586
+ // we need to transfer the updates to that queue, too. Because the base
21587
+ // queue is a singly-linked list with no cycles, we can append to both
21588
+ // lists and take advantage of structural sharing.
21589
+ // TODO: Pass `current` as argument
21590
 
21591
+ var current = workInProgress.alternate;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21592
 
21593
+ if (current !== null) {
21594
+ // This is always non-null on a ClassComponent or HostRoot
21595
+ var currentQueue = current.updateQueue;
21596
+ var currentLastBaseUpdate = currentQueue.lastBaseUpdate;
 
 
 
 
 
 
21597
 
21598
+ if (currentLastBaseUpdate !== lastBaseUpdate) {
21599
+ if (currentLastBaseUpdate === null) {
21600
+ currentQueue.firstBaseUpdate = firstPendingUpdate;
21601
+ } else {
21602
+ currentLastBaseUpdate.next = firstPendingUpdate;
21603
+ }
21604
 
21605
+ currentQueue.lastBaseUpdate = lastPendingUpdate;
 
 
 
 
 
 
 
 
21606
  }
21607
  }
21608
+ } // These values may change as we process the queue.
 
21609
 
 
 
21610
 
21611
+ if (firstBaseUpdate !== null) {
21612
+ // Iterate through the list of updates to compute the result.
21613
+ var newState = queue.baseState; // TODO: Don't need to accumulate this. Instead, we can remove renderLanes
21614
+ // from the original lanes.
21615
 
21616
+ var newLanes = NoLanes;
21617
+ var newBaseState = null;
21618
+ var newFirstBaseUpdate = null;
21619
+ var newLastBaseUpdate = null;
21620
+ var update = firstBaseUpdate;
21621
 
21622
+ do {
21623
+ var updateLane = update.lane;
21624
+ var updateEventTime = update.eventTime;
21625
+
21626
+ if (!isSubsetOfLanes(renderLanes, updateLane)) {
21627
+ // Priority is insufficient. Skip this update. If this is the first
21628
+ // skipped update, the previous update/state is the new base
21629
+ // update/state.
21630
+ var clone = {
21631
+ eventTime: updateEventTime,
21632
+ lane: updateLane,
21633
+ tag: update.tag,
21634
+ payload: update.payload,
21635
+ callback: update.callback,
21636
+ next: null
21637
+ };
21638
 
21639
+ if (newLastBaseUpdate === null) {
21640
+ newFirstBaseUpdate = newLastBaseUpdate = clone;
21641
+ newBaseState = newState;
21642
+ } else {
21643
+ newLastBaseUpdate = newLastBaseUpdate.next = clone;
21644
+ } // Update the remaining priority in the queue.
 
 
21645
 
21646
 
21647
+ newLanes = mergeLanes(newLanes, updateLane);
21648
+ } else {
21649
+ // This update does have sufficient priority.
21650
+ if (newLastBaseUpdate !== null) {
21651
+ var _clone = {
21652
+ eventTime: updateEventTime,
21653
+ // This update is going to be committed so we never want uncommit
21654
+ // it. Using NoLane works because 0 is a subset of all bitmasks, so
21655
+ // this will never be skipped by the check above.
21656
+ lane: NoLane,
21657
+ tag: update.tag,
21658
+ payload: update.payload,
21659
+ callback: update.callback,
21660
+ next: null
21661
+ };
21662
+ newLastBaseUpdate = newLastBaseUpdate.next = _clone;
21663
+ } // Process this update.
21664
+
21665
+
21666
+ newState = getStateFromUpdate(workInProgress, queue, update, newState, props, instance);
21667
+ var callback = update.callback;
21668
+
21669
+ if (callback !== null) {
21670
+ workInProgress.flags |= Callback;
21671
+ var effects = queue.effects;
21672
+
21673
+ if (effects === null) {
21674
+ queue.effects = [update];
21675
+ } else {
21676
+ effects.push(update);
21677
+ }
21678
+ }
21679
+ }
21680
 
21681
+ update = update.next;
 
 
21682
 
21683
+ if (update === null) {
21684
+ pendingQueue = queue.shared.pending;
21685
 
21686
+ if (pendingQueue === null) {
21687
+ break;
21688
+ } else {
21689
+ // An update was scheduled from inside a reducer. Add the new
21690
+ // pending updates to the end of the list and keep processing.
21691
+ var _lastPendingUpdate = pendingQueue; // Intentionally unsound. Pending updates form a circular list, but we
21692
+ // unravel them when transferring them to the base queue.
21693
+
21694
+ var _firstPendingUpdate = _lastPendingUpdate.next;
21695
+ _lastPendingUpdate.next = null;
21696
+ update = _firstPendingUpdate;
21697
+ queue.lastBaseUpdate = _lastPendingUpdate;
21698
+ queue.shared.pending = null;
21699
+ }
21700
+ }
21701
+ } while (true);
21702
 
21703
+ if (newLastBaseUpdate === null) {
21704
+ newBaseState = newState;
21705
+ }
21706
+
21707
+ queue.baseState = newBaseState;
21708
+ queue.firstBaseUpdate = newFirstBaseUpdate;
21709
+ queue.lastBaseUpdate = newLastBaseUpdate; // Set the remaining expiration time to be whatever is remaining in the queue.
21710
+ // This should be fine because the only two other things that contribute to
21711
+ // expiration time are props and context. We're already in the middle of the
21712
+ // begin phase by the time we start processing the queue, so we've already
21713
+ // dealt with the props. Context in components that specify
21714
+ // shouldComponentUpdate is tricky; but we'll have to account for
21715
+ // that regardless.
21716
+
21717
+ markSkippedUpdateLanes(newLanes);
21718
+ workInProgress.lanes = newLanes;
21719
+ workInProgress.memoizedState = newState;
21720
  }
 
 
 
 
21721
 
21722
+ {
21723
+ currentlyProcessingQueue = null;
21724
+ }
21725
  }
21726
 
21727
+ function callCallback(callback, context) {
21728
+ if (!(typeof callback === 'function')) {
21729
+ {
21730
+ throw Error( "Invalid argument passed as callback. Expected a function. Instead received: " + callback );
21731
+ }
21732
+ }
 
 
 
 
 
 
 
21733
 
21734
+ callback.call(context);
21735
+ }
 
21736
 
21737
+ function resetHasForceUpdateBeforeProcessing() {
21738
+ hasForceUpdate = false;
21739
+ }
21740
+ function checkHasForceUpdateAfterProcessing() {
21741
+ return hasForceUpdate;
21742
+ }
21743
+ function commitUpdateQueue(finishedWork, finishedQueue, instance) {
21744
+ // Commit the effects
21745
+ var effects = finishedQueue.effects;
21746
+ finishedQueue.effects = null;
21747
 
21748
+ if (effects !== null) {
21749
+ for (var i = 0; i < effects.length; i++) {
21750
+ var effect = effects[i];
21751
+ var callback = effect.callback;
21752
 
21753
+ if (callback !== null) {
21754
+ effect.callback = null;
21755
+ callCallback(callback, instance);
 
 
 
 
 
 
 
 
 
21756
  }
 
 
 
 
 
 
 
 
 
 
21757
  }
21758
+ }
21759
+ }
21760
 
21761
+ var fakeInternalInstance = {};
21762
+ var isArray = Array.isArray; // React.Component uses a shared frozen object by default.
21763
+ // We'll use it to determine whether we need to initialize legacy refs.
 
 
 
 
 
 
 
 
 
 
21764
 
21765
+ var emptyRefsObject = new React.Component().refs;
21766
+ var didWarnAboutStateAssignmentForComponent;
21767
+ var didWarnAboutUninitializedState;
21768
+ var didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate;
21769
+ var didWarnAboutLegacyLifecyclesAndDerivedState;
21770
+ var didWarnAboutUndefinedDerivedState;
21771
+ var warnOnUndefinedDerivedState;
21772
+ var warnOnInvalidCallback;
21773
+ var didWarnAboutDirectlyAssigningPropsToState;
21774
+ var didWarnAboutContextTypeAndContextTypes;
21775
+ var didWarnAboutInvalidateContextType;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21776
 
21777
+ {
21778
+ didWarnAboutStateAssignmentForComponent = new Set();
21779
+ didWarnAboutUninitializedState = new Set();
21780
+ didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate = new Set();
21781
+ didWarnAboutLegacyLifecyclesAndDerivedState = new Set();
21782
+ didWarnAboutDirectlyAssigningPropsToState = new Set();
21783
+ didWarnAboutUndefinedDerivedState = new Set();
21784
+ didWarnAboutContextTypeAndContextTypes = new Set();
21785
+ didWarnAboutInvalidateContextType = new Set();
21786
+ var didWarnOnInvalidCallback = new Set();
21787
 
21788
+ warnOnInvalidCallback = function (callback, callerName) {
21789
+ if (callback === null || typeof callback === 'function') {
21790
  return;
21791
  }
 
 
 
 
 
21792
 
21793
+ var key = callerName + '_' + callback;
 
 
 
 
 
 
 
 
 
21794
 
21795
+ if (!didWarnOnInvalidCallback.has(key)) {
21796
+ didWarnOnInvalidCallback.add(key);
21797
+
21798
+ error('%s(...): Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callerName, callback);
 
 
 
 
 
 
 
 
 
 
21799
  }
21800
+ };
21801
 
21802
+ warnOnUndefinedDerivedState = function (type, partialState) {
21803
+ if (partialState === undefined) {
21804
+ var componentName = getComponentName(type) || 'Component';
21805
+
21806
+ if (!didWarnAboutUndefinedDerivedState.has(componentName)) {
21807
+ didWarnAboutUndefinedDerivedState.add(componentName);
21808
+
21809
+ error('%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. ' + 'You have returned undefined.', componentName);
 
 
 
 
 
 
 
 
 
 
 
 
 
21810
  }
 
 
21811
  }
21812
+ }; // This is so gross but it's at least non-critical and can be removed if
21813
+ // it causes problems. This is meant to give a nicer error message for
21814
+ // ReactDOM15.unstable_renderSubtreeIntoContainer(reactDOM16Component,
21815
+ // ...)) which otherwise throws a "_processChildContext is not a function"
21816
+ // exception.
21817
 
21818
+
21819
+ Object.defineProperty(fakeInternalInstance, '_processChildContext', {
21820
+ enumerable: false,
21821
+ value: function () {
21822
+ {
21823
+ {
21824
+ throw Error( "_processChildContext is not available in React 16+. This likely means you have multiple copies of React and are attempting to nest a React 15 tree inside a React 16 tree using unstable_renderSubtreeIntoContainer, which isn't supported. Try to make sure you have only one copy of React (and ideally, switch to ReactDOM.createPortal)." );
21825
+ }
21826
+ }
21827
  }
21828
+ });
21829
+ Object.freeze(fakeInternalInstance);
21830
+ }
21831
 
21832
+ function applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, nextProps) {
21833
+ var prevState = workInProgress.memoizedState;
21834
 
21835
+ {
21836
+ if ( workInProgress.mode & StrictMode) {
21837
+ disableLogs();
21838
 
21839
+ try {
21840
+ // Invoke the function an extra time to help detect side-effects.
21841
+ getDerivedStateFromProps(nextProps, prevState);
21842
+ } finally {
21843
+ reenableLogs();
21844
+ }
21845
+ }
21846
+ }
21847
 
21848
+ var partialState = getDerivedStateFromProps(nextProps, prevState);
 
 
 
 
 
 
 
21849
 
21850
+ {
21851
+ warnOnUndefinedDerivedState(ctor, partialState);
21852
+ } // Merge the partial state and the previous state.
21853
 
21854
 
21855
+ var memoizedState = partialState === null || partialState === undefined ? prevState : _assign({}, prevState, partialState);
21856
+ workInProgress.memoizedState = memoizedState; // Once the update queue is empty, persist the derived state onto the
21857
+ // base state.
21858
 
21859
+ if (workInProgress.lanes === NoLanes) {
21860
+ // Queue is always non-null for classes
21861
+ var updateQueue = workInProgress.updateQueue;
21862
+ updateQueue.baseState = memoizedState;
21863
+ }
21864
+ }
21865
+ var classComponentUpdater = {
21866
+ isMounted: isMounted,
21867
+ enqueueSetState: function (inst, payload, callback) {
21868
+ var fiber = get(inst);
21869
+ var eventTime = requestEventTime();
21870
+ var lane = requestUpdateLane(fiber);
21871
+ var update = createUpdate(eventTime, lane);
21872
+ update.payload = payload;
21873
 
21874
+ if (callback !== undefined && callback !== null) {
21875
+ {
21876
+ warnOnInvalidCallback(callback, 'setState');
21877
+ }
21878
 
21879
+ update.callback = callback;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21880
  }
 
 
21881
 
21882
+ enqueueUpdate(fiber, update);
21883
+ scheduleUpdateOnFiber(fiber, lane, eventTime);
21884
+ },
21885
+ enqueueReplaceState: function (inst, payload, callback) {
21886
+ var fiber = get(inst);
21887
+ var eventTime = requestEventTime();
21888
+ var lane = requestUpdateLane(fiber);
21889
+ var update = createUpdate(eventTime, lane);
21890
+ update.tag = ReplaceState;
21891
+ update.payload = payload;
21892
 
21893
+ if (callback !== undefined && callback !== null) {
21894
+ {
21895
+ warnOnInvalidCallback(callback, 'replaceState');
21896
+ }
21897
 
21898
+ update.callback = callback;
21899
+ }
 
 
 
 
21900
 
21901
+ enqueueUpdate(fiber, update);
21902
+ scheduleUpdateOnFiber(fiber, lane, eventTime);
21903
+ },
21904
+ enqueueForceUpdate: function (inst, callback) {
21905
+ var fiber = get(inst);
21906
+ var eventTime = requestEventTime();
21907
+ var lane = requestUpdateLane(fiber);
21908
+ var update = createUpdate(eventTime, lane);
21909
+ update.tag = ForceUpdate;
21910
 
21911
+ if (callback !== undefined && callback !== null) {
21912
+ {
21913
+ warnOnInvalidCallback(callback, 'forceUpdate');
21914
+ }
21915
 
21916
+ update.callback = callback;
21917
+ }
21918
 
21919
+ enqueueUpdate(fiber, update);
21920
+ scheduleUpdateOnFiber(fiber, lane, eventTime);
21921
+ }
21922
+ };
 
 
 
 
 
21923
 
21924
+ function checkShouldComponentUpdate(workInProgress, ctor, oldProps, newProps, oldState, newState, nextContext) {
21925
+ var instance = workInProgress.stateNode;
21926
 
21927
+ if (typeof instance.shouldComponentUpdate === 'function') {
21928
+ {
21929
+ if ( workInProgress.mode & StrictMode) {
21930
+ disableLogs();
21931
 
21932
+ try {
21933
+ // Invoke the function an extra time to help detect side-effects.
21934
+ instance.shouldComponentUpdate(newProps, newState, nextContext);
21935
+ } finally {
21936
+ reenableLogs();
21937
+ }
21938
+ }
21939
+ }
21940
 
21941
+ var shouldUpdate = instance.shouldComponentUpdate(newProps, newState, nextContext);
 
 
 
 
 
21942
 
21943
+ {
21944
+ if (shouldUpdate === undefined) {
21945
+ error('%s.shouldComponentUpdate(): Returned undefined instead of a ' + 'boolean value. Make sure to return true or false.', getComponentName(ctor) || 'Component');
21946
+ }
21947
+ }
 
 
 
21948
 
21949
+ return shouldUpdate;
21950
+ }
21951
 
21952
+ if (ctor.prototype && ctor.prototype.isPureReactComponent) {
21953
+ return !shallowEqual(oldProps, newProps) || !shallowEqual(oldState, newState);
21954
+ }
21955
 
21956
+ return true;
21957
+ }
 
21958
 
21959
+ function checkClassInstance(workInProgress, ctor, newProps) {
21960
+ var instance = workInProgress.stateNode;
 
 
 
 
 
 
 
 
21961
 
21962
+ {
21963
+ var name = getComponentName(ctor) || 'Component';
21964
+ var renderPresent = instance.render;
21965
 
21966
+ if (!renderPresent) {
21967
+ if (ctor.prototype && typeof ctor.prototype.render === 'function') {
21968
+ error('%s(...): No `render` method found on the returned component ' + 'instance: did you accidentally return an object from the constructor?', name);
21969
+ } else {
21970
+ error('%s(...): No `render` method found on the returned component ' + 'instance: you may have forgotten to define `render`.', name);
21971
+ }
 
 
 
 
21972
  }
21973
+
21974
+ if (instance.getInitialState && !instance.getInitialState.isReactClassApproved && !instance.state) {
21975
+ error('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?', name);
21976
  }
21977
 
21978
+ if (instance.getDefaultProps && !instance.getDefaultProps.isReactClassApproved) {
21979
+ error('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.', name);
 
 
 
 
 
 
 
 
 
 
21980
  }
21981
 
21982
+ if (instance.propTypes) {
21983
+ error('propTypes was defined as an instance property on %s. Use a static ' + 'property to define propTypes instead.', name);
 
 
 
 
 
 
 
 
21984
  }
21985
 
21986
+ if (instance.contextType) {
21987
+ error('contextType was defined as an instance property on %s. Use a static ' + 'property to define contextType instead.', name);
 
21988
  }
21989
 
21990
+ {
21991
+ if (instance.contextTypes) {
21992
+ error('contextTypes was defined as an instance property on %s. Use a static ' + 'property to define contextTypes instead.', name);
21993
+ }
21994
+
21995
+ if (ctor.contextType && ctor.contextTypes && !didWarnAboutContextTypeAndContextTypes.has(ctor)) {
21996
+ didWarnAboutContextTypeAndContextTypes.add(ctor);
21997
 
21998
+ error('%s declares both contextTypes and contextType static properties. ' + 'The legacy contextTypes property will be ignored.', name);
21999
+ }
22000
+ }
 
22001
 
22002
+ if (typeof instance.componentShouldUpdate === 'function') {
22003
+ error('%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.', name);
22004
+ }
 
22005
 
22006
+ if (ctor.prototype && ctor.prototype.isPureReactComponent && typeof instance.shouldComponentUpdate !== 'undefined') {
22007
+ error('%s has a method called shouldComponentUpdate(). ' + 'shouldComponentUpdate should not be used when extending React.PureComponent. ' + 'Please extend React.Component if shouldComponentUpdate is used.', getComponentName(ctor) || 'A pure component');
22008
+ }
22009
 
22010
+ if (typeof instance.componentDidUnmount === 'function') {
22011
+ error('%s has a method called ' + 'componentDidUnmount(). But there is no such lifecycle method. ' + 'Did you mean componentWillUnmount()?', name);
22012
+ }
22013
 
22014
+ if (typeof instance.componentDidReceiveProps === 'function') {
22015
+ error('%s has a method called ' + 'componentDidReceiveProps(). But there is no such lifecycle method. ' + 'If you meant to update the state in response to changing props, ' + 'use componentWillReceiveProps(). If you meant to fetch data or ' + 'run side-effects or mutations after React has updated the UI, use componentDidUpdate().', name);
22016
+ }
22017
 
22018
+ if (typeof instance.componentWillRecieveProps === 'function') {
22019
+ error('%s has a method called ' + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', name);
22020
+ }
22021
 
22022
+ if (typeof instance.UNSAFE_componentWillRecieveProps === 'function') {
22023
+ error('%s has a method called ' + 'UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?', name);
22024
+ }
 
 
 
22025
 
22026
+ var hasMutatedProps = instance.props !== newProps;
 
 
 
 
 
 
 
22027
 
22028
+ if (instance.props !== undefined && hasMutatedProps) {
22029
+ error('%s(...): When calling super() in `%s`, make sure to pass ' + "up the same props that your component's constructor was passed.", name, name);
22030
+ }
22031
 
22032
+ if (instance.defaultProps) {
22033
+ error('Setting defaultProps as an instance property on %s is not supported and will be ignored.' + ' Instead, define defaultProps as a static property on %s.', name, name);
22034
+ }
22035
 
22036
+ if (typeof instance.getSnapshotBeforeUpdate === 'function' && typeof instance.componentDidUpdate !== 'function' && !didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.has(ctor)) {
22037
+ didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.add(ctor);
22038
 
22039
+ error('%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). ' + 'This component defines getSnapshotBeforeUpdate() only.', getComponentName(ctor));
22040
+ }
 
22041
 
22042
+ if (typeof instance.getDerivedStateFromProps === 'function') {
22043
+ error('%s: getDerivedStateFromProps() is defined as an instance method ' + 'and will be ignored. Instead, declare it as a static method.', name);
22044
+ }
22045
 
22046
+ if (typeof instance.getDerivedStateFromError === 'function') {
22047
+ error('%s: getDerivedStateFromError() is defined as an instance method ' + 'and will be ignored. Instead, declare it as a static method.', name);
22048
+ }
 
22049
 
22050
+ if (typeof ctor.getSnapshotBeforeUpdate === 'function') {
22051
+ error('%s: getSnapshotBeforeUpdate() is defined as a static method ' + 'and will be ignored. Instead, declare it as an instance method.', name);
22052
+ }
 
 
22053
 
22054
+ var _state = instance.state;
22055
+
22056
+ if (_state && (typeof _state !== 'object' || isArray(_state))) {
22057
+ error('%s.state: must be set to an object or null', name);
22058
+ }
 
 
 
 
 
22059
 
22060
+ if (typeof instance.getChildContext === 'function' && typeof ctor.childContextTypes !== 'object') {
22061
+ error('%s.getChildContext(): childContextTypes must be defined in order to ' + 'use getChildContext().', name);
22062
  }
22063
  }
22064
+ }
 
 
 
 
 
 
22065
 
22066
+ function adoptClassInstance(workInProgress, instance) {
22067
+ instance.updater = classComponentUpdater;
22068
+ workInProgress.stateNode = instance; // The instance needs access to the fiber so that it can schedule updates
 
 
22069
 
22070
+ set(instance, workInProgress);
 
 
22071
 
22072
+ {
22073
+ instance._reactInternalInstance = fakeInternalInstance;
 
 
 
 
 
 
 
 
 
 
 
 
 
22074
  }
22075
  }
22076
 
22077
+ function constructClassInstance(workInProgress, ctor, props) {
22078
+ var isLegacyContextConsumer = false;
22079
+ var unmaskedContext = emptyContextObject;
22080
+ var context = emptyContextObject;
22081
+ var contextType = ctor.contextType;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
22082
 
22083
+ {
22084
+ if ('contextType' in ctor) {
22085
+ var isValid = // Allow null for conditional declaration
22086
+ contextType === null || contextType !== undefined && contextType.$$typeof === REACT_CONTEXT_TYPE && contextType._context === undefined; // Not a <Context.Consumer>
22087
+
22088
+ if (!isValid && !didWarnAboutInvalidateContextType.has(ctor)) {
22089
+ didWarnAboutInvalidateContextType.add(ctor);
22090
+ var addendum = '';
22091
+
22092
+ if (contextType === undefined) {
22093
+ addendum = ' However, it is set to undefined. ' + 'This can be caused by a typo or by mixing up named and default imports. ' + 'This can also happen due to a circular dependency, so ' + 'try moving the createContext() call to a separate file.';
22094
+ } else if (typeof contextType !== 'object') {
22095
+ addendum = ' However, it is set to a ' + typeof contextType + '.';
22096
+ } else if (contextType.$$typeof === REACT_PROVIDER_TYPE) {
22097
+ addendum = ' Did you accidentally pass the Context.Provider instead?';
22098
+ } else if (contextType._context !== undefined) {
22099
+ // <Context.Consumer>
22100
+ addendum = ' Did you accidentally pass the Context.Consumer instead?';
22101
+ } else {
22102
+ addendum = ' However, it is set to an object with keys {' + Object.keys(contextType).join(', ') + '}.';
22103
+ }
22104
 
22105
+ error('%s defines an invalid contextType. ' + 'contextType should point to the Context object returned by React.createContext().%s', getComponentName(ctor) || 'Component', addendum);
22106
+ }
22107
+ }
22108
+ }
 
 
 
 
 
22109
 
22110
+ if (typeof contextType === 'object' && contextType !== null) {
22111
+ context = readContext(contextType);
22112
+ } else {
22113
+ unmaskedContext = getUnmaskedContext(workInProgress, ctor, true);
22114
+ var contextTypes = ctor.contextTypes;
22115
+ isLegacyContextConsumer = contextTypes !== null && contextTypes !== undefined;
22116
+ context = isLegacyContextConsumer ? getMaskedContext(workInProgress, unmaskedContext) : emptyContextObject;
22117
+ } // Instantiate twice to help detect side-effects.
22118
 
 
 
 
 
 
22119
 
22120
+ {
22121
+ if ( workInProgress.mode & StrictMode) {
22122
+ disableLogs();
 
 
 
 
 
 
 
 
 
 
 
 
22123
 
22124
+ try {
22125
+ new ctor(props, context); // eslint-disable-line no-new
22126
+ } finally {
22127
+ reenableLogs();
22128
+ }
 
 
 
 
 
22129
  }
22130
+ }
22131
 
22132
+ var instance = new ctor(props, context);
22133
+ var state = workInProgress.memoizedState = instance.state !== null && instance.state !== undefined ? instance.state : null;
22134
+ adoptClassInstance(workInProgress, instance);
 
 
 
 
22135
 
22136
+ {
22137
+ if (typeof ctor.getDerivedStateFromProps === 'function' && state === null) {
22138
+ var componentName = getComponentName(ctor) || 'Component';
22139
+
22140
+ if (!didWarnAboutUninitializedState.has(componentName)) {
22141
+ didWarnAboutUninitializedState.add(componentName);
22142
+
22143
+ error('`%s` uses `getDerivedStateFromProps` but its initial state is ' + '%s. This is not recommended. Instead, define the initial state by ' + 'assigning an object to `this.state` in the constructor of `%s`. ' + 'This ensures that `getDerivedStateFromProps` arguments have a consistent shape.', componentName, instance.state === null ? 'null' : 'undefined', componentName);
 
 
22144
  }
22145
+ } // If new component APIs are defined, "unsafe" lifecycles won't be called.
22146
+ // Warn about these lifecycles if they are present.
22147
+ // Don't warn about react-lifecycles-compat polyfilled methods though.
22148
 
22149
+
22150
+ if (typeof ctor.getDerivedStateFromProps === 'function' || typeof instance.getSnapshotBeforeUpdate === 'function') {
22151
+ var foundWillMountName = null;
22152
+ var foundWillReceivePropsName = null;
22153
+ var foundWillUpdateName = null;
22154
+
22155
+ if (typeof instance.componentWillMount === 'function' && instance.componentWillMount.__suppressDeprecationWarning !== true) {
22156
+ foundWillMountName = 'componentWillMount';
22157
+ } else if (typeof instance.UNSAFE_componentWillMount === 'function') {
22158
+ foundWillMountName = 'UNSAFE_componentWillMount';
22159
  }
22160
 
22161
+ if (typeof instance.componentWillReceiveProps === 'function' && instance.componentWillReceiveProps.__suppressDeprecationWarning !== true) {
22162
+ foundWillReceivePropsName = 'componentWillReceiveProps';
22163
+ } else if (typeof instance.UNSAFE_componentWillReceiveProps === 'function') {
22164
+ foundWillReceivePropsName = 'UNSAFE_componentWillReceiveProps';
22165
  }
22166
 
22167
+ if (typeof instance.componentWillUpdate === 'function' && instance.componentWillUpdate.__suppressDeprecationWarning !== true) {
22168
+ foundWillUpdateName = 'componentWillUpdate';
22169
+ } else if (typeof instance.UNSAFE_componentWillUpdate === 'function') {
22170
+ foundWillUpdateName = 'UNSAFE_componentWillUpdate';
22171
+ }
22172
 
22173
+ if (foundWillMountName !== null || foundWillReceivePropsName !== null || foundWillUpdateName !== null) {
22174
+ var _componentName = getComponentName(ctor) || 'Component';
22175
+
22176
+ var newApiName = typeof ctor.getDerivedStateFromProps === 'function' ? 'getDerivedStateFromProps()' : 'getSnapshotBeforeUpdate()';
22177
+
22178
+ if (!didWarnAboutLegacyLifecyclesAndDerivedState.has(_componentName)) {
22179
+ didWarnAboutLegacyLifecyclesAndDerivedState.add(_componentName);
22180
+
22181
+ error('Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n' + '%s uses %s but also contains the following legacy lifecycles:%s%s%s\n\n' + 'The above lifecycles should be removed. Learn more about this warning here:\n' + 'https://reactjs.org/link/unsafe-component-lifecycles', _componentName, newApiName, foundWillMountName !== null ? "\n " + foundWillMountName : '', foundWillReceivePropsName !== null ? "\n " + foundWillReceivePropsName : '', foundWillUpdateName !== null ? "\n " + foundWillUpdateName : '');
 
 
 
 
 
 
 
 
22182
  }
22183
  }
22184
  }
22185
+ } // Cache unmasked context so we can avoid recreating masked context unless necessary.
22186
+ // ReactFiberContext usually updates this cache but can't for newly-created instances.
22187
 
 
 
 
 
 
 
 
 
 
 
 
 
22188
 
22189
+ if (isLegacyContextConsumer) {
22190
+ cacheContext(workInProgress, unmaskedContext, context);
22191
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
22192
 
22193
+ return instance;
22194
+ }
 
 
 
 
22195
 
22196
+ function callComponentWillMount(workInProgress, instance) {
22197
+ var oldState = instance.state;
22198
+
22199
+ if (typeof instance.componentWillMount === 'function') {
22200
+ instance.componentWillMount();
22201
  }
 
22202
 
22203
+ if (typeof instance.UNSAFE_componentWillMount === 'function') {
22204
+ instance.UNSAFE_componentWillMount();
22205
+ }
22206
 
22207
+ if (oldState !== instance.state) {
22208
+ {
22209
+ error('%s.componentWillMount(): Assigning directly to this.state is ' + "deprecated (except inside a component's " + 'constructor). Use setState instead.', getComponentName(workInProgress.type) || 'Component');
22210
+ }
22211
 
22212
+ classComponentUpdater.enqueueReplaceState(instance, instance.state, null);
22213
+ }
22214
+ }
 
 
 
22215
 
22216
+ function callComponentWillReceiveProps(workInProgress, instance, newProps, nextContext) {
22217
+ var oldState = instance.state;
 
 
 
 
 
 
 
22218
 
22219
+ if (typeof instance.componentWillReceiveProps === 'function') {
22220
+ instance.componentWillReceiveProps(newProps, nextContext);
22221
+ }
22222
 
22223
+ if (typeof instance.UNSAFE_componentWillReceiveProps === 'function') {
22224
+ instance.UNSAFE_componentWillReceiveProps(newProps, nextContext);
22225
+ }
22226
 
22227
+ if (instance.state !== oldState) {
22228
+ {
22229
+ var componentName = getComponentName(workInProgress.type) || 'Component';
22230
 
22231
+ if (!didWarnAboutStateAssignmentForComponent.has(componentName)) {
22232
+ didWarnAboutStateAssignmentForComponent.add(componentName);
22233
 
22234
+ error('%s.componentWillReceiveProps(): Assigning directly to ' + "this.state is deprecated (except inside a component's " + 'constructor). Use setState instead.', componentName);
22235
+ }
22236
+ }
 
22237
 
22238
+ classComponentUpdater.enqueueReplaceState(instance, instance.state, null);
22239
+ }
22240
+ } // Invokes the mount life-cycles on a previously never rendered instance.
 
22241
 
22242
+
22243
+ function mountClassInstance(workInProgress, ctor, newProps, renderLanes) {
22244
+ {
22245
+ checkClassInstance(workInProgress, ctor, newProps);
 
 
 
 
 
22246
  }
22247
+
22248
+ var instance = workInProgress.stateNode;
22249
+ instance.props = newProps;
22250
+ instance.state = workInProgress.memoizedState;
22251
+ instance.refs = emptyRefsObject;
22252
+ initializeUpdateQueue(workInProgress);
22253
+ var contextType = ctor.contextType;
22254
+
22255
+ if (typeof contextType === 'object' && contextType !== null) {
22256
+ instance.context = readContext(contextType);
22257
+ } else {
22258
+ var unmaskedContext = getUnmaskedContext(workInProgress, ctor, true);
22259
+ instance.context = getMaskedContext(workInProgress, unmaskedContext);
22260
  }
 
22261
 
22262
+ {
22263
+ if (instance.state === newProps) {
22264
+ var componentName = getComponentName(ctor) || 'Component';
 
 
 
 
 
 
 
 
22265
 
22266
+ if (!didWarnAboutDirectlyAssigningPropsToState.has(componentName)) {
22267
+ didWarnAboutDirectlyAssigningPropsToState.add(componentName);
22268
+
22269
+ error('%s: It is not recommended to assign props directly to state ' + "because updates to props won't be reflected in state. " + 'In most cases, it is better to use props directly.', componentName);
 
 
22270
  }
22271
  }
22272
+
22273
+ if (workInProgress.mode & StrictMode) {
22274
+ ReactStrictModeWarnings.recordLegacyContextWarning(workInProgress, instance);
22275
+ }
22276
+
22277
+ {
22278
+ ReactStrictModeWarnings.recordUnsafeLifecycleWarnings(workInProgress, instance);
22279
+ }
22280
  }
 
 
22281
 
22282
+ processUpdateQueue(workInProgress, newProps, instance, renderLanes);
22283
+ instance.state = workInProgress.memoizedState;
22284
+ var getDerivedStateFromProps = ctor.getDerivedStateFromProps;
 
 
 
 
 
 
 
 
 
22285
 
22286
+ if (typeof getDerivedStateFromProps === 'function') {
22287
+ applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, newProps);
22288
+ instance.state = workInProgress.memoizedState;
22289
+ } // In order to support react-lifecycles-compat polyfilled components,
22290
+ // Unsafe lifecycles should not be invoked for components using the new APIs.
22291
 
22292
+
22293
+ if (typeof ctor.getDerivedStateFromProps !== 'function' && typeof instance.getSnapshotBeforeUpdate !== 'function' && (typeof instance.UNSAFE_componentWillMount === 'function' || typeof instance.componentWillMount === 'function')) {
22294
+ callComponentWillMount(workInProgress, instance); // If we had additional state updates during this life-cycle, let's
22295
+ // process them now.
22296
+
22297
+ processUpdateQueue(workInProgress, newProps, instance, renderLanes);
22298
+ instance.state = workInProgress.memoizedState;
22299
+ }
22300
+
22301
+ if (typeof instance.componentDidMount === 'function') {
22302
+ workInProgress.flags |= Update;
22303
  }
22304
  }
22305
 
22306
+ function resumeMountClassInstance(workInProgress, ctor, newProps, renderLanes) {
22307
+ var instance = workInProgress.stateNode;
22308
+ var oldProps = workInProgress.memoizedProps;
22309
+ instance.props = oldProps;
22310
+ var oldContext = instance.context;
22311
+ var contextType = ctor.contextType;
22312
+ var nextContext = emptyContextObject;
 
 
 
22313
 
22314
+ if (typeof contextType === 'object' && contextType !== null) {
22315
+ nextContext = readContext(contextType);
22316
+ } else {
22317
+ var nextLegacyUnmaskedContext = getUnmaskedContext(workInProgress, ctor, true);
22318
+ nextContext = getMaskedContext(workInProgress, nextLegacyUnmaskedContext);
22319
+ }
22320
 
22321
+ var getDerivedStateFromProps = ctor.getDerivedStateFromProps;
22322
+ var hasNewLifecycles = typeof getDerivedStateFromProps === 'function' || typeof instance.getSnapshotBeforeUpdate === 'function'; // Note: During these life-cycles, instance.props/instance.state are what
22323
+ // ever the previously attempted to render - not the "current". However,
22324
+ // during componentDidUpdate we pass the "current" props.
22325
+ // In order to support react-lifecycles-compat polyfilled components,
22326
+ // Unsafe lifecycles should not be invoked for components using the new APIs.
22327
 
22328
+ if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillReceiveProps === 'function' || typeof instance.componentWillReceiveProps === 'function')) {
22329
+ if (oldProps !== newProps || oldContext !== nextContext) {
22330
+ callComponentWillReceiveProps(workInProgress, instance, newProps, nextContext);
22331
+ }
22332
+ }
22333
 
22334
+ resetHasForceUpdateBeforeProcessing();
22335
+ var oldState = workInProgress.memoizedState;
22336
+ var newState = instance.state = oldState;
22337
+ processUpdateQueue(workInProgress, newProps, instance, renderLanes);
22338
+ newState = workInProgress.memoizedState;
 
 
 
22339
 
22340
+ if (oldProps === newProps && oldState === newState && !hasContextChanged() && !checkHasForceUpdateAfterProcessing()) {
22341
+ // If an update was already in progress, we should schedule an Update
22342
+ // effect even though we're bailing out, so that cWU/cDU are called.
22343
+ if (typeof instance.componentDidMount === 'function') {
22344
+ workInProgress.flags |= Update;
22345
+ }
 
 
 
 
 
 
 
 
 
22346
 
22347
+ return false;
22348
+ }
22349
+
22350
+ if (typeof getDerivedStateFromProps === 'function') {
22351
+ applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, newProps);
22352
+ newState = workInProgress.memoizedState;
22353
+ }
22354
+
22355
+ var shouldUpdate = checkHasForceUpdateAfterProcessing() || checkShouldComponentUpdate(workInProgress, ctor, oldProps, newProps, oldState, newState, nextContext);
22356
+
22357
+ if (shouldUpdate) {
22358
+ // In order to support react-lifecycles-compat polyfilled components,
22359
+ // Unsafe lifecycles should not be invoked for components using the new APIs.
22360
+ if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillMount === 'function' || typeof instance.componentWillMount === 'function')) {
22361
+ if (typeof instance.componentWillMount === 'function') {
22362
+ instance.componentWillMount();
22363
  }
22364
+
22365
+ if (typeof instance.UNSAFE_componentWillMount === 'function') {
22366
+ instance.UNSAFE_componentWillMount();
 
 
22367
  }
22368
  }
22369
+
22370
+ if (typeof instance.componentDidMount === 'function') {
22371
+ workInProgress.flags |= Update;
22372
  }
22373
+ } else {
22374
+ // If an update was already in progress, we should schedule an Update
22375
+ // effect even though we're bailing out, so that cWU/cDU are called.
22376
+ if (typeof instance.componentDidMount === 'function') {
22377
+ workInProgress.flags |= Update;
22378
+ } // If shouldComponentUpdate returned false, we should still update the
22379
+ // memoized state to indicate that this work can be reused.
22380
+
22381
+
22382
+ workInProgress.memoizedProps = newProps;
22383
+ workInProgress.memoizedState = newState;
22384
+ } // Update the existing instance's state, props, and context pointers even
22385
+ // if shouldComponentUpdate returns false.
22386
+
22387
+
22388
+ instance.props = newProps;
22389
+ instance.state = newState;
22390
+ instance.context = nextContext;
22391
+ return shouldUpdate;
22392
+ } // Invokes the update life-cycles and returns false if it shouldn't rerender.
22393
+
22394
+
22395
+ function updateClassInstance(current, workInProgress, ctor, newProps, renderLanes) {
22396
+ var instance = workInProgress.stateNode;
22397
+ cloneUpdateQueue(current, workInProgress);
22398
+ var unresolvedOldProps = workInProgress.memoizedProps;
22399
+ var oldProps = workInProgress.type === workInProgress.elementType ? unresolvedOldProps : resolveDefaultProps(workInProgress.type, unresolvedOldProps);
22400
+ instance.props = oldProps;
22401
+ var unresolvedNewProps = workInProgress.pendingProps;
22402
+ var oldContext = instance.context;
22403
+ var contextType = ctor.contextType;
22404
+ var nextContext = emptyContextObject;
22405
+
22406
+ if (typeof contextType === 'object' && contextType !== null) {
22407
+ nextContext = readContext(contextType);
22408
+ } else {
22409
+ var nextUnmaskedContext = getUnmaskedContext(workInProgress, ctor, true);
22410
+ nextContext = getMaskedContext(workInProgress, nextUnmaskedContext);
22411
+ }
22412
 
22413
+ var getDerivedStateFromProps = ctor.getDerivedStateFromProps;
22414
+ var hasNewLifecycles = typeof getDerivedStateFromProps === 'function' || typeof instance.getSnapshotBeforeUpdate === 'function'; // Note: During these life-cycles, instance.props/instance.state are what
22415
+ // ever the previously attempted to render - not the "current". However,
22416
+ // during componentDidUpdate we pass the "current" props.
22417
+ // In order to support react-lifecycles-compat polyfilled components,
22418
+ // Unsafe lifecycles should not be invoked for components using the new APIs.
22419
+
22420
+ if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillReceiveProps === 'function' || typeof instance.componentWillReceiveProps === 'function')) {
22421
+ if (unresolvedOldProps !== unresolvedNewProps || oldContext !== nextContext) {
22422
+ callComponentWillReceiveProps(workInProgress, instance, newProps, nextContext);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
22423
  }
22424
+ }
 
22425
 
22426
+ resetHasForceUpdateBeforeProcessing();
22427
+ var oldState = workInProgress.memoizedState;
22428
+ var newState = instance.state = oldState;
22429
+ processUpdateQueue(workInProgress, newProps, instance, renderLanes);
22430
+ newState = workInProgress.memoizedState;
22431
+
22432
+ if (unresolvedOldProps === unresolvedNewProps && oldState === newState && !hasContextChanged() && !checkHasForceUpdateAfterProcessing()) {
22433
+ // If an update was already in progress, we should schedule an Update
22434
+ // effect even though we're bailing out, so that cWU/cDU are called.
22435
+ if (typeof instance.componentDidUpdate === 'function') {
22436
+ if (unresolvedOldProps !== current.memoizedProps || oldState !== current.memoizedState) {
22437
+ workInProgress.flags |= Update;
22438
  }
22439
  }
 
22440
 
22441
+ if (typeof instance.getSnapshotBeforeUpdate === 'function') {
22442
+ if (unresolvedOldProps !== current.memoizedProps || oldState !== current.memoizedState) {
22443
+ workInProgress.flags |= Snapshot;
 
22444
  }
22445
  }
22446
 
22447
+ return false;
22448
+ }
22449
+
22450
+ if (typeof getDerivedStateFromProps === 'function') {
22451
+ applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, newProps);
22452
+ newState = workInProgress.memoizedState;
22453
+ }
22454
+
22455
+ var shouldUpdate = checkHasForceUpdateAfterProcessing() || checkShouldComponentUpdate(workInProgress, ctor, oldProps, newProps, oldState, newState, nextContext);
22456
+
22457
+ if (shouldUpdate) {
22458
+ // In order to support react-lifecycles-compat polyfilled components,
22459
+ // Unsafe lifecycles should not be invoked for components using the new APIs.
22460
+ if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillUpdate === 'function' || typeof instance.componentWillUpdate === 'function')) {
22461
+ if (typeof instance.componentWillUpdate === 'function') {
22462
+ instance.componentWillUpdate(newProps, newState, nextContext);
22463
  }
 
22464
 
22465
+ if (typeof instance.UNSAFE_componentWillUpdate === 'function') {
22466
+ instance.UNSAFE_componentWillUpdate(newProps, newState, nextContext);
 
 
 
 
22467
  }
22468
  }
 
 
22469
 
22470
+ if (typeof instance.componentDidUpdate === 'function') {
22471
+ workInProgress.flags |= Update;
22472
+ }
22473
 
22474
+ if (typeof instance.getSnapshotBeforeUpdate === 'function') {
22475
+ workInProgress.flags |= Snapshot;
22476
+ }
22477
+ } else {
22478
+ // If an update was already in progress, we should schedule an Update
22479
+ // effect even though we're bailing out, so that cWU/cDU are called.
22480
+ if (typeof instance.componentDidUpdate === 'function') {
22481
+ if (unresolvedOldProps !== current.memoizedProps || oldState !== current.memoizedState) {
22482
+ workInProgress.flags |= Update;
22483
+ }
22484
+ }
22485
 
22486
+ if (typeof instance.getSnapshotBeforeUpdate === 'function') {
22487
+ if (unresolvedOldProps !== current.memoizedProps || oldState !== current.memoizedState) {
22488
+ workInProgress.flags |= Snapshot;
22489
+ }
22490
+ } // If shouldComponentUpdate returned false, we should still update the
22491
+ // memoized props/state to indicate that this work can be reused.
22492
 
 
 
 
 
 
 
 
 
22493
 
22494
+ workInProgress.memoizedProps = newProps;
22495
+ workInProgress.memoizedState = newState;
22496
+ } // Update the existing instance's state, props, and context pointers even
22497
+ // if shouldComponentUpdate returns false.
22498
 
22499
 
22500
+ instance.props = newProps;
22501
+ instance.state = newState;
22502
+ instance.context = nextContext;
22503
+ return shouldUpdate;
22504
+ }
22505
 
22506
+ var didWarnAboutMaps;
22507
+ var didWarnAboutGenerators;
22508
+ var didWarnAboutStringRefs;
22509
+ var ownerHasKeyUseWarning;
22510
+ var ownerHasFunctionTypeWarning;
22511
 
22512
+ var warnForMissingKey = function (child, returnFiber) {};
 
22513
 
22514
+ {
22515
+ didWarnAboutMaps = false;
22516
+ didWarnAboutGenerators = false;
22517
+ didWarnAboutStringRefs = {};
22518
+ /**
22519
+ * Warn if there's no key explicitly set on dynamic arrays of children or
22520
+ * object keys are not valid. This allows us to keep track of children between
22521
+ * updates.
22522
+ */
22523
 
22524
+ ownerHasKeyUseWarning = {};
22525
+ ownerHasFunctionTypeWarning = {};
22526
+
22527
+ warnForMissingKey = function (child, returnFiber) {
22528
+ if (child === null || typeof child !== 'object') {
22529
+ return;
 
 
 
 
 
 
 
 
 
 
 
22530
  }
 
 
22531
 
22532
+ if (!child._store || child._store.validated || child.key != null) {
22533
+ return;
22534
+ }
22535
 
22536
+ if (!(typeof child._store === 'object')) {
22537
+ {
22538
+ throw Error( "React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue." );
22539
+ }
22540
+ }
 
22541
 
22542
+ child._store.validated = true;
22543
+ var componentName = getComponentName(returnFiber.type) || 'Component';
 
 
 
22544
 
22545
+ if (ownerHasKeyUseWarning[componentName]) {
22546
+ return;
22547
+ }
22548
 
22549
+ ownerHasKeyUseWarning[componentName] = true;
 
22550
 
22551
+ error('Each child in a list should have a unique ' + '"key" prop. See https://reactjs.org/link/warning-keys for ' + 'more information.');
22552
  };
22553
  }
22554
 
22555
+ var isArray$1 = Array.isArray;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
22556
 
22557
+ function coerceRef(returnFiber, current, element) {
22558
+ var mixedRef = element.ref;
22559
+
22560
+ if (mixedRef !== null && typeof mixedRef !== 'function' && typeof mixedRef !== 'object') {
22561
+ {
22562
+ // TODO: Clean this up once we turn on the string ref warning for
22563
+ // everyone, because the strict mode case will no longer be relevant
22564
+ if ((returnFiber.mode & StrictMode || warnAboutStringRefs) && // We warn in ReactElement.js if owner and self are equal for string refs
22565
+ // because these cannot be automatically converted to an arrow function
22566
+ // using a codemod. Therefore, we don't have to warn about string refs again.
22567
+ !(element._owner && element._self && element._owner.stateNode !== element._self)) {
22568
+ var componentName = getComponentName(returnFiber.type) || 'Component';
22569
+
22570
+ if (!didWarnAboutStringRefs[componentName]) {
22571
+ {
22572
+ error('A string ref, "%s", has been found within a strict mode tree. ' + 'String refs are a source of potential bugs and should be avoided. ' + 'We recommend using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref', mixedRef);
22573
+ }
22574
+
22575
+ didWarnAboutStringRefs[componentName] = true;
22576
+ }
22577
  }
 
 
22578
  }
 
 
 
 
 
 
22579
 
22580
+ if (element._owner) {
22581
+ var owner = element._owner;
22582
+ var inst;
22583
+
22584
+ if (owner) {
22585
+ var ownerFiber = owner;
22586
+
22587
+ if (!(ownerFiber.tag === ClassComponent)) {
22588
+ {
22589
+ throw Error( "Function components cannot have string refs. We recommend using useRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref" );
22590
+ }
22591
+ }
22592
+
22593
+ inst = ownerFiber.stateNode;
 
 
 
22594
  }
22595
+
22596
+ if (!inst) {
22597
+ {
22598
+ throw Error( "Missing owner for string ref " + mixedRef + ". This error is likely caused by a bug in React. Please file an issue." );
22599
+ }
22600
+ }
22601
+
22602
+ var stringRef = '' + mixedRef; // Check if previous string ref matches new string ref
22603
+
22604
+ if (current !== null && current.ref !== null && typeof current.ref === 'function' && current.ref._stringRef === stringRef) {
22605
+ return current.ref;
22606
+ }
22607
+
22608
+ var ref = function (value) {
22609
+ var refs = inst.refs;
22610
+
22611
+ if (refs === emptyRefsObject) {
22612
+ // This is a lazy pooled frozen object, so we need to initialize.
22613
+ refs = inst.refs = {};
22614
+ }
22615
+
22616
+ if (value === null) {
22617
+ delete refs[stringRef];
22618
+ } else {
22619
+ refs[stringRef] = value;
22620
+ }
22621
+ };
22622
+
22623
+ ref._stringRef = stringRef;
22624
+ return ref;
22625
+ } else {
22626
+ if (!(typeof mixedRef === 'string')) {
22627
+ {
22628
+ throw Error( "Expected ref to be a function, a string, an object returned by React.createRef(), or null." );
22629
+ }
22630
+ }
22631
+
22632
+ if (!element._owner) {
22633
+ {
22634
+ throw Error( "Element ref was specified as a string (" + mixedRef + ") but no owner was set. This could happen for one of the following reasons:\n1. You may be adding a ref to a function component\n2. You may be adding a ref to a component that was not created inside a component's render method\n3. You have multiple copies of React loaded\nSee https://reactjs.org/link/refs-must-have-owner for more information." );
22635
+ }
22636
  }
 
 
 
 
22637
  }
22638
  }
 
 
22639
 
22640
+ return mixedRef;
 
 
 
 
 
 
 
22641
  }
22642
 
22643
+ function throwOnInvalidObjectType(returnFiber, newChild) {
22644
+ if (returnFiber.type !== 'textarea') {
22645
+ {
22646
+ {
22647
+ throw Error( "Objects are not valid as a React child (found: " + (Object.prototype.toString.call(newChild) === '[object Object]' ? 'object with keys {' + Object.keys(newChild).join(', ') + '}' : newChild) + "). If you meant to render a collection of children, use an array instead." );
22648
+ }
22649
+ }
 
 
 
 
 
22650
  }
 
 
 
 
 
 
 
 
 
22651
  }
22652
 
22653
+ function warnOnFunctionType(returnFiber) {
22654
+ {
22655
+ var componentName = getComponentName(returnFiber.type) || 'Component';
 
 
 
 
22656
 
22657
+ if (ownerHasFunctionTypeWarning[componentName]) {
22658
+ return;
22659
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
22660
 
22661
+ ownerHasFunctionTypeWarning[componentName] = true;
 
22662
 
22663
+ error('Functions are not valid as a React child. This may happen if ' + 'you return a Component instead of <Component /> from render. ' + 'Or maybe you meant to call this function rather than return it.');
22664
+ }
22665
+ } // We avoid inlining this to avoid potential deopts from using try/catch.
22666
+ // to be able to optimize each path individually by branching early. This needs
22667
+ // a compiler or we can do it manually. Helpers that don't need this branching
22668
+ // live outside of this function.
22669
 
 
22670
 
22671
+ function ChildReconciler(shouldTrackSideEffects) {
22672
+ function deleteChild(returnFiber, childToDelete) {
22673
+ if (!shouldTrackSideEffects) {
22674
+ // Noop.
22675
+ return;
22676
+ } // Deletions are added in reversed order so we add it to the front.
22677
+ // At this point, the return fiber's effect list is empty except for
22678
+ // deletions, so we can just append the deletion to the list. The remaining
22679
+ // effects aren't added until the complete phase. Once we implement
22680
+ // resuming, this may not be true.
22681
 
 
 
 
 
 
 
 
 
22682
 
22683
+ var last = returnFiber.lastEffect;
22684
 
22685
+ if (last !== null) {
22686
+ last.nextEffect = childToDelete;
22687
+ returnFiber.lastEffect = childToDelete;
22688
+ } else {
22689
+ returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;
22690
+ }
22691
 
22692
+ childToDelete.nextEffect = null;
22693
+ childToDelete.flags = Deletion;
22694
+ }
22695
 
22696
+ function deleteRemainingChildren(returnFiber, currentFirstChild) {
22697
+ if (!shouldTrackSideEffects) {
22698
+ // Noop.
22699
+ return null;
22700
+ } // TODO: For the shouldClone case, this could be micro-optimized a bit by
22701
+ // assuming that after the first child we've already added everything.
22702
 
 
22703
 
22704
+ var childToDelete = currentFirstChild;
 
 
 
 
 
 
 
22705
 
22706
+ while (childToDelete !== null) {
22707
+ deleteChild(returnFiber, childToDelete);
22708
+ childToDelete = childToDelete.sibling;
22709
+ }
22710
+
22711
+ return null;
 
 
 
22712
  }
22713
+
22714
+ function mapRemainingChildren(returnFiber, currentFirstChild) {
22715
+ // Add the remaining children to a temporary map so that we can find them by
22716
+ // keys quickly. Implicit (null) keys get added to this set with their index
22717
+ // instead.
22718
+ var existingChildren = new Map();
22719
+ var existingChild = currentFirstChild;
22720
+
22721
+ while (existingChild !== null) {
22722
+ if (existingChild.key !== null) {
22723
+ existingChildren.set(existingChild.key, existingChild);
22724
+ } else {
22725
+ existingChildren.set(existingChild.index, existingChild);
22726
+ }
22727
+
22728
+ existingChild = existingChild.sibling;
22729
+ }
22730
+
22731
+ return existingChildren;
22732
  }
 
22733
 
22734
+ function useFiber(fiber, pendingProps) {
22735
+ // We currently set sibling to null and index to 0 here because it is easy
22736
+ // to forget to do before returning it. E.g. for the single child case.
22737
+ var clone = createWorkInProgress(fiber, pendingProps);
22738
+ clone.index = 0;
22739
+ clone.sibling = null;
22740
+ return clone;
 
 
 
22741
  }
 
22742
 
22743
+ function placeChild(newFiber, lastPlacedIndex, newIndex) {
22744
+ newFiber.index = newIndex;
22745
+
22746
+ if (!shouldTrackSideEffects) {
22747
+ // Noop.
22748
+ return lastPlacedIndex;
22749
+ }
22750
+
22751
+ var current = newFiber.alternate;
22752
+
22753
+ if (current !== null) {
22754
+ var oldIndex = current.index;
22755
+
22756
+ if (oldIndex < lastPlacedIndex) {
22757
+ // This is a move.
22758
+ newFiber.flags = Placement;
22759
+ return lastPlacedIndex;
22760
+ } else {
22761
+ // This item can stay in place.
22762
+ return oldIndex;
22763
+ }
22764
+ } else {
22765
+ // This is an insertion.
22766
+ newFiber.flags = Placement;
22767
+ return lastPlacedIndex;
22768
+ }
22769
  }
 
22770
 
22771
+ function placeSingleChild(newFiber) {
22772
+ // This is simpler for the single child case. We only need to do a
22773
+ // placement for inserting new children.
22774
+ if (shouldTrackSideEffects && newFiber.alternate === null) {
22775
+ newFiber.flags = Placement;
 
 
 
 
 
 
 
22776
  }
22777
+
22778
+ return newFiber;
22779
  }
 
22780
 
22781
+ function updateTextNode(returnFiber, current, textContent, lanes) {
22782
+ if (current === null || current.tag !== HostText) {
22783
+ // Insert
22784
+ var created = createFiberFromText(textContent, returnFiber.mode, lanes);
22785
+ created.return = returnFiber;
22786
+ return created;
22787
+ } else {
22788
+ // Update
22789
+ var existing = useFiber(current, textContent);
22790
+ existing.return = returnFiber;
22791
+ return existing;
22792
+ }
22793
  }
 
22794
 
22795
+ function updateElement(returnFiber, current, element, lanes) {
22796
+ if (current !== null) {
22797
+ if (current.elementType === element.type || ( // Keep this check inline so it only runs on the false path:
22798
+ isCompatibleFamilyForHotReloading(current, element) )) {
22799
+ // Move based on index
22800
+ var existing = useFiber(current, element.props);
22801
+ existing.ref = coerceRef(returnFiber, current, element);
22802
+ existing.return = returnFiber;
22803
 
22804
+ {
22805
+ existing._debugSource = element._source;
22806
+ existing._debugOwner = element._owner;
22807
+ }
22808
 
22809
+ return existing;
22810
+ }
22811
+ } // Insert
22812
 
 
 
 
22813
 
22814
+ var created = createFiberFromElement(element, returnFiber.mode, lanes);
22815
+ created.ref = coerceRef(returnFiber, current, element);
22816
+ created.return = returnFiber;
22817
+ return created;
22818
+ }
 
 
 
 
 
 
 
 
 
 
 
 
22819
 
22820
+ function updatePortal(returnFiber, current, portal, lanes) {
22821
+ if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {
22822
+ // Insert
22823
+ var created = createFiberFromPortal(portal, returnFiber.mode, lanes);
22824
+ created.return = returnFiber;
22825
+ return created;
22826
+ } else {
22827
+ // Update
22828
+ var existing = useFiber(current, portal.children || []);
22829
+ existing.return = returnFiber;
22830
+ return existing;
22831
+ }
22832
+ }
22833
 
22834
+ function updateFragment(returnFiber, current, fragment, lanes, key) {
22835
+ if (current === null || current.tag !== Fragment) {
22836
+ // Insert
22837
+ var created = createFiberFromFragment(fragment, returnFiber.mode, lanes, key);
22838
+ created.return = returnFiber;
22839
+ return created;
22840
+ } else {
22841
+ // Update
22842
+ var existing = useFiber(current, fragment);
22843
+ existing.return = returnFiber;
22844
+ return existing;
22845
+ }
22846
+ }
22847
 
22848
+ function createChild(returnFiber, newChild, lanes) {
22849
+ if (typeof newChild === 'string' || typeof newChild === 'number') {
22850
+ // Text nodes don't have keys. If the previous node is implicitly keyed
22851
+ // we can continue to replace it without aborting even if it is not a text
22852
+ // node.
22853
+ var created = createFiberFromText('' + newChild, returnFiber.mode, lanes);
22854
+ created.return = returnFiber;
22855
+ return created;
22856
+ }
22857
 
22858
+ if (typeof newChild === 'object' && newChild !== null) {
22859
+ switch (newChild.$$typeof) {
22860
+ case REACT_ELEMENT_TYPE:
22861
+ {
22862
+ var _created = createFiberFromElement(newChild, returnFiber.mode, lanes);
 
 
 
22863
 
22864
+ _created.ref = coerceRef(returnFiber, null, newChild);
22865
+ _created.return = returnFiber;
22866
+ return _created;
22867
+ }
22868
 
22869
+ case REACT_PORTAL_TYPE:
22870
+ {
22871
+ var _created2 = createFiberFromPortal(newChild, returnFiber.mode, lanes);
22872
 
22873
+ _created2.return = returnFiber;
22874
+ return _created2;
22875
+ }
22876
+ }
22877
 
22878
+ if (isArray$1(newChild) || getIteratorFn(newChild)) {
22879
+ var _created3 = createFiberFromFragment(newChild, returnFiber.mode, lanes, null);
22880
 
22881
+ _created3.return = returnFiber;
22882
+ return _created3;
22883
+ }
22884
 
22885
+ throwOnInvalidObjectType(returnFiber, newChild);
22886
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
22887
 
22888
+ {
22889
+ if (typeof newChild === 'function') {
22890
+ warnOnFunctionType(returnFiber);
22891
+ }
22892
+ }
 
22893
 
22894
+ return null;
22895
+ }
22896
+
22897
+ function updateSlot(returnFiber, oldFiber, newChild, lanes) {
22898
+ // Update the fiber if the keys match, otherwise return null.
22899
+ var key = oldFiber !== null ? oldFiber.key : null;
22900
+
22901
+ if (typeof newChild === 'string' || typeof newChild === 'number') {
22902
+ // Text nodes don't have keys. If the previous node is implicitly keyed
22903
+ // we can continue to replace it without aborting even if it is not a text
22904
+ // node.
22905
+ if (key !== null) {
22906
+ return null;
22907
+ }
22908
+
22909
+ return updateTextNode(returnFiber, oldFiber, '' + newChild, lanes);
22910
  }
 
 
22911
 
22912
+ if (typeof newChild === 'object' && newChild !== null) {
22913
+ switch (newChild.$$typeof) {
22914
+ case REACT_ELEMENT_TYPE:
22915
+ {
22916
+ if (newChild.key === key) {
22917
+ if (newChild.type === REACT_FRAGMENT_TYPE) {
22918
+ return updateFragment(returnFiber, oldFiber, newChild.props.children, lanes, key);
22919
+ }
22920
+
22921
+ return updateElement(returnFiber, oldFiber, newChild, lanes);
22922
+ } else {
22923
+ return null;
22924
+ }
22925
+ }
22926
+
22927
+ case REACT_PORTAL_TYPE:
22928
+ {
22929
+ if (newChild.key === key) {
22930
+ return updatePortal(returnFiber, oldFiber, newChild, lanes);
22931
+ } else {
22932
+ return null;
22933
+ }
22934
+ }
22935
+ }
22936
 
22937
+ if (isArray$1(newChild) || getIteratorFn(newChild)) {
22938
+ if (key !== null) {
22939
+ return null;
22940
+ }
 
 
22941
 
22942
+ return updateFragment(returnFiber, oldFiber, newChild, lanes, null);
 
 
22943
  }
22944
+
22945
+ throwOnInvalidObjectType(returnFiber, newChild);
22946
  }
22947
 
22948
+ {
22949
+ if (typeof newChild === 'function') {
22950
+ warnOnFunctionType(returnFiber);
 
22951
  }
22952
  }
22953
 
22954
+ return null;
 
 
22955
  }
 
 
 
22956
 
22957
+ function updateFromMap(existingChildren, returnFiber, newIdx, newChild, lanes) {
22958
+ if (typeof newChild === 'string' || typeof newChild === 'number') {
22959
+ // Text nodes don't have keys, so we neither have to check the old nor
22960
+ // new node for the key. If both are text nodes, they match.
22961
+ var matchedFiber = existingChildren.get(newIdx) || null;
22962
+ return updateTextNode(returnFiber, matchedFiber, '' + newChild, lanes);
22963
+ }
22964
 
22965
+ if (typeof newChild === 'object' && newChild !== null) {
22966
+ switch (newChild.$$typeof) {
22967
+ case REACT_ELEMENT_TYPE:
22968
+ {
22969
+ var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;
22970
 
22971
+ if (newChild.type === REACT_FRAGMENT_TYPE) {
22972
+ return updateFragment(returnFiber, _matchedFiber, newChild.props.children, lanes, newChild.key);
22973
+ }
 
 
 
22974
 
22975
+ return updateElement(returnFiber, _matchedFiber, newChild, lanes);
22976
+ }
 
 
 
 
 
 
22977
 
22978
+ case REACT_PORTAL_TYPE:
22979
+ {
22980
+ var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;
22981
 
22982
+ return updatePortal(returnFiber, _matchedFiber2, newChild, lanes);
22983
+ }
22984
 
22985
+ }
22986
 
22987
+ if (isArray$1(newChild) || getIteratorFn(newChild)) {
22988
+ var _matchedFiber3 = existingChildren.get(newIdx) || null;
 
 
 
22989
 
22990
+ return updateFragment(returnFiber, _matchedFiber3, newChild, lanes, null);
22991
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
22992
 
22993
+ throwOnInvalidObjectType(returnFiber, newChild);
22994
+ }
 
 
 
 
 
 
 
 
 
 
22995
 
22996
+ {
22997
+ if (typeof newChild === 'function') {
22998
+ warnOnFunctionType(returnFiber);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
22999
  }
23000
  }
23001
+
23002
+ return null;
23003
  }
23004
+ /**
23005
+ * Warns if there is a duplicate or missing key
23006
+ */
23007
 
 
23008
 
23009
+ function warnOnInvalidKey(child, knownKeys, returnFiber) {
23010
+ {
23011
+ if (typeof child !== 'object' || child === null) {
23012
+ return knownKeys;
23013
+ }
23014
 
23015
+ switch (child.$$typeof) {
23016
+ case REACT_ELEMENT_TYPE:
23017
+ case REACT_PORTAL_TYPE:
23018
+ warnForMissingKey(child, returnFiber);
23019
+ var key = child.key;
 
23020
 
23021
+ if (typeof key !== 'string') {
23022
+ break;
23023
+ }
 
 
 
 
 
 
23024
 
23025
+ if (knownKeys === null) {
23026
+ knownKeys = new Set();
23027
+ knownKeys.add(key);
23028
+ break;
23029
+ }
23030
 
23031
+ if (!knownKeys.has(key)) {
23032
+ knownKeys.add(key);
23033
+ break;
23034
+ }
23035
 
23036
+ error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);
 
 
 
 
 
23037
 
23038
+ break;
23039
+ }
23040
+ }
 
 
 
 
 
 
23041
 
23042
+ return knownKeys;
23043
+ }
23044
 
23045
+ function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, lanes) {
23046
+ // This algorithm can't optimize by searching from both ends since we
23047
+ // don't have backpointers on fibers. I'm trying to see how far we can get
23048
+ // with that model. If it ends up not being worth the tradeoffs, we can
23049
+ // add it later.
23050
+ // Even with a two ended optimization, we'd want to optimize for the case
23051
+ // where there are few changes and brute force the comparison instead of
23052
+ // going for the Map. It'd like to explore hitting that path first in
23053
+ // forward-only mode and only go for the Map once we notice that we need
23054
+ // lots of look ahead. This doesn't handle reversal as well as two ended
23055
+ // search but that's unusual. Besides, for the two ended optimization to
23056
+ // work on Iterables, we'd need to copy the whole set.
23057
+ // In this first iteration, we'll just live with hitting the bad case
23058
+ // (adding everything to a Map) in for every insert/move.
23059
+ // If you change this code, also update reconcileChildrenIterator() which
23060
+ // uses the same algorithm.
23061
+ {
23062
+ // First, validate keys.
23063
+ var knownKeys = null;
23064
 
23065
+ for (var i = 0; i < newChildren.length; i++) {
23066
+ var child = newChildren[i];
23067
+ knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);
23068
+ }
23069
+ }
23070
 
23071
+ var resultingFirstChild = null;
23072
+ var previousNewFiber = null;
23073
+ var oldFiber = currentFirstChild;
23074
+ var lastPlacedIndex = 0;
23075
+ var newIdx = 0;
23076
+ var nextOldFiber = null;
23077
 
23078
+ for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {
23079
+ if (oldFiber.index > newIdx) {
23080
+ nextOldFiber = oldFiber;
23081
+ oldFiber = null;
23082
+ } else {
23083
+ nextOldFiber = oldFiber.sibling;
23084
+ }
23085
 
23086
+ var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], lanes);
23087
 
23088
+ if (newFiber === null) {
23089
+ // TODO: This breaks on empty slots like null children. That's
23090
+ // unfortunate because it triggers the slow path all the time. We need
23091
+ // a better way to communicate whether this was a miss or null,
23092
+ // boolean, undefined, etc.
23093
+ if (oldFiber === null) {
23094
+ oldFiber = nextOldFiber;
23095
+ }
23096
 
23097
+ break;
23098
+ }
 
 
 
 
 
 
23099
 
23100
+ if (shouldTrackSideEffects) {
23101
+ if (oldFiber && newFiber.alternate === null) {
23102
+ // We matched the slot, but we didn't reuse the existing fiber, so we
23103
+ // need to delete the existing child.
23104
+ deleteChild(returnFiber, oldFiber);
23105
+ }
23106
+ }
23107
 
23108
+ lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);
23109
 
23110
+ if (previousNewFiber === null) {
23111
+ // TODO: Move out of the loop. This only happens for the first run.
23112
+ resultingFirstChild = newFiber;
23113
+ } else {
23114
+ // TODO: Defer siblings if we're not at the right index for this slot.
23115
+ // I.e. if we had null values before, then we want to defer this
23116
+ // for each null value. However, we also don't want to call updateSlot
23117
+ // with the previous one.
23118
+ previousNewFiber.sibling = newFiber;
23119
+ }
23120
 
23121
+ previousNewFiber = newFiber;
23122
+ oldFiber = nextOldFiber;
23123
+ }
23124
 
23125
+ if (newIdx === newChildren.length) {
23126
+ // We've reached the end of the new children. We can delete the rest.
23127
+ deleteRemainingChildren(returnFiber, oldFiber);
23128
+ return resultingFirstChild;
23129
+ }
23130
 
23131
+ if (oldFiber === null) {
23132
+ // If we don't have any more existing children we can choose a fast path
23133
+ // since the rest will all be insertions.
23134
+ for (; newIdx < newChildren.length; newIdx++) {
23135
+ var _newFiber = createChild(returnFiber, newChildren[newIdx], lanes);
23136
 
23137
+ if (_newFiber === null) {
23138
+ continue;
23139
+ }
 
 
 
 
 
 
23140
 
23141
+ lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);
 
 
 
 
 
 
23142
 
23143
+ if (previousNewFiber === null) {
23144
+ // TODO: Move out of the loop. This only happens for the first run.
23145
+ resultingFirstChild = _newFiber;
23146
+ } else {
23147
+ previousNewFiber.sibling = _newFiber;
23148
+ }
23149
 
23150
+ previousNewFiber = _newFiber;
23151
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
23152
 
23153
+ return resultingFirstChild;
23154
+ } // Add all children to a key map for quick lookups.
 
 
 
 
 
 
 
 
23155
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23156
 
23157
+ var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.
 
 
 
 
23158
 
23159
+ for (; newIdx < newChildren.length; newIdx++) {
23160
+ var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], lanes);
 
 
 
 
 
 
 
 
 
23161
 
23162
+ if (_newFiber2 !== null) {
23163
+ if (shouldTrackSideEffects) {
23164
+ if (_newFiber2.alternate !== null) {
23165
+ // The new fiber is a work in progress, but if there exists a
23166
+ // current, that means that we reused the fiber. We need to delete
23167
+ // it from the child list so that we don't add it to the deletion
23168
+ // list.
23169
+ existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);
23170
+ }
23171
+ }
23172
+
23173
+ lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);
23174
+
23175
+ if (previousNewFiber === null) {
23176
+ resultingFirstChild = _newFiber2;
23177
+ } else {
23178
+ previousNewFiber.sibling = _newFiber2;
23179
+ }
23180
+
23181
+ previousNewFiber = _newFiber2;
23182
+ }
23183
  }
 
 
23184
 
23185
+ if (shouldTrackSideEffects) {
23186
+ // Any existing children that weren't consumed above were deleted. We need
23187
+ // to add them to the deletion list.
23188
+ existingChildren.forEach(function (child) {
23189
+ return deleteChild(returnFiber, child);
23190
+ });
 
 
 
 
 
 
 
23191
  }
 
 
23192
 
23193
+ return resultingFirstChild;
23194
+ }
23195
 
23196
+ function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, lanes) {
23197
+ // This is the same implementation as reconcileChildrenArray(),
23198
+ // but using the iterator instead.
23199
+ var iteratorFn = getIteratorFn(newChildrenIterable);
23200
 
23201
+ if (!(typeof iteratorFn === 'function')) {
23202
+ {
23203
+ throw Error( "An object is not an iterable. This error is likely caused by a bug in React. Please file an issue." );
23204
+ }
23205
+ }
 
23206
 
23207
+ {
23208
+ // We don't support rendering Generators because it's a mutation.
23209
+ // See https://github.com/facebook/react/issues/12995
23210
+ if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag
23211
+ newChildrenIterable[Symbol.toStringTag] === 'Generator') {
23212
+ if (!didWarnAboutGenerators) {
23213
+ error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');
23214
+ }
 
23215
 
23216
+ didWarnAboutGenerators = true;
23217
+ } // Warn about using Maps as children
23218
 
23219
 
23220
+ if (newChildrenIterable.entries === iteratorFn) {
23221
+ if (!didWarnAboutMaps) {
23222
+ error('Using Maps as children is not supported. ' + 'Use an array of keyed ReactElements instead.');
23223
+ }
23224
 
23225
+ didWarnAboutMaps = true;
23226
+ } // First, validate keys.
23227
+ // We'll get a different iterator later for the main pass.
23228
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23229
 
23230
+ var _newChildren = iteratorFn.call(newChildrenIterable);
 
 
 
 
 
 
 
 
 
23231
 
23232
+ if (_newChildren) {
23233
+ var knownKeys = null;
 
 
 
 
 
 
 
 
23234
 
23235
+ var _step = _newChildren.next();
 
 
 
 
 
 
 
 
 
23236
 
23237
+ for (; !_step.done; _step = _newChildren.next()) {
23238
+ var child = _step.value;
23239
+ knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);
23240
+ }
23241
+ }
23242
+ }
 
 
23243
 
23244
+ var newChildren = iteratorFn.call(newChildrenIterable);
 
23245
 
23246
+ if (!(newChildren != null)) {
23247
+ {
23248
+ throw Error( "An iterable object provided no iterator." );
23249
+ }
23250
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23251
 
23252
+ var resultingFirstChild = null;
23253
+ var previousNewFiber = null;
23254
+ var oldFiber = currentFirstChild;
23255
+ var lastPlacedIndex = 0;
23256
+ var newIdx = 0;
23257
+ var nextOldFiber = null;
23258
+ var step = newChildren.next();
23259
 
23260
+ for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {
23261
+ if (oldFiber.index > newIdx) {
23262
+ nextOldFiber = oldFiber;
23263
+ oldFiber = null;
23264
+ } else {
23265
+ nextOldFiber = oldFiber.sibling;
23266
+ }
23267
 
23268
+ var newFiber = updateSlot(returnFiber, oldFiber, step.value, lanes);
23269
 
23270
+ if (newFiber === null) {
23271
+ // TODO: This breaks on empty slots like null children. That's
23272
+ // unfortunate because it triggers the slow path all the time. We need
23273
+ // a better way to communicate whether this was a miss or null,
23274
+ // boolean, undefined, etc.
23275
+ if (oldFiber === null) {
23276
+ oldFiber = nextOldFiber;
23277
+ }
23278
 
23279
+ break;
23280
+ }
 
 
 
 
 
 
23281
 
23282
+ if (shouldTrackSideEffects) {
23283
+ if (oldFiber && newFiber.alternate === null) {
23284
+ // We matched the slot, but we didn't reuse the existing fiber, so we
23285
+ // need to delete the existing child.
23286
+ deleteChild(returnFiber, oldFiber);
23287
+ }
23288
+ }
23289
 
23290
+ lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);
23291
 
23292
+ if (previousNewFiber === null) {
23293
+ // TODO: Move out of the loop. This only happens for the first run.
23294
+ resultingFirstChild = newFiber;
23295
+ } else {
23296
+ // TODO: Defer siblings if we're not at the right index for this slot.
23297
+ // I.e. if we had null values before, then we want to defer this
23298
+ // for each null value. However, we also don't want to call updateSlot
23299
+ // with the previous one.
23300
+ previousNewFiber.sibling = newFiber;
23301
+ }
23302
 
23303
+ previousNewFiber = newFiber;
23304
+ oldFiber = nextOldFiber;
23305
+ }
23306
 
23307
+ if (step.done) {
23308
+ // We've reached the end of the new children. We can delete the rest.
23309
+ deleteRemainingChildren(returnFiber, oldFiber);
23310
+ return resultingFirstChild;
23311
+ }
23312
 
23313
+ if (oldFiber === null) {
23314
+ // If we don't have any more existing children we can choose a fast path
23315
+ // since the rest will all be insertions.
23316
+ for (; !step.done; newIdx++, step = newChildren.next()) {
23317
+ var _newFiber3 = createChild(returnFiber, step.value, lanes);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23318
 
23319
+ if (_newFiber3 === null) {
23320
+ continue;
23321
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23322
 
23323
+ lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);
 
 
 
23324
 
23325
+ if (previousNewFiber === null) {
23326
+ // TODO: Move out of the loop. This only happens for the first run.
23327
+ resultingFirstChild = _newFiber3;
23328
+ } else {
23329
+ previousNewFiber.sibling = _newFiber3;
23330
+ }
 
 
 
23331
 
23332
+ previousNewFiber = _newFiber3;
23333
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
23334
 
23335
+ return resultingFirstChild;
23336
+ } // Add all children to a key map for quick lookups.
 
 
 
 
 
 
 
23337
 
 
 
 
 
 
 
 
 
 
 
23338
 
23339
+ var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.
 
 
 
 
 
23340
 
23341
+ for (; !step.done; newIdx++, step = newChildren.next()) {
23342
+ var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, lanes);
23343
+
23344
+ if (_newFiber4 !== null) {
23345
+ if (shouldTrackSideEffects) {
23346
+ if (_newFiber4.alternate !== null) {
23347
+ // The new fiber is a work in progress, but if there exists a
23348
+ // current, that means that we reused the fiber. We need to delete
23349
+ // it from the child list so that we don't add it to the deletion
23350
+ // list.
23351
+ existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23352
  }
23353
+ }
23354
 
23355
+ lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);
23356
+
23357
+ if (previousNewFiber === null) {
23358
+ resultingFirstChild = _newFiber4;
23359
+ } else {
23360
+ previousNewFiber.sibling = _newFiber4;
23361
  }
23362
 
23363
+ previousNewFiber = _newFiber4;
23364
  }
23365
  }
 
23366
 
23367
+ if (shouldTrackSideEffects) {
23368
+ // Any existing children that weren't consumed above were deleted. We need
23369
+ // to add them to the deletion list.
23370
+ existingChildren.forEach(function (child) {
23371
+ return deleteChild(returnFiber, child);
23372
+ });
23373
+ }
23374
 
23375
+ return resultingFirstChild;
23376
+ }
23377
+
23378
+ function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, lanes) {
23379
+ // There's no need to check for keys on text nodes since we don't have a
23380
+ // way to define them.
23381
+ if (currentFirstChild !== null && currentFirstChild.tag === HostText) {
23382
+ // We already have an existing node so let's just update it and delete
23383
+ // the rest.
23384
+ deleteRemainingChildren(returnFiber, currentFirstChild.sibling);
23385
+ var existing = useFiber(currentFirstChild, textContent);
23386
+ existing.return = returnFiber;
23387
+ return existing;
23388
+ } // The existing first child is not a text node so we need to create one
23389
+ // and delete the existing ones.
23390
+
23391
+
23392
+ deleteRemainingChildren(returnFiber, currentFirstChild);
23393
+ var created = createFiberFromText(textContent, returnFiber.mode, lanes);
23394
+ created.return = returnFiber;
23395
+ return created;
23396
+ }
23397
+
23398
+ function reconcileSingleElement(returnFiber, currentFirstChild, element, lanes) {
23399
+ var key = element.key;
23400
+ var child = currentFirstChild;
23401
+
23402
+ while (child !== null) {
23403
+ // TODO: If key === null and child.key === null, then this only applies to
23404
+ // the first item in the list.
23405
+ if (child.key === key) {
23406
+ switch (child.tag) {
23407
+ case Fragment:
23408
+ {
23409
+ if (element.type === REACT_FRAGMENT_TYPE) {
23410
+ deleteRemainingChildren(returnFiber, child.sibling);
23411
+ var existing = useFiber(child, element.props.children);
23412
+ existing.return = returnFiber;
23413
+
23414
+ {
23415
+ existing._debugSource = element._source;
23416
+ existing._debugOwner = element._owner;
23417
+ }
23418
 
23419
+ return existing;
23420
+ }
 
 
 
 
 
 
 
 
 
 
23421
 
23422
+ break;
23423
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23424
 
23425
+ case Block:
23426
 
23427
+ // We intentionally fallthrough here if enableBlocksAPI is not on.
23428
+ // eslint-disable-next-lined no-fallthrough
23429
 
23430
+ default:
23431
+ {
23432
+ if (child.elementType === element.type || ( // Keep this check inline so it only runs on the false path:
23433
+ isCompatibleFamilyForHotReloading(child, element) )) {
23434
+ deleteRemainingChildren(returnFiber, child.sibling);
 
23435
 
23436
+ var _existing3 = useFiber(child, element.props);
 
 
 
 
 
 
 
23437
 
23438
+ _existing3.ref = coerceRef(returnFiber, child, element);
23439
+ _existing3.return = returnFiber;
23440
 
23441
+ {
23442
+ _existing3._debugSource = element._source;
23443
+ _existing3._debugOwner = element._owner;
23444
+ }
23445
 
23446
+ return _existing3;
23447
+ }
23448
 
23449
+ break;
23450
+ }
23451
+ } // Didn't match.
 
 
23452
 
 
23453
 
23454
+ deleteRemainingChildren(returnFiber, child);
23455
+ break;
23456
+ } else {
23457
+ deleteChild(returnFiber, child);
23458
+ }
 
 
 
23459
 
23460
+ child = child.sibling;
 
 
 
 
 
 
 
 
23461
  }
 
 
 
 
 
23462
 
23463
+ if (element.type === REACT_FRAGMENT_TYPE) {
23464
+ var created = createFiberFromFragment(element.props.children, returnFiber.mode, lanes, element.key);
23465
+ created.return = returnFiber;
23466
+ return created;
23467
+ } else {
23468
+ var _created4 = createFiberFromElement(element, returnFiber.mode, lanes);
23469
+
23470
+ _created4.ref = coerceRef(returnFiber, currentFirstChild, element);
23471
+ _created4.return = returnFiber;
23472
+ return _created4;
 
 
 
 
 
 
 
 
23473
  }
23474
+ }
23475
 
23476
+ function reconcileSinglePortal(returnFiber, currentFirstChild, portal, lanes) {
23477
+ var key = portal.key;
23478
+ var child = currentFirstChild;
 
 
 
 
23479
 
23480
+ while (child !== null) {
23481
+ // TODO: If key === null and child.key === null, then this only applies to
23482
+ // the first item in the list.
23483
+ if (child.key === key) {
23484
+ if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {
23485
+ deleteRemainingChildren(returnFiber, child.sibling);
23486
+ var existing = useFiber(child, portal.children || []);
23487
+ existing.return = returnFiber;
23488
+ return existing;
23489
+ } else {
23490
+ deleteRemainingChildren(returnFiber, child);
23491
+ break;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23492
  }
23493
+ } else {
23494
+ deleteChild(returnFiber, child);
 
 
 
 
 
 
 
 
 
 
 
 
 
23495
  }
 
 
23496
 
23497
+ child = child.sibling;
 
 
 
 
 
 
 
 
 
 
 
 
23498
  }
 
 
23499
 
23500
+ var created = createFiberFromPortal(portal, returnFiber.mode, lanes);
23501
+ created.return = returnFiber;
23502
+ return created;
23503
+ } // This API will tag the children with the side-effect of the reconciliation
23504
+ // itself. They will be added to the side-effect list as we pass through the
23505
+ // children and the parent.
23506
 
 
 
 
 
 
 
23507
 
23508
+ function reconcileChildFibers(returnFiber, currentFirstChild, newChild, lanes) {
23509
+ // This function is not recursive.
23510
+ // If the top level item is an array, we treat it as a set of children,
23511
+ // not as a fragment. Nested arrays on the other hand will be treated as
23512
+ // fragment nodes. Recursion happens at the normal flow.
23513
+ // Handle top level unkeyed fragments as if they were arrays.
23514
+ // This leads to an ambiguity between <>{[...]}</> and <>...</>.
23515
+ // We treat the ambiguous cases above the same.
23516
+ var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;
23517
 
23518
+ if (isUnkeyedTopLevelFragment) {
23519
+ newChild = newChild.props.children;
23520
+ } // Handle object types
23521
 
23522
 
23523
+ var isObject = typeof newChild === 'object' && newChild !== null;
 
23524
 
23525
+ if (isObject) {
23526
+ switch (newChild.$$typeof) {
23527
+ case REACT_ELEMENT_TYPE:
23528
+ return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, lanes));
 
 
 
23529
 
23530
+ case REACT_PORTAL_TYPE:
23531
+ return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, lanes));
23532
 
23533
+ }
23534
+ }
23535
 
23536
+ if (typeof newChild === 'string' || typeof newChild === 'number') {
23537
+ return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, lanes));
23538
+ }
23539
 
23540
+ if (isArray$1(newChild)) {
23541
+ return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, lanes);
23542
+ }
 
 
 
23543
 
23544
+ if (getIteratorFn(newChild)) {
23545
+ return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, lanes);
23546
+ }
 
 
 
 
 
 
23547
 
23548
+ if (isObject) {
23549
+ throwOnInvalidObjectType(returnFiber, newChild);
23550
+ }
23551
 
23552
+ {
23553
+ if (typeof newChild === 'function') {
23554
+ warnOnFunctionType(returnFiber);
23555
+ }
23556
+ }
23557
 
23558
+ if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {
23559
+ // If the new child is undefined, and the return fiber is a composite
23560
+ // component, throw an error. If Fiber return types are disabled,
23561
+ // we already threw above.
23562
+ switch (returnFiber.tag) {
23563
+ case ClassComponent:
23564
+ {
23565
+ {
23566
+ var instance = returnFiber.stateNode;
23567