react-dom 16.10.0 → 16.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/build-info.json +4 -4
  2. package/cjs/react-dom-server.browser.development.js +122 -177
  3. package/cjs/react-dom-server.browser.production.min.js +29 -29
  4. package/cjs/react-dom-server.node.development.js +116 -167
  5. package/cjs/react-dom-server.node.production.min.js +17 -17
  6. package/cjs/react-dom-test-utils.development.js +55 -91
  7. package/cjs/react-dom-test-utils.production.min.js +9 -9
  8. package/cjs/react-dom-unstable-fizz.browser.development.js +9 -5
  9. package/cjs/react-dom-unstable-fizz.browser.production.min.js +3 -3
  10. package/cjs/react-dom-unstable-fizz.node.development.js +23 -10
  11. package/cjs/react-dom-unstable-fizz.node.production.min.js +4 -3
  12. package/cjs/react-dom-unstable-flight-client.development.js +357 -0
  13. package/cjs/react-dom-unstable-flight-client.production.min.js +16 -0
  14. package/cjs/react-dom-unstable-flight-server.browser.development.js +392 -0
  15. package/cjs/react-dom-unstable-flight-server.browser.production.min.js +16 -0
  16. package/cjs/react-dom-unstable-flight-server.node.development.js +415 -0
  17. package/cjs/react-dom-unstable-flight-server.node.production.min.js +16 -0
  18. package/cjs/react-dom-unstable-native-dependencies.development.js +28 -48
  19. package/cjs/react-dom-unstable-native-dependencies.production.min.js +15 -15
  20. package/cjs/react-dom.development.js +1912 -2046
  21. package/cjs/react-dom.production.min.js +266 -269
  22. package/cjs/react-dom.profiling.min.js +252 -255
  23. package/package.json +8 -3
  24. package/umd/react-dom-server.browser.development.js +122 -177
  25. package/umd/react-dom-server.browser.production.min.js +36 -36
  26. package/umd/react-dom-test-utils.development.js +55 -91
  27. package/umd/react-dom-test-utils.production.min.js +9 -9
  28. package/umd/react-dom-unstable-fizz.browser.development.js +9 -5
  29. package/umd/react-dom-unstable-fizz.browser.production.min.js +3 -3
  30. package/umd/react-dom-unstable-flight-client.development.js +357 -0
  31. package/umd/react-dom-unstable-flight-client.production.min.js +14 -0
  32. package/umd/react-dom-unstable-flight-server.browser.development.js +390 -0
  33. package/umd/react-dom-unstable-flight-server.browser.production.min.js +14 -0
  34. package/umd/react-dom-unstable-native-dependencies.development.js +28 -48
  35. package/umd/react-dom-unstable-native-dependencies.production.min.js +22 -22
  36. package/umd/react-dom.development.js +1916 -2050
  37. package/umd/react-dom.production.min.js +230 -232
  38. package/umd/react-dom.profiling.min.js +237 -239
  39. package/unstable-flight-client.js +7 -0
  40. package/unstable-flight-server.browser.js +7 -0
  41. package/unstable-flight-server.js +3 -0
  42. package/unstable-flight-server.node.js +7 -0
@@ -0,0 +1,390 @@
1
+ /** @license React v16.12.0
2
+ * react-dom-unstable-flight-server.browser.development.js
3
+ *
4
+ * Copyright (c) Facebook, Inc. and its affiliates.
5
+ *
6
+ * This source code is licensed under the MIT license found in the
7
+ * LICENSE file in the root directory of this source tree.
8
+ */
9
+
10
+ 'use strict';
11
+
12
+ (function (global, factory) {
13
+ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('react-dom/server')) :
14
+ typeof define === 'function' && define.amd ? define(['react-dom/server'], factory) :
15
+ (global.ReactFlightDOMServer = factory(global.ReactDOMServer));
16
+ }(this, (function (ReactDOMServer) { 'use strict';
17
+
18
+ function scheduleWork(callback) {
19
+ callback();
20
+ }
21
+
22
+
23
+ function writeChunk(destination, buffer) {
24
+ destination.enqueue(buffer);
25
+ return destination.desiredSize > 0;
26
+ }
27
+
28
+ function close(destination) {
29
+ destination.close();
30
+ }
31
+ var textEncoder = new TextEncoder();
32
+ function convertStringToBuffer(content) {
33
+ return textEncoder.encode(content);
34
+ }
35
+
36
+ function renderHostChildrenToString(children) {
37
+ // TODO: This file is used to actually implement a server renderer
38
+ // so we can't actually reference the renderer here. Instead, we
39
+ // should replace this method with a reference to Fizz which
40
+ // then uses this file to implement the server renderer.
41
+ return ReactDOMServer.renderToStaticMarkup(children);
42
+ }
43
+
44
+ // The Symbol used to tag the ReactElement-like types. If there is no native Symbol
45
+ // nor polyfill, then a plain number is used for performance.
46
+ var hasSymbol = typeof Symbol === 'function' && Symbol.for;
47
+ var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
48
+
49
+
50
+
51
+
52
+
53
+ // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
54
+ // (unstable) APIs that have been removed. Can we remove the symbols?
55
+
56
+ /*
57
+
58
+ FLIGHT PROTOCOL GRAMMAR
59
+
60
+ Response
61
+ - JSONData RowSequence
62
+ - JSONData
63
+
64
+ RowSequence
65
+ - Row RowSequence
66
+ - Row
67
+
68
+ Row
69
+ - "J" RowID JSONData
70
+ - "H" RowID HTMLData
71
+ - "B" RowID BlobData
72
+ - "U" RowID URLData
73
+ - "E" RowID ErrorData
74
+
75
+ RowID
76
+ - HexDigits ":"
77
+
78
+ HexDigits
79
+ - HexDigit HexDigits
80
+ - HexDigit
81
+
82
+ HexDigit
83
+ - 0-F
84
+
85
+ URLData
86
+ - (UTF8 encoded URL) "\n"
87
+
88
+ ErrorData
89
+ - (UTF8 encoded JSON: {message: "...", stack: "..."}) "\n"
90
+
91
+ JSONData
92
+ - (UTF8 encoded JSON) "\n"
93
+ - String values that begin with $ are escaped with a "$" prefix.
94
+ - References to other rows are encoding as JSONReference strings.
95
+
96
+ JSONReference
97
+ - "$" HexDigits
98
+
99
+ HTMLData
100
+ - ByteSize (UTF8 encoded HTML)
101
+
102
+ BlobData
103
+ - ByteSize (Binary Data)
104
+
105
+ ByteSize
106
+ - (unsigned 32-bit integer)
107
+ */
108
+ // TODO: Implement HTMLData, BlobData and URLData.
109
+
110
+ var stringify = JSON.stringify;
111
+ function createRequest(model, destination) {
112
+ var pingedSegments = [];
113
+ var request = {
114
+ destination: destination,
115
+ nextChunkId: 0,
116
+ pendingChunks: 0,
117
+ pingedSegments: pingedSegments,
118
+ completedJSONChunks: [],
119
+ completedErrorChunks: [],
120
+ flowing: false,
121
+ toJSON: function (key, value) {
122
+ return resolveModelToJSON(request, value);
123
+ }
124
+ };
125
+ request.pendingChunks++;
126
+ var rootSegment = createSegment(request, model);
127
+ pingedSegments.push(rootSegment);
128
+ return request;
129
+ }
130
+
131
+ function attemptResolveModelComponent(element) {
132
+ var type = element.type;
133
+ var props = element.props;
134
+
135
+ if (typeof type === 'function') {
136
+ // This is a nested view model.
137
+ return type(props);
138
+ } else if (typeof type === 'string') {
139
+ // This is a host element. E.g. HTML.
140
+ return renderHostChildrenToString(element);
141
+ } else {
142
+ throw new Error('Unsupported type.');
143
+ }
144
+ }
145
+
146
+ function pingSegment(request, segment) {
147
+ var pingedSegments = request.pingedSegments;
148
+ pingedSegments.push(segment);
149
+
150
+ if (pingedSegments.length === 1) {
151
+ scheduleWork(function () {
152
+ return performWork(request);
153
+ });
154
+ }
155
+ }
156
+
157
+ function createSegment(request, model) {
158
+ var id = request.nextChunkId++;
159
+ var segment = {
160
+ id: id,
161
+ model: model,
162
+ ping: function () {
163
+ return pingSegment(request, segment);
164
+ }
165
+ };
166
+ return segment;
167
+ }
168
+
169
+ function serializeIDRef(id) {
170
+ return '$' + id.toString(16);
171
+ }
172
+
173
+ function serializeRowHeader(tag, id) {
174
+ return tag + id.toString(16) + ':';
175
+ }
176
+
177
+ function escapeStringValue(value) {
178
+ if (value[0] === '$') {
179
+ // We need to escape $ prefixed strings since we use that to encode
180
+ // references to IDs.
181
+ return '$' + value;
182
+ } else {
183
+ return value;
184
+ }
185
+ }
186
+
187
+ function resolveModelToJSON(request, value) {
188
+ if (typeof value === 'string') {
189
+ return escapeStringValue(value);
190
+ }
191
+
192
+ while (typeof value === 'object' && value !== null && value.$$typeof === REACT_ELEMENT_TYPE) {
193
+ var element = value;
194
+
195
+ try {
196
+ value = attemptResolveModelComponent(element);
197
+ } catch (x) {
198
+ if (typeof x === 'object' && x !== null && typeof x.then === 'function') {
199
+ // Something suspended, we'll need to create a new segment and resolve it later.
200
+ request.pendingChunks++;
201
+ var newSegment = createSegment(request, element);
202
+ var ping = newSegment.ping;
203
+ x.then(ping, ping);
204
+ return serializeIDRef(newSegment.id);
205
+ } else {
206
+ request.pendingChunks++;
207
+ var errorId = request.nextChunkId++;
208
+ emitErrorChunk(request, errorId, x);
209
+ return serializeIDRef(errorId);
210
+ }
211
+ }
212
+ }
213
+
214
+ return value;
215
+ }
216
+
217
+ function emitErrorChunk(request, id, error) {
218
+ // TODO: We should not leak error messages to the client in prod.
219
+ // Give this an error code instead and log on the server.
220
+ // We can serialize the error in DEV as a convenience.
221
+ var message;
222
+ var stack = '';
223
+
224
+ try {
225
+ if (error instanceof Error) {
226
+ message = '' + error.message;
227
+ stack = '' + error.stack;
228
+ } else {
229
+ message = 'Error: ' + error;
230
+ }
231
+ } catch (x) {
232
+ message = 'An error occurred but serializing the error message failed.';
233
+ }
234
+
235
+ var errorInfo = {
236
+ message: message,
237
+ stack: stack
238
+ };
239
+ var row = serializeRowHeader('E', id) + stringify(errorInfo) + '\n';
240
+ request.completedErrorChunks.push(convertStringToBuffer(row));
241
+ }
242
+
243
+ function retrySegment(request, segment) {
244
+ var value = segment.model;
245
+
246
+ try {
247
+ while (typeof value === 'object' && value !== null && value.$$typeof === REACT_ELEMENT_TYPE) {
248
+ // If this is a nested model, there's no need to create another chunk,
249
+ // we can reuse the existing one and try again.
250
+ var element = value;
251
+ segment.model = element;
252
+ value = attemptResolveModelComponent(element);
253
+ }
254
+
255
+ var json = stringify(value, request.toJSON);
256
+ var row;
257
+ var id = segment.id;
258
+
259
+ if (id === 0) {
260
+ row = json + '\n';
261
+ } else {
262
+ row = serializeRowHeader('J', id) + json + '\n';
263
+ }
264
+
265
+ request.completedJSONChunks.push(convertStringToBuffer(row));
266
+ } catch (x) {
267
+ if (typeof x === 'object' && x !== null && typeof x.then === 'function') {
268
+ // Something suspended again, let's pick it back up later.
269
+ var ping = segment.ping;
270
+ x.then(ping, ping);
271
+ return;
272
+ } else {
273
+ // This errored, we need to serialize this error to the
274
+ emitErrorChunk(request, segment.id, x);
275
+ }
276
+ }
277
+ }
278
+
279
+ function performWork(request) {
280
+ var pingedSegments = request.pingedSegments;
281
+ request.pingedSegments = [];
282
+
283
+ for (var i = 0; i < pingedSegments.length; i++) {
284
+ var segment = pingedSegments[i];
285
+ retrySegment(request, segment);
286
+ }
287
+
288
+ if (request.flowing) {
289
+ flushCompletedChunks(request);
290
+ }
291
+ }
292
+
293
+ var reentrant = false;
294
+
295
+ function flushCompletedChunks(request) {
296
+ if (reentrant) {
297
+ return;
298
+ }
299
+
300
+ reentrant = true;
301
+ var destination = request.destination;
302
+ try {
303
+ var jsonChunks = request.completedJSONChunks;
304
+ var i = 0;
305
+
306
+ for (; i < jsonChunks.length; i++) {
307
+ request.pendingChunks--;
308
+ var chunk = jsonChunks[i];
309
+
310
+ if (!writeChunk(destination, chunk)) {
311
+ request.flowing = false;
312
+ i++;
313
+ break;
314
+ }
315
+ }
316
+
317
+ jsonChunks.splice(0, i);
318
+ var errorChunks = request.completedErrorChunks;
319
+ i = 0;
320
+
321
+ for (; i < errorChunks.length; i++) {
322
+ request.pendingChunks--;
323
+ var _chunk = errorChunks[i];
324
+
325
+ if (!writeChunk(destination, _chunk)) {
326
+ request.flowing = false;
327
+ i++;
328
+ break;
329
+ }
330
+ }
331
+
332
+ errorChunks.splice(0, i);
333
+ } finally {
334
+ reentrant = false;
335
+
336
+ }
337
+
338
+ if (request.pendingChunks === 0) {
339
+ // We're done.
340
+ close(destination);
341
+ }
342
+ }
343
+
344
+ function startWork(request) {
345
+ request.flowing = true;
346
+ scheduleWork(function () {
347
+ return performWork(request);
348
+ });
349
+ }
350
+ function startFlowing(request) {
351
+ request.flowing = true;
352
+ flushCompletedChunks(request);
353
+ }
354
+
355
+ // This file intentionally does *not* have the Flow annotation.
356
+ // Don't add it. See `./inline-typed.js` for an explanation.
357
+
358
+ function renderToReadableStream(model) {
359
+ var request;
360
+ return new ReadableStream({
361
+ start: function (controller) {
362
+ request = createRequest(model, controller);
363
+ startWork(request);
364
+ },
365
+ pull: function (controller) {
366
+ startFlowing(request);
367
+ },
368
+ cancel: function (reason) {}
369
+ });
370
+ }
371
+
372
+ var ReactFlightDOMServerBrowser = {
373
+ renderToReadableStream: renderToReadableStream
374
+ };
375
+
376
+ var ReactFlightDOMServerBrowser$1 = Object.freeze({
377
+ default: ReactFlightDOMServerBrowser
378
+ });
379
+
380
+ var ReactFlightDOMServerBrowser$2 = ( ReactFlightDOMServerBrowser$1 && ReactFlightDOMServerBrowser ) || ReactFlightDOMServerBrowser$1;
381
+
382
+ // TODO: decide on the top-level export form.
383
+ // This is hacky but makes it work with both Rollup and Jest
384
+
385
+
386
+ var unstableFlightServer_browser = ReactFlightDOMServerBrowser$2.default || ReactFlightDOMServerBrowser$2;
387
+
388
+ return unstableFlightServer_browser;
389
+
390
+ })));
@@ -0,0 +1,14 @@
1
+ /** @license React v16.12.0
2
+ * react-dom-unstable-flight-server.browser.production.min.js
3
+ *
4
+ * Copyright (c) Facebook, Inc. and its affiliates.
5
+ *
6
+ * This source code is licensed under the MIT license found in the
7
+ * LICENSE file in the root directory of this source tree.
8
+ */
9
+ 'use strict';(function(k,g){"object"===typeof exports&&"undefined"!==typeof module?module.exports=g(require("react-dom/server")):"function"===typeof define&&define.amd?define(["react-dom/server"],g):k.ReactFlightDOMServer=g(k.ReactDOMServer)})(this,function(k){function g(a,b){var c=[],d={destination:b,nextChunkId:0,pendingChunks:0,pingedSegments:c,completedJSONChunks:[],completedErrorChunks:[],flowing:!1,toJSON:function(a,b){return z(d,b)}};d.pendingChunks++;a=p(d,a);c.push(a);return d}function q(a){var b=
10
+ a.type,c=a.props;if("function"===typeof b)return b(c);if("string"===typeof b)return k.renderToStaticMarkup(a);throw Error("Unsupported type.");}function p(a,b){var c={id:a.nextChunkId++,model:b,ping:function(){var b=a.pingedSegments;b.push(c);1===b.length&&r(a)}};return c}function z(a,b){if("string"===typeof b)return a="$"===b[0]?"$"+b:b,a;for(;"object"===typeof b&&null!==b&&b.$$typeof===t;){var c=b;try{b=q(c)}catch(d){if("object"===typeof d&&null!==d&&"function"===typeof d.then)return a.pendingChunks++,
11
+ a=p(a,c),b=a.ping,d.then(b,b),"$"+a.id.toString(16);a.pendingChunks++;b=a.nextChunkId++;u(a,b,d);return"$"+b.toString(16)}}return b}function u(a,b,c){var d="";try{if(c instanceof Error){var e=""+c.message;d=""+c.stack}else e="Error: "+c}catch(f){e="An error occurred but serializing the error message failed."}c={message:e,stack:d};b="E"+b.toString(16)+":"+v(c)+"\n";a.completedErrorChunks.push(w.encode(b))}function r(a){var b=a.pingedSegments;a.pingedSegments=[];for(var c=0;c<b.length;c++){var d=void 0,
12
+ e=a,f=b[c],l=f.model;try{for(;"object"===typeof l&&null!==l&&l.$$typeof===t;){var g=l;f.model=g;l=q(g)}var h=v(l,e.toJSON),k=f.id;d=0===k?h+"\n":"J"+k.toString(16)+":"+h+"\n";e.completedJSONChunks.push(w.encode(d))}catch(m){"object"===typeof m&&null!==m&&"function"===typeof m.then?(d=f.ping,m.then(d,d)):u(e,f.id,m)}}a.flowing&&x(a)}function x(a){if(!n){n=!0;var b=a.destination;try{for(var c=a.completedJSONChunks,d=0;d<c.length;d++){a.pendingChunks--;var e=b;e.enqueue(c[d]);if(!(0<e.desiredSize)){a.flowing=
13
+ !1;d++;break}}c.splice(0,d);var f=a.completedErrorChunks;for(d=0;d<f.length;d++)if(a.pendingChunks--,c=b,c.enqueue(f[d]),!(0<c.desiredSize)){a.flowing=!1;d++;break}f.splice(0,d)}finally{n=!1}0===a.pendingChunks&&b.close()}}var w=new TextEncoder,t="function"===typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103,v=JSON.stringify,n=!1,h={renderToReadableStream:function(a){var b;return new ReadableStream({start:function(c){c=b=g(a,c);c.flowing=!0;r(c)},pull:function(a){a=b;a.flowing=!0;x(a)},
14
+ cancel:function(a){}})}},y={default:h};h=y&&h||y;return h.default||h});
@@ -1,4 +1,4 @@
1
- /** @license React v16.10.0
1
+ /** @license React v16.12.0
2
2
  * react-dom-unstable-native-dependencies.development.js
3
3
  *
4
4
  * Copyright (c) Facebook, Inc. and its affiliates.
@@ -16,16 +16,8 @@
16
16
  }(this, (function (ReactDOM,React) { 'use strict';
17
17
 
18
18
  // Do not require this module directly! Use normal `invariant` calls with
19
- // template literal strings. The messages will be converted to ReactError during
20
- // build, and in production they will be minified.
21
-
22
- // Do not require this module directly! Use normal `invariant` calls with
23
- // template literal strings. The messages will be converted to ReactError during
24
- // build, and in production they will be minified.
25
- function ReactError(error) {
26
- error.name = 'Invariant Violation';
27
- return error;
28
- }
19
+ // template literal strings. The messages will be replaced with error codes
20
+ // during build.
29
21
 
30
22
  /**
31
23
  * Use invariant() to assert state which your program assumes to be true.
@@ -253,13 +245,11 @@ function executeDirectDispatch(event) {
253
245
  var dispatchListener = event._dispatchListeners;
254
246
  var dispatchInstance = event._dispatchInstances;
255
247
 
256
- (function () {
257
- if (!!Array.isArray(dispatchListener)) {
258
- {
259
- throw ReactError(Error("executeDirectDispatch(...): Invalid `event`."));
260
- }
248
+ if (!!Array.isArray(dispatchListener)) {
249
+ {
250
+ throw Error("executeDirectDispatch(...): Invalid `event`.");
261
251
  }
262
- })();
252
+ }
263
253
 
264
254
  event.currentTarget = dispatchListener ? getNodeFromInstance$1(dispatchInstance) : null;
265
255
  var res = dispatchListener ? dispatchListener(event) : null;
@@ -469,13 +459,11 @@ function traverseTwoPhase(inst, fn, arg) {
469
459
  */
470
460
 
471
461
  function accumulateInto(current, next) {
472
- (function () {
473
- if (!(next != null)) {
474
- {
475
- throw ReactError(Error("accumulateInto(...): Accumulated items must not be null or undefined."));
476
- }
462
+ if (!(next != null)) {
463
+ {
464
+ throw Error("accumulateInto(...): Accumulated items must not be null or undefined.");
477
465
  }
478
- })();
466
+ }
479
467
 
480
468
  if (current == null) {
481
469
  return next;
@@ -599,13 +587,11 @@ function getListener(inst, registrationName) {
599
587
  return null;
600
588
  }
601
589
 
602
- (function () {
603
- if (!(!listener || typeof listener === 'function')) {
604
- {
605
- throw ReactError(Error("Expected `" + registrationName + "` listener to be a function, instead got a value of `" + typeof listener + "` type."));
606
- }
590
+ if (!(!listener || typeof listener === 'function')) {
591
+ {
592
+ throw Error("Expected `" + registrationName + "` listener to be a function, instead got a value of `" + typeof listener + "` type.");
607
593
  }
608
- })();
594
+ }
609
595
 
610
596
  return listener;
611
597
  }
@@ -981,13 +967,11 @@ function getPooledEvent(dispatchConfig, targetInst, nativeEvent, nativeInst) {
981
967
  function releasePooledEvent(event) {
982
968
  var EventConstructor = this;
983
969
 
984
- (function () {
985
- if (!(event instanceof EventConstructor)) {
986
- {
987
- throw ReactError(Error("Trying to release an event instance into a pool of a different type."));
988
- }
970
+ if (!(event instanceof EventConstructor)) {
971
+ {
972
+ throw Error("Trying to release an event instance into a pool of a different type.");
989
973
  }
990
- })();
974
+ }
991
975
 
992
976
  event.destructor();
993
977
 
@@ -1099,13 +1083,11 @@ function resetTouchRecord(touchRecord, touch) {
1099
1083
  function getTouchIdentifier(_ref) {
1100
1084
  var identifier = _ref.identifier;
1101
1085
 
1102
- (function () {
1103
- if (!(identifier != null)) {
1104
- {
1105
- throw ReactError(Error("Touch object is missing identifier."));
1106
- }
1086
+ if (!(identifier != null)) {
1087
+ {
1088
+ throw Error("Touch object is missing identifier.");
1107
1089
  }
1108
- })();
1090
+ }
1109
1091
 
1110
1092
  {
1111
1093
  !(identifier <= MAX_TOUCH_BANK) ? warningWithoutStack$1(false, 'Touch identifier %s is greater than maximum supported %s which causes ' + 'performance issues backfilling array locations for all of the indices.', identifier, MAX_TOUCH_BANK) : void 0;
@@ -1224,13 +1206,11 @@ var ResponderTouchHistoryStore = {
1224
1206
  */
1225
1207
 
1226
1208
  function accumulate(current, next) {
1227
- (function () {
1228
- if (!(next != null)) {
1229
- {
1230
- throw ReactError(Error("accumulate(...): Accumulated items must not be null or undefined."));
1231
- }
1209
+ if (!(next != null)) {
1210
+ {
1211
+ throw Error("accumulate(...): Accumulated items must not be null or undefined.");
1232
1212
  }
1233
- })();
1213
+ }
1234
1214
 
1235
1215
  if (current == null) {
1236
1216
  return next;
@@ -1678,7 +1658,7 @@ var ResponderEventPlugin = {
1678
1658
  * `touchEnd`. On certain platforms, this means that a native scroll has
1679
1659
  * assumed control and the original touch targets are destroyed.
1680
1660
  */
1681
- extractEvents: function (topLevelType, eventSystemFlags, targetInst, nativeEvent, nativeEventTarget) {
1661
+ extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags) {
1682
1662
  if (isStartish(topLevelType)) {
1683
1663
  trackedTouchCount += 1;
1684
1664
  } else if (isEndish(topLevelType)) {
@@ -1,4 +1,4 @@
1
- /** @license React v16.10.0
1
+ /** @license React v16.12.0
2
2
  * react-dom-unstable-native-dependencies.production.min.js
3
3
  *
4
4
  * Copyright (c) Facebook, Inc. and its affiliates.
@@ -6,24 +6,24 @@
6
6
  * This source code is licensed under the MIT license found in the
7
7
  * LICENSE file in the root directory of this source tree.
8
8
  */
9
- 'use strict';(function(h,l){"object"===typeof exports&&"undefined"!==typeof module?module.exports=l(require("react-dom"),require("react")):"function"===typeof define&&define.amd?define(["react-dom","react"],l):h.ReactDOMUnstableNativeDependencies=l(h.ReactDOM,h.React)})(this,function(h,l){function w(a){for(var b=a.message,c="https://reactjs.org/docs/error-decoder.html?invariant="+b,d=1;d<arguments.length;d++)c+="&args[]="+encodeURIComponent(arguments[d]);a.message="Minified React error #"+b+"; visit "+
10
- c+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ";return a}function L(a){var b=a._dispatchListeners,c=a._dispatchInstances;if(Array.isArray(b))throw w(Error(103));a.currentTarget=b?M(c):null;b=b?b(a):null;a.currentTarget=null;a._dispatchListeners=null;a._dispatchInstances=null;return b}function r(a){do a=a.return;while(a&&5!==a.tag);return a?a:null}function N(a,b,c){for(var d=[];a;)d.push(a),a=r(a);for(a=d.length;0<a--;)b(d[a],"captured",
11
- c);for(a=0;a<d.length;a++)b(d[a],"bubbled",c)}function B(a,b){if(null==b)throw w(Error(30));if(null==a)return b;if(Array.isArray(a)){if(Array.isArray(b))return a.push.apply(a,b),a;a.push(b);return a}return Array.isArray(b)?[a].concat(b):[a,b]}function u(a,b,c){Array.isArray(a)?a.forEach(b,c):a&&b.call(c,a)}function O(a,b){var c=a.stateNode;if(!c)return null;var d=P(c);if(!d)return null;c=d[b];a:switch(b){case "onClick":case "onClickCapture":case "onDoubleClick":case "onDoubleClickCapture":case "onMouseDown":case "onMouseDownCapture":case "onMouseMove":case "onMouseMoveCapture":case "onMouseUp":case "onMouseUpCapture":(d=
12
- !d.disabled)||(a=a.type,d=!("button"===a||"input"===a||"select"===a||"textarea"===a));a=!d;break a;default:a=!1}if(a)return null;if(c&&"function"!==typeof c)throw w(Error(231),b,typeof c);return c}function Q(a,b,c){if(b=O(a,c.dispatchConfig.phasedRegistrationNames[b]))c._dispatchListeners=B(c._dispatchListeners,b),c._dispatchInstances=B(c._dispatchInstances,a)}function X(a){a&&a.dispatchConfig.phasedRegistrationNames&&N(a._targetInst,Q,a)}function Y(a){if(a&&a.dispatchConfig.phasedRegistrationNames){var b=
13
- a._targetInst;b=b?r(b):null;N(b,Q,a)}}function x(a){if(a&&a.dispatchConfig.registrationName){var b=a._targetInst;if(b&&a&&a.dispatchConfig.registrationName){var c=O(b,a.dispatchConfig.registrationName);c&&(a._dispatchListeners=B(a._dispatchListeners,c),a._dispatchInstances=B(a._dispatchInstances,b))}}}function C(){return!0}function D(){return!1}function y(a,b,c,d){this.dispatchConfig=a;this._targetInst=b;this.nativeEvent=c;a=this.constructor.Interface;for(var g in a)a.hasOwnProperty(g)&&((b=a[g])?
14
- this[g]=b(c):"target"===g?this.target=d:this[g]=c[g]);this.isDefaultPrevented=(null!=c.defaultPrevented?c.defaultPrevented:!1===c.returnValue)?C:D;this.isPropagationStopped=D;return this}function Z(a,b,c,d){if(this.eventPool.length){var g=this.eventPool.pop();this.call(g,a,b,c,d);return g}return new this(a,b,c,d)}function aa(a){if(!(a instanceof this))throw w(Error(279));a.destructor();10>this.eventPool.length&&this.eventPool.push(a)}function R(a){a.eventPool=[];a.getPooled=Z;a.release=aa}function z(a){return"touchstart"===
15
- a||"mousedown"===a}function E(a){return"touchmove"===a||"mousemove"===a}function F(a){return"touchend"===a||"touchcancel"===a||"mouseup"===a}function k(a){return a.timeStamp||a.timestamp}function I(a){a=a.identifier;if(null==a)throw w(Error(138));return a}function ba(a){var b=I(a),c=p[b];c?(c.touchActive=!0,c.startPageX=a.pageX,c.startPageY=a.pageY,c.startTimeStamp=k(a),c.currentPageX=a.pageX,c.currentPageY=a.pageY,c.currentTimeStamp=k(a),c.previousPageX=a.pageX,c.previousPageY=a.pageY,c.previousTimeStamp=
16
- k(a)):(c={touchActive:!0,startPageX:a.pageX,startPageY:a.pageY,startTimeStamp:k(a),currentPageX:a.pageX,currentPageY:a.pageY,currentTimeStamp:k(a),previousPageX:a.pageX,previousPageY:a.pageY,previousTimeStamp:k(a)},p[b]=c);q.mostRecentTimeStamp=k(a)}function ca(a){var b=p[I(a)];b?(b.touchActive=!0,b.previousPageX=b.currentPageX,b.previousPageY=b.currentPageY,b.previousTimeStamp=b.currentTimeStamp,b.currentPageX=a.pageX,b.currentPageY=a.pageY,b.currentTimeStamp=k(a),q.mostRecentTimeStamp=k(a)):console.warn("Cannot record touch move without a touch start.\nTouch Move: %s\n",
17
- "Touch Bank: %s",S(a),T())}function da(a){var b=p[I(a)];b?(b.touchActive=!1,b.previousPageX=b.currentPageX,b.previousPageY=b.currentPageY,b.previousTimeStamp=b.currentTimeStamp,b.currentPageX=a.pageX,b.currentPageY=a.pageY,b.currentTimeStamp=k(a),q.mostRecentTimeStamp=k(a)):console.warn("Cannot record touch end without a touch start.\nTouch End: %s\n","Touch Bank: %s",S(a),T())}function S(a){return JSON.stringify({identifier:a.identifier,pageX:a.pageX,pageY:a.pageY,timestamp:k(a)})}function T(){var a=
18
- JSON.stringify(p.slice(0,20));20<p.length&&(a+=" (original size: "+p.length+")");return a}function A(a,b){if(null==b)throw w(Error(334));return null==a?b:Array.isArray(a)?a.concat(b):Array.isArray(b)?[a].concat(b):[a,b]}var P=null,U=null,M=null,J=l.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.assign;J(y.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():"unknown"!==typeof a.returnValue&&(a.returnValue=!1),this.isDefaultPrevented=
19
- C)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():"unknown"!==typeof a.cancelBubble&&(a.cancelBubble=!0),this.isPropagationStopped=C)},persist:function(){this.isPersistent=C},isPersistent:D,destructor:function(){var a=this.constructor.Interface,b;for(b in a)this[b]=null;this.nativeEvent=this._targetInst=this.dispatchConfig=null;this.isPropagationStopped=this.isDefaultPrevented=D;this._dispatchInstances=this._dispatchListeners=null}});y.Interface={type:null,
20
- target:null,currentTarget:function(){return null},eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null};y.extend=function(a){function b(){return c.apply(this,arguments)}var c=this,d=function(){};d.prototype=c.prototype;d=new d;J(d,b.prototype);b.prototype=d;b.prototype.constructor=b;b.Interface=J({},c.Interface,a);b.extend=c.extend;R(b);return b};R(y);var v=y.extend({touchHistory:function(a){return null}});l=["touchstart",
21
- "mousedown"];var V=["touchmove","mousemove"],W=["touchcancel","touchend","mouseup"],p=[],q={touchBank:p,numberActiveTouches:0,indexOfSingleActiveTouch:-1,mostRecentTimeStamp:0},t={recordTouchTrack:function(a,b){if(E(a))b.changedTouches.forEach(ca);else if(z(a))b.changedTouches.forEach(ba),q.numberActiveTouches=b.touches.length,1===q.numberActiveTouches&&(q.indexOfSingleActiveTouch=b.touches[0].identifier);else if(F(a)&&(b.changedTouches.forEach(da),q.numberActiveTouches=b.touches.length,1===q.numberActiveTouches))for(a=
22
- 0;a<p.length;a++)if(b=p[a],null!=b&&b.touchActive){q.indexOfSingleActiveTouch=a;break}},touchHistory:q},g=null,G=0,K=function(a,b){var c=g;g=a;if(null!==H.GlobalResponderHandler)H.GlobalResponderHandler.onChange(c,a,b)},m={startShouldSetResponder:{phasedRegistrationNames:{bubbled:"onStartShouldSetResponder",captured:"onStartShouldSetResponderCapture"},dependencies:l},scrollShouldSetResponder:{phasedRegistrationNames:{bubbled:"onScrollShouldSetResponder",captured:"onScrollShouldSetResponderCapture"},
23
- dependencies:["scroll"]},selectionChangeShouldSetResponder:{phasedRegistrationNames:{bubbled:"onSelectionChangeShouldSetResponder",captured:"onSelectionChangeShouldSetResponderCapture"},dependencies:["selectionchange"]},moveShouldSetResponder:{phasedRegistrationNames:{bubbled:"onMoveShouldSetResponder",captured:"onMoveShouldSetResponderCapture"},dependencies:V},responderStart:{registrationName:"onResponderStart",dependencies:l},responderMove:{registrationName:"onResponderMove",dependencies:V},responderEnd:{registrationName:"onResponderEnd",
24
- dependencies:W},responderRelease:{registrationName:"onResponderRelease",dependencies:W},responderTerminationRequest:{registrationName:"onResponderTerminationRequest",dependencies:[]},responderGrant:{registrationName:"onResponderGrant",dependencies:[]},responderReject:{registrationName:"onResponderReject",dependencies:[]},responderTerminate:{registrationName:"onResponderTerminate",dependencies:[]}},H={_getResponder:function(){return g},eventTypes:m,extractEvents:function(a,b,c,d,k){if(z(a))G+=1;else if(F(a))if(0<=
25
- G)--G;else return console.warn("Ended a touch event which was not counted in `trackedTouchCount`."),null;t.recordTouchTrack(a,d);if(c&&("scroll"===a&&!d.responderIgnoreScroll||0<G&&"selectionchange"===a||z(a)||E(a))){b=z(a)?m.startShouldSetResponder:E(a)?m.moveShouldSetResponder:"selectionchange"===a?m.selectionChangeShouldSetResponder:m.scrollShouldSetResponder;if(g)b:{var e=g;for(var f=0,h=e;h;h=r(h))f++;h=0;for(var l=c;l;l=r(l))h++;for(;0<f-h;)e=r(e),f--;for(;0<h-f;)c=r(c),h--;for(;f--;){if(e===
26
- c||e===c.alternate)break b;e=r(e);c=r(c)}e=null}else e=c;c=e===g;e=v.getPooled(b,e,d,k);e.touchHistory=t.touchHistory;c?u(e,Y):u(e,X);b:{b=e._dispatchListeners;c=e._dispatchInstances;if(Array.isArray(b))for(f=0;f<b.length&&!e.isPropagationStopped();f++){if(b[f](e,c[f])){b=c[f];break b}}else if(b&&b(e,c)){b=c;break b}b=null}e._dispatchInstances=null;e._dispatchListeners=null;e.isPersistent()||e.constructor.release(e);if(b&&b!==g)if(e=v.getPooled(m.responderGrant,b,d,k),e.touchHistory=t.touchHistory,
27
- u(e,x),c=!0===L(e),g)if(f=v.getPooled(m.responderTerminationRequest,g,d,k),f.touchHistory=t.touchHistory,u(f,x),h=!f._dispatchListeners||L(f),f.isPersistent()||f.constructor.release(f),h){f=v.getPooled(m.responderTerminate,g,d,k);f.touchHistory=t.touchHistory;u(f,x);var n=A(n,[e,f]);K(b,c)}else b=v.getPooled(m.responderReject,b,d,k),b.touchHistory=t.touchHistory,u(b,x),n=A(n,b);else n=A(n,e),K(b,c);else n=null}else n=null;b=g&&z(a);e=g&&E(a);c=g&&F(a);if(b=b?m.responderStart:e?m.responderMove:c?m.responderEnd:
28
- null)b=v.getPooled(b,g,d,k),b.touchHistory=t.touchHistory,u(b,x),n=A(n,b);b=g&&"touchcancel"===a;if(a=g&&!b&&F(a))a:{if((a=d.touches)&&0!==a.length)for(e=0;e<a.length;e++)if(c=a[e].target,null!==c&&void 0!==c&&0!==c){f=U(c);b:{for(c=g;f;){if(c===f||c===f.alternate){c=!0;break b}f=r(f)}c=!1}if(c){a=!1;break a}}a=!0}if(a=b?m.responderTerminate:a?m.responderRelease:null)d=v.getPooled(a,g,d,k),d.touchHistory=t.touchHistory,u(d,x),n=A(n,d),K(null);return n},GlobalResponderHandler:null,injection:{injectGlobalResponderHandler:function(a){H.GlobalResponderHandler=
29
- a}}};h=h.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Events;l=h[3];(function(a,b,c){P=a;U=b;M=c})(h[2],h[0],h[1]);return{ResponderEventPlugin:H,ResponderTouchHistoryStore:t,injectEventPluginsByName:l}});
9
+ 'use strict';(function(l,p){"object"===typeof exports&&"undefined"!==typeof module?module.exports=p(require("react-dom"),require("react")):"function"===typeof define&&define.amd?define(["react-dom","react"],p):l.ReactDOMUnstableNativeDependencies=p(l.ReactDOM,l.React)})(this,function(l,p){function x(a){for(var b="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=1;c<arguments.length;c++)b+="&args[]="+encodeURIComponent(arguments[c]);return"Minified React error #"+a+"; visit "+b+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}
10
+ function M(a){var b=a._dispatchListeners,c=a._dispatchInstances;if(Array.isArray(b))throw Error(x(103));a.currentTarget=b?N(c):null;b=b?b(a):null;a.currentTarget=null;a._dispatchListeners=null;a._dispatchInstances=null;return b}function t(a){do a=a.return;while(a&&5!==a.tag);return a?a:null}function O(a,b,c){for(var f=[];a;)f.push(a),a=t(a);for(a=f.length;0<a--;)b(f[a],"captured",c);for(a=0;a<f.length;a++)b(f[a],"bubbled",c)}function C(a,b){if(null==b)throw Error(x(30));if(null==a)return b;if(Array.isArray(a)){if(Array.isArray(b))return a.push.apply(a,
11
+ b),a;a.push(b);return a}return Array.isArray(b)?[a].concat(b):[a,b]}function v(a,b,c){Array.isArray(a)?a.forEach(b,c):a&&b.call(c,a)}function P(a,b){var c=a.stateNode;if(!c)return null;var f=Q(c);if(!f)return null;c=f[b];a:switch(b){case "onClick":case "onClickCapture":case "onDoubleClick":case "onDoubleClickCapture":case "onMouseDown":case "onMouseDownCapture":case "onMouseMove":case "onMouseMoveCapture":case "onMouseUp":case "onMouseUpCapture":(f=!f.disabled)||(a=a.type,f=!("button"===a||"input"===
12
+ a||"select"===a||"textarea"===a));a=!f;break a;default:a=!1}if(a)return null;if(c&&"function"!==typeof c)throw Error(x(231,b,typeof c));return c}function R(a,b,c){if(b=P(a,c.dispatchConfig.phasedRegistrationNames[b]))c._dispatchListeners=C(c._dispatchListeners,b),c._dispatchInstances=C(c._dispatchInstances,a)}function Y(a){a&&a.dispatchConfig.phasedRegistrationNames&&O(a._targetInst,R,a)}function Z(a){if(a&&a.dispatchConfig.phasedRegistrationNames){var b=a._targetInst;b=b?t(b):null;O(b,R,a)}}function y(a){if(a&&
13
+ a.dispatchConfig.registrationName){var b=a._targetInst;if(b&&a&&a.dispatchConfig.registrationName){var c=P(b,a.dispatchConfig.registrationName);c&&(a._dispatchListeners=C(a._dispatchListeners,c),a._dispatchInstances=C(a._dispatchInstances,b))}}}function D(){return!0}function E(){return!1}function z(a,b,c,f){this.dispatchConfig=a;this._targetInst=b;this.nativeEvent=c;a=this.constructor.Interface;for(var d in a)a.hasOwnProperty(d)&&((b=a[d])?this[d]=b(c):"target"===d?this.target=f:this[d]=c[d]);this.isDefaultPrevented=
14
+ (null!=c.defaultPrevented?c.defaultPrevented:!1===c.returnValue)?D:E;this.isPropagationStopped=E;return this}function aa(a,b,c,f){if(this.eventPool.length){var d=this.eventPool.pop();this.call(d,a,b,c,f);return d}return new this(a,b,c,f)}function ba(a){if(!(a instanceof this))throw Error(x(279));a.destructor();10>this.eventPool.length&&this.eventPool.push(a)}function S(a){a.eventPool=[];a.getPooled=aa;a.release=ba}function A(a){return"touchstart"===a||"mousedown"===a}function F(a){return"touchmove"===
15
+ a||"mousemove"===a}function G(a){return"touchend"===a||"touchcancel"===a||"mouseup"===a}function h(a){return a.timeStamp||a.timestamp}function J(a){a=a.identifier;if(null==a)throw Error(x(138));return a}function ca(a){var b=J(a),c=q[b];c?(c.touchActive=!0,c.startPageX=a.pageX,c.startPageY=a.pageY,c.startTimeStamp=h(a),c.currentPageX=a.pageX,c.currentPageY=a.pageY,c.currentTimeStamp=h(a),c.previousPageX=a.pageX,c.previousPageY=a.pageY,c.previousTimeStamp=h(a)):(c={touchActive:!0,startPageX:a.pageX,
16
+ startPageY:a.pageY,startTimeStamp:h(a),currentPageX:a.pageX,currentPageY:a.pageY,currentTimeStamp:h(a),previousPageX:a.pageX,previousPageY:a.pageY,previousTimeStamp:h(a)},q[b]=c);r.mostRecentTimeStamp=h(a)}function da(a){var b=q[J(a)];b?(b.touchActive=!0,b.previousPageX=b.currentPageX,b.previousPageY=b.currentPageY,b.previousTimeStamp=b.currentTimeStamp,b.currentPageX=a.pageX,b.currentPageY=a.pageY,b.currentTimeStamp=h(a),r.mostRecentTimeStamp=h(a)):console.warn("Cannot record touch move without a touch start.\nTouch Move: %s\n",
17
+ "Touch Bank: %s",T(a),U())}function ea(a){var b=q[J(a)];b?(b.touchActive=!1,b.previousPageX=b.currentPageX,b.previousPageY=b.currentPageY,b.previousTimeStamp=b.currentTimeStamp,b.currentPageX=a.pageX,b.currentPageY=a.pageY,b.currentTimeStamp=h(a),r.mostRecentTimeStamp=h(a)):console.warn("Cannot record touch end without a touch start.\nTouch End: %s\n","Touch Bank: %s",T(a),U())}function T(a){return JSON.stringify({identifier:a.identifier,pageX:a.pageX,pageY:a.pageY,timestamp:h(a)})}function U(){var a=
18
+ JSON.stringify(q.slice(0,20));20<q.length&&(a+=" (original size: "+q.length+")");return a}function B(a,b){if(null==b)throw Error(x(334));return null==a?b:Array.isArray(a)?a.concat(b):Array.isArray(b)?[a].concat(b):[a,b]}var Q=null,V=null,N=null,K=p.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.assign;K(z.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():"unknown"!==typeof a.returnValue&&(a.returnValue=!1),this.isDefaultPrevented=
19
+ D)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():"unknown"!==typeof a.cancelBubble&&(a.cancelBubble=!0),this.isPropagationStopped=D)},persist:function(){this.isPersistent=D},isPersistent:E,destructor:function(){var a=this.constructor.Interface,b;for(b in a)this[b]=null;this.nativeEvent=this._targetInst=this.dispatchConfig=null;this.isPropagationStopped=this.isDefaultPrevented=E;this._dispatchInstances=this._dispatchListeners=null}});z.Interface={type:null,
20
+ target:null,currentTarget:function(){return null},eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null};z.extend=function(a){function b(){return c.apply(this,arguments)}var c=this,f=function(){};f.prototype=c.prototype;f=new f;K(f,b.prototype);b.prototype=f;b.prototype.constructor=b;b.Interface=K({},c.Interface,a);b.extend=c.extend;S(b);return b};S(z);var w=z.extend({touchHistory:function(a){return null}});p=["touchstart",
21
+ "mousedown"];var W=["touchmove","mousemove"],X=["touchcancel","touchend","mouseup"],q=[],r={touchBank:q,numberActiveTouches:0,indexOfSingleActiveTouch:-1,mostRecentTimeStamp:0},u={recordTouchTrack:function(a,b){if(F(a))b.changedTouches.forEach(da);else if(A(a))b.changedTouches.forEach(ca),r.numberActiveTouches=b.touches.length,1===r.numberActiveTouches&&(r.indexOfSingleActiveTouch=b.touches[0].identifier);else if(G(a)&&(b.changedTouches.forEach(ea),r.numberActiveTouches=b.touches.length,1===r.numberActiveTouches))for(a=
22
+ 0;a<q.length;a++)if(b=q[a],null!=b&&b.touchActive){r.indexOfSingleActiveTouch=a;break}},touchHistory:r},k=null,H=0,L=function(a,b){var c=k;k=a;if(null!==I.GlobalResponderHandler)I.GlobalResponderHandler.onChange(c,a,b)},m={startShouldSetResponder:{phasedRegistrationNames:{bubbled:"onStartShouldSetResponder",captured:"onStartShouldSetResponderCapture"},dependencies:p},scrollShouldSetResponder:{phasedRegistrationNames:{bubbled:"onScrollShouldSetResponder",captured:"onScrollShouldSetResponderCapture"},
23
+ dependencies:["scroll"]},selectionChangeShouldSetResponder:{phasedRegistrationNames:{bubbled:"onSelectionChangeShouldSetResponder",captured:"onSelectionChangeShouldSetResponderCapture"},dependencies:["selectionchange"]},moveShouldSetResponder:{phasedRegistrationNames:{bubbled:"onMoveShouldSetResponder",captured:"onMoveShouldSetResponderCapture"},dependencies:W},responderStart:{registrationName:"onResponderStart",dependencies:p},responderMove:{registrationName:"onResponderMove",dependencies:W},responderEnd:{registrationName:"onResponderEnd",
24
+ dependencies:X},responderRelease:{registrationName:"onResponderRelease",dependencies:X},responderTerminationRequest:{registrationName:"onResponderTerminationRequest",dependencies:[]},responderGrant:{registrationName:"onResponderGrant",dependencies:[]},responderReject:{registrationName:"onResponderReject",dependencies:[]},responderTerminate:{registrationName:"onResponderTerminate",dependencies:[]}},I={_getResponder:function(){return k},eventTypes:m,extractEvents:function(a,b,c,f,d){if(A(a))H+=1;else if(G(a))if(0<=
25
+ H)--H;else return console.warn("Ended a touch event which was not counted in `trackedTouchCount`."),null;u.recordTouchTrack(a,c);if(b&&("scroll"===a&&!c.responderIgnoreScroll||0<H&&"selectionchange"===a||A(a)||F(a))){d=A(a)?m.startShouldSetResponder:F(a)?m.moveShouldSetResponder:"selectionchange"===a?m.selectionChangeShouldSetResponder:m.scrollShouldSetResponder;if(k)b:{var e=k;for(var g=0,h=e;h;h=t(h))g++;h=0;for(var l=b;l;l=t(l))h++;for(;0<g-h;)e=t(e),g--;for(;0<h-g;)b=t(b),h--;for(;g--;){if(e===
26
+ b||e===b.alternate)break b;e=t(e);b=t(b)}e=null}else e=b;b=e===k;e=w.getPooled(d,e,c,f);e.touchHistory=u.touchHistory;b?v(e,Z):v(e,Y);b:{d=e._dispatchListeners;b=e._dispatchInstances;if(Array.isArray(d))for(g=0;g<d.length&&!e.isPropagationStopped();g++){if(d[g](e,b[g])){d=b[g];break b}}else if(d&&d(e,b)){d=b;break b}d=null}e._dispatchInstances=null;e._dispatchListeners=null;e.isPersistent()||e.constructor.release(e);if(d&&d!==k)if(e=w.getPooled(m.responderGrant,d,c,f),e.touchHistory=u.touchHistory,
27
+ v(e,y),b=!0===M(e),k)if(g=w.getPooled(m.responderTerminationRequest,k,c,f),g.touchHistory=u.touchHistory,v(g,y),h=!g._dispatchListeners||M(g),g.isPersistent()||g.constructor.release(g),h){g=w.getPooled(m.responderTerminate,k,c,f);g.touchHistory=u.touchHistory;v(g,y);var n=B(n,[e,g]);L(d,b)}else d=w.getPooled(m.responderReject,d,c,f),d.touchHistory=u.touchHistory,v(d,y),n=B(n,d);else n=B(n,e),L(d,b);else n=null}else n=null;d=k&&A(a);e=k&&F(a);b=k&&G(a);if(d=d?m.responderStart:e?m.responderMove:b?m.responderEnd:
28
+ null)d=w.getPooled(d,k,c,f),d.touchHistory=u.touchHistory,v(d,y),n=B(n,d);d=k&&"touchcancel"===a;if(a=k&&!d&&G(a))a:{if((a=c.touches)&&0!==a.length)for(e=0;e<a.length;e++)if(b=a[e].target,null!==b&&void 0!==b&&0!==b){g=V(b);b:{for(b=k;g;){if(b===g||b===g.alternate){b=!0;break b}g=t(g)}b=!1}if(b){a=!1;break a}}a=!0}if(a=d?m.responderTerminate:a?m.responderRelease:null)c=w.getPooled(a,k,c,f),c.touchHistory=u.touchHistory,v(c,y),n=B(n,c),L(null);return n},GlobalResponderHandler:null,injection:{injectGlobalResponderHandler:function(a){I.GlobalResponderHandler=
29
+ a}}};l=l.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Events;p=l[3];(function(a,b,c){Q=a;V=b;N=c})(l[2],l[0],l[1]);return{ResponderEventPlugin:I,ResponderTouchHistoryStore:u,injectEventPluginsByName:p}});