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,415 @@
1
+ /** @license React v16.12.0
2
+ * react-dom-unstable-flight-server.node.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
+
13
+
14
+ if (process.env.NODE_ENV !== "production") {
15
+ (function() {
16
+ 'use strict';
17
+
18
+ var ReactDOMServer = require('react-dom/server');
19
+
20
+ function scheduleWork(callback) {
21
+ setImmediate(callback);
22
+ }
23
+ function flushBuffered(destination) {
24
+ // If we don't have any more data to send right now.
25
+ // Flush whatever is in the buffer to the wire.
26
+ if (typeof destination.flush === 'function') {
27
+ // http.createServer response have flush(), but it has a different meaning and
28
+ // is deprecated in favor of flushHeaders(). Detect to avoid a warning.
29
+ if (typeof destination.flushHeaders !== 'function') {
30
+ // By convention the Zlib streams provide a flush function for this purpose.
31
+ destination.flush();
32
+ }
33
+ }
34
+ }
35
+ function beginWriting(destination) {
36
+ // Older Node streams like http.createServer don't have this.
37
+ if (typeof destination.cork === 'function') {
38
+ destination.cork();
39
+ }
40
+ }
41
+ function writeChunk(destination, buffer) {
42
+ var nodeBuffer = buffer; // close enough
43
+
44
+ return destination.write(nodeBuffer);
45
+ }
46
+ function completeWriting(destination) {
47
+ // Older Node streams like http.createServer don't have this.
48
+ if (typeof destination.uncork === 'function') {
49
+ destination.uncork();
50
+ }
51
+ }
52
+ function close(destination) {
53
+ destination.end();
54
+ }
55
+ function convertStringToBuffer(content) {
56
+ return Buffer.from(content, 'utf8');
57
+ }
58
+
59
+ function renderHostChildrenToString(children) {
60
+ // TODO: This file is used to actually implement a server renderer
61
+ // so we can't actually reference the renderer here. Instead, we
62
+ // should replace this method with a reference to Fizz which
63
+ // then uses this file to implement the server renderer.
64
+ return ReactDOMServer.renderToStaticMarkup(children);
65
+ }
66
+
67
+ // The Symbol used to tag the ReactElement-like types. If there is no native Symbol
68
+ // nor polyfill, then a plain number is used for performance.
69
+ var hasSymbol = typeof Symbol === 'function' && Symbol.for;
70
+ var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
71
+
72
+
73
+
74
+
75
+
76
+ // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
77
+ // (unstable) APIs that have been removed. Can we remove the symbols?
78
+
79
+ /*
80
+
81
+ FLIGHT PROTOCOL GRAMMAR
82
+
83
+ Response
84
+ - JSONData RowSequence
85
+ - JSONData
86
+
87
+ RowSequence
88
+ - Row RowSequence
89
+ - Row
90
+
91
+ Row
92
+ - "J" RowID JSONData
93
+ - "H" RowID HTMLData
94
+ - "B" RowID BlobData
95
+ - "U" RowID URLData
96
+ - "E" RowID ErrorData
97
+
98
+ RowID
99
+ - HexDigits ":"
100
+
101
+ HexDigits
102
+ - HexDigit HexDigits
103
+ - HexDigit
104
+
105
+ HexDigit
106
+ - 0-F
107
+
108
+ URLData
109
+ - (UTF8 encoded URL) "\n"
110
+
111
+ ErrorData
112
+ - (UTF8 encoded JSON: {message: "...", stack: "..."}) "\n"
113
+
114
+ JSONData
115
+ - (UTF8 encoded JSON) "\n"
116
+ - String values that begin with $ are escaped with a "$" prefix.
117
+ - References to other rows are encoding as JSONReference strings.
118
+
119
+ JSONReference
120
+ - "$" HexDigits
121
+
122
+ HTMLData
123
+ - ByteSize (UTF8 encoded HTML)
124
+
125
+ BlobData
126
+ - ByteSize (Binary Data)
127
+
128
+ ByteSize
129
+ - (unsigned 32-bit integer)
130
+ */
131
+ // TODO: Implement HTMLData, BlobData and URLData.
132
+
133
+ var stringify = JSON.stringify;
134
+ function createRequest(model, destination) {
135
+ var pingedSegments = [];
136
+ var request = {
137
+ destination: destination,
138
+ nextChunkId: 0,
139
+ pendingChunks: 0,
140
+ pingedSegments: pingedSegments,
141
+ completedJSONChunks: [],
142
+ completedErrorChunks: [],
143
+ flowing: false,
144
+ toJSON: function (key, value) {
145
+ return resolveModelToJSON(request, value);
146
+ }
147
+ };
148
+ request.pendingChunks++;
149
+ var rootSegment = createSegment(request, model);
150
+ pingedSegments.push(rootSegment);
151
+ return request;
152
+ }
153
+
154
+ function attemptResolveModelComponent(element) {
155
+ var type = element.type;
156
+ var props = element.props;
157
+
158
+ if (typeof type === 'function') {
159
+ // This is a nested view model.
160
+ return type(props);
161
+ } else if (typeof type === 'string') {
162
+ // This is a host element. E.g. HTML.
163
+ return renderHostChildrenToString(element);
164
+ } else {
165
+ throw new Error('Unsupported type.');
166
+ }
167
+ }
168
+
169
+ function pingSegment(request, segment) {
170
+ var pingedSegments = request.pingedSegments;
171
+ pingedSegments.push(segment);
172
+
173
+ if (pingedSegments.length === 1) {
174
+ scheduleWork(function () {
175
+ return performWork(request);
176
+ });
177
+ }
178
+ }
179
+
180
+ function createSegment(request, model) {
181
+ var id = request.nextChunkId++;
182
+ var segment = {
183
+ id: id,
184
+ model: model,
185
+ ping: function () {
186
+ return pingSegment(request, segment);
187
+ }
188
+ };
189
+ return segment;
190
+ }
191
+
192
+ function serializeIDRef(id) {
193
+ return '$' + id.toString(16);
194
+ }
195
+
196
+ function serializeRowHeader(tag, id) {
197
+ return tag + id.toString(16) + ':';
198
+ }
199
+
200
+ function escapeStringValue(value) {
201
+ if (value[0] === '$') {
202
+ // We need to escape $ prefixed strings since we use that to encode
203
+ // references to IDs.
204
+ return '$' + value;
205
+ } else {
206
+ return value;
207
+ }
208
+ }
209
+
210
+ function resolveModelToJSON(request, value) {
211
+ if (typeof value === 'string') {
212
+ return escapeStringValue(value);
213
+ }
214
+
215
+ while (typeof value === 'object' && value !== null && value.$$typeof === REACT_ELEMENT_TYPE) {
216
+ var element = value;
217
+
218
+ try {
219
+ value = attemptResolveModelComponent(element);
220
+ } catch (x) {
221
+ if (typeof x === 'object' && x !== null && typeof x.then === 'function') {
222
+ // Something suspended, we'll need to create a new segment and resolve it later.
223
+ request.pendingChunks++;
224
+ var newSegment = createSegment(request, element);
225
+ var ping = newSegment.ping;
226
+ x.then(ping, ping);
227
+ return serializeIDRef(newSegment.id);
228
+ } else {
229
+ request.pendingChunks++;
230
+ var errorId = request.nextChunkId++;
231
+ emitErrorChunk(request, errorId, x);
232
+ return serializeIDRef(errorId);
233
+ }
234
+ }
235
+ }
236
+
237
+ return value;
238
+ }
239
+
240
+ function emitErrorChunk(request, id, error) {
241
+ // TODO: We should not leak error messages to the client in prod.
242
+ // Give this an error code instead and log on the server.
243
+ // We can serialize the error in DEV as a convenience.
244
+ var message;
245
+ var stack = '';
246
+
247
+ try {
248
+ if (error instanceof Error) {
249
+ message = '' + error.message;
250
+ stack = '' + error.stack;
251
+ } else {
252
+ message = 'Error: ' + error;
253
+ }
254
+ } catch (x) {
255
+ message = 'An error occurred but serializing the error message failed.';
256
+ }
257
+
258
+ var errorInfo = {
259
+ message: message,
260
+ stack: stack
261
+ };
262
+ var row = serializeRowHeader('E', id) + stringify(errorInfo) + '\n';
263
+ request.completedErrorChunks.push(convertStringToBuffer(row));
264
+ }
265
+
266
+ function retrySegment(request, segment) {
267
+ var value = segment.model;
268
+
269
+ try {
270
+ while (typeof value === 'object' && value !== null && value.$$typeof === REACT_ELEMENT_TYPE) {
271
+ // If this is a nested model, there's no need to create another chunk,
272
+ // we can reuse the existing one and try again.
273
+ var element = value;
274
+ segment.model = element;
275
+ value = attemptResolveModelComponent(element);
276
+ }
277
+
278
+ var json = stringify(value, request.toJSON);
279
+ var row;
280
+ var id = segment.id;
281
+
282
+ if (id === 0) {
283
+ row = json + '\n';
284
+ } else {
285
+ row = serializeRowHeader('J', id) + json + '\n';
286
+ }
287
+
288
+ request.completedJSONChunks.push(convertStringToBuffer(row));
289
+ } catch (x) {
290
+ if (typeof x === 'object' && x !== null && typeof x.then === 'function') {
291
+ // Something suspended again, let's pick it back up later.
292
+ var ping = segment.ping;
293
+ x.then(ping, ping);
294
+ return;
295
+ } else {
296
+ // This errored, we need to serialize this error to the
297
+ emitErrorChunk(request, segment.id, x);
298
+ }
299
+ }
300
+ }
301
+
302
+ function performWork(request) {
303
+ var pingedSegments = request.pingedSegments;
304
+ request.pingedSegments = [];
305
+
306
+ for (var i = 0; i < pingedSegments.length; i++) {
307
+ var segment = pingedSegments[i];
308
+ retrySegment(request, segment);
309
+ }
310
+
311
+ if (request.flowing) {
312
+ flushCompletedChunks(request);
313
+ }
314
+ }
315
+
316
+ var reentrant = false;
317
+
318
+ function flushCompletedChunks(request) {
319
+ if (reentrant) {
320
+ return;
321
+ }
322
+
323
+ reentrant = true;
324
+ var destination = request.destination;
325
+ beginWriting(destination);
326
+
327
+ try {
328
+ var jsonChunks = request.completedJSONChunks;
329
+ var i = 0;
330
+
331
+ for (; i < jsonChunks.length; i++) {
332
+ request.pendingChunks--;
333
+ var chunk = jsonChunks[i];
334
+
335
+ if (!writeChunk(destination, chunk)) {
336
+ request.flowing = false;
337
+ i++;
338
+ break;
339
+ }
340
+ }
341
+
342
+ jsonChunks.splice(0, i);
343
+ var errorChunks = request.completedErrorChunks;
344
+ i = 0;
345
+
346
+ for (; i < errorChunks.length; i++) {
347
+ request.pendingChunks--;
348
+ var _chunk = errorChunks[i];
349
+
350
+ if (!writeChunk(destination, _chunk)) {
351
+ request.flowing = false;
352
+ i++;
353
+ break;
354
+ }
355
+ }
356
+
357
+ errorChunks.splice(0, i);
358
+ } finally {
359
+ reentrant = false;
360
+ completeWriting(destination);
361
+ }
362
+
363
+ flushBuffered(destination);
364
+
365
+ if (request.pendingChunks === 0) {
366
+ // We're done.
367
+ close(destination);
368
+ }
369
+ }
370
+
371
+ function startWork(request) {
372
+ request.flowing = true;
373
+ scheduleWork(function () {
374
+ return performWork(request);
375
+ });
376
+ }
377
+ function startFlowing(request) {
378
+ request.flowing = true;
379
+ flushCompletedChunks(request);
380
+ }
381
+
382
+ // This file intentionally does *not* have the Flow annotation.
383
+ // Don't add it. See `./inline-typed.js` for an explanation.
384
+
385
+ function createDrainHandler(destination, request) {
386
+ return function () {
387
+ return startFlowing(request);
388
+ };
389
+ }
390
+
391
+ function pipeToNodeWritable(model, destination) {
392
+ var request = createRequest(model, destination);
393
+ destination.on('drain', createDrainHandler(destination, request));
394
+ startWork(request);
395
+ }
396
+
397
+ var ReactFlightDOMServerNode = {
398
+ pipeToNodeWritable: pipeToNodeWritable
399
+ };
400
+
401
+ var ReactFlightDOMServerNode$1 = Object.freeze({
402
+ default: ReactFlightDOMServerNode
403
+ });
404
+
405
+ var ReactFlightDOMServerNode$2 = ( ReactFlightDOMServerNode$1 && ReactFlightDOMServerNode ) || ReactFlightDOMServerNode$1;
406
+
407
+ // TODO: decide on the top-level export form.
408
+ // This is hacky but makes it work with both Rollup and Jest
409
+
410
+
411
+ var unstableFlightServer_node = ReactFlightDOMServerNode$2.default || ReactFlightDOMServerNode$2;
412
+
413
+ module.exports = unstableFlightServer_node;
414
+ })();
415
+ }
@@ -0,0 +1,16 @@
1
+ /** @license React v16.12.0
2
+ * react-dom-unstable-flight-server.node.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
+
10
+ 'use strict';var k=require("react-dom/server"),l="function"===typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103,m=JSON.stringify;function n(a,b){var d=[],c={destination:b,nextChunkId:0,pendingChunks:0,pingedSegments:d,completedJSONChunks:[],completedErrorChunks:[],flowing:!1,toJSON:function(b,a){return p(c,a)}};c.pendingChunks++;a=q(c,a);d.push(a);return c}
11
+ function r(a){var b=a.type,d=a.props;if("function"===typeof b)return b(d);if("string"===typeof b)return k.renderToStaticMarkup(a);throw Error("Unsupported type.");}function w(a,b){var d=a.pingedSegments;d.push(b);1===d.length&&setImmediate(function(){return x(a)})}function q(a,b){var d={id:a.nextChunkId++,model:b,ping:function(){return w(a,d)}};return d}
12
+ function p(a,b){if("string"===typeof b)return a="$"===b[0]?"$"+b:b,a;for(;"object"===typeof b&&null!==b&&b.$$typeof===l;){var d=b;try{b=r(d)}catch(c){if("object"===typeof c&&null!==c&&"function"===typeof c.then)return a.pendingChunks++,a=q(a,d),b=a.ping,c.then(b,b),"$"+a.id.toString(16);a.pendingChunks++;b=a.nextChunkId++;y(a,b,c);return"$"+b.toString(16)}}return b}
13
+ function y(a,b,d){var c="";try{if(d instanceof Error){var e=""+d.message;c=""+d.stack}else e="Error: "+d}catch(f){e="An error occurred but serializing the error message failed."}d={message:e,stack:c};b="E"+b.toString(16)+":"+m(d)+"\n";a.completedErrorChunks.push(Buffer.from(b,"utf8"))}
14
+ function x(a){var b=a.pingedSegments;a.pingedSegments=[];for(var d=0;d<b.length;d++){var c=void 0,e=a,f=b[d],g=f.model;try{for(;"object"===typeof g&&null!==g&&g.$$typeof===l;){var t=g;f.model=t;g=r(t)}var u=m(g,e.toJSON),v=f.id;c=0===v?u+"\n":"J"+v.toString(16)+":"+u+"\n";e.completedJSONChunks.push(Buffer.from(c,"utf8"))}catch(h){"object"===typeof h&&null!==h&&"function"===typeof h.then?(c=f.ping,h.then(c,c)):y(e,f.id,h)}}a.flowing&&z(a)}var A=!1;
15
+ function z(a){if(!A){A=!0;var b=a.destination;"function"===typeof b.cork&&b.cork();try{for(var d=a.completedJSONChunks,c=0;c<d.length;c++)if(a.pendingChunks--,!b.write(d[c])){a.flowing=!1;c++;break}d.splice(0,c);var e=a.completedErrorChunks;for(c=0;c<e.length;c++)if(a.pendingChunks--,!b.write(e[c])){a.flowing=!1;c++;break}e.splice(0,c)}finally{A=!1,"function"===typeof b.uncork&&b.uncork()}"function"===typeof b.flush&&"function"!==typeof b.flushHeaders&&b.flush();0===a.pendingChunks&&b.end()}}
16
+ function B(a){a.flowing=!0;setImmediate(function(){return x(a)})}function C(a,b){return function(){b.flowing=!0;z(b)}}var D={pipeToNodeWritable:function(a,b){a=n(a,b);b.on("drain",C(b,a));B(a)}},E={default:D},F=E&&D||E;module.exports=F.default||F;
@@ -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.
@@ -19,16 +19,8 @@ var ReactDOM = require('react-dom');
19
19
  var _assign = require('object-assign');
20
20
 
21
21
  // Do not require this module directly! Use normal `invariant` calls with
22
- // template literal strings. The messages will be converted to ReactError during
23
- // build, and in production they will be minified.
24
-
25
- // Do not require this module directly! Use normal `invariant` calls with
26
- // template literal strings. The messages will be converted to ReactError during
27
- // build, and in production they will be minified.
28
- function ReactError(error) {
29
- error.name = 'Invariant Violation';
30
- return error;
31
- }
22
+ // template literal strings. The messages will be replaced with error codes
23
+ // during build.
32
24
 
33
25
  /**
34
26
  * Use invariant() to assert state which your program assumes to be true.
@@ -256,13 +248,11 @@ function executeDirectDispatch(event) {
256
248
  var dispatchListener = event._dispatchListeners;
257
249
  var dispatchInstance = event._dispatchInstances;
258
250
 
259
- (function () {
260
- if (!!Array.isArray(dispatchListener)) {
261
- {
262
- throw ReactError(Error("executeDirectDispatch(...): Invalid `event`."));
263
- }
251
+ if (!!Array.isArray(dispatchListener)) {
252
+ {
253
+ throw Error("executeDirectDispatch(...): Invalid `event`.");
264
254
  }
265
- })();
255
+ }
266
256
 
267
257
  event.currentTarget = dispatchListener ? getNodeFromInstance$1(dispatchInstance) : null;
268
258
  var res = dispatchListener ? dispatchListener(event) : null;
@@ -472,13 +462,11 @@ function traverseTwoPhase(inst, fn, arg) {
472
462
  */
473
463
 
474
464
  function accumulateInto(current, next) {
475
- (function () {
476
- if (!(next != null)) {
477
- {
478
- throw ReactError(Error("accumulateInto(...): Accumulated items must not be null or undefined."));
479
- }
465
+ if (!(next != null)) {
466
+ {
467
+ throw Error("accumulateInto(...): Accumulated items must not be null or undefined.");
480
468
  }
481
- })();
469
+ }
482
470
 
483
471
  if (current == null) {
484
472
  return next;
@@ -602,13 +590,11 @@ function getListener(inst, registrationName) {
602
590
  return null;
603
591
  }
604
592
 
605
- (function () {
606
- if (!(!listener || typeof listener === 'function')) {
607
- {
608
- throw ReactError(Error("Expected `" + registrationName + "` listener to be a function, instead got a value of `" + typeof listener + "` type."));
609
- }
593
+ if (!(!listener || typeof listener === 'function')) {
594
+ {
595
+ throw Error("Expected `" + registrationName + "` listener to be a function, instead got a value of `" + typeof listener + "` type.");
610
596
  }
611
- })();
597
+ }
612
598
 
613
599
  return listener;
614
600
  }
@@ -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.
@@ -7,29 +7,29 @@
7
7
  * LICENSE file in the root directory of this source tree.
8
8
  */
9
9
 
10
- 'use strict';var aa=require("react-dom"),h=require("object-assign");function k(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 "+c+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ";return a}var l=null,n=null,p=null;
11
- function r(a){var b=a._dispatchListeners,c=a._dispatchInstances;if(Array.isArray(b))throw k(Error(103));a.currentTarget=b?p(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 u(a,b,c){for(var d=[];a;)d.push(a),a=t(a);for(a=d.length;0<a--;)b(d[a],"captured",c);for(a=0;a<d.length;a++)b(d[a],"bubbled",c)}
12
- function v(a,b){if(null==b)throw k(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 w(a,b,c){Array.isArray(a)?a.forEach(b,c):a&&b.call(c,a)}
13
- function x(a,b){var c=a.stateNode;if(!c)return null;var d=l(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=!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 k(Error(231),b,typeof c);
10
+ 'use strict';var aa=require("react-dom"),h=require("object-assign");function k(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."}var l=null,n=null,p=null;
11
+ function r(a){var b=a._dispatchListeners,c=a._dispatchInstances;if(Array.isArray(b))throw Error(k(103));a.currentTarget=b?p(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 u(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)}
12
+ function v(a,b){if(null==b)throw Error(k(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 w(a,b,c){Array.isArray(a)?a.forEach(b,c):a&&b.call(c,a)}
13
+ function x(a,b){var c=a.stateNode;if(!c)return null;var f=l(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"===a||"select"===a||"textarea"===a));a=!f;break a;default:a=!1}if(a)return null;if(c&&"function"!==typeof c)throw Error(k(231,b,typeof c));
14
14
  return c}function y(a,b,c){if(b=x(a,c.dispatchConfig.phasedRegistrationNames[b]))c._dispatchListeners=v(c._dispatchListeners,b),c._dispatchInstances=v(c._dispatchInstances,a)}function ba(a){a&&a.dispatchConfig.phasedRegistrationNames&&u(a._targetInst,y,a)}function ca(a){if(a&&a.dispatchConfig.phasedRegistrationNames){var b=a._targetInst;b=b?t(b):null;u(b,y,a)}}
15
15
  function z(a){if(a&&a.dispatchConfig.registrationName){var b=a._targetInst;if(b&&a&&a.dispatchConfig.registrationName){var c=x(b,a.dispatchConfig.registrationName);c&&(a._dispatchListeners=v(a._dispatchListeners,c),a._dispatchInstances=v(a._dispatchInstances,b))}}}function A(){return!0}function B(){return!1}
16
- function C(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])?this[g]=b(c):"target"===g?this.target=d:this[g]=c[g]);this.isDefaultPrevented=(null!=c.defaultPrevented?c.defaultPrevented:!1===c.returnValue)?A:B;this.isPropagationStopped=B;return this}
16
+ function C(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=(null!=c.defaultPrevented?c.defaultPrevented:!1===c.returnValue)?A:B;this.isPropagationStopped=B;return this}
17
17
  h(C.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():"unknown"!==typeof a.returnValue&&(a.returnValue=!1),this.isDefaultPrevented=A)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():"unknown"!==typeof a.cancelBubble&&(a.cancelBubble=!0),this.isPropagationStopped=A)},persist:function(){this.isPersistent=A},isPersistent:B,destructor:function(){var a=this.constructor.Interface,b;for(b in a)this[b]=
18
18
  null;this.nativeEvent=this._targetInst=this.dispatchConfig=null;this.isPropagationStopped=this.isDefaultPrevented=B;this._dispatchInstances=this._dispatchListeners=null}});C.Interface={type:null,target:null,currentTarget:function(){return null},eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null};
19
- C.extend=function(a){function b(){}function c(){return d.apply(this,arguments)}var d=this;b.prototype=d.prototype;var g=new b;h(g,c.prototype);c.prototype=g;c.prototype.constructor=c;c.Interface=h({},d.Interface,a);c.extend=d.extend;D(c);return c};D(C);function da(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)}
20
- function ea(a){if(!(a instanceof this))throw k(Error(279));a.destructor();10>this.eventPool.length&&this.eventPool.push(a)}function D(a){a.eventPool=[];a.getPooled=da;a.release=ea}var E=C.extend({touchHistory:function(){return null}});function F(a){return"touchstart"===a||"mousedown"===a}function G(a){return"touchmove"===a||"mousemove"===a}function H(a){return"touchend"===a||"touchcancel"===a||"mouseup"===a}
21
- var I=["touchstart","mousedown"],J=["touchmove","mousemove"],K=["touchcancel","touchend","mouseup"],L=[],N={touchBank:L,numberActiveTouches:0,indexOfSingleActiveTouch:-1,mostRecentTimeStamp:0};function O(a){return a.timeStamp||a.timestamp}function P(a){a=a.identifier;if(null==a)throw k(Error(138));return a}
19
+ C.extend=function(a){function b(){}function c(){return f.apply(this,arguments)}var f=this;b.prototype=f.prototype;var d=new b;h(d,c.prototype);c.prototype=d;c.prototype.constructor=c;c.Interface=h({},f.Interface,a);c.extend=f.extend;D(c);return c};D(C);function da(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)}
20
+ function ea(a){if(!(a instanceof this))throw Error(k(279));a.destructor();10>this.eventPool.length&&this.eventPool.push(a)}function D(a){a.eventPool=[];a.getPooled=da;a.release=ea}var E=C.extend({touchHistory:function(){return null}});function F(a){return"touchstart"===a||"mousedown"===a}function G(a){return"touchmove"===a||"mousemove"===a}function H(a){return"touchend"===a||"touchcancel"===a||"mouseup"===a}
21
+ var I=["touchstart","mousedown"],J=["touchmove","mousemove"],K=["touchcancel","touchend","mouseup"],L=[],N={touchBank:L,numberActiveTouches:0,indexOfSingleActiveTouch:-1,mostRecentTimeStamp:0};function O(a){return a.timeStamp||a.timestamp}function P(a){a=a.identifier;if(null==a)throw Error(k(138));return a}
22
22
  function fa(a){var b=P(a),c=L[b];c?(c.touchActive=!0,c.startPageX=a.pageX,c.startPageY=a.pageY,c.startTimeStamp=O(a),c.currentPageX=a.pageX,c.currentPageY=a.pageY,c.currentTimeStamp=O(a),c.previousPageX=a.pageX,c.previousPageY=a.pageY,c.previousTimeStamp=O(a)):(c={touchActive:!0,startPageX:a.pageX,startPageY:a.pageY,startTimeStamp:O(a),currentPageX:a.pageX,currentPageY:a.pageY,currentTimeStamp:O(a),previousPageX:a.pageX,previousPageY:a.pageY,previousTimeStamp:O(a)},L[b]=c);N.mostRecentTimeStamp=O(a)}
23
23
  function ha(a){var b=L[P(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=O(a),N.mostRecentTimeStamp=O(a)):console.warn("Cannot record touch move without a touch start.\nTouch Move: %s\n","Touch Bank: %s",Q(a),R())}
24
24
  function ia(a){var b=L[P(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=O(a),N.mostRecentTimeStamp=O(a)):console.warn("Cannot record touch end without a touch start.\nTouch End: %s\n","Touch Bank: %s",Q(a),R())}function Q(a){return JSON.stringify({identifier:a.identifier,pageX:a.pageX,pageY:a.pageY,timestamp:O(a)})}
25
25
  function R(){var a=JSON.stringify(L.slice(0,20));20<L.length&&(a+=" (original size: "+L.length+")");return a}
26
26
  var S={recordTouchTrack:function(a,b){if(G(a))b.changedTouches.forEach(ha);else if(F(a))b.changedTouches.forEach(fa),N.numberActiveTouches=b.touches.length,1===N.numberActiveTouches&&(N.indexOfSingleActiveTouch=b.touches[0].identifier);else if(H(a)&&(b.changedTouches.forEach(ia),N.numberActiveTouches=b.touches.length,1===N.numberActiveTouches))for(a=0;a<L.length;a++)if(b=L[a],null!=b&&b.touchActive){N.indexOfSingleActiveTouch=a;break}},touchHistory:N};
27
- function T(a,b){if(null==b)throw k(Error(334));return null==a?b:Array.isArray(a)?a.concat(b):Array.isArray(b)?[a].concat(b):[a,b]}var U=null,V=0;function W(a,b){var c=U;U=a;if(null!==X.GlobalResponderHandler)X.GlobalResponderHandler.onChange(c,a,b)}
27
+ function T(a,b){if(null==b)throw Error(k(334));return null==a?b:Array.isArray(a)?a.concat(b):Array.isArray(b)?[a].concat(b):[a,b]}var U=null,V=0;function W(a,b){var c=U;U=a;if(null!==X.GlobalResponderHandler)X.GlobalResponderHandler.onChange(c,a,b)}
28
28
  var Y={startShouldSetResponder:{phasedRegistrationNames:{bubbled:"onStartShouldSetResponder",captured:"onStartShouldSetResponderCapture"},dependencies:I},scrollShouldSetResponder:{phasedRegistrationNames:{bubbled:"onScrollShouldSetResponder",captured:"onScrollShouldSetResponderCapture"},dependencies:["scroll"]},selectionChangeShouldSetResponder:{phasedRegistrationNames:{bubbled:"onSelectionChangeShouldSetResponder",captured:"onSelectionChangeShouldSetResponderCapture"},dependencies:["selectionchange"]},
29
29
  moveShouldSetResponder:{phasedRegistrationNames:{bubbled:"onMoveShouldSetResponder",captured:"onMoveShouldSetResponderCapture"},dependencies:J},responderStart:{registrationName:"onResponderStart",dependencies:I},responderMove:{registrationName:"onResponderMove",dependencies:J},responderEnd:{registrationName:"onResponderEnd",dependencies:K},responderRelease:{registrationName:"onResponderRelease",dependencies:K},responderTerminationRequest:{registrationName:"onResponderTerminationRequest",dependencies:[]},
30
- responderGrant:{registrationName:"onResponderGrant",dependencies:[]},responderReject:{registrationName:"onResponderReject",dependencies:[]},responderTerminate:{registrationName:"onResponderTerminate",dependencies:[]}},X={_getResponder:function(){return U},eventTypes:Y,extractEvents:function(a,b,c,d,g){if(F(a))V+=1;else if(H(a))if(0<=V)--V;else return console.warn("Ended a touch event which was not counted in `trackedTouchCount`."),null;S.recordTouchTrack(a,d);if(c&&("scroll"===a&&!d.responderIgnoreScroll||
31
- 0<V&&"selectionchange"===a||F(a)||G(a))){b=F(a)?Y.startShouldSetResponder:G(a)?Y.moveShouldSetResponder:"selectionchange"===a?Y.selectionChangeShouldSetResponder:Y.scrollShouldSetResponder;if(U)b:{var e=U;for(var f=0,q=e;q;q=t(q))f++;q=0;for(var M=c;M;M=t(M))q++;for(;0<f-q;)e=t(e),f--;for(;0<q-f;)c=t(c),q--;for(;f--;){if(e===c||e===c.alternate)break b;e=t(e);c=t(c)}e=null}else e=c;c=e===U;e=E.getPooled(b,e,d,g);e.touchHistory=S.touchHistory;c?w(e,ca):w(e,ba);b:{b=e._dispatchListeners;c=e._dispatchInstances;
32
- 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!==U)if(e=E.getPooled(Y.responderGrant,b,d,g),e.touchHistory=S.touchHistory,w(e,z),c=!0===r(e),U)if(f=E.getPooled(Y.responderTerminationRequest,U,d,g),f.touchHistory=S.touchHistory,w(f,z),q=!f._dispatchListeners||r(f),f.isPersistent()||f.constructor.release(f),
33
- q){f=E.getPooled(Y.responderTerminate,U,d,g);f.touchHistory=S.touchHistory;w(f,z);var m=T(m,[e,f]);W(b,c)}else b=E.getPooled(Y.responderReject,b,d,g),b.touchHistory=S.touchHistory,w(b,z),m=T(m,b);else m=T(m,e),W(b,c);else m=null}else m=null;b=U&&F(a);e=U&&G(a);c=U&&H(a);if(b=b?Y.responderStart:e?Y.responderMove:c?Y.responderEnd:null)b=E.getPooled(b,U,d,g),b.touchHistory=S.touchHistory,w(b,z),m=T(m,b);b=U&&"touchcancel"===a;if(a=U&&!b&&H(a))a:{if((a=d.touches)&&0!==a.length)for(e=0;e<a.length;e++)if(c=
34
- a[e].target,null!==c&&void 0!==c&&0!==c){f=n(c);b:{for(c=U;f;){if(c===f||c===f.alternate){c=!0;break b}f=t(f)}c=!1}if(c){a=!1;break a}}a=!0}if(a=b?Y.responderTerminate:a?Y.responderRelease:null)d=E.getPooled(a,U,d,g),d.touchHistory=S.touchHistory,w(d,z),m=T(m,d),W(null);return m},GlobalResponderHandler:null,injection:{injectGlobalResponderHandler:function(a){X.GlobalResponderHandler=a}}},Z=aa.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Events,ja=Z[3],ka=Z[0],la=Z[1];l=Z[2];n=ka;p=la;
30
+ responderGrant:{registrationName:"onResponderGrant",dependencies:[]},responderReject:{registrationName:"onResponderReject",dependencies:[]},responderTerminate:{registrationName:"onResponderTerminate",dependencies:[]}},X={_getResponder:function(){return U},eventTypes:Y,extractEvents:function(a,b,c,f){if(F(a))V+=1;else if(H(a))if(0<=V)--V;else return console.warn("Ended a touch event which was not counted in `trackedTouchCount`."),null;S.recordTouchTrack(a,c);if(b&&("scroll"===a&&!c.responderIgnoreScroll||
31
+ 0<V&&"selectionchange"===a||F(a)||G(a))){var d=F(a)?Y.startShouldSetResponder:G(a)?Y.moveShouldSetResponder:"selectionchange"===a?Y.selectionChangeShouldSetResponder:Y.scrollShouldSetResponder;if(U)b:{var e=U;for(var g=0,q=e;q;q=t(q))g++;q=0;for(var M=b;M;M=t(M))q++;for(;0<g-q;)e=t(e),g--;for(;0<q-g;)b=t(b),q--;for(;g--;){if(e===b||e===b.alternate)break b;e=t(e);b=t(b)}e=null}else e=b;b=e===U;e=E.getPooled(d,e,c,f);e.touchHistory=S.touchHistory;b?w(e,ca):w(e,ba);b:{d=e._dispatchListeners;b=e._dispatchInstances;
32
+ 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!==U)if(e=E.getPooled(Y.responderGrant,d,c,f),e.touchHistory=S.touchHistory,w(e,z),b=!0===r(e),U)if(g=E.getPooled(Y.responderTerminationRequest,U,c,f),g.touchHistory=S.touchHistory,w(g,z),q=!g._dispatchListeners||r(g),g.isPersistent()||g.constructor.release(g),
33
+ q){g=E.getPooled(Y.responderTerminate,U,c,f);g.touchHistory=S.touchHistory;w(g,z);var m=T(m,[e,g]);W(d,b)}else d=E.getPooled(Y.responderReject,d,c,f),d.touchHistory=S.touchHistory,w(d,z),m=T(m,d);else m=T(m,e),W(d,b);else m=null}else m=null;d=U&&F(a);e=U&&G(a);b=U&&H(a);if(d=d?Y.responderStart:e?Y.responderMove:b?Y.responderEnd:null)d=E.getPooled(d,U,c,f),d.touchHistory=S.touchHistory,w(d,z),m=T(m,d);d=U&&"touchcancel"===a;if(a=U&&!d&&H(a))a:{if((a=c.touches)&&0!==a.length)for(e=0;e<a.length;e++)if(b=
34
+ a[e].target,null!==b&&void 0!==b&&0!==b){g=n(b);b:{for(b=U;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?Y.responderTerminate:a?Y.responderRelease:null)c=E.getPooled(a,U,c,f),c.touchHistory=S.touchHistory,w(c,z),m=T(m,c),W(null);return m},GlobalResponderHandler:null,injection:{injectGlobalResponderHandler:function(a){X.GlobalResponderHandler=a}}},Z=aa.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Events,ja=Z[3],ka=Z[0],la=Z[1];l=Z[2];n=ka;p=la;
35
35
  module.exports={ResponderEventPlugin:X,ResponderTouchHistoryStore:S,injectEventPluginsByName:ja};