UNPKG

281 kBJavaScriptView Raw
1/**
2 * Copyright (c) Facebook, Inc. and its affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
6 *
7 * @noflow
8 * @preventMunge
9 * @generated
10 */
11
12"use strict";
13require("react-native/Libraries/ReactPrivate/ReactNativePrivateInitializeCore");
14var ReactNativePrivateInterface = require("react-native/Libraries/ReactPrivate/ReactNativePrivateInterface"),
15 React = require("react"),
16 Scheduler = require("scheduler"),
17 tracing = require("scheduler/tracing");
18function ReactError(error) {
19 error.name = "Invariant Violation";
20 return error;
21}
22var eventPluginOrder = null,
23 namesToPlugins = {};
24function recomputePluginOrdering() {
25 if (eventPluginOrder)
26 for (var pluginName in namesToPlugins) {
27 var pluginModule = namesToPlugins[pluginName],
28 pluginIndex = eventPluginOrder.indexOf(pluginName);
29 if (!(-1 < pluginIndex))
30 throw ReactError(
31 Error(
32 "EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `" +
33 pluginName +
34 "`."
35 )
36 );
37 if (!plugins[pluginIndex]) {
38 if (!pluginModule.extractEvents)
39 throw ReactError(
40 Error(
41 "EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `" +
42 pluginName +
43 "` does not."
44 )
45 );
46 plugins[pluginIndex] = pluginModule;
47 pluginIndex = pluginModule.eventTypes;
48 for (var eventName in pluginIndex) {
49 var JSCompiler_inline_result = void 0;
50 var dispatchConfig = pluginIndex[eventName],
51 pluginModule$jscomp$0 = pluginModule,
52 eventName$jscomp$0 = eventName;
53 if (eventNameDispatchConfigs.hasOwnProperty(eventName$jscomp$0))
54 throw ReactError(
55 Error(
56 "EventPluginHub: More than one plugin attempted to publish the same event name, `" +
57 eventName$jscomp$0 +
58 "`."
59 )
60 );
61 eventNameDispatchConfigs[eventName$jscomp$0] = dispatchConfig;
62 var phasedRegistrationNames = dispatchConfig.phasedRegistrationNames;
63 if (phasedRegistrationNames) {
64 for (JSCompiler_inline_result in phasedRegistrationNames)
65 phasedRegistrationNames.hasOwnProperty(
66 JSCompiler_inline_result
67 ) &&
68 publishRegistrationName(
69 phasedRegistrationNames[JSCompiler_inline_result],
70 pluginModule$jscomp$0,
71 eventName$jscomp$0
72 );
73 JSCompiler_inline_result = !0;
74 } else
75 dispatchConfig.registrationName
76 ? (publishRegistrationName(
77 dispatchConfig.registrationName,
78 pluginModule$jscomp$0,
79 eventName$jscomp$0
80 ),
81 (JSCompiler_inline_result = !0))
82 : (JSCompiler_inline_result = !1);
83 if (!JSCompiler_inline_result)
84 throw ReactError(
85 Error(
86 "EventPluginRegistry: Failed to publish event `" +
87 eventName +
88 "` for plugin `" +
89 pluginName +
90 "`."
91 )
92 );
93 }
94 }
95 }
96}
97function publishRegistrationName(registrationName, pluginModule) {
98 if (registrationNameModules[registrationName])
99 throw ReactError(
100 Error(
101 "EventPluginHub: More than one plugin attempted to publish the same registration name, `" +
102 registrationName +
103 "`."
104 )
105 );
106 registrationNameModules[registrationName] = pluginModule;
107}
108var plugins = [],
109 eventNameDispatchConfigs = {},
110 registrationNameModules = {};
111function invokeGuardedCallbackImpl(name, func, context, a, b, c, d, e, f) {
112 var funcArgs = Array.prototype.slice.call(arguments, 3);
113 try {
114 func.apply(context, funcArgs);
115 } catch (error) {
116 this.onError(error);
117 }
118}
119var hasError = !1,
120 caughtError = null,
121 hasRethrowError = !1,
122 rethrowError = null,
123 reporter = {
124 onError: function(error) {
125 hasError = !0;
126 caughtError = error;
127 }
128 };
129function invokeGuardedCallback(name, func, context, a, b, c, d, e, f) {
130 hasError = !1;
131 caughtError = null;
132 invokeGuardedCallbackImpl.apply(reporter, arguments);
133}
134function invokeGuardedCallbackAndCatchFirstError(
135 name,
136 func,
137 context,
138 a,
139 b,
140 c,
141 d,
142 e,
143 f
144) {
145 invokeGuardedCallback.apply(this, arguments);
146 if (hasError) {
147 if (hasError) {
148 var error = caughtError;
149 hasError = !1;
150 caughtError = null;
151 } else
152 throw ReactError(
153 Error(
154 "clearCaughtError was called but no error was captured. This error is likely caused by a bug in React. Please file an issue."
155 )
156 );
157 hasRethrowError || ((hasRethrowError = !0), (rethrowError = error));
158 }
159}
160var getFiberCurrentPropsFromNode = null,
161 getInstanceFromNode = null,
162 getNodeFromInstance = null;
163function executeDispatch(event, listener, inst) {
164 var type = event.type || "unknown-event";
165 event.currentTarget = getNodeFromInstance(inst);
166 invokeGuardedCallbackAndCatchFirstError(type, listener, void 0, event);
167 event.currentTarget = null;
168}
169function executeDirectDispatch(event) {
170 var dispatchListener = event._dispatchListeners,
171 dispatchInstance = event._dispatchInstances;
172 if (Array.isArray(dispatchListener))
173 throw ReactError(Error("executeDirectDispatch(...): Invalid `event`."));
174 event.currentTarget = dispatchListener
175 ? getNodeFromInstance(dispatchInstance)
176 : null;
177 dispatchListener = dispatchListener ? dispatchListener(event) : null;
178 event.currentTarget = null;
179 event._dispatchListeners = null;
180 event._dispatchInstances = null;
181 return dispatchListener;
182}
183function accumulateInto(current, next) {
184 if (null == next)
185 throw ReactError(
186 Error(
187 "accumulateInto(...): Accumulated items must not be null or undefined."
188 )
189 );
190 if (null == current) return next;
191 if (Array.isArray(current)) {
192 if (Array.isArray(next)) return current.push.apply(current, next), current;
193 current.push(next);
194 return current;
195 }
196 return Array.isArray(next) ? [current].concat(next) : [current, next];
197}
198function forEachAccumulated(arr, cb, scope) {
199 Array.isArray(arr) ? arr.forEach(cb, scope) : arr && cb.call(scope, arr);
200}
201var eventQueue = null;
202function executeDispatchesAndReleaseTopLevel(e) {
203 if (e) {
204 var dispatchListeners = e._dispatchListeners,
205 dispatchInstances = e._dispatchInstances;
206 if (Array.isArray(dispatchListeners))
207 for (
208 var i = 0;
209 i < dispatchListeners.length && !e.isPropagationStopped();
210 i++
211 )
212 executeDispatch(e, dispatchListeners[i], dispatchInstances[i]);
213 else
214 dispatchListeners &&
215 executeDispatch(e, dispatchListeners, dispatchInstances);
216 e._dispatchListeners = null;
217 e._dispatchInstances = null;
218 e.isPersistent() || e.constructor.release(e);
219 }
220}
221var injection = {
222 injectEventPluginOrder: function(injectedEventPluginOrder) {
223 if (eventPluginOrder)
224 throw ReactError(
225 Error(
226 "EventPluginRegistry: Cannot inject event plugin ordering more than once. You are likely trying to load more than one copy of React."
227 )
228 );
229 eventPluginOrder = Array.prototype.slice.call(injectedEventPluginOrder);
230 recomputePluginOrdering();
231 },
232 injectEventPluginsByName: function(injectedNamesToPlugins) {
233 var isOrderingDirty = !1,
234 pluginName;
235 for (pluginName in injectedNamesToPlugins)
236 if (injectedNamesToPlugins.hasOwnProperty(pluginName)) {
237 var pluginModule = injectedNamesToPlugins[pluginName];
238 if (
239 !namesToPlugins.hasOwnProperty(pluginName) ||
240 namesToPlugins[pluginName] !== pluginModule
241 ) {
242 if (namesToPlugins[pluginName])
243 throw ReactError(
244 Error(
245 "EventPluginRegistry: Cannot inject two different event plugins using the same name, `" +
246 pluginName +
247 "`."
248 )
249 );
250 namesToPlugins[pluginName] = pluginModule;
251 isOrderingDirty = !0;
252 }
253 }
254 isOrderingDirty && recomputePluginOrdering();
255 }
256};
257function getListener(inst, registrationName) {
258 var listener = inst.stateNode;
259 if (!listener) return null;
260 var props = getFiberCurrentPropsFromNode(listener);
261 if (!props) return null;
262 listener = props[registrationName];
263 a: switch (registrationName) {
264 case "onClick":
265 case "onClickCapture":
266 case "onDoubleClick":
267 case "onDoubleClickCapture":
268 case "onMouseDown":
269 case "onMouseDownCapture":
270 case "onMouseMove":
271 case "onMouseMoveCapture":
272 case "onMouseUp":
273 case "onMouseUpCapture":
274 (props = !props.disabled) ||
275 ((inst = inst.type),
276 (props = !(
277 "button" === inst ||
278 "input" === inst ||
279 "select" === inst ||
280 "textarea" === inst
281 )));
282 inst = !props;
283 break a;
284 default:
285 inst = !1;
286 }
287 if (inst) return null;
288 if (listener && "function" !== typeof listener)
289 throw ReactError(
290 Error(
291 "Expected `" +
292 registrationName +
293 "` listener to be a function, instead got a value of `" +
294 typeof listener +
295 "` type."
296 )
297 );
298 return listener;
299}
300function getParent(inst) {
301 do inst = inst.return;
302 while (inst && 5 !== inst.tag);
303 return inst ? inst : null;
304}
305function traverseTwoPhase(inst, fn, arg) {
306 for (var path = []; inst; ) path.push(inst), (inst = getParent(inst));
307 for (inst = path.length; 0 < inst--; ) fn(path[inst], "captured", arg);
308 for (inst = 0; inst < path.length; inst++) fn(path[inst], "bubbled", arg);
309}
310function accumulateDirectionalDispatches(inst, phase, event) {
311 if (
312 (phase = getListener(
313 inst,
314 event.dispatchConfig.phasedRegistrationNames[phase]
315 ))
316 )
317 (event._dispatchListeners = accumulateInto(
318 event._dispatchListeners,
319 phase
320 )),
321 (event._dispatchInstances = accumulateInto(
322 event._dispatchInstances,
323 inst
324 ));
325}
326function accumulateTwoPhaseDispatchesSingle(event) {
327 event &&
328 event.dispatchConfig.phasedRegistrationNames &&
329 traverseTwoPhase(event._targetInst, accumulateDirectionalDispatches, event);
330}
331function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {
332 if (event && event.dispatchConfig.phasedRegistrationNames) {
333 var targetInst = event._targetInst;
334 targetInst = targetInst ? getParent(targetInst) : null;
335 traverseTwoPhase(targetInst, accumulateDirectionalDispatches, event);
336 }
337}
338function accumulateDirectDispatchesSingle(event) {
339 if (event && event.dispatchConfig.registrationName) {
340 var inst = event._targetInst;
341 if (inst && event && event.dispatchConfig.registrationName) {
342 var listener = getListener(inst, event.dispatchConfig.registrationName);
343 listener &&
344 ((event._dispatchListeners = accumulateInto(
345 event._dispatchListeners,
346 listener
347 )),
348 (event._dispatchInstances = accumulateInto(
349 event._dispatchInstances,
350 inst
351 )));
352 }
353 }
354}
355function functionThatReturnsTrue() {
356 return !0;
357}
358function functionThatReturnsFalse() {
359 return !1;
360}
361function SyntheticEvent(
362 dispatchConfig,
363 targetInst,
364 nativeEvent,
365 nativeEventTarget
366) {
367 this.dispatchConfig = dispatchConfig;
368 this._targetInst = targetInst;
369 this.nativeEvent = nativeEvent;
370 dispatchConfig = this.constructor.Interface;
371 for (var propName in dispatchConfig)
372 dispatchConfig.hasOwnProperty(propName) &&
373 ((targetInst = dispatchConfig[propName])
374 ? (this[propName] = targetInst(nativeEvent))
375 : "target" === propName
376 ? (this.target = nativeEventTarget)
377 : (this[propName] = nativeEvent[propName]));
378 this.isDefaultPrevented = (null != nativeEvent.defaultPrevented
379 ? nativeEvent.defaultPrevented
380 : !1 === nativeEvent.returnValue)
381 ? functionThatReturnsTrue
382 : functionThatReturnsFalse;
383 this.isPropagationStopped = functionThatReturnsFalse;
384 return this;
385}
386Object.assign(SyntheticEvent.prototype, {
387 preventDefault: function() {
388 this.defaultPrevented = !0;
389 var event = this.nativeEvent;
390 event &&
391 (event.preventDefault
392 ? event.preventDefault()
393 : "unknown" !== typeof event.returnValue && (event.returnValue = !1),
394 (this.isDefaultPrevented = functionThatReturnsTrue));
395 },
396 stopPropagation: function() {
397 var event = this.nativeEvent;
398 event &&
399 (event.stopPropagation
400 ? event.stopPropagation()
401 : "unknown" !== typeof event.cancelBubble && (event.cancelBubble = !0),
402 (this.isPropagationStopped = functionThatReturnsTrue));
403 },
404 persist: function() {
405 this.isPersistent = functionThatReturnsTrue;
406 },
407 isPersistent: functionThatReturnsFalse,
408 destructor: function() {
409 var Interface = this.constructor.Interface,
410 propName;
411 for (propName in Interface) this[propName] = null;
412 this.nativeEvent = this._targetInst = this.dispatchConfig = null;
413 this.isPropagationStopped = this.isDefaultPrevented = functionThatReturnsFalse;
414 this._dispatchInstances = this._dispatchListeners = null;
415 }
416});
417SyntheticEvent.Interface = {
418 type: null,
419 target: null,
420 currentTarget: function() {
421 return null;
422 },
423 eventPhase: null,
424 bubbles: null,
425 cancelable: null,
426 timeStamp: function(event) {
427 return event.timeStamp || Date.now();
428 },
429 defaultPrevented: null,
430 isTrusted: null
431};
432SyntheticEvent.extend = function(Interface) {
433 function E() {}
434 function Class() {
435 return Super.apply(this, arguments);
436 }
437 var Super = this;
438 E.prototype = Super.prototype;
439 var prototype = new E();
440 Object.assign(prototype, Class.prototype);
441 Class.prototype = prototype;
442 Class.prototype.constructor = Class;
443 Class.Interface = Object.assign({}, Super.Interface, Interface);
444 Class.extend = Super.extend;
445 addEventPoolingTo(Class);
446 return Class;
447};
448addEventPoolingTo(SyntheticEvent);
449function getPooledEvent(dispatchConfig, targetInst, nativeEvent, nativeInst) {
450 if (this.eventPool.length) {
451 var instance = this.eventPool.pop();
452 this.call(instance, dispatchConfig, targetInst, nativeEvent, nativeInst);
453 return instance;
454 }
455 return new this(dispatchConfig, targetInst, nativeEvent, nativeInst);
456}
457function releasePooledEvent(event) {
458 if (!(event instanceof this))
459 throw ReactError(
460 Error(
461 "Trying to release an event instance into a pool of a different type."
462 )
463 );
464 event.destructor();
465 10 > this.eventPool.length && this.eventPool.push(event);
466}
467function addEventPoolingTo(EventConstructor) {
468 EventConstructor.eventPool = [];
469 EventConstructor.getPooled = getPooledEvent;
470 EventConstructor.release = releasePooledEvent;
471}
472var ResponderSyntheticEvent = SyntheticEvent.extend({
473 touchHistory: function() {
474 return null;
475 }
476});
477function isStartish(topLevelType) {
478 return "topTouchStart" === topLevelType;
479}
480function isMoveish(topLevelType) {
481 return "topTouchMove" === topLevelType;
482}
483var startDependencies = ["topTouchStart"],
484 moveDependencies = ["topTouchMove"],
485 endDependencies = ["topTouchCancel", "topTouchEnd"],
486 touchBank = [],
487 touchHistory = {
488 touchBank: touchBank,
489 numberActiveTouches: 0,
490 indexOfSingleActiveTouch: -1,
491 mostRecentTimeStamp: 0
492 };
493function timestampForTouch(touch) {
494 return touch.timeStamp || touch.timestamp;
495}
496function getTouchIdentifier(_ref) {
497 _ref = _ref.identifier;
498 if (null == _ref)
499 throw ReactError(Error("Touch object is missing identifier."));
500 return _ref;
501}
502function recordTouchStart(touch) {
503 var identifier = getTouchIdentifier(touch),
504 touchRecord = touchBank[identifier];
505 touchRecord
506 ? ((touchRecord.touchActive = !0),
507 (touchRecord.startPageX = touch.pageX),
508 (touchRecord.startPageY = touch.pageY),
509 (touchRecord.startTimeStamp = timestampForTouch(touch)),
510 (touchRecord.currentPageX = touch.pageX),
511 (touchRecord.currentPageY = touch.pageY),
512 (touchRecord.currentTimeStamp = timestampForTouch(touch)),
513 (touchRecord.previousPageX = touch.pageX),
514 (touchRecord.previousPageY = touch.pageY),
515 (touchRecord.previousTimeStamp = timestampForTouch(touch)))
516 : ((touchRecord = {
517 touchActive: !0,
518 startPageX: touch.pageX,
519 startPageY: touch.pageY,
520 startTimeStamp: timestampForTouch(touch),
521 currentPageX: touch.pageX,
522 currentPageY: touch.pageY,
523 currentTimeStamp: timestampForTouch(touch),
524 previousPageX: touch.pageX,
525 previousPageY: touch.pageY,
526 previousTimeStamp: timestampForTouch(touch)
527 }),
528 (touchBank[identifier] = touchRecord));
529 touchHistory.mostRecentTimeStamp = timestampForTouch(touch);
530}
531function recordTouchMove(touch) {
532 var touchRecord = touchBank[getTouchIdentifier(touch)];
533 touchRecord
534 ? ((touchRecord.touchActive = !0),
535 (touchRecord.previousPageX = touchRecord.currentPageX),
536 (touchRecord.previousPageY = touchRecord.currentPageY),
537 (touchRecord.previousTimeStamp = touchRecord.currentTimeStamp),
538 (touchRecord.currentPageX = touch.pageX),
539 (touchRecord.currentPageY = touch.pageY),
540 (touchRecord.currentTimeStamp = timestampForTouch(touch)),
541 (touchHistory.mostRecentTimeStamp = timestampForTouch(touch)))
542 : console.warn(
543 "Cannot record touch move without a touch start.\nTouch Move: %s\n",
544 "Touch Bank: %s",
545 printTouch(touch),
546 printTouchBank()
547 );
548}
549function recordTouchEnd(touch) {
550 var touchRecord = touchBank[getTouchIdentifier(touch)];
551 touchRecord
552 ? ((touchRecord.touchActive = !1),
553 (touchRecord.previousPageX = touchRecord.currentPageX),
554 (touchRecord.previousPageY = touchRecord.currentPageY),
555 (touchRecord.previousTimeStamp = touchRecord.currentTimeStamp),
556 (touchRecord.currentPageX = touch.pageX),
557 (touchRecord.currentPageY = touch.pageY),
558 (touchRecord.currentTimeStamp = timestampForTouch(touch)),
559 (touchHistory.mostRecentTimeStamp = timestampForTouch(touch)))
560 : console.warn(
561 "Cannot record touch end without a touch start.\nTouch End: %s\n",
562 "Touch Bank: %s",
563 printTouch(touch),
564 printTouchBank()
565 );
566}
567function printTouch(touch) {
568 return JSON.stringify({
569 identifier: touch.identifier,
570 pageX: touch.pageX,
571 pageY: touch.pageY,
572 timestamp: timestampForTouch(touch)
573 });
574}
575function printTouchBank() {
576 var printed = JSON.stringify(touchBank.slice(0, 20));
577 20 < touchBank.length &&
578 (printed += " (original size: " + touchBank.length + ")");
579 return printed;
580}
581var ResponderTouchHistoryStore = {
582 recordTouchTrack: function(topLevelType, nativeEvent) {
583 if (isMoveish(topLevelType))
584 nativeEvent.changedTouches.forEach(recordTouchMove);
585 else if (isStartish(topLevelType))
586 nativeEvent.changedTouches.forEach(recordTouchStart),
587 (touchHistory.numberActiveTouches = nativeEvent.touches.length),
588 1 === touchHistory.numberActiveTouches &&
589 (touchHistory.indexOfSingleActiveTouch =
590 nativeEvent.touches[0].identifier);
591 else if (
592 "topTouchEnd" === topLevelType ||
593 "topTouchCancel" === topLevelType
594 )
595 if (
596 (nativeEvent.changedTouches.forEach(recordTouchEnd),
597 (touchHistory.numberActiveTouches = nativeEvent.touches.length),
598 1 === touchHistory.numberActiveTouches)
599 )
600 for (topLevelType = 0; topLevelType < touchBank.length; topLevelType++)
601 if (
602 ((nativeEvent = touchBank[topLevelType]),
603 null != nativeEvent && nativeEvent.touchActive)
604 ) {
605 touchHistory.indexOfSingleActiveTouch = topLevelType;
606 break;
607 }
608 },
609 touchHistory: touchHistory
610};
611function accumulate(current, next) {
612 if (null == next)
613 throw ReactError(
614 Error("accumulate(...): Accumulated items must not be null or undefined.")
615 );
616 return null == current
617 ? next
618 : Array.isArray(current)
619 ? current.concat(next)
620 : Array.isArray(next)
621 ? [current].concat(next)
622 : [current, next];
623}
624var responderInst = null,
625 trackedTouchCount = 0;
626function changeResponder(nextResponderInst, blockHostResponder) {
627 var oldResponderInst = responderInst;
628 responderInst = nextResponderInst;
629 if (null !== ResponderEventPlugin.GlobalResponderHandler)
630 ResponderEventPlugin.GlobalResponderHandler.onChange(
631 oldResponderInst,
632 nextResponderInst,
633 blockHostResponder
634 );
635}
636var eventTypes = {
637 startShouldSetResponder: {
638 phasedRegistrationNames: {
639 bubbled: "onStartShouldSetResponder",
640 captured: "onStartShouldSetResponderCapture"
641 },
642 dependencies: startDependencies
643 },
644 scrollShouldSetResponder: {
645 phasedRegistrationNames: {
646 bubbled: "onScrollShouldSetResponder",
647 captured: "onScrollShouldSetResponderCapture"
648 },
649 dependencies: ["topScroll"]
650 },
651 selectionChangeShouldSetResponder: {
652 phasedRegistrationNames: {
653 bubbled: "onSelectionChangeShouldSetResponder",
654 captured: "onSelectionChangeShouldSetResponderCapture"
655 },
656 dependencies: ["topSelectionChange"]
657 },
658 moveShouldSetResponder: {
659 phasedRegistrationNames: {
660 bubbled: "onMoveShouldSetResponder",
661 captured: "onMoveShouldSetResponderCapture"
662 },
663 dependencies: moveDependencies
664 },
665 responderStart: {
666 registrationName: "onResponderStart",
667 dependencies: startDependencies
668 },
669 responderMove: {
670 registrationName: "onResponderMove",
671 dependencies: moveDependencies
672 },
673 responderEnd: {
674 registrationName: "onResponderEnd",
675 dependencies: endDependencies
676 },
677 responderRelease: {
678 registrationName: "onResponderRelease",
679 dependencies: endDependencies
680 },
681 responderTerminationRequest: {
682 registrationName: "onResponderTerminationRequest",
683 dependencies: []
684 },
685 responderGrant: { registrationName: "onResponderGrant", dependencies: [] },
686 responderReject: {
687 registrationName: "onResponderReject",
688 dependencies: []
689 },
690 responderTerminate: {
691 registrationName: "onResponderTerminate",
692 dependencies: []
693 }
694 },
695 ResponderEventPlugin = {
696 _getResponder: function() {
697 return responderInst;
698 },
699 eventTypes: eventTypes,
700 extractEvents: function(
701 topLevelType,
702 targetInst,
703 nativeEvent,
704 nativeEventTarget
705 ) {
706 if (isStartish(topLevelType)) trackedTouchCount += 1;
707 else if (
708 "topTouchEnd" === topLevelType ||
709 "topTouchCancel" === topLevelType
710 )
711 if (0 <= trackedTouchCount) --trackedTouchCount;
712 else
713 return (
714 console.error(
715 "Ended a touch event which was not counted in `trackedTouchCount`."
716 ),
717 null
718 );
719 ResponderTouchHistoryStore.recordTouchTrack(topLevelType, nativeEvent);
720 if (
721 targetInst &&
722 (("topScroll" === topLevelType && !nativeEvent.responderIgnoreScroll) ||
723 (0 < trackedTouchCount && "topSelectionChange" === topLevelType) ||
724 isStartish(topLevelType) ||
725 isMoveish(topLevelType))
726 ) {
727 var JSCompiler_temp = isStartish(topLevelType)
728 ? eventTypes.startShouldSetResponder
729 : isMoveish(topLevelType)
730 ? eventTypes.moveShouldSetResponder
731 : "topSelectionChange" === topLevelType
732 ? eventTypes.selectionChangeShouldSetResponder
733 : eventTypes.scrollShouldSetResponder;
734 if (responderInst)
735 b: {
736 var JSCompiler_temp$jscomp$0 = responderInst;
737 for (
738 var depthA = 0, tempA = JSCompiler_temp$jscomp$0;
739 tempA;
740 tempA = getParent(tempA)
741 )
742 depthA++;
743 tempA = 0;
744 for (var tempB = targetInst; tempB; tempB = getParent(tempB))
745 tempA++;
746 for (; 0 < depthA - tempA; )
747 (JSCompiler_temp$jscomp$0 = getParent(JSCompiler_temp$jscomp$0)),
748 depthA--;
749 for (; 0 < tempA - depthA; )
750 (targetInst = getParent(targetInst)), tempA--;
751 for (; depthA--; ) {
752 if (
753 JSCompiler_temp$jscomp$0 === targetInst ||
754 JSCompiler_temp$jscomp$0 === targetInst.alternate
755 )
756 break b;
757 JSCompiler_temp$jscomp$0 = getParent(JSCompiler_temp$jscomp$0);
758 targetInst = getParent(targetInst);
759 }
760 JSCompiler_temp$jscomp$0 = null;
761 }
762 else JSCompiler_temp$jscomp$0 = targetInst;
763 targetInst = JSCompiler_temp$jscomp$0 === responderInst;
764 JSCompiler_temp$jscomp$0 = ResponderSyntheticEvent.getPooled(
765 JSCompiler_temp,
766 JSCompiler_temp$jscomp$0,
767 nativeEvent,
768 nativeEventTarget
769 );
770 JSCompiler_temp$jscomp$0.touchHistory =
771 ResponderTouchHistoryStore.touchHistory;
772 targetInst
773 ? forEachAccumulated(
774 JSCompiler_temp$jscomp$0,
775 accumulateTwoPhaseDispatchesSingleSkipTarget
776 )
777 : forEachAccumulated(
778 JSCompiler_temp$jscomp$0,
779 accumulateTwoPhaseDispatchesSingle
780 );
781 b: {
782 JSCompiler_temp = JSCompiler_temp$jscomp$0._dispatchListeners;
783 targetInst = JSCompiler_temp$jscomp$0._dispatchInstances;
784 if (Array.isArray(JSCompiler_temp))
785 for (
786 depthA = 0;
787 depthA < JSCompiler_temp.length &&
788 !JSCompiler_temp$jscomp$0.isPropagationStopped();
789 depthA++
790 ) {
791 if (
792 JSCompiler_temp[depthA](
793 JSCompiler_temp$jscomp$0,
794 targetInst[depthA]
795 )
796 ) {
797 JSCompiler_temp = targetInst[depthA];
798 break b;
799 }
800 }
801 else if (
802 JSCompiler_temp &&
803 JSCompiler_temp(JSCompiler_temp$jscomp$0, targetInst)
804 ) {
805 JSCompiler_temp = targetInst;
806 break b;
807 }
808 JSCompiler_temp = null;
809 }
810 JSCompiler_temp$jscomp$0._dispatchInstances = null;
811 JSCompiler_temp$jscomp$0._dispatchListeners = null;
812 JSCompiler_temp$jscomp$0.isPersistent() ||
813 JSCompiler_temp$jscomp$0.constructor.release(
814 JSCompiler_temp$jscomp$0
815 );
816 JSCompiler_temp && JSCompiler_temp !== responderInst
817 ? ((JSCompiler_temp$jscomp$0 = void 0),
818 (targetInst = ResponderSyntheticEvent.getPooled(
819 eventTypes.responderGrant,
820 JSCompiler_temp,
821 nativeEvent,
822 nativeEventTarget
823 )),
824 (targetInst.touchHistory = ResponderTouchHistoryStore.touchHistory),
825 forEachAccumulated(targetInst, accumulateDirectDispatchesSingle),
826 (depthA = !0 === executeDirectDispatch(targetInst)),
827 responderInst
828 ? ((tempA = ResponderSyntheticEvent.getPooled(
829 eventTypes.responderTerminationRequest,
830 responderInst,
831 nativeEvent,
832 nativeEventTarget
833 )),
834 (tempA.touchHistory = ResponderTouchHistoryStore.touchHistory),
835 forEachAccumulated(tempA, accumulateDirectDispatchesSingle),
836 (tempB =
837 !tempA._dispatchListeners || executeDirectDispatch(tempA)),
838 tempA.isPersistent() || tempA.constructor.release(tempA),
839 tempB
840 ? ((tempA = ResponderSyntheticEvent.getPooled(
841 eventTypes.responderTerminate,
842 responderInst,
843 nativeEvent,
844 nativeEventTarget
845 )),
846 (tempA.touchHistory =
847 ResponderTouchHistoryStore.touchHistory),
848 forEachAccumulated(tempA, accumulateDirectDispatchesSingle),
849 (JSCompiler_temp$jscomp$0 = accumulate(
850 JSCompiler_temp$jscomp$0,
851 [targetInst, tempA]
852 )),
853 changeResponder(JSCompiler_temp, depthA))
854 : ((JSCompiler_temp = ResponderSyntheticEvent.getPooled(
855 eventTypes.responderReject,
856 JSCompiler_temp,
857 nativeEvent,
858 nativeEventTarget
859 )),
860 (JSCompiler_temp.touchHistory =
861 ResponderTouchHistoryStore.touchHistory),
862 forEachAccumulated(
863 JSCompiler_temp,
864 accumulateDirectDispatchesSingle
865 ),
866 (JSCompiler_temp$jscomp$0 = accumulate(
867 JSCompiler_temp$jscomp$0,
868 JSCompiler_temp
869 ))))
870 : ((JSCompiler_temp$jscomp$0 = accumulate(
871 JSCompiler_temp$jscomp$0,
872 targetInst
873 )),
874 changeResponder(JSCompiler_temp, depthA)),
875 (JSCompiler_temp = JSCompiler_temp$jscomp$0))
876 : (JSCompiler_temp = null);
877 } else JSCompiler_temp = null;
878 JSCompiler_temp$jscomp$0 = responderInst && isStartish(topLevelType);
879 targetInst = responderInst && isMoveish(topLevelType);
880 depthA =
881 responderInst &&
882 ("topTouchEnd" === topLevelType || "topTouchCancel" === topLevelType);
883 if (
884 (JSCompiler_temp$jscomp$0 = JSCompiler_temp$jscomp$0
885 ? eventTypes.responderStart
886 : targetInst
887 ? eventTypes.responderMove
888 : depthA
889 ? eventTypes.responderEnd
890 : null)
891 )
892 (JSCompiler_temp$jscomp$0 = ResponderSyntheticEvent.getPooled(
893 JSCompiler_temp$jscomp$0,
894 responderInst,
895 nativeEvent,
896 nativeEventTarget
897 )),
898 (JSCompiler_temp$jscomp$0.touchHistory =
899 ResponderTouchHistoryStore.touchHistory),
900 forEachAccumulated(
901 JSCompiler_temp$jscomp$0,
902 accumulateDirectDispatchesSingle
903 ),
904 (JSCompiler_temp = accumulate(
905 JSCompiler_temp,
906 JSCompiler_temp$jscomp$0
907 ));
908 JSCompiler_temp$jscomp$0 =
909 responderInst && "topTouchCancel" === topLevelType;
910 if (
911 (topLevelType =
912 responderInst &&
913 !JSCompiler_temp$jscomp$0 &&
914 ("topTouchEnd" === topLevelType || "topTouchCancel" === topLevelType))
915 )
916 a: {
917 if ((topLevelType = nativeEvent.touches) && 0 !== topLevelType.length)
918 for (targetInst = 0; targetInst < topLevelType.length; targetInst++)
919 if (
920 ((depthA = topLevelType[targetInst].target),
921 null !== depthA && void 0 !== depthA && 0 !== depthA)
922 ) {
923 tempA = getInstanceFromNode(depthA);
924 b: {
925 for (depthA = responderInst; tempA; ) {
926 if (depthA === tempA || depthA === tempA.alternate) {
927 depthA = !0;
928 break b;
929 }
930 tempA = getParent(tempA);
931 }
932 depthA = !1;
933 }
934 if (depthA) {
935 topLevelType = !1;
936 break a;
937 }
938 }
939 topLevelType = !0;
940 }
941 if (
942 (topLevelType = JSCompiler_temp$jscomp$0
943 ? eventTypes.responderTerminate
944 : topLevelType
945 ? eventTypes.responderRelease
946 : null)
947 )
948 (nativeEvent = ResponderSyntheticEvent.getPooled(
949 topLevelType,
950 responderInst,
951 nativeEvent,
952 nativeEventTarget
953 )),
954 (nativeEvent.touchHistory = ResponderTouchHistoryStore.touchHistory),
955 forEachAccumulated(nativeEvent, accumulateDirectDispatchesSingle),
956 (JSCompiler_temp = accumulate(JSCompiler_temp, nativeEvent)),
957 changeResponder(null);
958 return JSCompiler_temp;
959 },
960 GlobalResponderHandler: null,
961 injection: {
962 injectGlobalResponderHandler: function(GlobalResponderHandler) {
963 ResponderEventPlugin.GlobalResponderHandler = GlobalResponderHandler;
964 }
965 }
966 },
967 customBubblingEventTypes =
968 ReactNativePrivateInterface.ReactNativeViewConfigRegistry
969 .customBubblingEventTypes,
970 customDirectEventTypes =
971 ReactNativePrivateInterface.ReactNativeViewConfigRegistry
972 .customDirectEventTypes;
973injection.injectEventPluginOrder([
974 "ResponderEventPlugin",
975 "ReactNativeBridgeEventPlugin"
976]);
977injection.injectEventPluginsByName({
978 ResponderEventPlugin: ResponderEventPlugin,
979 ReactNativeBridgeEventPlugin: {
980 eventTypes: {},
981 extractEvents: function(
982 topLevelType,
983 targetInst,
984 nativeEvent,
985 nativeEventTarget
986 ) {
987 if (null == targetInst) return null;
988 var bubbleDispatchConfig = customBubblingEventTypes[topLevelType],
989 directDispatchConfig = customDirectEventTypes[topLevelType];
990 if (!bubbleDispatchConfig && !directDispatchConfig)
991 throw ReactError(
992 Error(
993 'Unsupported top level event type "' + topLevelType + '" dispatched'
994 )
995 );
996 topLevelType = SyntheticEvent.getPooled(
997 bubbleDispatchConfig || directDispatchConfig,
998 targetInst,
999 nativeEvent,
1000 nativeEventTarget
1001 );
1002 if (bubbleDispatchConfig)
1003 forEachAccumulated(topLevelType, accumulateTwoPhaseDispatchesSingle);
1004 else if (directDispatchConfig)
1005 forEachAccumulated(topLevelType, accumulateDirectDispatchesSingle);
1006 else return null;
1007 return topLevelType;
1008 }
1009 }
1010});
1011function getInstanceFromInstance(instanceHandle) {
1012 return instanceHandle;
1013}
1014getFiberCurrentPropsFromNode = function(inst) {
1015 return inst.canonical.currentProps;
1016};
1017getInstanceFromNode = getInstanceFromInstance;
1018getNodeFromInstance = function(inst) {
1019 inst = inst.stateNode.canonical._nativeTag;
1020 if (!inst) throw ReactError(Error("All native instances should have a tag."));
1021 return inst;
1022};
1023ResponderEventPlugin.injection.injectGlobalResponderHandler({
1024 onChange: function(from, to, blockNativeResponder) {
1025 null !== to
1026 ? ReactNativePrivateInterface.UIManager.setJSResponder(
1027 to.stateNode.canonical._nativeTag,
1028 blockNativeResponder
1029 )
1030 : ReactNativePrivateInterface.UIManager.clearJSResponder();
1031 }
1032});
1033var ReactSharedInternals =
1034 React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
1035ReactSharedInternals.hasOwnProperty("ReactCurrentDispatcher") ||
1036 (ReactSharedInternals.ReactCurrentDispatcher = { current: null });
1037ReactSharedInternals.hasOwnProperty("ReactCurrentBatchConfig") ||
1038 (ReactSharedInternals.ReactCurrentBatchConfig = { suspense: null });
1039var hasSymbol = "function" === typeof Symbol && Symbol.for,
1040 REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for("react.element") : 60103,
1041 REACT_PORTAL_TYPE = hasSymbol ? Symbol.for("react.portal") : 60106,
1042 REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for("react.fragment") : 60107,
1043 REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for("react.strict_mode") : 60108,
1044 REACT_PROFILER_TYPE = hasSymbol ? Symbol.for("react.profiler") : 60114,
1045 REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for("react.provider") : 60109,
1046 REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for("react.context") : 60110,
1047 REACT_CONCURRENT_MODE_TYPE = hasSymbol
1048 ? Symbol.for("react.concurrent_mode")
1049 : 60111,
1050 REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for("react.forward_ref") : 60112,
1051 REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for("react.suspense") : 60113,
1052 REACT_SUSPENSE_LIST_TYPE = hasSymbol
1053 ? Symbol.for("react.suspense_list")
1054 : 60120,
1055 REACT_MEMO_TYPE = hasSymbol ? Symbol.for("react.memo") : 60115,
1056 REACT_LAZY_TYPE = hasSymbol ? Symbol.for("react.lazy") : 60116;
1057hasSymbol && Symbol.for("react.fundamental");
1058hasSymbol && Symbol.for("react.responder");
1059var MAYBE_ITERATOR_SYMBOL = "function" === typeof Symbol && Symbol.iterator;
1060function getIteratorFn(maybeIterable) {
1061 if (null === maybeIterable || "object" !== typeof maybeIterable) return null;
1062 maybeIterable =
1063 (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) ||
1064 maybeIterable["@@iterator"];
1065 return "function" === typeof maybeIterable ? maybeIterable : null;
1066}
1067function getComponentName(type) {
1068 if (null == type) return null;
1069 if ("function" === typeof type) return type.displayName || type.name || null;
1070 if ("string" === typeof type) return type;
1071 switch (type) {
1072 case REACT_FRAGMENT_TYPE:
1073 return "Fragment";
1074 case REACT_PORTAL_TYPE:
1075 return "Portal";
1076 case REACT_PROFILER_TYPE:
1077 return "Profiler";
1078 case REACT_STRICT_MODE_TYPE:
1079 return "StrictMode";
1080 case REACT_SUSPENSE_TYPE:
1081 return "Suspense";
1082 case REACT_SUSPENSE_LIST_TYPE:
1083 return "SuspenseList";
1084 }
1085 if ("object" === typeof type)
1086 switch (type.$$typeof) {
1087 case REACT_CONTEXT_TYPE:
1088 return "Context.Consumer";
1089 case REACT_PROVIDER_TYPE:
1090 return "Context.Provider";
1091 case REACT_FORWARD_REF_TYPE:
1092 var innerType = type.render;
1093 innerType = innerType.displayName || innerType.name || "";
1094 return (
1095 type.displayName ||
1096 ("" !== innerType ? "ForwardRef(" + innerType + ")" : "ForwardRef")
1097 );
1098 case REACT_MEMO_TYPE:
1099 return getComponentName(type.type);
1100 case REACT_LAZY_TYPE:
1101 if ((type = 1 === type._status ? type._result : null))
1102 return getComponentName(type);
1103 }
1104 return null;
1105}
1106require("../shims/ReactFeatureFlags");
1107function isFiberMountedImpl(fiber) {
1108 var node = fiber;
1109 if (fiber.alternate) for (; node.return; ) node = node.return;
1110 else {
1111 if (0 !== (node.effectTag & 2)) return 1;
1112 for (; node.return; )
1113 if (((node = node.return), 0 !== (node.effectTag & 2))) return 1;
1114 }
1115 return 3 === node.tag ? 2 : 3;
1116}
1117function assertIsMounted(fiber) {
1118 if (2 !== isFiberMountedImpl(fiber))
1119 throw ReactError(Error("Unable to find node on an unmounted component."));
1120}
1121function findCurrentFiberUsingSlowPath(fiber) {
1122 var alternate = fiber.alternate;
1123 if (!alternate) {
1124 alternate = isFiberMountedImpl(fiber);
1125 if (3 === alternate)
1126 throw ReactError(Error("Unable to find node on an unmounted component."));
1127 return 1 === alternate ? null : fiber;
1128 }
1129 for (var a = fiber, b = alternate; ; ) {
1130 var parentA = a.return;
1131 if (null === parentA) break;
1132 var parentB = parentA.alternate;
1133 if (null === parentB) {
1134 b = parentA.return;
1135 if (null !== b) {
1136 a = b;
1137 continue;
1138 }
1139 break;
1140 }
1141 if (parentA.child === parentB.child) {
1142 for (parentB = parentA.child; parentB; ) {
1143 if (parentB === a) return assertIsMounted(parentA), fiber;
1144 if (parentB === b) return assertIsMounted(parentA), alternate;
1145 parentB = parentB.sibling;
1146 }
1147 throw ReactError(Error("Unable to find node on an unmounted component."));
1148 }
1149 if (a.return !== b.return) (a = parentA), (b = parentB);
1150 else {
1151 for (var didFindChild = !1, _child = parentA.child; _child; ) {
1152 if (_child === a) {
1153 didFindChild = !0;
1154 a = parentA;
1155 b = parentB;
1156 break;
1157 }
1158 if (_child === b) {
1159 didFindChild = !0;
1160 b = parentA;
1161 a = parentB;
1162 break;
1163 }
1164 _child = _child.sibling;
1165 }
1166 if (!didFindChild) {
1167 for (_child = parentB.child; _child; ) {
1168 if (_child === a) {
1169 didFindChild = !0;
1170 a = parentB;
1171 b = parentA;
1172 break;
1173 }
1174 if (_child === b) {
1175 didFindChild = !0;
1176 b = parentB;
1177 a = parentA;
1178 break;
1179 }
1180 _child = _child.sibling;
1181 }
1182 if (!didFindChild)
1183 throw ReactError(
1184 Error(
1185 "Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue."
1186 )
1187 );
1188 }
1189 }
1190 if (a.alternate !== b)
1191 throw ReactError(
1192 Error(
1193 "Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue."
1194 )
1195 );
1196 }
1197 if (3 !== a.tag)
1198 throw ReactError(Error("Unable to find node on an unmounted component."));
1199 return a.stateNode.current === a ? fiber : alternate;
1200}
1201function findCurrentHostFiber(parent) {
1202 parent = findCurrentFiberUsingSlowPath(parent);
1203 if (!parent) return null;
1204 for (var node = parent; ; ) {
1205 if (5 === node.tag || 6 === node.tag) return node;
1206 if (node.child) (node.child.return = node), (node = node.child);
1207 else {
1208 if (node === parent) break;
1209 for (; !node.sibling; ) {
1210 if (!node.return || node.return === parent) return null;
1211 node = node.return;
1212 }
1213 node.sibling.return = node.return;
1214 node = node.sibling;
1215 }
1216 }
1217 return null;
1218}
1219function mountSafeCallback_NOT_REALLY_SAFE(context, callback) {
1220 return function() {
1221 if (
1222 callback &&
1223 ("boolean" !== typeof context.__isMounted || context.__isMounted)
1224 )
1225 return callback.apply(context, arguments);
1226 };
1227}
1228var emptyObject = {},
1229 removedKeys = null,
1230 removedKeyCount = 0;
1231function restoreDeletedValuesInNestedArray(
1232 updatePayload,
1233 node,
1234 validAttributes
1235) {
1236 if (Array.isArray(node))
1237 for (var i = node.length; i-- && 0 < removedKeyCount; )
1238 restoreDeletedValuesInNestedArray(
1239 updatePayload,
1240 node[i],
1241 validAttributes
1242 );
1243 else if (node && 0 < removedKeyCount)
1244 for (i in removedKeys)
1245 if (removedKeys[i]) {
1246 var nextProp = node[i];
1247 if (void 0 !== nextProp) {
1248 var attributeConfig = validAttributes[i];
1249 if (attributeConfig) {
1250 "function" === typeof nextProp && (nextProp = !0);
1251 "undefined" === typeof nextProp && (nextProp = null);
1252 if ("object" !== typeof attributeConfig)
1253 updatePayload[i] = nextProp;
1254 else if (
1255 "function" === typeof attributeConfig.diff ||
1256 "function" === typeof attributeConfig.process
1257 )
1258 (nextProp =
1259 "function" === typeof attributeConfig.process
1260 ? attributeConfig.process(nextProp)
1261 : nextProp),
1262 (updatePayload[i] = nextProp);
1263 removedKeys[i] = !1;
1264 removedKeyCount--;
1265 }
1266 }
1267 }
1268}
1269function diffNestedProperty(
1270 updatePayload,
1271 prevProp,
1272 nextProp,
1273 validAttributes
1274) {
1275 if (!updatePayload && prevProp === nextProp) return updatePayload;
1276 if (!prevProp || !nextProp)
1277 return nextProp
1278 ? addNestedProperty(updatePayload, nextProp, validAttributes)
1279 : prevProp
1280 ? clearNestedProperty(updatePayload, prevProp, validAttributes)
1281 : updatePayload;
1282 if (!Array.isArray(prevProp) && !Array.isArray(nextProp))
1283 return diffProperties(updatePayload, prevProp, nextProp, validAttributes);
1284 if (Array.isArray(prevProp) && Array.isArray(nextProp)) {
1285 var minLength =
1286 prevProp.length < nextProp.length ? prevProp.length : nextProp.length,
1287 i;
1288 for (i = 0; i < minLength; i++)
1289 updatePayload = diffNestedProperty(
1290 updatePayload,
1291 prevProp[i],
1292 nextProp[i],
1293 validAttributes
1294 );
1295 for (; i < prevProp.length; i++)
1296 updatePayload = clearNestedProperty(
1297 updatePayload,
1298 prevProp[i],
1299 validAttributes
1300 );
1301 for (; i < nextProp.length; i++)
1302 updatePayload = addNestedProperty(
1303 updatePayload,
1304 nextProp[i],
1305 validAttributes
1306 );
1307 return updatePayload;
1308 }
1309 return Array.isArray(prevProp)
1310 ? diffProperties(
1311 updatePayload,
1312 ReactNativePrivateInterface.flattenStyle(prevProp),
1313 nextProp,
1314 validAttributes
1315 )
1316 : diffProperties(
1317 updatePayload,
1318 prevProp,
1319 ReactNativePrivateInterface.flattenStyle(nextProp),
1320 validAttributes
1321 );
1322}
1323function addNestedProperty(updatePayload, nextProp, validAttributes) {
1324 if (!nextProp) return updatePayload;
1325 if (!Array.isArray(nextProp))
1326 return diffProperties(
1327 updatePayload,
1328 emptyObject,
1329 nextProp,
1330 validAttributes
1331 );
1332 for (var i = 0; i < nextProp.length; i++)
1333 updatePayload = addNestedProperty(
1334 updatePayload,
1335 nextProp[i],
1336 validAttributes
1337 );
1338 return updatePayload;
1339}
1340function clearNestedProperty(updatePayload, prevProp, validAttributes) {
1341 if (!prevProp) return updatePayload;
1342 if (!Array.isArray(prevProp))
1343 return diffProperties(
1344 updatePayload,
1345 prevProp,
1346 emptyObject,
1347 validAttributes
1348 );
1349 for (var i = 0; i < prevProp.length; i++)
1350 updatePayload = clearNestedProperty(
1351 updatePayload,
1352 prevProp[i],
1353 validAttributes
1354 );
1355 return updatePayload;
1356}
1357function diffProperties(updatePayload, prevProps, nextProps, validAttributes) {
1358 var attributeConfig, propKey;
1359 for (propKey in nextProps)
1360 if ((attributeConfig = validAttributes[propKey])) {
1361 var prevProp = prevProps[propKey];
1362 var nextProp = nextProps[propKey];
1363 "function" === typeof nextProp &&
1364 ((nextProp = !0), "function" === typeof prevProp && (prevProp = !0));
1365 "undefined" === typeof nextProp &&
1366 ((nextProp = null),
1367 "undefined" === typeof prevProp && (prevProp = null));
1368 removedKeys && (removedKeys[propKey] = !1);
1369 if (updatePayload && void 0 !== updatePayload[propKey])
1370 if ("object" !== typeof attributeConfig)
1371 updatePayload[propKey] = nextProp;
1372 else {
1373 if (
1374 "function" === typeof attributeConfig.diff ||
1375 "function" === typeof attributeConfig.process
1376 )
1377 (attributeConfig =
1378 "function" === typeof attributeConfig.process
1379 ? attributeConfig.process(nextProp)
1380 : nextProp),
1381 (updatePayload[propKey] = attributeConfig);
1382 }
1383 else if (prevProp !== nextProp)
1384 if ("object" !== typeof attributeConfig)
1385 ("object" !== typeof nextProp ||
1386 null === nextProp ||
1387 ReactNativePrivateInterface.deepDiffer(prevProp, nextProp)) &&
1388 ((updatePayload || (updatePayload = {}))[propKey] = nextProp);
1389 else if (
1390 "function" === typeof attributeConfig.diff ||
1391 "function" === typeof attributeConfig.process
1392 ) {
1393 if (
1394 void 0 === prevProp ||
1395 ("function" === typeof attributeConfig.diff
1396 ? attributeConfig.diff(prevProp, nextProp)
1397 : "object" !== typeof nextProp ||
1398 null === nextProp ||
1399 ReactNativePrivateInterface.deepDiffer(prevProp, nextProp))
1400 )
1401 (attributeConfig =
1402 "function" === typeof attributeConfig.process
1403 ? attributeConfig.process(nextProp)
1404 : nextProp),
1405 ((updatePayload || (updatePayload = {}))[
1406 propKey
1407 ] = attributeConfig);
1408 } else
1409 (removedKeys = null),
1410 (removedKeyCount = 0),
1411 (updatePayload = diffNestedProperty(
1412 updatePayload,
1413 prevProp,
1414 nextProp,
1415 attributeConfig
1416 )),
1417 0 < removedKeyCount &&
1418 updatePayload &&
1419 (restoreDeletedValuesInNestedArray(
1420 updatePayload,
1421 nextProp,
1422 attributeConfig
1423 ),
1424 (removedKeys = null));
1425 }
1426 for (var _propKey in prevProps)
1427 void 0 === nextProps[_propKey] &&
1428 (!(attributeConfig = validAttributes[_propKey]) ||
1429 (updatePayload && void 0 !== updatePayload[_propKey]) ||
1430 ((prevProp = prevProps[_propKey]),
1431 void 0 !== prevProp &&
1432 ("object" !== typeof attributeConfig ||
1433 "function" === typeof attributeConfig.diff ||
1434 "function" === typeof attributeConfig.process
1435 ? (((updatePayload || (updatePayload = {}))[_propKey] = null),
1436 removedKeys || (removedKeys = {}),
1437 removedKeys[_propKey] ||
1438 ((removedKeys[_propKey] = !0), removedKeyCount++))
1439 : (updatePayload = clearNestedProperty(
1440 updatePayload,
1441 prevProp,
1442 attributeConfig
1443 )))));
1444 return updatePayload;
1445}
1446var restoreTarget = null,
1447 restoreQueue = null;
1448function restoreStateOfTarget(target) {
1449 if (getInstanceFromNode(target))
1450 throw ReactError(
1451 Error(
1452 "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."
1453 )
1454 );
1455}
1456function batchedUpdatesImpl(fn, bookkeeping) {
1457 return fn(bookkeeping);
1458}
1459function flushDiscreteUpdatesImpl() {}
1460var isInsideEventHandler = !1;
1461function batchedUpdates(fn, bookkeeping) {
1462 if (isInsideEventHandler) return fn(bookkeeping);
1463 isInsideEventHandler = !0;
1464 try {
1465 return batchedUpdatesImpl(fn, bookkeeping);
1466 } finally {
1467 if (
1468 ((isInsideEventHandler = !1),
1469 null !== restoreTarget || null !== restoreQueue)
1470 )
1471 if (
1472 (flushDiscreteUpdatesImpl(),
1473 restoreTarget &&
1474 ((bookkeeping = restoreTarget),
1475 (fn = restoreQueue),
1476 (restoreQueue = restoreTarget = null),
1477 restoreStateOfTarget(bookkeeping),
1478 fn))
1479 )
1480 for (bookkeeping = 0; bookkeeping < fn.length; bookkeeping++)
1481 restoreStateOfTarget(fn[bookkeeping]);
1482 }
1483}
1484function _inherits(subClass, superClass) {
1485 if ("function" !== typeof superClass && null !== superClass)
1486 throw new TypeError(
1487 "Super expression must either be null or a function, not " +
1488 typeof superClass
1489 );
1490 subClass.prototype = Object.create(superClass && superClass.prototype, {
1491 constructor: {
1492 value: subClass,
1493 enumerable: !1,
1494 writable: !0,
1495 configurable: !0
1496 }
1497 });
1498 superClass &&
1499 (Object.setPrototypeOf
1500 ? Object.setPrototypeOf(subClass, superClass)
1501 : (subClass.__proto__ = superClass));
1502}
1503(function(_React$Component) {
1504 function ReactNativeComponent() {
1505 if (!(this instanceof ReactNativeComponent))
1506 throw new TypeError("Cannot call a class as a function");
1507 var call = _React$Component.apply(this, arguments);
1508 if (!this)
1509 throw new ReferenceError(
1510 "this hasn't been initialised - super() hasn't been called"
1511 );
1512 return !call || ("object" !== typeof call && "function" !== typeof call)
1513 ? this
1514 : call;
1515 }
1516 _inherits(ReactNativeComponent, _React$Component);
1517 ReactNativeComponent.prototype.blur = function() {};
1518 ReactNativeComponent.prototype.focus = function() {};
1519 ReactNativeComponent.prototype.measure = function() {};
1520 ReactNativeComponent.prototype.measureInWindow = function() {};
1521 ReactNativeComponent.prototype.measureLayout = function() {};
1522 ReactNativeComponent.prototype.setNativeProps = function() {};
1523 return ReactNativeComponent;
1524})(React.Component);
1525new Map();
1526new Map();
1527new Set();
1528new Map();
1529function dispatchEvent(target, topLevelType, nativeEvent) {
1530 batchedUpdates(function() {
1531 var events = nativeEvent.target;
1532 for (var events$jscomp$0 = null, i = 0; i < plugins.length; i++) {
1533 var possiblePlugin = plugins[i];
1534 possiblePlugin &&
1535 (possiblePlugin = possiblePlugin.extractEvents(
1536 topLevelType,
1537 target,
1538 nativeEvent,
1539 events
1540 )) &&
1541 (events$jscomp$0 = accumulateInto(events$jscomp$0, possiblePlugin));
1542 }
1543 events = events$jscomp$0;
1544 null !== events && (eventQueue = accumulateInto(eventQueue, events));
1545 events = eventQueue;
1546 eventQueue = null;
1547 if (events) {
1548 forEachAccumulated(events, executeDispatchesAndReleaseTopLevel);
1549 if (eventQueue)
1550 throw ReactError(
1551 Error(
1552 "processEventQueue(): Additional events were enqueued while processing an event queue. Support for this has not yet been implemented."
1553 )
1554 );
1555 if (hasRethrowError)
1556 throw ((events = rethrowError),
1557 (hasRethrowError = !1),
1558 (rethrowError = null),
1559 events);
1560 }
1561 });
1562}
1563function shim$1() {
1564 throw ReactError(
1565 Error(
1566 "The current renderer does not support hydration. This error is likely caused by a bug in React. Please file an issue."
1567 )
1568 );
1569}
1570var _nativeFabricUIManage$1 = nativeFabricUIManager,
1571 createNode = _nativeFabricUIManage$1.createNode,
1572 cloneNode = _nativeFabricUIManage$1.cloneNode,
1573 cloneNodeWithNewChildren = _nativeFabricUIManage$1.cloneNodeWithNewChildren,
1574 cloneNodeWithNewChildrenAndProps =
1575 _nativeFabricUIManage$1.cloneNodeWithNewChildrenAndProps,
1576 cloneNodeWithNewProps = _nativeFabricUIManage$1.cloneNodeWithNewProps,
1577 createChildNodeSet = _nativeFabricUIManage$1.createChildSet,
1578 appendChildNode = _nativeFabricUIManage$1.appendChild,
1579 appendChildNodeToSet = _nativeFabricUIManage$1.appendChildToSet,
1580 completeRoot = _nativeFabricUIManage$1.completeRoot,
1581 registerEventHandler = _nativeFabricUIManage$1.registerEventHandler,
1582 fabricMeasure = _nativeFabricUIManage$1.measure,
1583 fabricMeasureInWindow = _nativeFabricUIManage$1.measureInWindow,
1584 fabricMeasureLayout = _nativeFabricUIManage$1.measureLayout,
1585 getViewConfigForType =
1586 ReactNativePrivateInterface.ReactNativeViewConfigRegistry.get,
1587 nextReactTag = 2;
1588registerEventHandler && registerEventHandler(dispatchEvent);
1589var ReactFabricHostComponent = (function() {
1590 function ReactFabricHostComponent(
1591 tag,
1592 viewConfig,
1593 props,
1594 internalInstanceHandle
1595 ) {
1596 if (!(this instanceof ReactFabricHostComponent))
1597 throw new TypeError("Cannot call a class as a function");
1598 this._nativeTag = tag;
1599 this.viewConfig = viewConfig;
1600 this.currentProps = props;
1601 this._internalInstanceHandle = internalInstanceHandle;
1602 }
1603 ReactFabricHostComponent.prototype.blur = function() {
1604 ReactNativePrivateInterface.TextInputState.blurTextInput(this._nativeTag);
1605 };
1606 ReactFabricHostComponent.prototype.focus = function() {
1607 ReactNativePrivateInterface.TextInputState.focusTextInput(this._nativeTag);
1608 };
1609 ReactFabricHostComponent.prototype.measure = function(callback) {
1610 fabricMeasure(
1611 this._internalInstanceHandle.stateNode.node,
1612 mountSafeCallback_NOT_REALLY_SAFE(this, callback)
1613 );
1614 };
1615 ReactFabricHostComponent.prototype.measureInWindow = function(callback) {
1616 fabricMeasureInWindow(
1617 this._internalInstanceHandle.stateNode.node,
1618 mountSafeCallback_NOT_REALLY_SAFE(this, callback)
1619 );
1620 };
1621 ReactFabricHostComponent.prototype.measureLayout = function(
1622 relativeToNativeNode,
1623 onSuccess,
1624 onFail
1625 ) {
1626 "number" !== typeof relativeToNativeNode &&
1627 relativeToNativeNode instanceof ReactFabricHostComponent &&
1628 fabricMeasureLayout(
1629 this._internalInstanceHandle.stateNode.node,
1630 relativeToNativeNode._internalInstanceHandle.stateNode.node,
1631 mountSafeCallback_NOT_REALLY_SAFE(this, onFail),
1632 mountSafeCallback_NOT_REALLY_SAFE(this, onSuccess)
1633 );
1634 };
1635 ReactFabricHostComponent.prototype.setNativeProps = function() {};
1636 return ReactFabricHostComponent;
1637})();
1638function createTextInstance(
1639 text,
1640 rootContainerInstance,
1641 hostContext,
1642 internalInstanceHandle
1643) {
1644 if (!hostContext.isInAParentText)
1645 throw ReactError(
1646 Error("Text strings must be rendered within a <Text> component.")
1647 );
1648 hostContext = nextReactTag;
1649 nextReactTag += 2;
1650 return {
1651 node: createNode(
1652 hostContext,
1653 "RCTRawText",
1654 rootContainerInstance,
1655 { text: text },
1656 internalInstanceHandle
1657 )
1658 };
1659}
1660var scheduleTimeout = setTimeout,
1661 cancelTimeout = clearTimeout;
1662function cloneHiddenInstance(instance) {
1663 var node = instance.node;
1664 var updatePayload = diffProperties(
1665 null,
1666 emptyObject,
1667 { style: { display: "none" } },
1668 instance.canonical.viewConfig.validAttributes
1669 );
1670 return {
1671 node: cloneNodeWithNewProps(node, updatePayload),
1672 canonical: instance.canonical
1673 };
1674}
1675var BEFORE_SLASH_RE = /^(.*)[\\\/]/;
1676function getStackByFiberInDevAndProd(workInProgress) {
1677 var info = "";
1678 do {
1679 a: switch (workInProgress.tag) {
1680 case 3:
1681 case 4:
1682 case 6:
1683 case 7:
1684 case 10:
1685 case 9:
1686 var JSCompiler_inline_result = "";
1687 break a;
1688 default:
1689 var owner = workInProgress._debugOwner,
1690 source = workInProgress._debugSource,
1691 name = getComponentName(workInProgress.type);
1692 JSCompiler_inline_result = null;
1693 owner && (JSCompiler_inline_result = getComponentName(owner.type));
1694 owner = name;
1695 name = "";
1696 source
1697 ? (name =
1698 " (at " +
1699 source.fileName.replace(BEFORE_SLASH_RE, "") +
1700 ":" +
1701 source.lineNumber +
1702 ")")
1703 : JSCompiler_inline_result &&
1704 (name = " (created by " + JSCompiler_inline_result + ")");
1705 JSCompiler_inline_result = "\n in " + (owner || "Unknown") + name;
1706 }
1707 info += JSCompiler_inline_result;
1708 workInProgress = workInProgress.return;
1709 } while (workInProgress);
1710 return info;
1711}
1712new Set();
1713var valueStack = [],
1714 index = -1;
1715function pop(cursor) {
1716 0 > index ||
1717 ((cursor.current = valueStack[index]), (valueStack[index] = null), index--);
1718}
1719function push(cursor, value) {
1720 index++;
1721 valueStack[index] = cursor.current;
1722 cursor.current = value;
1723}
1724var emptyContextObject = {},
1725 contextStackCursor = { current: emptyContextObject },
1726 didPerformWorkStackCursor = { current: !1 },
1727 previousContext = emptyContextObject;
1728function getMaskedContext(workInProgress, unmaskedContext) {
1729 var contextTypes = workInProgress.type.contextTypes;
1730 if (!contextTypes) return emptyContextObject;
1731 var instance = workInProgress.stateNode;
1732 if (
1733 instance &&
1734 instance.__reactInternalMemoizedUnmaskedChildContext === unmaskedContext
1735 )
1736 return instance.__reactInternalMemoizedMaskedChildContext;
1737 var context = {},
1738 key;
1739 for (key in contextTypes) context[key] = unmaskedContext[key];
1740 instance &&
1741 ((workInProgress = workInProgress.stateNode),
1742 (workInProgress.__reactInternalMemoizedUnmaskedChildContext = unmaskedContext),
1743 (workInProgress.__reactInternalMemoizedMaskedChildContext = context));
1744 return context;
1745}
1746function isContextProvider(type) {
1747 type = type.childContextTypes;
1748 return null !== type && void 0 !== type;
1749}
1750function popContext(fiber) {
1751 pop(didPerformWorkStackCursor, fiber);
1752 pop(contextStackCursor, fiber);
1753}
1754function popTopLevelContextObject(fiber) {
1755 pop(didPerformWorkStackCursor, fiber);
1756 pop(contextStackCursor, fiber);
1757}
1758function pushTopLevelContextObject(fiber, context, didChange) {
1759 if (contextStackCursor.current !== emptyContextObject)
1760 throw ReactError(
1761 Error(
1762 "Unexpected context found on stack. This error is likely caused by a bug in React. Please file an issue."
1763 )
1764 );
1765 push(contextStackCursor, context, fiber);
1766 push(didPerformWorkStackCursor, didChange, fiber);
1767}
1768function processChildContext(fiber, type, parentContext) {
1769 var instance = fiber.stateNode;
1770 fiber = type.childContextTypes;
1771 if ("function" !== typeof instance.getChildContext) return parentContext;
1772 instance = instance.getChildContext();
1773 for (var contextKey in instance)
1774 if (!(contextKey in fiber))
1775 throw ReactError(
1776 Error(
1777 (getComponentName(type) || "Unknown") +
1778 '.getChildContext(): key "' +
1779 contextKey +
1780 '" is not defined in childContextTypes.'
1781 )
1782 );
1783 return Object.assign({}, parentContext, instance);
1784}
1785function pushContextProvider(workInProgress) {
1786 var instance = workInProgress.stateNode;
1787 instance =
1788 (instance && instance.__reactInternalMemoizedMergedChildContext) ||
1789 emptyContextObject;
1790 previousContext = contextStackCursor.current;
1791 push(contextStackCursor, instance, workInProgress);
1792 push(
1793 didPerformWorkStackCursor,
1794 didPerformWorkStackCursor.current,
1795 workInProgress
1796 );
1797 return !0;
1798}
1799function invalidateContextProvider(workInProgress, type, didChange) {
1800 var instance = workInProgress.stateNode;
1801 if (!instance)
1802 throw ReactError(
1803 Error(
1804 "Expected to have an instance by this point. This error is likely caused by a bug in React. Please file an issue."
1805 )
1806 );
1807 didChange
1808 ? ((type = processChildContext(workInProgress, type, previousContext)),
1809 (instance.__reactInternalMemoizedMergedChildContext = type),
1810 pop(didPerformWorkStackCursor, workInProgress),
1811 pop(contextStackCursor, workInProgress),
1812 push(contextStackCursor, type, workInProgress))
1813 : pop(didPerformWorkStackCursor, workInProgress);
1814 push(didPerformWorkStackCursor, didChange, workInProgress);
1815}
1816var Scheduler_runWithPriority = Scheduler.unstable_runWithPriority,
1817 Scheduler_scheduleCallback = Scheduler.unstable_scheduleCallback,
1818 Scheduler_cancelCallback = Scheduler.unstable_cancelCallback,
1819 Scheduler_shouldYield = Scheduler.unstable_shouldYield,
1820 Scheduler_requestPaint = Scheduler.unstable_requestPaint,
1821 Scheduler_now = Scheduler.unstable_now,
1822 Scheduler_getCurrentPriorityLevel =
1823 Scheduler.unstable_getCurrentPriorityLevel,
1824 Scheduler_ImmediatePriority = Scheduler.unstable_ImmediatePriority,
1825 Scheduler_UserBlockingPriority = Scheduler.unstable_UserBlockingPriority,
1826 Scheduler_NormalPriority = Scheduler.unstable_NormalPriority,
1827 Scheduler_LowPriority = Scheduler.unstable_LowPriority,
1828 Scheduler_IdlePriority = Scheduler.unstable_IdlePriority;
1829if (
1830 null == tracing.__interactionsRef ||
1831 null == tracing.__interactionsRef.current
1832)
1833 throw ReactError(
1834 Error(
1835 "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 http://fb.me/react-profiling"
1836 )
1837 );
1838var fakeCallbackNode = {},
1839 requestPaint =
1840 void 0 !== Scheduler_requestPaint ? Scheduler_requestPaint : function() {},
1841 syncQueue = null,
1842 immediateQueueCallbackNode = null,
1843 isFlushingSyncQueue = !1,
1844 initialTimeMs = Scheduler_now(),
1845 now =
1846 1e4 > initialTimeMs
1847 ? Scheduler_now
1848 : function() {
1849 return Scheduler_now() - initialTimeMs;
1850 };
1851function getCurrentPriorityLevel() {
1852 switch (Scheduler_getCurrentPriorityLevel()) {
1853 case Scheduler_ImmediatePriority:
1854 return 99;
1855 case Scheduler_UserBlockingPriority:
1856 return 98;
1857 case Scheduler_NormalPriority:
1858 return 97;
1859 case Scheduler_LowPriority:
1860 return 96;
1861 case Scheduler_IdlePriority:
1862 return 95;
1863 default:
1864 throw ReactError(Error("Unknown priority level."));
1865 }
1866}
1867function reactPriorityToSchedulerPriority(reactPriorityLevel) {
1868 switch (reactPriorityLevel) {
1869 case 99:
1870 return Scheduler_ImmediatePriority;
1871 case 98:
1872 return Scheduler_UserBlockingPriority;
1873 case 97:
1874 return Scheduler_NormalPriority;
1875 case 96:
1876 return Scheduler_LowPriority;
1877 case 95:
1878 return Scheduler_IdlePriority;
1879 default:
1880 throw ReactError(Error("Unknown priority level."));
1881 }
1882}
1883function runWithPriority$1(reactPriorityLevel, fn) {
1884 reactPriorityLevel = reactPriorityToSchedulerPriority(reactPriorityLevel);
1885 return Scheduler_runWithPriority(reactPriorityLevel, fn);
1886}
1887function scheduleCallback(reactPriorityLevel, callback, options) {
1888 reactPriorityLevel = reactPriorityToSchedulerPriority(reactPriorityLevel);
1889 return Scheduler_scheduleCallback(reactPriorityLevel, callback, options);
1890}
1891function scheduleSyncCallback(callback) {
1892 null === syncQueue
1893 ? ((syncQueue = [callback]),
1894 (immediateQueueCallbackNode = Scheduler_scheduleCallback(
1895 Scheduler_ImmediatePriority,
1896 flushSyncCallbackQueueImpl
1897 )))
1898 : syncQueue.push(callback);
1899 return fakeCallbackNode;
1900}
1901function flushSyncCallbackQueue() {
1902 null !== immediateQueueCallbackNode &&
1903 Scheduler_cancelCallback(immediateQueueCallbackNode);
1904 flushSyncCallbackQueueImpl();
1905}
1906function flushSyncCallbackQueueImpl() {
1907 if (!isFlushingSyncQueue && null !== syncQueue) {
1908 isFlushingSyncQueue = !0;
1909 var i = 0;
1910 try {
1911 var queue = syncQueue;
1912 runWithPriority$1(99, function() {
1913 for (; i < queue.length; i++) {
1914 var callback = queue[i];
1915 do callback = callback(!0);
1916 while (null !== callback);
1917 }
1918 });
1919 syncQueue = null;
1920 } catch (error) {
1921 throw (null !== syncQueue && (syncQueue = syncQueue.slice(i + 1)),
1922 Scheduler_scheduleCallback(
1923 Scheduler_ImmediatePriority,
1924 flushSyncCallbackQueue
1925 ),
1926 error);
1927 } finally {
1928 isFlushingSyncQueue = !1;
1929 }
1930 }
1931}
1932function inferPriorityFromExpirationTime(currentTime, expirationTime) {
1933 if (1073741823 === expirationTime) return 99;
1934 if (1 === expirationTime) return 95;
1935 currentTime =
1936 10 * (1073741821 - expirationTime) - 10 * (1073741821 - currentTime);
1937 return 0 >= currentTime
1938 ? 99
1939 : 250 >= currentTime
1940 ? 98
1941 : 5250 >= currentTime
1942 ? 97
1943 : 95;
1944}
1945function is(x, y) {
1946 return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);
1947}
1948var hasOwnProperty = Object.prototype.hasOwnProperty;
1949function shallowEqual(objA, objB) {
1950 if (is(objA, objB)) return !0;
1951 if (
1952 "object" !== typeof objA ||
1953 null === objA ||
1954 "object" !== typeof objB ||
1955 null === objB
1956 )
1957 return !1;
1958 var keysA = Object.keys(objA),
1959 keysB = Object.keys(objB);
1960 if (keysA.length !== keysB.length) return !1;
1961 for (keysB = 0; keysB < keysA.length; keysB++)
1962 if (
1963 !hasOwnProperty.call(objB, keysA[keysB]) ||
1964 !is(objA[keysA[keysB]], objB[keysA[keysB]])
1965 )
1966 return !1;
1967 return !0;
1968}
1969function resolveDefaultProps(Component, baseProps) {
1970 if (Component && Component.defaultProps) {
1971 baseProps = Object.assign({}, baseProps);
1972 Component = Component.defaultProps;
1973 for (var propName in Component)
1974 void 0 === baseProps[propName] &&
1975 (baseProps[propName] = Component[propName]);
1976 }
1977 return baseProps;
1978}
1979function readLazyComponentType(lazyComponent) {
1980 var result = lazyComponent._result;
1981 switch (lazyComponent._status) {
1982 case 1:
1983 return result;
1984 case 2:
1985 throw result;
1986 case 0:
1987 throw result;
1988 default:
1989 lazyComponent._status = 0;
1990 result = lazyComponent._ctor;
1991 result = result();
1992 result.then(
1993 function(moduleObject) {
1994 0 === lazyComponent._status &&
1995 ((moduleObject = moduleObject.default),
1996 (lazyComponent._status = 1),
1997 (lazyComponent._result = moduleObject));
1998 },
1999 function(error) {
2000 0 === lazyComponent._status &&
2001 ((lazyComponent._status = 2), (lazyComponent._result = error));
2002 }
2003 );
2004 switch (lazyComponent._status) {
2005 case 1:
2006 return lazyComponent._result;
2007 case 2:
2008 throw lazyComponent._result;
2009 }
2010 lazyComponent._result = result;
2011 throw result;
2012 }
2013}
2014var valueCursor = { current: null },
2015 currentlyRenderingFiber = null,
2016 lastContextDependency = null,
2017 lastContextWithAllBitsObserved = null;
2018function resetContextDependencies() {
2019 lastContextWithAllBitsObserved = lastContextDependency = currentlyRenderingFiber = null;
2020}
2021function pushProvider(providerFiber, nextValue) {
2022 var context = providerFiber.type._context;
2023 push(valueCursor, context._currentValue2, providerFiber);
2024 context._currentValue2 = nextValue;
2025}
2026function popProvider(providerFiber) {
2027 var currentValue = valueCursor.current;
2028 pop(valueCursor, providerFiber);
2029 providerFiber.type._context._currentValue2 = currentValue;
2030}
2031function scheduleWorkOnParentPath(parent, renderExpirationTime) {
2032 for (; null !== parent; ) {
2033 var alternate = parent.alternate;
2034 if (parent.childExpirationTime < renderExpirationTime)
2035 (parent.childExpirationTime = renderExpirationTime),
2036 null !== alternate &&
2037 alternate.childExpirationTime < renderExpirationTime &&
2038 (alternate.childExpirationTime = renderExpirationTime);
2039 else if (
2040 null !== alternate &&
2041 alternate.childExpirationTime < renderExpirationTime
2042 )
2043 alternate.childExpirationTime = renderExpirationTime;
2044 else break;
2045 parent = parent.return;
2046 }
2047}
2048function prepareToReadContext(workInProgress, renderExpirationTime) {
2049 currentlyRenderingFiber = workInProgress;
2050 lastContextWithAllBitsObserved = lastContextDependency = null;
2051 workInProgress = workInProgress.dependencies;
2052 null !== workInProgress &&
2053 null !== workInProgress.firstContext &&
2054 (workInProgress.expirationTime >= renderExpirationTime &&
2055 (didReceiveUpdate = !0),
2056 (workInProgress.firstContext = null));
2057}
2058function readContext(context, observedBits) {
2059 if (
2060 lastContextWithAllBitsObserved !== context &&
2061 !1 !== observedBits &&
2062 0 !== observedBits
2063 ) {
2064 if ("number" !== typeof observedBits || 1073741823 === observedBits)
2065 (lastContextWithAllBitsObserved = context), (observedBits = 1073741823);
2066 observedBits = { context: context, observedBits: observedBits, next: null };
2067 if (null === lastContextDependency) {
2068 if (null === currentlyRenderingFiber)
2069 throw ReactError(
2070 Error(
2071 "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()."
2072 )
2073 );
2074 lastContextDependency = observedBits;
2075 currentlyRenderingFiber.dependencies = {
2076 expirationTime: 0,
2077 firstContext: observedBits,
2078 responders: null
2079 };
2080 } else lastContextDependency = lastContextDependency.next = observedBits;
2081 }
2082 return context._currentValue2;
2083}
2084var hasForceUpdate = !1;
2085function createUpdateQueue(baseState) {
2086 return {
2087 baseState: baseState,
2088 firstUpdate: null,
2089 lastUpdate: null,
2090 firstCapturedUpdate: null,
2091 lastCapturedUpdate: null,
2092 firstEffect: null,
2093 lastEffect: null,
2094 firstCapturedEffect: null,
2095 lastCapturedEffect: null
2096 };
2097}
2098function cloneUpdateQueue(currentQueue) {
2099 return {
2100 baseState: currentQueue.baseState,
2101 firstUpdate: currentQueue.firstUpdate,
2102 lastUpdate: currentQueue.lastUpdate,
2103 firstCapturedUpdate: null,
2104 lastCapturedUpdate: null,
2105 firstEffect: null,
2106 lastEffect: null,
2107 firstCapturedEffect: null,
2108 lastCapturedEffect: null
2109 };
2110}
2111function createUpdate(expirationTime, suspenseConfig) {
2112 return {
2113 expirationTime: expirationTime,
2114 suspenseConfig: suspenseConfig,
2115 tag: 0,
2116 payload: null,
2117 callback: null,
2118 next: null,
2119 nextEffect: null
2120 };
2121}
2122function appendUpdateToQueue(queue, update) {
2123 null === queue.lastUpdate
2124 ? (queue.firstUpdate = queue.lastUpdate = update)
2125 : ((queue.lastUpdate.next = update), (queue.lastUpdate = update));
2126}
2127function enqueueUpdate(fiber, update) {
2128 var alternate = fiber.alternate;
2129 if (null === alternate) {
2130 var queue1 = fiber.updateQueue;
2131 var queue2 = null;
2132 null === queue1 &&
2133 (queue1 = fiber.updateQueue = createUpdateQueue(fiber.memoizedState));
2134 } else
2135 (queue1 = fiber.updateQueue),
2136 (queue2 = alternate.updateQueue),
2137 null === queue1
2138 ? null === queue2
2139 ? ((queue1 = fiber.updateQueue = createUpdateQueue(
2140 fiber.memoizedState
2141 )),
2142 (queue2 = alternate.updateQueue = createUpdateQueue(
2143 alternate.memoizedState
2144 )))
2145 : (queue1 = fiber.updateQueue = cloneUpdateQueue(queue2))
2146 : null === queue2 &&
2147 (queue2 = alternate.updateQueue = cloneUpdateQueue(queue1));
2148 null === queue2 || queue1 === queue2
2149 ? appendUpdateToQueue(queue1, update)
2150 : null === queue1.lastUpdate || null === queue2.lastUpdate
2151 ? (appendUpdateToQueue(queue1, update),
2152 appendUpdateToQueue(queue2, update))
2153 : (appendUpdateToQueue(queue1, update), (queue2.lastUpdate = update));
2154}
2155function enqueueCapturedUpdate(workInProgress, update) {
2156 var workInProgressQueue = workInProgress.updateQueue;
2157 workInProgressQueue =
2158 null === workInProgressQueue
2159 ? (workInProgress.updateQueue = createUpdateQueue(
2160 workInProgress.memoizedState
2161 ))
2162 : ensureWorkInProgressQueueIsAClone(workInProgress, workInProgressQueue);
2163 null === workInProgressQueue.lastCapturedUpdate
2164 ? (workInProgressQueue.firstCapturedUpdate = workInProgressQueue.lastCapturedUpdate = update)
2165 : ((workInProgressQueue.lastCapturedUpdate.next = update),
2166 (workInProgressQueue.lastCapturedUpdate = update));
2167}
2168function ensureWorkInProgressQueueIsAClone(workInProgress, queue) {
2169 var current = workInProgress.alternate;
2170 null !== current &&
2171 queue === current.updateQueue &&
2172 (queue = workInProgress.updateQueue = cloneUpdateQueue(queue));
2173 return queue;
2174}
2175function getStateFromUpdate(
2176 workInProgress,
2177 queue,
2178 update,
2179 prevState,
2180 nextProps,
2181 instance
2182) {
2183 switch (update.tag) {
2184 case 1:
2185 return (
2186 (workInProgress = update.payload),
2187 "function" === typeof workInProgress
2188 ? workInProgress.call(instance, prevState, nextProps)
2189 : workInProgress
2190 );
2191 case 3:
2192 workInProgress.effectTag = (workInProgress.effectTag & -2049) | 64;
2193 case 0:
2194 workInProgress = update.payload;
2195 nextProps =
2196 "function" === typeof workInProgress
2197 ? workInProgress.call(instance, prevState, nextProps)
2198 : workInProgress;
2199 if (null === nextProps || void 0 === nextProps) break;
2200 return Object.assign({}, prevState, nextProps);
2201 case 2:
2202 hasForceUpdate = !0;
2203 }
2204 return prevState;
2205}
2206function processUpdateQueue(
2207 workInProgress,
2208 queue,
2209 props,
2210 instance,
2211 renderExpirationTime
2212) {
2213 hasForceUpdate = !1;
2214 queue = ensureWorkInProgressQueueIsAClone(workInProgress, queue);
2215 for (
2216 var newBaseState = queue.baseState,
2217 newFirstUpdate = null,
2218 newExpirationTime = 0,
2219 update = queue.firstUpdate,
2220 resultState = newBaseState;
2221 null !== update;
2222
2223 ) {
2224 var updateExpirationTime = update.expirationTime;
2225 updateExpirationTime < renderExpirationTime
2226 ? (null === newFirstUpdate &&
2227 ((newFirstUpdate = update), (newBaseState = resultState)),
2228 newExpirationTime < updateExpirationTime &&
2229 (newExpirationTime = updateExpirationTime))
2230 : (markRenderEventTimeAndConfig(
2231 updateExpirationTime,
2232 update.suspenseConfig
2233 ),
2234 (resultState = getStateFromUpdate(
2235 workInProgress,
2236 queue,
2237 update,
2238 resultState,
2239 props,
2240 instance
2241 )),
2242 null !== update.callback &&
2243 ((workInProgress.effectTag |= 32),
2244 (update.nextEffect = null),
2245 null === queue.lastEffect
2246 ? (queue.firstEffect = queue.lastEffect = update)
2247 : ((queue.lastEffect.nextEffect = update),
2248 (queue.lastEffect = update))));
2249 update = update.next;
2250 }
2251 updateExpirationTime = null;
2252 for (update = queue.firstCapturedUpdate; null !== update; ) {
2253 var _updateExpirationTime = update.expirationTime;
2254 _updateExpirationTime < renderExpirationTime
2255 ? (null === updateExpirationTime &&
2256 ((updateExpirationTime = update),
2257 null === newFirstUpdate && (newBaseState = resultState)),
2258 newExpirationTime < _updateExpirationTime &&
2259 (newExpirationTime = _updateExpirationTime))
2260 : ((resultState = getStateFromUpdate(
2261 workInProgress,
2262 queue,
2263 update,
2264 resultState,
2265 props,
2266 instance
2267 )),
2268 null !== update.callback &&
2269 ((workInProgress.effectTag |= 32),
2270 (update.nextEffect = null),
2271 null === queue.lastCapturedEffect
2272 ? (queue.firstCapturedEffect = queue.lastCapturedEffect = update)
2273 : ((queue.lastCapturedEffect.nextEffect = update),
2274 (queue.lastCapturedEffect = update))));
2275 update = update.next;
2276 }
2277 null === newFirstUpdate && (queue.lastUpdate = null);
2278 null === updateExpirationTime
2279 ? (queue.lastCapturedUpdate = null)
2280 : (workInProgress.effectTag |= 32);
2281 null === newFirstUpdate &&
2282 null === updateExpirationTime &&
2283 (newBaseState = resultState);
2284 queue.baseState = newBaseState;
2285 queue.firstUpdate = newFirstUpdate;
2286 queue.firstCapturedUpdate = updateExpirationTime;
2287 workInProgress.expirationTime = newExpirationTime;
2288 workInProgress.memoizedState = resultState;
2289}
2290function commitUpdateQueue(finishedWork, finishedQueue, instance) {
2291 null !== finishedQueue.firstCapturedUpdate &&
2292 (null !== finishedQueue.lastUpdate &&
2293 ((finishedQueue.lastUpdate.next = finishedQueue.firstCapturedUpdate),
2294 (finishedQueue.lastUpdate = finishedQueue.lastCapturedUpdate)),
2295 (finishedQueue.firstCapturedUpdate = finishedQueue.lastCapturedUpdate = null));
2296 commitUpdateEffects(finishedQueue.firstEffect, instance);
2297 finishedQueue.firstEffect = finishedQueue.lastEffect = null;
2298 commitUpdateEffects(finishedQueue.firstCapturedEffect, instance);
2299 finishedQueue.firstCapturedEffect = finishedQueue.lastCapturedEffect = null;
2300}
2301function commitUpdateEffects(effect, instance) {
2302 for (; null !== effect; ) {
2303 var _callback3 = effect.callback;
2304 if (null !== _callback3) {
2305 effect.callback = null;
2306 var context = instance;
2307 if ("function" !== typeof _callback3)
2308 throw ReactError(
2309 Error(
2310 "Invalid argument passed as callback. Expected a function. Instead received: " +
2311 _callback3
2312 )
2313 );
2314 _callback3.call(context);
2315 }
2316 effect = effect.nextEffect;
2317 }
2318}
2319var ReactCurrentBatchConfig = ReactSharedInternals.ReactCurrentBatchConfig,
2320 emptyRefsObject = new React.Component().refs;
2321function applyDerivedStateFromProps(
2322 workInProgress,
2323 ctor,
2324 getDerivedStateFromProps,
2325 nextProps
2326) {
2327 ctor = workInProgress.memoizedState;
2328 getDerivedStateFromProps = getDerivedStateFromProps(nextProps, ctor);
2329 getDerivedStateFromProps =
2330 null === getDerivedStateFromProps || void 0 === getDerivedStateFromProps
2331 ? ctor
2332 : Object.assign({}, ctor, getDerivedStateFromProps);
2333 workInProgress.memoizedState = getDerivedStateFromProps;
2334 nextProps = workInProgress.updateQueue;
2335 null !== nextProps &&
2336 0 === workInProgress.expirationTime &&
2337 (nextProps.baseState = getDerivedStateFromProps);
2338}
2339var classComponentUpdater = {
2340 isMounted: function(component) {
2341 return (component = component._reactInternalFiber)
2342 ? 2 === isFiberMountedImpl(component)
2343 : !1;
2344 },
2345 enqueueSetState: function(inst, payload, callback) {
2346 inst = inst._reactInternalFiber;
2347 var currentTime = requestCurrentTime(),
2348 suspenseConfig = ReactCurrentBatchConfig.suspense;
2349 currentTime = computeExpirationForFiber(currentTime, inst, suspenseConfig);
2350 suspenseConfig = createUpdate(currentTime, suspenseConfig);
2351 suspenseConfig.payload = payload;
2352 void 0 !== callback &&
2353 null !== callback &&
2354 (suspenseConfig.callback = callback);
2355 enqueueUpdate(inst, suspenseConfig);
2356 scheduleUpdateOnFiber(inst, currentTime);
2357 },
2358 enqueueReplaceState: function(inst, payload, callback) {
2359 inst = inst._reactInternalFiber;
2360 var currentTime = requestCurrentTime(),
2361 suspenseConfig = ReactCurrentBatchConfig.suspense;
2362 currentTime = computeExpirationForFiber(currentTime, inst, suspenseConfig);
2363 suspenseConfig = createUpdate(currentTime, suspenseConfig);
2364 suspenseConfig.tag = 1;
2365 suspenseConfig.payload = payload;
2366 void 0 !== callback &&
2367 null !== callback &&
2368 (suspenseConfig.callback = callback);
2369 enqueueUpdate(inst, suspenseConfig);
2370 scheduleUpdateOnFiber(inst, currentTime);
2371 },
2372 enqueueForceUpdate: function(inst, callback) {
2373 inst = inst._reactInternalFiber;
2374 var currentTime = requestCurrentTime(),
2375 suspenseConfig = ReactCurrentBatchConfig.suspense;
2376 currentTime = computeExpirationForFiber(currentTime, inst, suspenseConfig);
2377 suspenseConfig = createUpdate(currentTime, suspenseConfig);
2378 suspenseConfig.tag = 2;
2379 void 0 !== callback &&
2380 null !== callback &&
2381 (suspenseConfig.callback = callback);
2382 enqueueUpdate(inst, suspenseConfig);
2383 scheduleUpdateOnFiber(inst, currentTime);
2384 }
2385};
2386function checkShouldComponentUpdate(
2387 workInProgress,
2388 ctor,
2389 oldProps,
2390 newProps,
2391 oldState,
2392 newState,
2393 nextContext
2394) {
2395 workInProgress = workInProgress.stateNode;
2396 return "function" === typeof workInProgress.shouldComponentUpdate
2397 ? workInProgress.shouldComponentUpdate(newProps, newState, nextContext)
2398 : ctor.prototype && ctor.prototype.isPureReactComponent
2399 ? !shallowEqual(oldProps, newProps) || !shallowEqual(oldState, newState)
2400 : !0;
2401}
2402function constructClassInstance(workInProgress, ctor, props) {
2403 var isLegacyContextConsumer = !1,
2404 unmaskedContext = emptyContextObject;
2405 var context = ctor.contextType;
2406 "object" === typeof context && null !== context
2407 ? (context = readContext(context))
2408 : ((unmaskedContext = isContextProvider(ctor)
2409 ? previousContext
2410 : contextStackCursor.current),
2411 (isLegacyContextConsumer = ctor.contextTypes),
2412 (context = (isLegacyContextConsumer =
2413 null !== isLegacyContextConsumer && void 0 !== isLegacyContextConsumer)
2414 ? getMaskedContext(workInProgress, unmaskedContext)
2415 : emptyContextObject));
2416 ctor = new ctor(props, context);
2417 workInProgress.memoizedState =
2418 null !== ctor.state && void 0 !== ctor.state ? ctor.state : null;
2419 ctor.updater = classComponentUpdater;
2420 workInProgress.stateNode = ctor;
2421 ctor._reactInternalFiber = workInProgress;
2422 isLegacyContextConsumer &&
2423 ((workInProgress = workInProgress.stateNode),
2424 (workInProgress.__reactInternalMemoizedUnmaskedChildContext = unmaskedContext),
2425 (workInProgress.__reactInternalMemoizedMaskedChildContext = context));
2426 return ctor;
2427}
2428function callComponentWillReceiveProps(
2429 workInProgress,
2430 instance,
2431 newProps,
2432 nextContext
2433) {
2434 workInProgress = instance.state;
2435 "function" === typeof instance.componentWillReceiveProps &&
2436 instance.componentWillReceiveProps(newProps, nextContext);
2437 "function" === typeof instance.UNSAFE_componentWillReceiveProps &&
2438 instance.UNSAFE_componentWillReceiveProps(newProps, nextContext);
2439 instance.state !== workInProgress &&
2440 classComponentUpdater.enqueueReplaceState(instance, instance.state, null);
2441}
2442function mountClassInstance(
2443 workInProgress,
2444 ctor,
2445 newProps,
2446 renderExpirationTime
2447) {
2448 var instance = workInProgress.stateNode;
2449 instance.props = newProps;
2450 instance.state = workInProgress.memoizedState;
2451 instance.refs = emptyRefsObject;
2452 var contextType = ctor.contextType;
2453 "object" === typeof contextType && null !== contextType
2454 ? (instance.context = readContext(contextType))
2455 : ((contextType = isContextProvider(ctor)
2456 ? previousContext
2457 : contextStackCursor.current),
2458 (instance.context = getMaskedContext(workInProgress, contextType)));
2459 contextType = workInProgress.updateQueue;
2460 null !== contextType &&
2461 (processUpdateQueue(
2462 workInProgress,
2463 contextType,
2464 newProps,
2465 instance,
2466 renderExpirationTime
2467 ),
2468 (instance.state = workInProgress.memoizedState));
2469 contextType = ctor.getDerivedStateFromProps;
2470 "function" === typeof contextType &&
2471 (applyDerivedStateFromProps(workInProgress, ctor, contextType, newProps),
2472 (instance.state = workInProgress.memoizedState));
2473 "function" === typeof ctor.getDerivedStateFromProps ||
2474 "function" === typeof instance.getSnapshotBeforeUpdate ||
2475 ("function" !== typeof instance.UNSAFE_componentWillMount &&
2476 "function" !== typeof instance.componentWillMount) ||
2477 ((ctor = instance.state),
2478 "function" === typeof instance.componentWillMount &&
2479 instance.componentWillMount(),
2480 "function" === typeof instance.UNSAFE_componentWillMount &&
2481 instance.UNSAFE_componentWillMount(),
2482 ctor !== instance.state &&
2483 classComponentUpdater.enqueueReplaceState(instance, instance.state, null),
2484 (contextType = workInProgress.updateQueue),
2485 null !== contextType &&
2486 (processUpdateQueue(
2487 workInProgress,
2488 contextType,
2489 newProps,
2490 instance,
2491 renderExpirationTime
2492 ),
2493 (instance.state = workInProgress.memoizedState)));
2494 "function" === typeof instance.componentDidMount &&
2495 (workInProgress.effectTag |= 4);
2496}
2497var isArray = Array.isArray;
2498function coerceRef(returnFiber, current$$1, element) {
2499 returnFiber = element.ref;
2500 if (
2501 null !== returnFiber &&
2502 "function" !== typeof returnFiber &&
2503 "object" !== typeof returnFiber
2504 ) {
2505 if (element._owner) {
2506 element = element._owner;
2507 var inst = void 0;
2508 if (element) {
2509 if (1 !== element.tag)
2510 throw ReactError(
2511 Error(
2512 "Function components cannot have refs. Did you mean to use React.forwardRef()?"
2513 )
2514 );
2515 inst = element.stateNode;
2516 }
2517 if (!inst)
2518 throw ReactError(
2519 Error(
2520 "Missing owner for string ref " +
2521 returnFiber +
2522 ". This error is likely caused by a bug in React. Please file an issue."
2523 )
2524 );
2525 var stringRef = "" + returnFiber;
2526 if (
2527 null !== current$$1 &&
2528 null !== current$$1.ref &&
2529 "function" === typeof current$$1.ref &&
2530 current$$1.ref._stringRef === stringRef
2531 )
2532 return current$$1.ref;
2533 current$$1 = function(value) {
2534 var refs = inst.refs;
2535 refs === emptyRefsObject && (refs = inst.refs = {});
2536 null === value ? delete refs[stringRef] : (refs[stringRef] = value);
2537 };
2538 current$$1._stringRef = stringRef;
2539 return current$$1;
2540 }
2541 if ("string" !== typeof returnFiber)
2542 throw ReactError(
2543 Error(
2544 "Expected ref to be a function, a string, an object returned by React.createRef(), or null."
2545 )
2546 );
2547 if (!element._owner)
2548 throw ReactError(
2549 Error(
2550 "Element ref was specified as a string (" +
2551 returnFiber +
2552 ") 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://fb.me/react-refs-must-have-owner for more information."
2553 )
2554 );
2555 }
2556 return returnFiber;
2557}
2558function throwOnInvalidObjectType(returnFiber, newChild) {
2559 if ("textarea" !== returnFiber.type)
2560 throw ReactError(
2561 Error(
2562 "Objects are not valid as a React child (found: " +
2563 ("[object Object]" === Object.prototype.toString.call(newChild)
2564 ? "object with keys {" + Object.keys(newChild).join(", ") + "}"
2565 : newChild) +
2566 ")."
2567 )
2568 );
2569}
2570function ChildReconciler(shouldTrackSideEffects) {
2571 function deleteChild(returnFiber, childToDelete) {
2572 if (shouldTrackSideEffects) {
2573 var last = returnFiber.lastEffect;
2574 null !== last
2575 ? ((last.nextEffect = childToDelete),
2576 (returnFiber.lastEffect = childToDelete))
2577 : (returnFiber.firstEffect = returnFiber.lastEffect = childToDelete);
2578 childToDelete.nextEffect = null;
2579 childToDelete.effectTag = 8;
2580 }
2581 }
2582 function deleteRemainingChildren(returnFiber, currentFirstChild) {
2583 if (!shouldTrackSideEffects) return null;
2584 for (; null !== currentFirstChild; )
2585 deleteChild(returnFiber, currentFirstChild),
2586 (currentFirstChild = currentFirstChild.sibling);
2587 return null;
2588 }
2589 function mapRemainingChildren(returnFiber, currentFirstChild) {
2590 for (returnFiber = new Map(); null !== currentFirstChild; )
2591 null !== currentFirstChild.key
2592 ? returnFiber.set(currentFirstChild.key, currentFirstChild)
2593 : returnFiber.set(currentFirstChild.index, currentFirstChild),
2594 (currentFirstChild = currentFirstChild.sibling);
2595 return returnFiber;
2596 }
2597 function useFiber(fiber, pendingProps, expirationTime) {
2598 fiber = createWorkInProgress(fiber, pendingProps, expirationTime);
2599 fiber.index = 0;
2600 fiber.sibling = null;
2601 return fiber;
2602 }
2603 function placeChild(newFiber, lastPlacedIndex, newIndex) {
2604 newFiber.index = newIndex;
2605 if (!shouldTrackSideEffects) return lastPlacedIndex;
2606 newIndex = newFiber.alternate;
2607 if (null !== newIndex)
2608 return (
2609 (newIndex = newIndex.index),
2610 newIndex < lastPlacedIndex
2611 ? ((newFiber.effectTag = 2), lastPlacedIndex)
2612 : newIndex
2613 );
2614 newFiber.effectTag = 2;
2615 return lastPlacedIndex;
2616 }
2617 function placeSingleChild(newFiber) {
2618 shouldTrackSideEffects &&
2619 null === newFiber.alternate &&
2620 (newFiber.effectTag = 2);
2621 return newFiber;
2622 }
2623 function updateTextNode(
2624 returnFiber,
2625 current$$1,
2626 textContent,
2627 expirationTime
2628 ) {
2629 if (null === current$$1 || 6 !== current$$1.tag)
2630 return (
2631 (current$$1 = createFiberFromText(
2632 textContent,
2633 returnFiber.mode,
2634 expirationTime
2635 )),
2636 (current$$1.return = returnFiber),
2637 current$$1
2638 );
2639 current$$1 = useFiber(current$$1, textContent, expirationTime);
2640 current$$1.return = returnFiber;
2641 return current$$1;
2642 }
2643 function updateElement(returnFiber, current$$1, element, expirationTime) {
2644 if (null !== current$$1 && current$$1.elementType === element.type)
2645 return (
2646 (expirationTime = useFiber(current$$1, element.props, expirationTime)),
2647 (expirationTime.ref = coerceRef(returnFiber, current$$1, element)),
2648 (expirationTime.return = returnFiber),
2649 expirationTime
2650 );
2651 expirationTime = createFiberFromTypeAndProps(
2652 element.type,
2653 element.key,
2654 element.props,
2655 null,
2656 returnFiber.mode,
2657 expirationTime
2658 );
2659 expirationTime.ref = coerceRef(returnFiber, current$$1, element);
2660 expirationTime.return = returnFiber;
2661 return expirationTime;
2662 }
2663 function updatePortal(returnFiber, current$$1, portal, expirationTime) {
2664 if (
2665 null === current$$1 ||
2666 4 !== current$$1.tag ||
2667 current$$1.stateNode.containerInfo !== portal.containerInfo ||
2668 current$$1.stateNode.implementation !== portal.implementation
2669 )
2670 return (
2671 (current$$1 = createFiberFromPortal(
2672 portal,
2673 returnFiber.mode,
2674 expirationTime
2675 )),
2676 (current$$1.return = returnFiber),
2677 current$$1
2678 );
2679 current$$1 = useFiber(current$$1, portal.children || [], expirationTime);
2680 current$$1.return = returnFiber;
2681 return current$$1;
2682 }
2683 function updateFragment(
2684 returnFiber,
2685 current$$1,
2686 fragment,
2687 expirationTime,
2688 key
2689 ) {
2690 if (null === current$$1 || 7 !== current$$1.tag)
2691 return (
2692 (current$$1 = createFiberFromFragment(
2693 fragment,
2694 returnFiber.mode,
2695 expirationTime,
2696 key
2697 )),
2698 (current$$1.return = returnFiber),
2699 current$$1
2700 );
2701 current$$1 = useFiber(current$$1, fragment, expirationTime);
2702 current$$1.return = returnFiber;
2703 return current$$1;
2704 }
2705 function createChild(returnFiber, newChild, expirationTime) {
2706 if ("string" === typeof newChild || "number" === typeof newChild)
2707 return (
2708 (newChild = createFiberFromText(
2709 "" + newChild,
2710 returnFiber.mode,
2711 expirationTime
2712 )),
2713 (newChild.return = returnFiber),
2714 newChild
2715 );
2716 if ("object" === typeof newChild && null !== newChild) {
2717 switch (newChild.$$typeof) {
2718 case REACT_ELEMENT_TYPE:
2719 return (
2720 (expirationTime = createFiberFromTypeAndProps(
2721 newChild.type,
2722 newChild.key,
2723 newChild.props,
2724 null,
2725 returnFiber.mode,
2726 expirationTime
2727 )),
2728 (expirationTime.ref = coerceRef(returnFiber, null, newChild)),
2729 (expirationTime.return = returnFiber),
2730 expirationTime
2731 );
2732 case REACT_PORTAL_TYPE:
2733 return (
2734 (newChild = createFiberFromPortal(
2735 newChild,
2736 returnFiber.mode,
2737 expirationTime
2738 )),
2739 (newChild.return = returnFiber),
2740 newChild
2741 );
2742 }
2743 if (isArray(newChild) || getIteratorFn(newChild))
2744 return (
2745 (newChild = createFiberFromFragment(
2746 newChild,
2747 returnFiber.mode,
2748 expirationTime,
2749 null
2750 )),
2751 (newChild.return = returnFiber),
2752 newChild
2753 );
2754 throwOnInvalidObjectType(returnFiber, newChild);
2755 }
2756 return null;
2757 }
2758 function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {
2759 var key = null !== oldFiber ? oldFiber.key : null;
2760 if ("string" === typeof newChild || "number" === typeof newChild)
2761 return null !== key
2762 ? null
2763 : updateTextNode(returnFiber, oldFiber, "" + newChild, expirationTime);
2764 if ("object" === typeof newChild && null !== newChild) {
2765 switch (newChild.$$typeof) {
2766 case REACT_ELEMENT_TYPE:
2767 return newChild.key === key
2768 ? newChild.type === REACT_FRAGMENT_TYPE
2769 ? updateFragment(
2770 returnFiber,
2771 oldFiber,
2772 newChild.props.children,
2773 expirationTime,
2774 key
2775 )
2776 : updateElement(returnFiber, oldFiber, newChild, expirationTime)
2777 : null;
2778 case REACT_PORTAL_TYPE:
2779 return newChild.key === key
2780 ? updatePortal(returnFiber, oldFiber, newChild, expirationTime)
2781 : null;
2782 }
2783 if (isArray(newChild) || getIteratorFn(newChild))
2784 return null !== key
2785 ? null
2786 : updateFragment(
2787 returnFiber,
2788 oldFiber,
2789 newChild,
2790 expirationTime,
2791 null
2792 );
2793 throwOnInvalidObjectType(returnFiber, newChild);
2794 }
2795 return null;
2796 }
2797 function updateFromMap(
2798 existingChildren,
2799 returnFiber,
2800 newIdx,
2801 newChild,
2802 expirationTime
2803 ) {
2804 if ("string" === typeof newChild || "number" === typeof newChild)
2805 return (
2806 (existingChildren = existingChildren.get(newIdx) || null),
2807 updateTextNode(
2808 returnFiber,
2809 existingChildren,
2810 "" + newChild,
2811 expirationTime
2812 )
2813 );
2814 if ("object" === typeof newChild && null !== newChild) {
2815 switch (newChild.$$typeof) {
2816 case REACT_ELEMENT_TYPE:
2817 return (
2818 (existingChildren =
2819 existingChildren.get(
2820 null === newChild.key ? newIdx : newChild.key
2821 ) || null),
2822 newChild.type === REACT_FRAGMENT_TYPE
2823 ? updateFragment(
2824 returnFiber,
2825 existingChildren,
2826 newChild.props.children,
2827 expirationTime,
2828 newChild.key
2829 )
2830 : updateElement(
2831 returnFiber,
2832 existingChildren,
2833 newChild,
2834 expirationTime
2835 )
2836 );
2837 case REACT_PORTAL_TYPE:
2838 return (
2839 (existingChildren =
2840 existingChildren.get(
2841 null === newChild.key ? newIdx : newChild.key
2842 ) || null),
2843 updatePortal(
2844 returnFiber,
2845 existingChildren,
2846 newChild,
2847 expirationTime
2848 )
2849 );
2850 }
2851 if (isArray(newChild) || getIteratorFn(newChild))
2852 return (
2853 (existingChildren = existingChildren.get(newIdx) || null),
2854 updateFragment(
2855 returnFiber,
2856 existingChildren,
2857 newChild,
2858 expirationTime,
2859 null
2860 )
2861 );
2862 throwOnInvalidObjectType(returnFiber, newChild);
2863 }
2864 return null;
2865 }
2866 function reconcileChildrenArray(
2867 returnFiber,
2868 currentFirstChild,
2869 newChildren,
2870 expirationTime
2871 ) {
2872 for (
2873 var resultingFirstChild = null,
2874 previousNewFiber = null,
2875 oldFiber = currentFirstChild,
2876 newIdx = (currentFirstChild = 0),
2877 nextOldFiber = null;
2878 null !== oldFiber && newIdx < newChildren.length;
2879 newIdx++
2880 ) {
2881 oldFiber.index > newIdx
2882 ? ((nextOldFiber = oldFiber), (oldFiber = null))
2883 : (nextOldFiber = oldFiber.sibling);
2884 var newFiber = updateSlot(
2885 returnFiber,
2886 oldFiber,
2887 newChildren[newIdx],
2888 expirationTime
2889 );
2890 if (null === newFiber) {
2891 null === oldFiber && (oldFiber = nextOldFiber);
2892 break;
2893 }
2894 shouldTrackSideEffects &&
2895 oldFiber &&
2896 null === newFiber.alternate &&
2897 deleteChild(returnFiber, oldFiber);
2898 currentFirstChild = placeChild(newFiber, currentFirstChild, newIdx);
2899 null === previousNewFiber
2900 ? (resultingFirstChild = newFiber)
2901 : (previousNewFiber.sibling = newFiber);
2902 previousNewFiber = newFiber;
2903 oldFiber = nextOldFiber;
2904 }
2905 if (newIdx === newChildren.length)
2906 return (
2907 deleteRemainingChildren(returnFiber, oldFiber), resultingFirstChild
2908 );
2909 if (null === oldFiber) {
2910 for (; newIdx < newChildren.length; newIdx++)
2911 (oldFiber = createChild(
2912 returnFiber,
2913 newChildren[newIdx],
2914 expirationTime
2915 )),
2916 null !== oldFiber &&
2917 ((currentFirstChild = placeChild(
2918 oldFiber,
2919 currentFirstChild,
2920 newIdx
2921 )),
2922 null === previousNewFiber
2923 ? (resultingFirstChild = oldFiber)
2924 : (previousNewFiber.sibling = oldFiber),
2925 (previousNewFiber = oldFiber));
2926 return resultingFirstChild;
2927 }
2928 for (
2929 oldFiber = mapRemainingChildren(returnFiber, oldFiber);
2930 newIdx < newChildren.length;
2931 newIdx++
2932 )
2933 (nextOldFiber = updateFromMap(
2934 oldFiber,
2935 returnFiber,
2936 newIdx,
2937 newChildren[newIdx],
2938 expirationTime
2939 )),
2940 null !== nextOldFiber &&
2941 (shouldTrackSideEffects &&
2942 null !== nextOldFiber.alternate &&
2943 oldFiber.delete(
2944 null === nextOldFiber.key ? newIdx : nextOldFiber.key
2945 ),
2946 (currentFirstChild = placeChild(
2947 nextOldFiber,
2948 currentFirstChild,
2949 newIdx
2950 )),
2951 null === previousNewFiber
2952 ? (resultingFirstChild = nextOldFiber)
2953 : (previousNewFiber.sibling = nextOldFiber),
2954 (previousNewFiber = nextOldFiber));
2955 shouldTrackSideEffects &&
2956 oldFiber.forEach(function(child) {
2957 return deleteChild(returnFiber, child);
2958 });
2959 return resultingFirstChild;
2960 }
2961 function reconcileChildrenIterator(
2962 returnFiber,
2963 currentFirstChild,
2964 newChildrenIterable,
2965 expirationTime
2966 ) {
2967 var iteratorFn = getIteratorFn(newChildrenIterable);
2968 if ("function" !== typeof iteratorFn)
2969 throw ReactError(
2970 Error(
2971 "An object is not an iterable. This error is likely caused by a bug in React. Please file an issue."
2972 )
2973 );
2974 newChildrenIterable = iteratorFn.call(newChildrenIterable);
2975 if (null == newChildrenIterable)
2976 throw ReactError(Error("An iterable object provided no iterator."));
2977 for (
2978 var previousNewFiber = (iteratorFn = null),
2979 oldFiber = currentFirstChild,
2980 newIdx = (currentFirstChild = 0),
2981 nextOldFiber = null,
2982 step = newChildrenIterable.next();
2983 null !== oldFiber && !step.done;
2984 newIdx++, step = newChildrenIterable.next()
2985 ) {
2986 oldFiber.index > newIdx
2987 ? ((nextOldFiber = oldFiber), (oldFiber = null))
2988 : (nextOldFiber = oldFiber.sibling);
2989 var newFiber = updateSlot(
2990 returnFiber,
2991 oldFiber,
2992 step.value,
2993 expirationTime
2994 );
2995 if (null === newFiber) {
2996 null === oldFiber && (oldFiber = nextOldFiber);
2997 break;
2998 }
2999 shouldTrackSideEffects &&
3000 oldFiber &&
3001 null === newFiber.alternate &&
3002 deleteChild(returnFiber, oldFiber);
3003 currentFirstChild = placeChild(newFiber, currentFirstChild, newIdx);
3004 null === previousNewFiber
3005 ? (iteratorFn = newFiber)
3006 : (previousNewFiber.sibling = newFiber);
3007 previousNewFiber = newFiber;
3008 oldFiber = nextOldFiber;
3009 }
3010 if (step.done)
3011 return deleteRemainingChildren(returnFiber, oldFiber), iteratorFn;
3012 if (null === oldFiber) {
3013 for (; !step.done; newIdx++, step = newChildrenIterable.next())
3014 (step = createChild(returnFiber, step.value, expirationTime)),
3015 null !== step &&
3016 ((currentFirstChild = placeChild(step, currentFirstChild, newIdx)),
3017 null === previousNewFiber
3018 ? (iteratorFn = step)
3019 : (previousNewFiber.sibling = step),
3020 (previousNewFiber = step));
3021 return iteratorFn;
3022 }
3023 for (
3024 oldFiber = mapRemainingChildren(returnFiber, oldFiber);
3025 !step.done;
3026 newIdx++, step = newChildrenIterable.next()
3027 )
3028 (step = updateFromMap(
3029 oldFiber,
3030 returnFiber,
3031 newIdx,
3032 step.value,
3033 expirationTime
3034 )),
3035 null !== step &&
3036 (shouldTrackSideEffects &&
3037 null !== step.alternate &&
3038 oldFiber.delete(null === step.key ? newIdx : step.key),
3039 (currentFirstChild = placeChild(step, currentFirstChild, newIdx)),
3040 null === previousNewFiber
3041 ? (iteratorFn = step)
3042 : (previousNewFiber.sibling = step),
3043 (previousNewFiber = step));
3044 shouldTrackSideEffects &&
3045 oldFiber.forEach(function(child) {
3046 return deleteChild(returnFiber, child);
3047 });
3048 return iteratorFn;
3049 }
3050 return function(returnFiber, currentFirstChild, newChild, expirationTime) {
3051 var isUnkeyedTopLevelFragment =
3052 "object" === typeof newChild &&
3053 null !== newChild &&
3054 newChild.type === REACT_FRAGMENT_TYPE &&
3055 null === newChild.key;
3056 isUnkeyedTopLevelFragment && (newChild = newChild.props.children);
3057 var isObject = "object" === typeof newChild && null !== newChild;
3058 if (isObject)
3059 switch (newChild.$$typeof) {
3060 case REACT_ELEMENT_TYPE:
3061 a: {
3062 isObject = newChild.key;
3063 for (
3064 isUnkeyedTopLevelFragment = currentFirstChild;
3065 null !== isUnkeyedTopLevelFragment;
3066
3067 ) {
3068 if (isUnkeyedTopLevelFragment.key === isObject) {
3069 if (
3070 7 === isUnkeyedTopLevelFragment.tag
3071 ? newChild.type === REACT_FRAGMENT_TYPE
3072 : isUnkeyedTopLevelFragment.elementType === newChild.type
3073 ) {
3074 deleteRemainingChildren(
3075 returnFiber,
3076 isUnkeyedTopLevelFragment.sibling
3077 );
3078 currentFirstChild = useFiber(
3079 isUnkeyedTopLevelFragment,
3080 newChild.type === REACT_FRAGMENT_TYPE
3081 ? newChild.props.children
3082 : newChild.props,
3083 expirationTime
3084 );
3085 currentFirstChild.ref = coerceRef(
3086 returnFiber,
3087 isUnkeyedTopLevelFragment,
3088 newChild
3089 );
3090 currentFirstChild.return = returnFiber;
3091 returnFiber = currentFirstChild;
3092 break a;
3093 }
3094 deleteRemainingChildren(returnFiber, isUnkeyedTopLevelFragment);
3095 break;
3096 } else deleteChild(returnFiber, isUnkeyedTopLevelFragment);
3097 isUnkeyedTopLevelFragment = isUnkeyedTopLevelFragment.sibling;
3098 }
3099 newChild.type === REACT_FRAGMENT_TYPE
3100 ? ((currentFirstChild = createFiberFromFragment(
3101 newChild.props.children,
3102 returnFiber.mode,
3103 expirationTime,
3104 newChild.key
3105 )),
3106 (currentFirstChild.return = returnFiber),
3107 (returnFiber = currentFirstChild))
3108 : ((expirationTime = createFiberFromTypeAndProps(
3109 newChild.type,
3110 newChild.key,
3111 newChild.props,
3112 null,
3113 returnFiber.mode,
3114 expirationTime
3115 )),
3116 (expirationTime.ref = coerceRef(
3117 returnFiber,
3118 currentFirstChild,
3119 newChild
3120 )),
3121 (expirationTime.return = returnFiber),
3122 (returnFiber = expirationTime));
3123 }
3124 return placeSingleChild(returnFiber);
3125 case REACT_PORTAL_TYPE:
3126 a: {
3127 for (
3128 isUnkeyedTopLevelFragment = newChild.key;
3129 null !== currentFirstChild;
3130
3131 ) {
3132 if (currentFirstChild.key === isUnkeyedTopLevelFragment) {
3133 if (
3134 4 === currentFirstChild.tag &&
3135 currentFirstChild.stateNode.containerInfo ===
3136 newChild.containerInfo &&
3137 currentFirstChild.stateNode.implementation ===
3138 newChild.implementation
3139 ) {
3140 deleteRemainingChildren(
3141 returnFiber,
3142 currentFirstChild.sibling
3143 );
3144 currentFirstChild = useFiber(
3145 currentFirstChild,
3146 newChild.children || [],
3147 expirationTime
3148 );
3149 currentFirstChild.return = returnFiber;
3150 returnFiber = currentFirstChild;
3151 break a;
3152 }
3153 deleteRemainingChildren(returnFiber, currentFirstChild);
3154 break;
3155 } else deleteChild(returnFiber, currentFirstChild);
3156 currentFirstChild = currentFirstChild.sibling;
3157 }
3158 currentFirstChild = createFiberFromPortal(
3159 newChild,
3160 returnFiber.mode,
3161 expirationTime
3162 );
3163 currentFirstChild.return = returnFiber;
3164 returnFiber = currentFirstChild;
3165 }
3166 return placeSingleChild(returnFiber);
3167 }
3168 if ("string" === typeof newChild || "number" === typeof newChild)
3169 return (
3170 (newChild = "" + newChild),
3171 null !== currentFirstChild && 6 === currentFirstChild.tag
3172 ? (deleteRemainingChildren(returnFiber, currentFirstChild.sibling),
3173 (currentFirstChild = useFiber(
3174 currentFirstChild,
3175 newChild,
3176 expirationTime
3177 )),
3178 (currentFirstChild.return = returnFiber),
3179 (returnFiber = currentFirstChild))
3180 : (deleteRemainingChildren(returnFiber, currentFirstChild),
3181 (currentFirstChild = createFiberFromText(
3182 newChild,
3183 returnFiber.mode,
3184 expirationTime
3185 )),
3186 (currentFirstChild.return = returnFiber),
3187 (returnFiber = currentFirstChild)),
3188 placeSingleChild(returnFiber)
3189 );
3190 if (isArray(newChild))
3191 return reconcileChildrenArray(
3192 returnFiber,
3193 currentFirstChild,
3194 newChild,
3195 expirationTime
3196 );
3197 if (getIteratorFn(newChild))
3198 return reconcileChildrenIterator(
3199 returnFiber,
3200 currentFirstChild,
3201 newChild,
3202 expirationTime
3203 );
3204 isObject && throwOnInvalidObjectType(returnFiber, newChild);
3205 if ("undefined" === typeof newChild && !isUnkeyedTopLevelFragment)
3206 switch (returnFiber.tag) {
3207 case 1:
3208 case 0:
3209 throw ((returnFiber = returnFiber.type),
3210 ReactError(
3211 Error(
3212 (returnFiber.displayName || returnFiber.name || "Component") +
3213 "(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null."
3214 )
3215 ));
3216 }
3217 return deleteRemainingChildren(returnFiber, currentFirstChild);
3218 };
3219}
3220var reconcileChildFibers = ChildReconciler(!0),
3221 mountChildFibers = ChildReconciler(!1),
3222 NO_CONTEXT = {},
3223 contextStackCursor$1 = { current: NO_CONTEXT },
3224 contextFiberStackCursor = { current: NO_CONTEXT },
3225 rootInstanceStackCursor = { current: NO_CONTEXT };
3226function requiredContext(c) {
3227 if (c === NO_CONTEXT)
3228 throw ReactError(
3229 Error(
3230 "Expected host context to exist. This error is likely caused by a bug in React. Please file an issue."
3231 )
3232 );
3233 return c;
3234}
3235function pushHostContainer(fiber, nextRootInstance) {
3236 push(rootInstanceStackCursor, nextRootInstance, fiber);
3237 push(contextFiberStackCursor, fiber, fiber);
3238 push(contextStackCursor$1, NO_CONTEXT, fiber);
3239 pop(contextStackCursor$1, fiber);
3240 push(contextStackCursor$1, { isInAParentText: !1 }, fiber);
3241}
3242function popHostContainer(fiber) {
3243 pop(contextStackCursor$1, fiber);
3244 pop(contextFiberStackCursor, fiber);
3245 pop(rootInstanceStackCursor, fiber);
3246}
3247function pushHostContext(fiber) {
3248 requiredContext(rootInstanceStackCursor.current);
3249 var context = requiredContext(contextStackCursor$1.current);
3250 var nextContext = fiber.type;
3251 nextContext =
3252 "AndroidTextInput" === nextContext ||
3253 "RCTMultilineTextInputView" === nextContext ||
3254 "RCTSinglelineTextInputView" === nextContext ||
3255 "RCTText" === nextContext ||
3256 "RCTVirtualText" === nextContext;
3257 nextContext =
3258 context.isInAParentText !== nextContext
3259 ? { isInAParentText: nextContext }
3260 : context;
3261 context !== nextContext &&
3262 (push(contextFiberStackCursor, fiber, fiber),
3263 push(contextStackCursor$1, nextContext, fiber));
3264}
3265function popHostContext(fiber) {
3266 contextFiberStackCursor.current === fiber &&
3267 (pop(contextStackCursor$1, fiber), pop(contextFiberStackCursor, fiber));
3268}
3269var SubtreeSuspenseContextMask = 1,
3270 InvisibleParentSuspenseContext = 1,
3271 ForceSuspenseFallback = 2,
3272 suspenseStackCursor = { current: 0 };
3273function findFirstSuspended(row) {
3274 for (var node = row; null !== node; ) {
3275 if (13 === node.tag) {
3276 if (null !== node.memoizedState) return node;
3277 } else if (19 === node.tag && void 0 !== node.memoizedProps.revealOrder) {
3278 if (0 !== (node.effectTag & 64)) return node;
3279 } else if (null !== node.child) {
3280 node.child.return = node;
3281 node = node.child;
3282 continue;
3283 }
3284 if (node === row) break;
3285 for (; null === node.sibling; ) {
3286 if (null === node.return || node.return === row) return null;
3287 node = node.return;
3288 }
3289 node.sibling.return = node.return;
3290 node = node.sibling;
3291 }
3292 return null;
3293}
3294function createResponderListener(responder, props) {
3295 return { responder: responder, props: props };
3296}
3297var NoEffect$1 = 0,
3298 UnmountSnapshot = 2,
3299 UnmountMutation = 4,
3300 MountMutation = 8,
3301 UnmountLayout = 16,
3302 MountLayout = 32,
3303 MountPassive = 64,
3304 UnmountPassive = 128,
3305 ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher,
3306 renderExpirationTime$1 = 0,
3307 currentlyRenderingFiber$1 = null,
3308 currentHook = null,
3309 nextCurrentHook = null,
3310 firstWorkInProgressHook = null,
3311 workInProgressHook = null,
3312 nextWorkInProgressHook = null,
3313 remainingExpirationTime = 0,
3314 componentUpdateQueue = null,
3315 sideEffectTag = 0,
3316 didScheduleRenderPhaseUpdate = !1,
3317 renderPhaseUpdates = null,
3318 numberOfReRenders = 0;
3319function throwInvalidHookError() {
3320 throw ReactError(
3321 Error(
3322 "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://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem."
3323 )
3324 );
3325}
3326function areHookInputsEqual(nextDeps, prevDeps) {
3327 if (null === prevDeps) return !1;
3328 for (var i = 0; i < prevDeps.length && i < nextDeps.length; i++)
3329 if (!is(nextDeps[i], prevDeps[i])) return !1;
3330 return !0;
3331}
3332function renderWithHooks(
3333 current,
3334 workInProgress,
3335 Component,
3336 props,
3337 refOrContext,
3338 nextRenderExpirationTime
3339) {
3340 renderExpirationTime$1 = nextRenderExpirationTime;
3341 currentlyRenderingFiber$1 = workInProgress;
3342 nextCurrentHook = null !== current ? current.memoizedState : null;
3343 ReactCurrentDispatcher$1.current =
3344 null === nextCurrentHook ? HooksDispatcherOnMount : HooksDispatcherOnUpdate;
3345 workInProgress = Component(props, refOrContext);
3346 if (didScheduleRenderPhaseUpdate) {
3347 do
3348 (didScheduleRenderPhaseUpdate = !1),
3349 (numberOfReRenders += 1),
3350 (nextCurrentHook = null !== current ? current.memoizedState : null),
3351 (nextWorkInProgressHook = firstWorkInProgressHook),
3352 (componentUpdateQueue = workInProgressHook = currentHook = null),
3353 (ReactCurrentDispatcher$1.current = HooksDispatcherOnUpdate),
3354 (workInProgress = Component(props, refOrContext));
3355 while (didScheduleRenderPhaseUpdate);
3356 renderPhaseUpdates = null;
3357 numberOfReRenders = 0;
3358 }
3359 ReactCurrentDispatcher$1.current = ContextOnlyDispatcher;
3360 current = currentlyRenderingFiber$1;
3361 current.memoizedState = firstWorkInProgressHook;
3362 current.expirationTime = remainingExpirationTime;
3363 current.updateQueue = componentUpdateQueue;
3364 current.effectTag |= sideEffectTag;
3365 current = null !== currentHook && null !== currentHook.next;
3366 renderExpirationTime$1 = 0;
3367 nextWorkInProgressHook = workInProgressHook = firstWorkInProgressHook = nextCurrentHook = currentHook = currentlyRenderingFiber$1 = null;
3368 remainingExpirationTime = 0;
3369 componentUpdateQueue = null;
3370 sideEffectTag = 0;
3371 if (current)
3372 throw ReactError(
3373 Error(
3374 "Rendered fewer hooks than expected. This may be caused by an accidental early return statement."
3375 )
3376 );
3377 return workInProgress;
3378}
3379function resetHooks() {
3380 ReactCurrentDispatcher$1.current = ContextOnlyDispatcher;
3381 renderExpirationTime$1 = 0;
3382 nextWorkInProgressHook = workInProgressHook = firstWorkInProgressHook = nextCurrentHook = currentHook = currentlyRenderingFiber$1 = null;
3383 remainingExpirationTime = 0;
3384 componentUpdateQueue = null;
3385 sideEffectTag = 0;
3386 didScheduleRenderPhaseUpdate = !1;
3387 renderPhaseUpdates = null;
3388 numberOfReRenders = 0;
3389}
3390function mountWorkInProgressHook() {
3391 var hook = {
3392 memoizedState: null,
3393 baseState: null,
3394 queue: null,
3395 baseUpdate: null,
3396 next: null
3397 };
3398 null === workInProgressHook
3399 ? (firstWorkInProgressHook = workInProgressHook = hook)
3400 : (workInProgressHook = workInProgressHook.next = hook);
3401 return workInProgressHook;
3402}
3403function updateWorkInProgressHook() {
3404 if (null !== nextWorkInProgressHook)
3405 (workInProgressHook = nextWorkInProgressHook),
3406 (nextWorkInProgressHook = workInProgressHook.next),
3407 (currentHook = nextCurrentHook),
3408 (nextCurrentHook = null !== currentHook ? currentHook.next : null);
3409 else {
3410 if (null === nextCurrentHook)
3411 throw ReactError(
3412 Error("Rendered more hooks than during the previous render.")
3413 );
3414 currentHook = nextCurrentHook;
3415 var newHook = {
3416 memoizedState: currentHook.memoizedState,
3417 baseState: currentHook.baseState,
3418 queue: currentHook.queue,
3419 baseUpdate: currentHook.baseUpdate,
3420 next: null
3421 };
3422 workInProgressHook =
3423 null === workInProgressHook
3424 ? (firstWorkInProgressHook = newHook)
3425 : (workInProgressHook.next = newHook);
3426 nextCurrentHook = currentHook.next;
3427 }
3428 return workInProgressHook;
3429}
3430function basicStateReducer(state, action) {
3431 return "function" === typeof action ? action(state) : action;
3432}
3433function updateReducer(reducer) {
3434 var hook = updateWorkInProgressHook(),
3435 queue = hook.queue;
3436 if (null === queue)
3437 throw ReactError(
3438 Error(
3439 "Should have a queue. This is likely a bug in React. Please file an issue."
3440 )
3441 );
3442 queue.lastRenderedReducer = reducer;
3443 if (0 < numberOfReRenders) {
3444 var _dispatch = queue.dispatch;
3445 if (null !== renderPhaseUpdates) {
3446 var firstRenderPhaseUpdate = renderPhaseUpdates.get(queue);
3447 if (void 0 !== firstRenderPhaseUpdate) {
3448 renderPhaseUpdates.delete(queue);
3449 var newState = hook.memoizedState;
3450 do
3451 (newState = reducer(newState, firstRenderPhaseUpdate.action)),
3452 (firstRenderPhaseUpdate = firstRenderPhaseUpdate.next);
3453 while (null !== firstRenderPhaseUpdate);
3454 is(newState, hook.memoizedState) || (didReceiveUpdate = !0);
3455 hook.memoizedState = newState;
3456 hook.baseUpdate === queue.last && (hook.baseState = newState);
3457 queue.lastRenderedState = newState;
3458 return [newState, _dispatch];
3459 }
3460 }
3461 return [hook.memoizedState, _dispatch];
3462 }
3463 _dispatch = queue.last;
3464 var baseUpdate = hook.baseUpdate;
3465 newState = hook.baseState;
3466 null !== baseUpdate
3467 ? (null !== _dispatch && (_dispatch.next = null),
3468 (_dispatch = baseUpdate.next))
3469 : (_dispatch = null !== _dispatch ? _dispatch.next : null);
3470 if (null !== _dispatch) {
3471 var newBaseUpdate = (firstRenderPhaseUpdate = null),
3472 _update = _dispatch,
3473 didSkip = !1;
3474 do {
3475 var updateExpirationTime = _update.expirationTime;
3476 updateExpirationTime < renderExpirationTime$1
3477 ? (didSkip ||
3478 ((didSkip = !0),
3479 (newBaseUpdate = baseUpdate),
3480 (firstRenderPhaseUpdate = newState)),
3481 updateExpirationTime > remainingExpirationTime &&
3482 (remainingExpirationTime = updateExpirationTime))
3483 : (markRenderEventTimeAndConfig(
3484 updateExpirationTime,
3485 _update.suspenseConfig
3486 ),
3487 (newState =
3488 _update.eagerReducer === reducer
3489 ? _update.eagerState
3490 : reducer(newState, _update.action)));
3491 baseUpdate = _update;
3492 _update = _update.next;
3493 } while (null !== _update && _update !== _dispatch);
3494 didSkip ||
3495 ((newBaseUpdate = baseUpdate), (firstRenderPhaseUpdate = newState));
3496 is(newState, hook.memoizedState) || (didReceiveUpdate = !0);
3497 hook.memoizedState = newState;
3498 hook.baseUpdate = newBaseUpdate;
3499 hook.baseState = firstRenderPhaseUpdate;
3500 queue.lastRenderedState = newState;
3501 }
3502 return [hook.memoizedState, queue.dispatch];
3503}
3504function pushEffect(tag, create, destroy, deps) {
3505 tag = { tag: tag, create: create, destroy: destroy, deps: deps, next: null };
3506 null === componentUpdateQueue
3507 ? ((componentUpdateQueue = { lastEffect: null }),
3508 (componentUpdateQueue.lastEffect = tag.next = tag))
3509 : ((create = componentUpdateQueue.lastEffect),
3510 null === create
3511 ? (componentUpdateQueue.lastEffect = tag.next = tag)
3512 : ((destroy = create.next),
3513 (create.next = tag),
3514 (tag.next = destroy),
3515 (componentUpdateQueue.lastEffect = tag)));
3516 return tag;
3517}
3518function mountEffectImpl(fiberEffectTag, hookEffectTag, create, deps) {
3519 var hook = mountWorkInProgressHook();
3520 sideEffectTag |= fiberEffectTag;
3521 hook.memoizedState = pushEffect(
3522 hookEffectTag,
3523 create,
3524 void 0,
3525 void 0 === deps ? null : deps
3526 );
3527}
3528function updateEffectImpl(fiberEffectTag, hookEffectTag, create, deps) {
3529 var hook = updateWorkInProgressHook();
3530 deps = void 0 === deps ? null : deps;
3531 var destroy = void 0;
3532 if (null !== currentHook) {
3533 var prevEffect = currentHook.memoizedState;
3534 destroy = prevEffect.destroy;
3535 if (null !== deps && areHookInputsEqual(deps, prevEffect.deps)) {
3536 pushEffect(NoEffect$1, create, destroy, deps);
3537 return;
3538 }
3539 }
3540 sideEffectTag |= fiberEffectTag;
3541 hook.memoizedState = pushEffect(hookEffectTag, create, destroy, deps);
3542}
3543function imperativeHandleEffect(create, ref) {
3544 if ("function" === typeof ref)
3545 return (
3546 (create = create()),
3547 ref(create),
3548 function() {
3549 ref(null);
3550 }
3551 );
3552 if (null !== ref && void 0 !== ref)
3553 return (
3554 (create = create()),
3555 (ref.current = create),
3556 function() {
3557 ref.current = null;
3558 }
3559 );
3560}
3561function mountDebugValue() {}
3562function dispatchAction(fiber, queue, action) {
3563 if (!(25 > numberOfReRenders))
3564 throw ReactError(
3565 Error(
3566 "Too many re-renders. React limits the number of renders to prevent an infinite loop."
3567 )
3568 );
3569 var alternate = fiber.alternate;
3570 if (
3571 fiber === currentlyRenderingFiber$1 ||
3572 (null !== alternate && alternate === currentlyRenderingFiber$1)
3573 )
3574 if (
3575 ((didScheduleRenderPhaseUpdate = !0),
3576 (fiber = {
3577 expirationTime: renderExpirationTime$1,
3578 suspenseConfig: null,
3579 action: action,
3580 eagerReducer: null,
3581 eagerState: null,
3582 next: null
3583 }),
3584 null === renderPhaseUpdates && (renderPhaseUpdates = new Map()),
3585 (action = renderPhaseUpdates.get(queue)),
3586 void 0 === action)
3587 )
3588 renderPhaseUpdates.set(queue, fiber);
3589 else {
3590 for (queue = action; null !== queue.next; ) queue = queue.next;
3591 queue.next = fiber;
3592 }
3593 else {
3594 var currentTime = requestCurrentTime(),
3595 _suspenseConfig = ReactCurrentBatchConfig.suspense;
3596 currentTime = computeExpirationForFiber(
3597 currentTime,
3598 fiber,
3599 _suspenseConfig
3600 );
3601 _suspenseConfig = {
3602 expirationTime: currentTime,
3603 suspenseConfig: _suspenseConfig,
3604 action: action,
3605 eagerReducer: null,
3606 eagerState: null,
3607 next: null
3608 };
3609 var _last = queue.last;
3610 if (null === _last) _suspenseConfig.next = _suspenseConfig;
3611 else {
3612 var first = _last.next;
3613 null !== first && (_suspenseConfig.next = first);
3614 _last.next = _suspenseConfig;
3615 }
3616 queue.last = _suspenseConfig;
3617 if (
3618 0 === fiber.expirationTime &&
3619 (null === alternate || 0 === alternate.expirationTime) &&
3620 ((alternate = queue.lastRenderedReducer), null !== alternate)
3621 )
3622 try {
3623 var currentState = queue.lastRenderedState,
3624 _eagerState = alternate(currentState, action);
3625 _suspenseConfig.eagerReducer = alternate;
3626 _suspenseConfig.eagerState = _eagerState;
3627 if (is(_eagerState, currentState)) return;
3628 } catch (error) {
3629 } finally {
3630 }
3631 scheduleUpdateOnFiber(fiber, currentTime);
3632 }
3633}
3634var ContextOnlyDispatcher = {
3635 readContext: readContext,
3636 useCallback: throwInvalidHookError,
3637 useContext: throwInvalidHookError,
3638 useEffect: throwInvalidHookError,
3639 useImperativeHandle: throwInvalidHookError,
3640 useLayoutEffect: throwInvalidHookError,
3641 useMemo: throwInvalidHookError,
3642 useReducer: throwInvalidHookError,
3643 useRef: throwInvalidHookError,
3644 useState: throwInvalidHookError,
3645 useDebugValue: throwInvalidHookError,
3646 useResponder: throwInvalidHookError
3647 },
3648 HooksDispatcherOnMount = {
3649 readContext: readContext,
3650 useCallback: function(callback, deps) {
3651 mountWorkInProgressHook().memoizedState = [
3652 callback,
3653 void 0 === deps ? null : deps
3654 ];
3655 return callback;
3656 },
3657 useContext: readContext,
3658 useEffect: function(create, deps) {
3659 return mountEffectImpl(516, UnmountPassive | MountPassive, create, deps);
3660 },
3661 useImperativeHandle: function(ref, create, deps) {
3662 deps = null !== deps && void 0 !== deps ? deps.concat([ref]) : null;
3663 return mountEffectImpl(
3664 4,
3665 UnmountMutation | MountLayout,
3666 imperativeHandleEffect.bind(null, create, ref),
3667 deps
3668 );
3669 },
3670 useLayoutEffect: function(create, deps) {
3671 return mountEffectImpl(4, UnmountMutation | MountLayout, create, deps);
3672 },
3673 useMemo: function(nextCreate, deps) {
3674 var hook = mountWorkInProgressHook();
3675 deps = void 0 === deps ? null : deps;
3676 nextCreate = nextCreate();
3677 hook.memoizedState = [nextCreate, deps];
3678 return nextCreate;
3679 },
3680 useReducer: function(reducer, initialArg, init) {
3681 var hook = mountWorkInProgressHook();
3682 initialArg = void 0 !== init ? init(initialArg) : initialArg;
3683 hook.memoizedState = hook.baseState = initialArg;
3684 reducer = hook.queue = {
3685 last: null,
3686 dispatch: null,
3687 lastRenderedReducer: reducer,
3688 lastRenderedState: initialArg
3689 };
3690 reducer = reducer.dispatch = dispatchAction.bind(
3691 null,
3692 currentlyRenderingFiber$1,
3693 reducer
3694 );
3695 return [hook.memoizedState, reducer];
3696 },
3697 useRef: function(initialValue) {
3698 var hook = mountWorkInProgressHook();
3699 initialValue = { current: initialValue };
3700 return (hook.memoizedState = initialValue);
3701 },
3702 useState: function(initialState) {
3703 var hook = mountWorkInProgressHook();
3704 "function" === typeof initialState && (initialState = initialState());
3705 hook.memoizedState = hook.baseState = initialState;
3706 initialState = hook.queue = {
3707 last: null,
3708 dispatch: null,
3709 lastRenderedReducer: basicStateReducer,
3710 lastRenderedState: initialState
3711 };
3712 initialState = initialState.dispatch = dispatchAction.bind(
3713 null,
3714 currentlyRenderingFiber$1,
3715 initialState
3716 );
3717 return [hook.memoizedState, initialState];
3718 },
3719 useDebugValue: mountDebugValue,
3720 useResponder: createResponderListener
3721 },
3722 HooksDispatcherOnUpdate = {
3723 readContext: readContext,
3724 useCallback: function(callback, deps) {
3725 var hook = updateWorkInProgressHook();
3726 deps = void 0 === deps ? null : deps;
3727 var prevState = hook.memoizedState;
3728 if (
3729 null !== prevState &&
3730 null !== deps &&
3731 areHookInputsEqual(deps, prevState[1])
3732 )
3733 return prevState[0];
3734 hook.memoizedState = [callback, deps];
3735 return callback;
3736 },
3737 useContext: readContext,
3738 useEffect: function(create, deps) {
3739 return updateEffectImpl(516, UnmountPassive | MountPassive, create, deps);
3740 },
3741 useImperativeHandle: function(ref, create, deps) {
3742 deps = null !== deps && void 0 !== deps ? deps.concat([ref]) : null;
3743 return updateEffectImpl(
3744 4,
3745 UnmountMutation | MountLayout,
3746 imperativeHandleEffect.bind(null, create, ref),
3747 deps
3748 );
3749 },
3750 useLayoutEffect: function(create, deps) {
3751 return updateEffectImpl(4, UnmountMutation | MountLayout, create, deps);
3752 },
3753 useMemo: function(nextCreate, deps) {
3754 var hook = updateWorkInProgressHook();
3755 deps = void 0 === deps ? null : deps;
3756 var prevState = hook.memoizedState;
3757 if (
3758 null !== prevState &&
3759 null !== deps &&
3760 areHookInputsEqual(deps, prevState[1])
3761 )
3762 return prevState[0];
3763 nextCreate = nextCreate();
3764 hook.memoizedState = [nextCreate, deps];
3765 return nextCreate;
3766 },
3767 useReducer: updateReducer,
3768 useRef: function() {
3769 return updateWorkInProgressHook().memoizedState;
3770 },
3771 useState: function(initialState) {
3772 return updateReducer(basicStateReducer, initialState);
3773 },
3774 useDebugValue: mountDebugValue,
3775 useResponder: createResponderListener
3776 },
3777 now$1 = Scheduler.unstable_now,
3778 commitTime = 0,
3779 profilerStartTime = -1;
3780function stopProfilerTimerIfRunningAndRecordDelta(fiber, overrideBaseTime) {
3781 if (0 <= profilerStartTime) {
3782 var elapsedTime = now$1() - profilerStartTime;
3783 fiber.actualDuration += elapsedTime;
3784 overrideBaseTime && (fiber.selfBaseDuration = elapsedTime);
3785 profilerStartTime = -1;
3786 }
3787}
3788var hydrationParentFiber = null,
3789 nextHydratableInstance = null,
3790 isHydrating = !1;
3791function tryHydrate(fiber, nextInstance) {
3792 switch (fiber.tag) {
3793 case 5:
3794 return (
3795 (nextInstance = shim$1(nextInstance, fiber.type, fiber.pendingProps)),
3796 null !== nextInstance ? ((fiber.stateNode = nextInstance), !0) : !1
3797 );
3798 case 6:
3799 return (
3800 (nextInstance = shim$1(nextInstance, fiber.pendingProps)),
3801 null !== nextInstance ? ((fiber.stateNode = nextInstance), !0) : !1
3802 );
3803 case 13:
3804 return !1;
3805 default:
3806 return !1;
3807 }
3808}
3809function tryToClaimNextHydratableInstance(fiber$jscomp$0) {
3810 if (isHydrating) {
3811 var nextInstance = nextHydratableInstance;
3812 if (nextInstance) {
3813 var firstAttemptedInstance = nextInstance;
3814 if (!tryHydrate(fiber$jscomp$0, nextInstance)) {
3815 nextInstance = shim$1(firstAttemptedInstance);
3816 if (!nextInstance || !tryHydrate(fiber$jscomp$0, nextInstance)) {
3817 fiber$jscomp$0.effectTag |= 2;
3818 isHydrating = !1;
3819 hydrationParentFiber = fiber$jscomp$0;
3820 return;
3821 }
3822 var returnFiber = hydrationParentFiber,
3823 fiber = createFiber(5, null, null, 0);
3824 fiber.elementType = "DELETED";
3825 fiber.type = "DELETED";
3826 fiber.stateNode = firstAttemptedInstance;
3827 fiber.return = returnFiber;
3828 fiber.effectTag = 8;
3829 null !== returnFiber.lastEffect
3830 ? ((returnFiber.lastEffect.nextEffect = fiber),
3831 (returnFiber.lastEffect = fiber))
3832 : (returnFiber.firstEffect = returnFiber.lastEffect = fiber);
3833 }
3834 hydrationParentFiber = fiber$jscomp$0;
3835 nextHydratableInstance = shim$1(nextInstance);
3836 } else
3837 (fiber$jscomp$0.effectTag |= 2),
3838 (isHydrating = !1),
3839 (hydrationParentFiber = fiber$jscomp$0);
3840 }
3841}
3842var ReactCurrentOwner$3 = ReactSharedInternals.ReactCurrentOwner,
3843 didReceiveUpdate = !1;
3844function reconcileChildren(
3845 current$$1,
3846 workInProgress,
3847 nextChildren,
3848 renderExpirationTime
3849) {
3850 workInProgress.child =
3851 null === current$$1
3852 ? mountChildFibers(
3853 workInProgress,
3854 null,
3855 nextChildren,
3856 renderExpirationTime
3857 )
3858 : reconcileChildFibers(
3859 workInProgress,
3860 current$$1.child,
3861 nextChildren,
3862 renderExpirationTime
3863 );
3864}
3865function updateForwardRef(
3866 current$$1,
3867 workInProgress,
3868 Component,
3869 nextProps,
3870 renderExpirationTime
3871) {
3872 Component = Component.render;
3873 var ref = workInProgress.ref;
3874 prepareToReadContext(workInProgress, renderExpirationTime);
3875 nextProps = renderWithHooks(
3876 current$$1,
3877 workInProgress,
3878 Component,
3879 nextProps,
3880 ref,
3881 renderExpirationTime
3882 );
3883 if (null !== current$$1 && !didReceiveUpdate)
3884 return (
3885 (workInProgress.updateQueue = current$$1.updateQueue),
3886 (workInProgress.effectTag &= -517),
3887 current$$1.expirationTime <= renderExpirationTime &&
3888 (current$$1.expirationTime = 0),
3889 bailoutOnAlreadyFinishedWork(
3890 current$$1,
3891 workInProgress,
3892 renderExpirationTime
3893 )
3894 );
3895 workInProgress.effectTag |= 1;
3896 reconcileChildren(
3897 current$$1,
3898 workInProgress,
3899 nextProps,
3900 renderExpirationTime
3901 );
3902 return workInProgress.child;
3903}
3904function updateMemoComponent(
3905 current$$1,
3906 workInProgress,
3907 Component,
3908 nextProps,
3909 updateExpirationTime,
3910 renderExpirationTime
3911) {
3912 if (null === current$$1) {
3913 var type = Component.type;
3914 if (
3915 "function" === typeof type &&
3916 !shouldConstruct(type) &&
3917 void 0 === type.defaultProps &&
3918 null === Component.compare &&
3919 void 0 === Component.defaultProps
3920 )
3921 return (
3922 (workInProgress.tag = 15),
3923 (workInProgress.type = type),
3924 updateSimpleMemoComponent(
3925 current$$1,
3926 workInProgress,
3927 type,
3928 nextProps,
3929 updateExpirationTime,
3930 renderExpirationTime
3931 )
3932 );
3933 current$$1 = createFiberFromTypeAndProps(
3934 Component.type,
3935 null,
3936 nextProps,
3937 null,
3938 workInProgress.mode,
3939 renderExpirationTime
3940 );
3941 current$$1.ref = workInProgress.ref;
3942 current$$1.return = workInProgress;
3943 return (workInProgress.child = current$$1);
3944 }
3945 type = current$$1.child;
3946 if (
3947 updateExpirationTime < renderExpirationTime &&
3948 ((updateExpirationTime = type.memoizedProps),
3949 (Component = Component.compare),
3950 (Component = null !== Component ? Component : shallowEqual),
3951 Component(updateExpirationTime, nextProps) &&
3952 current$$1.ref === workInProgress.ref)
3953 )
3954 return bailoutOnAlreadyFinishedWork(
3955 current$$1,
3956 workInProgress,
3957 renderExpirationTime
3958 );
3959 workInProgress.effectTag |= 1;
3960 current$$1 = createWorkInProgress(type, nextProps, renderExpirationTime);
3961 current$$1.ref = workInProgress.ref;
3962 current$$1.return = workInProgress;
3963 return (workInProgress.child = current$$1);
3964}
3965function updateSimpleMemoComponent(
3966 current$$1,
3967 workInProgress,
3968 Component,
3969 nextProps,
3970 updateExpirationTime,
3971 renderExpirationTime
3972) {
3973 return null !== current$$1 &&
3974 shallowEqual(current$$1.memoizedProps, nextProps) &&
3975 current$$1.ref === workInProgress.ref &&
3976 ((didReceiveUpdate = !1), updateExpirationTime < renderExpirationTime)
3977 ? bailoutOnAlreadyFinishedWork(
3978 current$$1,
3979 workInProgress,
3980 renderExpirationTime
3981 )
3982 : updateFunctionComponent(
3983 current$$1,
3984 workInProgress,
3985 Component,
3986 nextProps,
3987 renderExpirationTime
3988 );
3989}
3990function markRef(current$$1, workInProgress) {
3991 var ref = workInProgress.ref;
3992 if (
3993 (null === current$$1 && null !== ref) ||
3994 (null !== current$$1 && current$$1.ref !== ref)
3995 )
3996 workInProgress.effectTag |= 128;
3997}
3998function updateFunctionComponent(
3999 current$$1,
4000 workInProgress,
4001 Component,
4002 nextProps,
4003 renderExpirationTime
4004) {
4005 var context = isContextProvider(Component)
4006 ? previousContext
4007 : contextStackCursor.current;
4008 context = getMaskedContext(workInProgress, context);
4009 prepareToReadContext(workInProgress, renderExpirationTime);
4010 Component = renderWithHooks(
4011 current$$1,
4012 workInProgress,
4013 Component,
4014 nextProps,
4015 context,
4016 renderExpirationTime
4017 );
4018 if (null !== current$$1 && !didReceiveUpdate)
4019 return (
4020 (workInProgress.updateQueue = current$$1.updateQueue),
4021 (workInProgress.effectTag &= -517),
4022 current$$1.expirationTime <= renderExpirationTime &&
4023 (current$$1.expirationTime = 0),
4024 bailoutOnAlreadyFinishedWork(
4025 current$$1,
4026 workInProgress,
4027 renderExpirationTime
4028 )
4029 );
4030 workInProgress.effectTag |= 1;
4031 reconcileChildren(
4032 current$$1,
4033 workInProgress,
4034 Component,
4035 renderExpirationTime
4036 );
4037 return workInProgress.child;
4038}
4039function updateClassComponent(
4040 current$$1,
4041 workInProgress,
4042 Component,
4043 nextProps,
4044 renderExpirationTime
4045) {
4046 if (isContextProvider(Component)) {
4047 var hasContext = !0;
4048 pushContextProvider(workInProgress);
4049 } else hasContext = !1;
4050 prepareToReadContext(workInProgress, renderExpirationTime);
4051 if (null === workInProgress.stateNode)
4052 null !== current$$1 &&
4053 ((current$$1.alternate = null),
4054 (workInProgress.alternate = null),
4055 (workInProgress.effectTag |= 2)),
4056 constructClassInstance(
4057 workInProgress,
4058 Component,
4059 nextProps,
4060 renderExpirationTime
4061 ),
4062 mountClassInstance(
4063 workInProgress,
4064 Component,
4065 nextProps,
4066 renderExpirationTime
4067 ),
4068 (nextProps = !0);
4069 else if (null === current$$1) {
4070 var instance = workInProgress.stateNode,
4071 oldProps = workInProgress.memoizedProps;
4072 instance.props = oldProps;
4073 var oldContext = instance.context,
4074 contextType = Component.contextType;
4075 "object" === typeof contextType && null !== contextType
4076 ? (contextType = readContext(contextType))
4077 : ((contextType = isContextProvider(Component)
4078 ? previousContext
4079 : contextStackCursor.current),
4080 (contextType = getMaskedContext(workInProgress, contextType)));
4081 var getDerivedStateFromProps = Component.getDerivedStateFromProps,
4082 hasNewLifecycles =
4083 "function" === typeof getDerivedStateFromProps ||
4084 "function" === typeof instance.getSnapshotBeforeUpdate;
4085 hasNewLifecycles ||
4086 ("function" !== typeof instance.UNSAFE_componentWillReceiveProps &&
4087 "function" !== typeof instance.componentWillReceiveProps) ||
4088 ((oldProps !== nextProps || oldContext !== contextType) &&
4089 callComponentWillReceiveProps(
4090 workInProgress,
4091 instance,
4092 nextProps,
4093 contextType
4094 ));
4095 hasForceUpdate = !1;
4096 var oldState = workInProgress.memoizedState;
4097 oldContext = instance.state = oldState;
4098 var updateQueue = workInProgress.updateQueue;
4099 null !== updateQueue &&
4100 (processUpdateQueue(
4101 workInProgress,
4102 updateQueue,
4103 nextProps,
4104 instance,
4105 renderExpirationTime
4106 ),
4107 (oldContext = workInProgress.memoizedState));
4108 oldProps !== nextProps ||
4109 oldState !== oldContext ||
4110 didPerformWorkStackCursor.current ||
4111 hasForceUpdate
4112 ? ("function" === typeof getDerivedStateFromProps &&
4113 (applyDerivedStateFromProps(
4114 workInProgress,
4115 Component,
4116 getDerivedStateFromProps,
4117 nextProps
4118 ),
4119 (oldContext = workInProgress.memoizedState)),
4120 (oldProps =
4121 hasForceUpdate ||
4122 checkShouldComponentUpdate(
4123 workInProgress,
4124 Component,
4125 oldProps,
4126 nextProps,
4127 oldState,
4128 oldContext,
4129 contextType
4130 ))
4131 ? (hasNewLifecycles ||
4132 ("function" !== typeof instance.UNSAFE_componentWillMount &&
4133 "function" !== typeof instance.componentWillMount) ||
4134 ("function" === typeof instance.componentWillMount &&
4135 instance.componentWillMount(),
4136 "function" === typeof instance.UNSAFE_componentWillMount &&
4137 instance.UNSAFE_componentWillMount()),
4138 "function" === typeof instance.componentDidMount &&
4139 (workInProgress.effectTag |= 4))
4140 : ("function" === typeof instance.componentDidMount &&
4141 (workInProgress.effectTag |= 4),
4142 (workInProgress.memoizedProps = nextProps),
4143 (workInProgress.memoizedState = oldContext)),
4144 (instance.props = nextProps),
4145 (instance.state = oldContext),
4146 (instance.context = contextType),
4147 (nextProps = oldProps))
4148 : ("function" === typeof instance.componentDidMount &&
4149 (workInProgress.effectTag |= 4),
4150 (nextProps = !1));
4151 } else
4152 (instance = workInProgress.stateNode),
4153 (oldProps = workInProgress.memoizedProps),
4154 (instance.props =
4155 workInProgress.type === workInProgress.elementType
4156 ? oldProps
4157 : resolveDefaultProps(workInProgress.type, oldProps)),
4158 (oldContext = instance.context),
4159 (contextType = Component.contextType),
4160 "object" === typeof contextType && null !== contextType
4161 ? (contextType = readContext(contextType))
4162 : ((contextType = isContextProvider(Component)
4163 ? previousContext
4164 : contextStackCursor.current),
4165 (contextType = getMaskedContext(workInProgress, contextType))),
4166 (getDerivedStateFromProps = Component.getDerivedStateFromProps),
4167 (hasNewLifecycles =
4168 "function" === typeof getDerivedStateFromProps ||
4169 "function" === typeof instance.getSnapshotBeforeUpdate) ||
4170 ("function" !== typeof instance.UNSAFE_componentWillReceiveProps &&
4171 "function" !== typeof instance.componentWillReceiveProps) ||
4172 ((oldProps !== nextProps || oldContext !== contextType) &&
4173 callComponentWillReceiveProps(
4174 workInProgress,
4175 instance,
4176 nextProps,
4177 contextType
4178 )),
4179 (hasForceUpdate = !1),
4180 (oldContext = workInProgress.memoizedState),
4181 (oldState = instance.state = oldContext),
4182 (updateQueue = workInProgress.updateQueue),
4183 null !== updateQueue &&
4184 (processUpdateQueue(
4185 workInProgress,
4186 updateQueue,
4187 nextProps,
4188 instance,
4189 renderExpirationTime
4190 ),
4191 (oldState = workInProgress.memoizedState)),
4192 oldProps !== nextProps ||
4193 oldContext !== oldState ||
4194 didPerformWorkStackCursor.current ||
4195 hasForceUpdate
4196 ? ("function" === typeof getDerivedStateFromProps &&
4197 (applyDerivedStateFromProps(
4198 workInProgress,
4199 Component,
4200 getDerivedStateFromProps,
4201 nextProps
4202 ),
4203 (oldState = workInProgress.memoizedState)),
4204 (getDerivedStateFromProps =
4205 hasForceUpdate ||
4206 checkShouldComponentUpdate(
4207 workInProgress,
4208 Component,
4209 oldProps,
4210 nextProps,
4211 oldContext,
4212 oldState,
4213 contextType
4214 ))
4215 ? (hasNewLifecycles ||
4216 ("function" !== typeof instance.UNSAFE_componentWillUpdate &&
4217 "function" !== typeof instance.componentWillUpdate) ||
4218 ("function" === typeof instance.componentWillUpdate &&
4219 instance.componentWillUpdate(
4220 nextProps,
4221 oldState,
4222 contextType
4223 ),
4224 "function" === typeof instance.UNSAFE_componentWillUpdate &&
4225 instance.UNSAFE_componentWillUpdate(
4226 nextProps,
4227 oldState,
4228 contextType
4229 )),
4230 "function" === typeof instance.componentDidUpdate &&
4231 (workInProgress.effectTag |= 4),
4232 "function" === typeof instance.getSnapshotBeforeUpdate &&
4233 (workInProgress.effectTag |= 256))
4234 : ("function" !== typeof instance.componentDidUpdate ||
4235 (oldProps === current$$1.memoizedProps &&
4236 oldContext === current$$1.memoizedState) ||
4237 (workInProgress.effectTag |= 4),
4238 "function" !== typeof instance.getSnapshotBeforeUpdate ||
4239 (oldProps === current$$1.memoizedProps &&
4240 oldContext === current$$1.memoizedState) ||
4241 (workInProgress.effectTag |= 256),
4242 (workInProgress.memoizedProps = nextProps),
4243 (workInProgress.memoizedState = oldState)),
4244 (instance.props = nextProps),
4245 (instance.state = oldState),
4246 (instance.context = contextType),
4247 (nextProps = getDerivedStateFromProps))
4248 : ("function" !== typeof instance.componentDidUpdate ||
4249 (oldProps === current$$1.memoizedProps &&
4250 oldContext === current$$1.memoizedState) ||
4251 (workInProgress.effectTag |= 4),
4252 "function" !== typeof instance.getSnapshotBeforeUpdate ||
4253 (oldProps === current$$1.memoizedProps &&
4254 oldContext === current$$1.memoizedState) ||
4255 (workInProgress.effectTag |= 256),
4256 (nextProps = !1));
4257 return finishClassComponent(
4258 current$$1,
4259 workInProgress,
4260 Component,
4261 nextProps,
4262 hasContext,
4263 renderExpirationTime
4264 );
4265}
4266function finishClassComponent(
4267 current$$1,
4268 workInProgress,
4269 Component,
4270 shouldUpdate,
4271 hasContext,
4272 renderExpirationTime
4273) {
4274 markRef(current$$1, workInProgress);
4275 var didCaptureError = 0 !== (workInProgress.effectTag & 64);
4276 if (!shouldUpdate && !didCaptureError)
4277 return (
4278 hasContext && invalidateContextProvider(workInProgress, Component, !1),
4279 bailoutOnAlreadyFinishedWork(
4280 current$$1,
4281 workInProgress,
4282 renderExpirationTime
4283 )
4284 );
4285 shouldUpdate = workInProgress.stateNode;
4286 ReactCurrentOwner$3.current = workInProgress;
4287 if (
4288 didCaptureError &&
4289 "function" !== typeof Component.getDerivedStateFromError
4290 ) {
4291 var nextChildren = null;
4292 profilerStartTime = -1;
4293 } else nextChildren = shouldUpdate.render();
4294 workInProgress.effectTag |= 1;
4295 null !== current$$1 && didCaptureError
4296 ? ((didCaptureError = nextChildren),
4297 (workInProgress.child = reconcileChildFibers(
4298 workInProgress,
4299 current$$1.child,
4300 null,
4301 renderExpirationTime
4302 )),
4303 (workInProgress.child = reconcileChildFibers(
4304 workInProgress,
4305 null,
4306 didCaptureError,
4307 renderExpirationTime
4308 )))
4309 : reconcileChildren(
4310 current$$1,
4311 workInProgress,
4312 nextChildren,
4313 renderExpirationTime
4314 );
4315 workInProgress.memoizedState = shouldUpdate.state;
4316 hasContext && invalidateContextProvider(workInProgress, Component, !0);
4317 return workInProgress.child;
4318}
4319function pushHostRootContext(workInProgress) {
4320 var root = workInProgress.stateNode;
4321 root.pendingContext
4322 ? pushTopLevelContextObject(
4323 workInProgress,
4324 root.pendingContext,
4325 root.pendingContext !== root.context
4326 )
4327 : root.context &&
4328 pushTopLevelContextObject(workInProgress, root.context, !1);
4329 pushHostContainer(workInProgress, root.containerInfo);
4330}
4331var SUSPENDED_MARKER = {};
4332function updateSuspenseComponent(
4333 current$$1,
4334 workInProgress,
4335 renderExpirationTime
4336) {
4337 var mode = workInProgress.mode,
4338 nextProps = workInProgress.pendingProps,
4339 suspenseContext = suspenseStackCursor.current,
4340 nextState = null,
4341 nextDidTimeout = !1,
4342 JSCompiler_temp;
4343 (JSCompiler_temp = 0 !== (workInProgress.effectTag & 64)) ||
4344 (JSCompiler_temp =
4345 0 !== (suspenseContext & ForceSuspenseFallback) &&
4346 (null === current$$1 || null !== current$$1.memoizedState));
4347 JSCompiler_temp
4348 ? ((nextState = SUSPENDED_MARKER),
4349 (nextDidTimeout = !0),
4350 (workInProgress.effectTag &= -65))
4351 : (null !== current$$1 && null === current$$1.memoizedState) ||
4352 void 0 === nextProps.fallback ||
4353 !0 === nextProps.unstable_avoidThisFallback ||
4354 (suspenseContext |= InvisibleParentSuspenseContext);
4355 suspenseContext &= SubtreeSuspenseContextMask;
4356 push(suspenseStackCursor, suspenseContext, workInProgress);
4357 if (null === current$$1)
4358 if (nextDidTimeout) {
4359 nextProps = nextProps.fallback;
4360 current$$1 = createFiberFromFragment(null, mode, 0, null);
4361 current$$1.return = workInProgress;
4362 if (0 === (workInProgress.mode & 2))
4363 for (
4364 nextDidTimeout =
4365 null !== workInProgress.memoizedState
4366 ? workInProgress.child.child
4367 : workInProgress.child,
4368 current$$1.child = nextDidTimeout;
4369 null !== nextDidTimeout;
4370
4371 )
4372 (nextDidTimeout.return = current$$1),
4373 (nextDidTimeout = nextDidTimeout.sibling);
4374 renderExpirationTime = createFiberFromFragment(
4375 nextProps,
4376 mode,
4377 renderExpirationTime,
4378 null
4379 );
4380 renderExpirationTime.return = workInProgress;
4381 current$$1.sibling = renderExpirationTime;
4382 mode = current$$1;
4383 } else
4384 mode = renderExpirationTime = mountChildFibers(
4385 workInProgress,
4386 null,
4387 nextProps.children,
4388 renderExpirationTime
4389 );
4390 else {
4391 if (null !== current$$1.memoizedState)
4392 if (
4393 ((suspenseContext = current$$1.child),
4394 (mode = suspenseContext.sibling),
4395 nextDidTimeout)
4396 ) {
4397 nextProps = nextProps.fallback;
4398 renderExpirationTime = createWorkInProgress(
4399 suspenseContext,
4400 suspenseContext.pendingProps,
4401 0
4402 );
4403 renderExpirationTime.return = workInProgress;
4404 if (
4405 0 === (workInProgress.mode & 2) &&
4406 ((nextDidTimeout =
4407 null !== workInProgress.memoizedState
4408 ? workInProgress.child.child
4409 : workInProgress.child),
4410 nextDidTimeout !== suspenseContext.child)
4411 )
4412 for (
4413 renderExpirationTime.child = nextDidTimeout;
4414 null !== nextDidTimeout;
4415
4416 )
4417 (nextDidTimeout.return = renderExpirationTime),
4418 (nextDidTimeout = nextDidTimeout.sibling);
4419 if (workInProgress.mode & 8) {
4420 nextDidTimeout = 0;
4421 for (
4422 suspenseContext = renderExpirationTime.child;
4423 null !== suspenseContext;
4424
4425 )
4426 (nextDidTimeout += suspenseContext.treeBaseDuration),
4427 (suspenseContext = suspenseContext.sibling);
4428 renderExpirationTime.treeBaseDuration = nextDidTimeout;
4429 }
4430 nextProps = createWorkInProgress(mode, nextProps, mode.expirationTime);
4431 nextProps.return = workInProgress;
4432 renderExpirationTime.sibling = nextProps;
4433 mode = renderExpirationTime;
4434 renderExpirationTime.childExpirationTime = 0;
4435 renderExpirationTime = nextProps;
4436 } else
4437 mode = renderExpirationTime = reconcileChildFibers(
4438 workInProgress,
4439 suspenseContext.child,
4440 nextProps.children,
4441 renderExpirationTime
4442 );
4443 else if (((suspenseContext = current$$1.child), nextDidTimeout)) {
4444 nextDidTimeout = nextProps.fallback;
4445 nextProps = createFiberFromFragment(null, mode, 0, null);
4446 nextProps.return = workInProgress;
4447 nextProps.child = suspenseContext;
4448 null !== suspenseContext && (suspenseContext.return = nextProps);
4449 if (0 === (workInProgress.mode & 2))
4450 for (
4451 suspenseContext =
4452 null !== workInProgress.memoizedState
4453 ? workInProgress.child.child
4454 : workInProgress.child,
4455 nextProps.child = suspenseContext;
4456 null !== suspenseContext;
4457
4458 )
4459 (suspenseContext.return = nextProps),
4460 (suspenseContext = suspenseContext.sibling);
4461 if (workInProgress.mode & 8) {
4462 suspenseContext = 0;
4463 for (JSCompiler_temp = nextProps.child; null !== JSCompiler_temp; )
4464 (suspenseContext += JSCompiler_temp.treeBaseDuration),
4465 (JSCompiler_temp = JSCompiler_temp.sibling);
4466 nextProps.treeBaseDuration = suspenseContext;
4467 }
4468 renderExpirationTime = createFiberFromFragment(
4469 nextDidTimeout,
4470 mode,
4471 renderExpirationTime,
4472 null
4473 );
4474 renderExpirationTime.return = workInProgress;
4475 nextProps.sibling = renderExpirationTime;
4476 renderExpirationTime.effectTag |= 2;
4477 mode = nextProps;
4478 nextProps.childExpirationTime = 0;
4479 } else
4480 renderExpirationTime = mode = reconcileChildFibers(
4481 workInProgress,
4482 suspenseContext,
4483 nextProps.children,
4484 renderExpirationTime
4485 );
4486 workInProgress.stateNode = current$$1.stateNode;
4487 }
4488 workInProgress.memoizedState = nextState;
4489 workInProgress.child = mode;
4490 return renderExpirationTime;
4491}
4492function initSuspenseListRenderState(
4493 workInProgress,
4494 isBackwards,
4495 tail,
4496 lastContentRow,
4497 tailMode
4498) {
4499 var renderState = workInProgress.memoizedState;
4500 null === renderState
4501 ? (workInProgress.memoizedState = {
4502 isBackwards: isBackwards,
4503 rendering: null,
4504 last: lastContentRow,
4505 tail: tail,
4506 tailExpiration: 0,
4507 tailMode: tailMode
4508 })
4509 : ((renderState.isBackwards = isBackwards),
4510 (renderState.rendering = null),
4511 (renderState.last = lastContentRow),
4512 (renderState.tail = tail),
4513 (renderState.tailExpiration = 0),
4514 (renderState.tailMode = tailMode));
4515}
4516function updateSuspenseListComponent(
4517 current$$1,
4518 workInProgress,
4519 renderExpirationTime
4520) {
4521 var nextProps = workInProgress.pendingProps,
4522 revealOrder = nextProps.revealOrder,
4523 tailMode = nextProps.tail;
4524 reconcileChildren(
4525 current$$1,
4526 workInProgress,
4527 nextProps.children,
4528 renderExpirationTime
4529 );
4530 nextProps = suspenseStackCursor.current;
4531 if (0 !== (nextProps & ForceSuspenseFallback))
4532 (nextProps =
4533 (nextProps & SubtreeSuspenseContextMask) | ForceSuspenseFallback),
4534 (workInProgress.effectTag |= 64);
4535 else {
4536 if (null !== current$$1 && 0 !== (current$$1.effectTag & 64))
4537 a: for (current$$1 = workInProgress.child; null !== current$$1; ) {
4538 if (13 === current$$1.tag) {
4539 if (null !== current$$1.memoizedState) {
4540 current$$1.expirationTime < renderExpirationTime &&
4541 (current$$1.expirationTime = renderExpirationTime);
4542 var alternate = current$$1.alternate;
4543 null !== alternate &&
4544 alternate.expirationTime < renderExpirationTime &&
4545 (alternate.expirationTime = renderExpirationTime);
4546 scheduleWorkOnParentPath(current$$1.return, renderExpirationTime);
4547 }
4548 } else if (null !== current$$1.child) {
4549 current$$1.child.return = current$$1;
4550 current$$1 = current$$1.child;
4551 continue;
4552 }
4553 if (current$$1 === workInProgress) break a;
4554 for (; null === current$$1.sibling; ) {
4555 if (
4556 null === current$$1.return ||
4557 current$$1.return === workInProgress
4558 )
4559 break a;
4560 current$$1 = current$$1.return;
4561 }
4562 current$$1.sibling.return = current$$1.return;
4563 current$$1 = current$$1.sibling;
4564 }
4565 nextProps &= SubtreeSuspenseContextMask;
4566 }
4567 push(suspenseStackCursor, nextProps, workInProgress);
4568 if (0 === (workInProgress.mode & 2)) workInProgress.memoizedState = null;
4569 else
4570 switch (revealOrder) {
4571 case "forwards":
4572 renderExpirationTime = workInProgress.child;
4573 for (revealOrder = null; null !== renderExpirationTime; )
4574 (nextProps = renderExpirationTime.alternate),
4575 null !== nextProps &&
4576 null === findFirstSuspended(nextProps) &&
4577 (revealOrder = renderExpirationTime),
4578 (renderExpirationTime = renderExpirationTime.sibling);
4579 renderExpirationTime = revealOrder;
4580 null === renderExpirationTime
4581 ? ((revealOrder = workInProgress.child),
4582 (workInProgress.child = null))
4583 : ((revealOrder = renderExpirationTime.sibling),
4584 (renderExpirationTime.sibling = null));
4585 initSuspenseListRenderState(
4586 workInProgress,
4587 !1,
4588 revealOrder,
4589 renderExpirationTime,
4590 tailMode
4591 );
4592 break;
4593 case "backwards":
4594 renderExpirationTime = null;
4595 revealOrder = workInProgress.child;
4596 for (workInProgress.child = null; null !== revealOrder; ) {
4597 nextProps = revealOrder.alternate;
4598 if (null !== nextProps && null === findFirstSuspended(nextProps)) {
4599 workInProgress.child = revealOrder;
4600 break;
4601 }
4602 nextProps = revealOrder.sibling;
4603 revealOrder.sibling = renderExpirationTime;
4604 renderExpirationTime = revealOrder;
4605 revealOrder = nextProps;
4606 }
4607 initSuspenseListRenderState(
4608 workInProgress,
4609 !0,
4610 renderExpirationTime,
4611 null,
4612 tailMode
4613 );
4614 break;
4615 case "together":
4616 initSuspenseListRenderState(workInProgress, !1, null, null, void 0);
4617 break;
4618 default:
4619 workInProgress.memoizedState = null;
4620 }
4621 return workInProgress.child;
4622}
4623function bailoutOnAlreadyFinishedWork(
4624 current$$1,
4625 workInProgress,
4626 renderExpirationTime
4627) {
4628 null !== current$$1 &&
4629 (workInProgress.dependencies = current$$1.dependencies);
4630 profilerStartTime = -1;
4631 if (workInProgress.childExpirationTime < renderExpirationTime) return null;
4632 if (null !== current$$1 && workInProgress.child !== current$$1.child)
4633 throw ReactError(Error("Resuming work not yet implemented."));
4634 if (null !== workInProgress.child) {
4635 current$$1 = workInProgress.child;
4636 renderExpirationTime = createWorkInProgress(
4637 current$$1,
4638 current$$1.pendingProps,
4639 current$$1.expirationTime
4640 );
4641 workInProgress.child = renderExpirationTime;
4642 for (
4643 renderExpirationTime.return = workInProgress;
4644 null !== current$$1.sibling;
4645
4646 )
4647 (current$$1 = current$$1.sibling),
4648 (renderExpirationTime = renderExpirationTime.sibling = createWorkInProgress(
4649 current$$1,
4650 current$$1.pendingProps,
4651 current$$1.expirationTime
4652 )),
4653 (renderExpirationTime.return = workInProgress);
4654 renderExpirationTime.sibling = null;
4655 }
4656 return workInProgress.child;
4657}
4658var appendAllChildren = void 0,
4659 updateHostContainer = void 0,
4660 updateHostComponent$1 = void 0,
4661 updateHostText$1 = void 0;
4662appendAllChildren = function(
4663 parent,
4664 workInProgress,
4665 needsVisibilityToggle,
4666 isHidden
4667) {
4668 for (var node = workInProgress.child; null !== node; ) {
4669 if (5 === node.tag) {
4670 var instance = node.stateNode;
4671 needsVisibilityToggle &&
4672 isHidden &&
4673 (instance = cloneHiddenInstance(
4674 instance,
4675 node.type,
4676 node.memoizedProps,
4677 node
4678 ));
4679 appendChildNode(parent.node, instance.node);
4680 } else if (6 === node.tag) {
4681 instance = node.stateNode;
4682 if (needsVisibilityToggle && isHidden)
4683 throw Error("Not yet implemented.");
4684 appendChildNode(parent.node, instance.node);
4685 } else if (4 !== node.tag) {
4686 if (
4687 13 === node.tag &&
4688 0 !== (node.effectTag & 4) &&
4689 (instance = null !== node.memoizedState)
4690 ) {
4691 var primaryChildParent = node.child;
4692 if (
4693 null !== primaryChildParent &&
4694 (null !== primaryChildParent.child &&
4695 ((primaryChildParent.child.return = primaryChildParent),
4696 appendAllChildren(parent, primaryChildParent, !0, instance)),
4697 (instance = primaryChildParent.sibling),
4698 null !== instance)
4699 ) {
4700 instance.return = node;
4701 node = instance;
4702 continue;
4703 }
4704 }
4705 if (null !== node.child) {
4706 node.child.return = node;
4707 node = node.child;
4708 continue;
4709 }
4710 }
4711 if (node === workInProgress) break;
4712 for (; null === node.sibling; ) {
4713 if (null === node.return || node.return === workInProgress) return;
4714 node = node.return;
4715 }
4716 node.sibling.return = node.return;
4717 node = node.sibling;
4718 }
4719};
4720function appendAllChildrenToContainer(
4721 containerChildSet,
4722 workInProgress,
4723 needsVisibilityToggle,
4724 isHidden
4725) {
4726 for (var node = workInProgress.child; null !== node; ) {
4727 if (5 === node.tag) {
4728 var instance = node.stateNode;
4729 needsVisibilityToggle &&
4730 isHidden &&
4731 (instance = cloneHiddenInstance(
4732 instance,
4733 node.type,
4734 node.memoizedProps,
4735 node
4736 ));
4737 appendChildNodeToSet(containerChildSet, instance.node);
4738 } else if (6 === node.tag) {
4739 instance = node.stateNode;
4740 if (needsVisibilityToggle && isHidden)
4741 throw Error("Not yet implemented.");
4742 appendChildNodeToSet(containerChildSet, instance.node);
4743 } else if (4 !== node.tag) {
4744 if (
4745 13 === node.tag &&
4746 0 !== (node.effectTag & 4) &&
4747 (instance = null !== node.memoizedState)
4748 ) {
4749 var primaryChildParent = node.child;
4750 if (
4751 null !== primaryChildParent &&
4752 (null !== primaryChildParent.child &&
4753 ((primaryChildParent.child.return = primaryChildParent),
4754 appendAllChildrenToContainer(
4755 containerChildSet,
4756 primaryChildParent,
4757 !0,
4758 instance
4759 )),
4760 (instance = primaryChildParent.sibling),
4761 null !== instance)
4762 ) {
4763 instance.return = node;
4764 node = instance;
4765 continue;
4766 }
4767 }
4768 if (null !== node.child) {
4769 node.child.return = node;
4770 node = node.child;
4771 continue;
4772 }
4773 }
4774 if (node === workInProgress) break;
4775 for (; null === node.sibling; ) {
4776 if (null === node.return || node.return === workInProgress) return;
4777 node = node.return;
4778 }
4779 node.sibling.return = node.return;
4780 node = node.sibling;
4781 }
4782}
4783updateHostContainer = function(workInProgress) {
4784 var portalOrRoot = workInProgress.stateNode;
4785 if (null !== workInProgress.firstEffect) {
4786 var container = portalOrRoot.containerInfo,
4787 newChildSet = createChildNodeSet(container);
4788 appendAllChildrenToContainer(newChildSet, workInProgress, !1, !1);
4789 portalOrRoot.pendingChildren = newChildSet;
4790 workInProgress.effectTag |= 4;
4791 completeRoot(container, newChildSet);
4792 }
4793};
4794updateHostComponent$1 = function(current, workInProgress, type, newProps) {
4795 type = current.stateNode;
4796 var oldProps = current.memoizedProps;
4797 if ((current = null === workInProgress.firstEffect) && oldProps === newProps)
4798 workInProgress.stateNode = type;
4799 else {
4800 var recyclableInstance = workInProgress.stateNode;
4801 requiredContext(contextStackCursor$1.current);
4802 var updatePayload = null;
4803 oldProps !== newProps &&
4804 ((oldProps = diffProperties(
4805 null,
4806 oldProps,
4807 newProps,
4808 recyclableInstance.canonical.viewConfig.validAttributes
4809 )),
4810 (recyclableInstance.canonical.currentProps = newProps),
4811 (updatePayload = oldProps));
4812 current && null === updatePayload
4813 ? (workInProgress.stateNode = type)
4814 : ((newProps = updatePayload),
4815 (recyclableInstance = type.node),
4816 (type = {
4817 node: current
4818 ? null !== newProps
4819 ? cloneNodeWithNewProps(recyclableInstance, newProps)
4820 : cloneNode(recyclableInstance)
4821 : null !== newProps
4822 ? cloneNodeWithNewChildrenAndProps(recyclableInstance, newProps)
4823 : cloneNodeWithNewChildren(recyclableInstance),
4824 canonical: type.canonical
4825 }),
4826 (workInProgress.stateNode = type),
4827 current
4828 ? (workInProgress.effectTag |= 4)
4829 : appendAllChildren(type, workInProgress, !1, !1));
4830 }
4831};
4832updateHostText$1 = function(current, workInProgress, oldText, newText) {
4833 oldText !== newText &&
4834 ((current = requiredContext(rootInstanceStackCursor.current)),
4835 (oldText = requiredContext(contextStackCursor$1.current)),
4836 (workInProgress.stateNode = createTextInstance(
4837 newText,
4838 current,
4839 oldText,
4840 workInProgress
4841 )),
4842 (workInProgress.effectTag |= 4));
4843};
4844function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) {
4845 switch (renderState.tailMode) {
4846 case "hidden":
4847 hasRenderedATailFallback = renderState.tail;
4848 for (var lastTailNode = null; null !== hasRenderedATailFallback; )
4849 null !== hasRenderedATailFallback.alternate &&
4850 (lastTailNode = hasRenderedATailFallback),
4851 (hasRenderedATailFallback = hasRenderedATailFallback.sibling);
4852 null === lastTailNode
4853 ? (renderState.tail = null)
4854 : (lastTailNode.sibling = null);
4855 break;
4856 case "collapsed":
4857 lastTailNode = renderState.tail;
4858 for (var _lastTailNode = null; null !== lastTailNode; )
4859 null !== lastTailNode.alternate && (_lastTailNode = lastTailNode),
4860 (lastTailNode = lastTailNode.sibling);
4861 null === _lastTailNode
4862 ? hasRenderedATailFallback || null === renderState.tail
4863 ? (renderState.tail = null)
4864 : (renderState.tail.sibling = null)
4865 : (_lastTailNode.sibling = null);
4866 }
4867}
4868function completeWork(current, workInProgress, renderExpirationTime) {
4869 var newProps = workInProgress.pendingProps;
4870 switch (workInProgress.tag) {
4871 case 2:
4872 break;
4873 case 16:
4874 break;
4875 case 15:
4876 case 0:
4877 break;
4878 case 1:
4879 isContextProvider(workInProgress.type) && popContext(workInProgress);
4880 break;
4881 case 3:
4882 popHostContainer(workInProgress);
4883 popTopLevelContextObject(workInProgress);
4884 newProps = workInProgress.stateNode;
4885 newProps.pendingContext &&
4886 ((newProps.context = newProps.pendingContext),
4887 (newProps.pendingContext = null));
4888 if (null === current || null === current.child)
4889 workInProgress.effectTag &= -3;
4890 updateHostContainer(workInProgress);
4891 break;
4892 case 5:
4893 popHostContext(workInProgress);
4894 var rootContainerInstance = requiredContext(
4895 rootInstanceStackCursor.current
4896 );
4897 renderExpirationTime = workInProgress.type;
4898 if (null !== current && null != workInProgress.stateNode)
4899 updateHostComponent$1(
4900 current,
4901 workInProgress,
4902 renderExpirationTime,
4903 newProps,
4904 rootContainerInstance
4905 ),
4906 current.ref !== workInProgress.ref &&
4907 (workInProgress.effectTag |= 128);
4908 else if (newProps) {
4909 requiredContext(contextStackCursor$1.current);
4910 current = nextReactTag;
4911 nextReactTag += 2;
4912 renderExpirationTime = getViewConfigForType(renderExpirationTime);
4913 var updatePayload = diffProperties(
4914 null,
4915 emptyObject,
4916 newProps,
4917 renderExpirationTime.validAttributes
4918 );
4919 rootContainerInstance = createNode(
4920 current,
4921 renderExpirationTime.uiViewClassName,
4922 rootContainerInstance,
4923 updatePayload,
4924 workInProgress
4925 );
4926 current = new ReactFabricHostComponent(
4927 current,
4928 renderExpirationTime,
4929 newProps,
4930 workInProgress
4931 );
4932 current = { node: rootContainerInstance, canonical: current };
4933 appendAllChildren(current, workInProgress, !1, !1);
4934 workInProgress.stateNode = current;
4935 null !== workInProgress.ref && (workInProgress.effectTag |= 128);
4936 } else if (null === workInProgress.stateNode)
4937 throw ReactError(
4938 Error(
4939 "We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue."
4940 )
4941 );
4942 break;
4943 case 6:
4944 if (current && null != workInProgress.stateNode)
4945 updateHostText$1(
4946 current,
4947 workInProgress,
4948 current.memoizedProps,
4949 newProps
4950 );
4951 else {
4952 if ("string" !== typeof newProps && null === workInProgress.stateNode)
4953 throw ReactError(
4954 Error(
4955 "We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue."
4956 )
4957 );
4958 current = requiredContext(rootInstanceStackCursor.current);
4959 rootContainerInstance = requiredContext(contextStackCursor$1.current);
4960 workInProgress.stateNode = createTextInstance(
4961 newProps,
4962 current,
4963 rootContainerInstance,
4964 workInProgress
4965 );
4966 }
4967 break;
4968 case 11:
4969 break;
4970 case 13:
4971 pop(suspenseStackCursor, workInProgress);
4972 newProps = workInProgress.memoizedState;
4973 if (0 !== (workInProgress.effectTag & 64))
4974 return (
4975 (workInProgress.expirationTime = renderExpirationTime), workInProgress
4976 );
4977 newProps = null !== newProps;
4978 rootContainerInstance = !1;
4979 null !== current &&
4980 ((renderExpirationTime = current.memoizedState),
4981 (rootContainerInstance = null !== renderExpirationTime),
4982 newProps ||
4983 null === renderExpirationTime ||
4984 ((renderExpirationTime = current.child.sibling),
4985 null !== renderExpirationTime &&
4986 ((updatePayload = workInProgress.firstEffect),
4987 null !== updatePayload
4988 ? ((workInProgress.firstEffect = renderExpirationTime),
4989 (renderExpirationTime.nextEffect = updatePayload))
4990 : ((workInProgress.firstEffect = workInProgress.lastEffect = renderExpirationTime),
4991 (renderExpirationTime.nextEffect = null)),
4992 (renderExpirationTime.effectTag = 8))));
4993 if (newProps && !rootContainerInstance && 0 !== (workInProgress.mode & 2))
4994 if (
4995 (null === current &&
4996 !0 !== workInProgress.memoizedProps.unstable_avoidThisFallback) ||
4997 0 !== (suspenseStackCursor.current & InvisibleParentSuspenseContext)
4998 )
4999 workInProgressRootExitStatus === RootIncomplete &&
5000 (workInProgressRootExitStatus = RootSuspended);
5001 else if (
5002 workInProgressRootExitStatus === RootIncomplete ||
5003 workInProgressRootExitStatus === RootSuspended
5004 )
5005 workInProgressRootExitStatus = RootSuspendedWithDelay;
5006 newProps && (workInProgress.effectTag |= 4);
5007 break;
5008 case 7:
5009 break;
5010 case 8:
5011 break;
5012 case 12:
5013 break;
5014 case 4:
5015 popHostContainer(workInProgress);
5016 updateHostContainer(workInProgress);
5017 break;
5018 case 10:
5019 popProvider(workInProgress);
5020 break;
5021 case 9:
5022 break;
5023 case 14:
5024 break;
5025 case 17:
5026 isContextProvider(workInProgress.type) && popContext(workInProgress);
5027 break;
5028 case 18:
5029 break;
5030 case 19:
5031 pop(suspenseStackCursor, workInProgress);
5032 newProps = workInProgress.memoizedState;
5033 if (null === newProps) break;
5034 rootContainerInstance = 0 !== (workInProgress.effectTag & 64);
5035 updatePayload = newProps.rendering;
5036 if (null === updatePayload)
5037 if (rootContainerInstance) cutOffTailIfNeeded(newProps, !1);
5038 else {
5039 if (
5040 workInProgressRootExitStatus !== RootIncomplete ||
5041 (null !== current && 0 !== (current.effectTag & 64))
5042 )
5043 for (current = workInProgress.child; null !== current; ) {
5044 updatePayload = findFirstSuspended(current);
5045 if (null !== updatePayload) {
5046 workInProgress.effectTag |= 64;
5047 cutOffTailIfNeeded(newProps, !1);
5048 current = updatePayload.updateQueue;
5049 null !== current &&
5050 ((workInProgress.updateQueue = current),
5051 (workInProgress.effectTag |= 4));
5052 workInProgress.firstEffect = workInProgress.lastEffect = null;
5053 current = renderExpirationTime;
5054 for (newProps = workInProgress.child; null !== newProps; )
5055 (rootContainerInstance = newProps),
5056 (updatePayload = current),
5057 (rootContainerInstance.effectTag &= 2),
5058 (rootContainerInstance.nextEffect = null),
5059 (rootContainerInstance.firstEffect = null),
5060 (rootContainerInstance.lastEffect = null),
5061 (renderExpirationTime = rootContainerInstance.alternate),
5062 null === renderExpirationTime
5063 ? ((rootContainerInstance.childExpirationTime = 0),
5064 (rootContainerInstance.expirationTime = updatePayload),
5065 (rootContainerInstance.child = null),
5066 (rootContainerInstance.memoizedProps = null),
5067 (rootContainerInstance.memoizedState = null),
5068 (rootContainerInstance.updateQueue = null),
5069 (rootContainerInstance.dependencies = null),
5070 (rootContainerInstance.selfBaseDuration = 0),
5071 (rootContainerInstance.treeBaseDuration = 0))
5072 : ((rootContainerInstance.childExpirationTime =
5073 renderExpirationTime.childExpirationTime),
5074 (rootContainerInstance.expirationTime =
5075 renderExpirationTime.expirationTime),
5076 (rootContainerInstance.child =
5077 renderExpirationTime.child),
5078 (rootContainerInstance.memoizedProps =
5079 renderExpirationTime.memoizedProps),
5080 (rootContainerInstance.memoizedState =
5081 renderExpirationTime.memoizedState),
5082 (rootContainerInstance.updateQueue =
5083 renderExpirationTime.updateQueue),
5084 (updatePayload = renderExpirationTime.dependencies),
5085 (rootContainerInstance.dependencies =
5086 null === updatePayload
5087 ? null
5088 : {
5089 expirationTime: updatePayload.expirationTime,
5090 firstContext: updatePayload.firstContext,
5091 responders: updatePayload.responders
5092 }),
5093 (rootContainerInstance.selfBaseDuration =
5094 renderExpirationTime.selfBaseDuration),
5095 (rootContainerInstance.treeBaseDuration =
5096 renderExpirationTime.treeBaseDuration)),
5097 (newProps = newProps.sibling);
5098 push(
5099 suspenseStackCursor,
5100 (suspenseStackCursor.current & SubtreeSuspenseContextMask) |
5101 ForceSuspenseFallback,
5102 workInProgress
5103 );
5104 return workInProgress.child;
5105 }
5106 current = current.sibling;
5107 }
5108 }
5109 else {
5110 if (!rootContainerInstance)
5111 if (
5112 ((current = findFirstSuspended(updatePayload)), null !== current)
5113 ) {
5114 if (
5115 ((workInProgress.effectTag |= 64),
5116 (rootContainerInstance = !0),
5117 cutOffTailIfNeeded(newProps, !0),
5118 null === newProps.tail && "hidden" === newProps.tailMode)
5119 ) {
5120 current = current.updateQueue;
5121 null !== current &&
5122 ((workInProgress.updateQueue = current),
5123 (workInProgress.effectTag |= 4));
5124 workInProgress = workInProgress.lastEffect = newProps.lastEffect;
5125 null !== workInProgress && (workInProgress.nextEffect = null);
5126 break;
5127 }
5128 } else
5129 now() > newProps.tailExpiration &&
5130 1 < renderExpirationTime &&
5131 ((workInProgress.effectTag |= 64),
5132 (rootContainerInstance = !0),
5133 cutOffTailIfNeeded(newProps, !1),
5134 (current = renderExpirationTime - 1),
5135 (workInProgress.expirationTime = workInProgress.childExpirationTime = current),
5136 null === spawnedWorkDuringRender
5137 ? (spawnedWorkDuringRender = [current])
5138 : spawnedWorkDuringRender.push(current));
5139 newProps.isBackwards
5140 ? ((updatePayload.sibling = workInProgress.child),
5141 (workInProgress.child = updatePayload))
5142 : ((current = newProps.last),
5143 null !== current
5144 ? (current.sibling = updatePayload)
5145 : (workInProgress.child = updatePayload),
5146 (newProps.last = updatePayload));
5147 }
5148 if (null !== newProps.tail)
5149 return (
5150 0 === newProps.tailExpiration &&
5151 (newProps.tailExpiration = now() + 500),
5152 (current = newProps.tail),
5153 (newProps.rendering = current),
5154 (newProps.tail = current.sibling),
5155 (newProps.lastEffect = workInProgress.lastEffect),
5156 (current.sibling = null),
5157 (newProps = suspenseStackCursor.current),
5158 (newProps = rootContainerInstance
5159 ? (newProps & SubtreeSuspenseContextMask) | ForceSuspenseFallback
5160 : newProps & SubtreeSuspenseContextMask),
5161 push(suspenseStackCursor, newProps, workInProgress),
5162 current
5163 );
5164 break;
5165 case 20:
5166 break;
5167 default:
5168 throw ReactError(
5169 Error(
5170 "Unknown unit of work tag. This error is likely caused by a bug in React. Please file an issue."
5171 )
5172 );
5173 }
5174 return null;
5175}
5176function unwindWork(workInProgress) {
5177 switch (workInProgress.tag) {
5178 case 1:
5179 isContextProvider(workInProgress.type) && popContext(workInProgress);
5180 var effectTag = workInProgress.effectTag;
5181 return effectTag & 2048
5182 ? ((workInProgress.effectTag = (effectTag & -2049) | 64),
5183 workInProgress)
5184 : null;
5185 case 3:
5186 popHostContainer(workInProgress);
5187 popTopLevelContextObject(workInProgress);
5188 effectTag = workInProgress.effectTag;
5189 if (0 !== (effectTag & 64))
5190 throw ReactError(
5191 Error(
5192 "The root failed to unmount after an error. This is likely a bug in React. Please file an issue."
5193 )
5194 );
5195 workInProgress.effectTag = (effectTag & -2049) | 64;
5196 return workInProgress;
5197 case 5:
5198 return popHostContext(workInProgress), null;
5199 case 13:
5200 return (
5201 pop(suspenseStackCursor, workInProgress),
5202 (effectTag = workInProgress.effectTag),
5203 effectTag & 2048
5204 ? ((workInProgress.effectTag = (effectTag & -2049) | 64),
5205 workInProgress)
5206 : null
5207 );
5208 case 18:
5209 return null;
5210 case 19:
5211 return pop(suspenseStackCursor, workInProgress), null;
5212 case 4:
5213 return popHostContainer(workInProgress), null;
5214 case 10:
5215 return popProvider(workInProgress), null;
5216 default:
5217 return null;
5218 }
5219}
5220function createCapturedValue(value, source) {
5221 return {
5222 value: value,
5223 source: source,
5224 stack: getStackByFiberInDevAndProd(source)
5225 };
5226}
5227if (
5228 "function" !==
5229 typeof ReactNativePrivateInterface.ReactFiberErrorDialog.showErrorDialog
5230)
5231 throw ReactError(
5232 Error("Expected ReactFiberErrorDialog.showErrorDialog to be a function.")
5233 );
5234function logCapturedError(capturedError) {
5235 !1 !==
5236 ReactNativePrivateInterface.ReactFiberErrorDialog.showErrorDialog(
5237 capturedError
5238 ) && console.error(capturedError.error);
5239}
5240var PossiblyWeakSet$1 = "function" === typeof WeakSet ? WeakSet : Set;
5241function logError(boundary, errorInfo) {
5242 var source = errorInfo.source,
5243 stack = errorInfo.stack;
5244 null === stack &&
5245 null !== source &&
5246 (stack = getStackByFiberInDevAndProd(source));
5247 errorInfo = {
5248 componentName: null !== source ? getComponentName(source.type) : null,
5249 componentStack: null !== stack ? stack : "",
5250 error: errorInfo.value,
5251 errorBoundary: null,
5252 errorBoundaryName: null,
5253 errorBoundaryFound: !1,
5254 willRetry: !1
5255 };
5256 null !== boundary &&
5257 1 === boundary.tag &&
5258 ((errorInfo.errorBoundary = boundary.stateNode),
5259 (errorInfo.errorBoundaryName = getComponentName(boundary.type)),
5260 (errorInfo.errorBoundaryFound = !0),
5261 (errorInfo.willRetry = !0));
5262 try {
5263 logCapturedError(errorInfo);
5264 } catch (e) {
5265 setTimeout(function() {
5266 throw e;
5267 });
5268 }
5269}
5270function safelyCallComponentWillUnmount(current$$1, instance) {
5271 try {
5272 (instance.props = current$$1.memoizedProps),
5273 (instance.state = current$$1.memoizedState),
5274 instance.componentWillUnmount();
5275 } catch (unmountError) {
5276 captureCommitPhaseError(current$$1, unmountError);
5277 }
5278}
5279function safelyDetachRef(current$$1) {
5280 var ref = current$$1.ref;
5281 if (null !== ref)
5282 if ("function" === typeof ref)
5283 try {
5284 ref(null);
5285 } catch (refError) {
5286 captureCommitPhaseError(current$$1, refError);
5287 }
5288 else ref.current = null;
5289}
5290function commitHookEffectList(unmountTag, mountTag, finishedWork) {
5291 finishedWork = finishedWork.updateQueue;
5292 finishedWork = null !== finishedWork ? finishedWork.lastEffect : null;
5293 if (null !== finishedWork) {
5294 var effect = (finishedWork = finishedWork.next);
5295 do {
5296 if ((effect.tag & unmountTag) !== NoEffect$1) {
5297 var destroy = effect.destroy;
5298 effect.destroy = void 0;
5299 void 0 !== destroy && destroy();
5300 }
5301 (effect.tag & mountTag) !== NoEffect$1 &&
5302 ((destroy = effect.create), (effect.destroy = destroy()));
5303 effect = effect.next;
5304 } while (effect !== finishedWork);
5305 }
5306}
5307function commitUnmount(current$$1$jscomp$0, renderPriorityLevel) {
5308 "function" === typeof onCommitFiberUnmount &&
5309 onCommitFiberUnmount(current$$1$jscomp$0);
5310 switch (current$$1$jscomp$0.tag) {
5311 case 0:
5312 case 11:
5313 case 14:
5314 case 15:
5315 var updateQueue = current$$1$jscomp$0.updateQueue;
5316 if (
5317 null !== updateQueue &&
5318 ((updateQueue = updateQueue.lastEffect), null !== updateQueue)
5319 ) {
5320 var firstEffect = updateQueue.next;
5321 runWithPriority$1(
5322 97 < renderPriorityLevel ? 97 : renderPriorityLevel,
5323 function() {
5324 var effect = firstEffect;
5325 do {
5326 var destroy = effect.destroy;
5327 if (void 0 !== destroy) {
5328 var current$$1 = current$$1$jscomp$0;
5329 try {
5330 destroy();
5331 } catch (error) {
5332 captureCommitPhaseError(current$$1, error);
5333 }
5334 }
5335 effect = effect.next;
5336 } while (effect !== firstEffect);
5337 }
5338 );
5339 }
5340 break;
5341 case 1:
5342 safelyDetachRef(current$$1$jscomp$0);
5343 renderPriorityLevel = current$$1$jscomp$0.stateNode;
5344 "function" === typeof renderPriorityLevel.componentWillUnmount &&
5345 safelyCallComponentWillUnmount(
5346 current$$1$jscomp$0,
5347 renderPriorityLevel
5348 );
5349 break;
5350 case 5:
5351 safelyDetachRef(current$$1$jscomp$0);
5352 break;
5353 case 4:
5354 createChildNodeSet(current$$1$jscomp$0.stateNode.containerInfo);
5355 }
5356}
5357function detachFiber(current$$1) {
5358 var alternate = current$$1.alternate;
5359 current$$1.return = null;
5360 current$$1.child = null;
5361 current$$1.memoizedState = null;
5362 current$$1.updateQueue = null;
5363 current$$1.dependencies = null;
5364 current$$1.alternate = null;
5365 current$$1.firstEffect = null;
5366 current$$1.lastEffect = null;
5367 current$$1.pendingProps = null;
5368 current$$1.memoizedProps = null;
5369 null !== alternate && detachFiber(alternate);
5370}
5371function commitWork(current$$1, finishedWork) {
5372 switch (finishedWork.tag) {
5373 case 0:
5374 case 11:
5375 case 14:
5376 case 15:
5377 commitHookEffectList(UnmountMutation, MountMutation, finishedWork);
5378 return;
5379 case 12:
5380 return;
5381 case 13:
5382 null !== finishedWork.memoizedState &&
5383 (globalMostRecentFallbackTime = now());
5384 attachSuspenseRetryListeners(finishedWork);
5385 return;
5386 case 19:
5387 attachSuspenseRetryListeners(finishedWork);
5388 return;
5389 }
5390 switch (finishedWork.tag) {
5391 case 1:
5392 case 5:
5393 case 6:
5394 case 20:
5395 break;
5396 case 3:
5397 case 4:
5398 break;
5399 default:
5400 throw ReactError(
5401 Error(
5402 "This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue."
5403 )
5404 );
5405 }
5406}
5407function attachSuspenseRetryListeners(finishedWork) {
5408 var thenables = finishedWork.updateQueue;
5409 if (null !== thenables) {
5410 finishedWork.updateQueue = null;
5411 var retryCache = finishedWork.stateNode;
5412 null === retryCache &&
5413 (retryCache = finishedWork.stateNode = new PossiblyWeakSet$1());
5414 thenables.forEach(function(thenable) {
5415 var retry = resolveRetryThenable.bind(null, finishedWork, thenable);
5416 retryCache.has(thenable) ||
5417 ((retry = tracing.unstable_wrap(retry)),
5418 retryCache.add(thenable),
5419 thenable.then(retry, retry));
5420 });
5421 }
5422}
5423var PossiblyWeakMap = "function" === typeof WeakMap ? WeakMap : Map;
5424function createRootErrorUpdate(fiber, errorInfo, expirationTime) {
5425 expirationTime = createUpdate(expirationTime, null);
5426 expirationTime.tag = 3;
5427 expirationTime.payload = { element: null };
5428 var error = errorInfo.value;
5429 expirationTime.callback = function() {
5430 hasUncaughtError || ((hasUncaughtError = !0), (firstUncaughtError = error));
5431 logError(fiber, errorInfo);
5432 };
5433 return expirationTime;
5434}
5435function createClassErrorUpdate(fiber, errorInfo, expirationTime) {
5436 expirationTime = createUpdate(expirationTime, null);
5437 expirationTime.tag = 3;
5438 var getDerivedStateFromError = fiber.type.getDerivedStateFromError;
5439 if ("function" === typeof getDerivedStateFromError) {
5440 var error = errorInfo.value;
5441 expirationTime.payload = function() {
5442 logError(fiber, errorInfo);
5443 return getDerivedStateFromError(error);
5444 };
5445 }
5446 var inst = fiber.stateNode;
5447 null !== inst &&
5448 "function" === typeof inst.componentDidCatch &&
5449 (expirationTime.callback = function() {
5450 "function" !== typeof getDerivedStateFromError &&
5451 (null === legacyErrorBoundariesThatAlreadyFailed
5452 ? (legacyErrorBoundariesThatAlreadyFailed = new Set([this]))
5453 : legacyErrorBoundariesThatAlreadyFailed.add(this),
5454 logError(fiber, errorInfo));
5455 var stack = errorInfo.stack;
5456 this.componentDidCatch(errorInfo.value, {
5457 componentStack: null !== stack ? stack : ""
5458 });
5459 });
5460 return expirationTime;
5461}
5462var ceil = Math.ceil,
5463 ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher,
5464 ReactCurrentOwner$2 = ReactSharedInternals.ReactCurrentOwner,
5465 NoContext = 0,
5466 LegacyUnbatchedContext = 8,
5467 RenderContext = 16,
5468 CommitContext = 32,
5469 RootIncomplete = 0,
5470 RootErrored = 1,
5471 RootSuspended = 2,
5472 RootSuspendedWithDelay = 3,
5473 RootCompleted = 4,
5474 executionContext = NoContext,
5475 workInProgressRoot = null,
5476 workInProgress = null,
5477 renderExpirationTime = 0,
5478 workInProgressRootExitStatus = RootIncomplete,
5479 workInProgressRootLatestProcessedExpirationTime = 1073741823,
5480 workInProgressRootLatestSuspenseTimeout = 1073741823,
5481 workInProgressRootCanSuspendUsingConfig = null,
5482 workInProgressRootHasPendingPing = !1,
5483 globalMostRecentFallbackTime = 0,
5484 FALLBACK_THROTTLE_MS = 500,
5485 nextEffect = null,
5486 hasUncaughtError = !1,
5487 firstUncaughtError = null,
5488 legacyErrorBoundariesThatAlreadyFailed = null,
5489 rootDoesHavePassiveEffects = !1,
5490 rootWithPendingPassiveEffects = null,
5491 pendingPassiveEffectsRenderPriority = 90,
5492 pendingPassiveEffectsExpirationTime = 0,
5493 rootsWithPendingDiscreteUpdates = null,
5494 nestedUpdateCount = 0,
5495 rootWithNestedUpdates = null,
5496 spawnedWorkDuringRender = null,
5497 currentEventTime = 0;
5498function requestCurrentTime() {
5499 return (executionContext & (RenderContext | CommitContext)) !== NoContext
5500 ? 1073741821 - ((now() / 10) | 0)
5501 : 0 !== currentEventTime
5502 ? currentEventTime
5503 : (currentEventTime = 1073741821 - ((now() / 10) | 0));
5504}
5505function computeExpirationForFiber(currentTime, fiber, suspenseConfig) {
5506 fiber = fiber.mode;
5507 if (0 === (fiber & 2)) return 1073741823;
5508 var priorityLevel = getCurrentPriorityLevel();
5509 if (0 === (fiber & 4)) return 99 === priorityLevel ? 1073741823 : 1073741822;
5510 if ((executionContext & RenderContext) !== NoContext)
5511 return renderExpirationTime;
5512 if (null !== suspenseConfig)
5513 currentTime =
5514 1073741821 -
5515 25 *
5516 ((((1073741821 -
5517 currentTime +
5518 (suspenseConfig.timeoutMs | 0 || 5e3) / 10) /
5519 25) |
5520 0) +
5521 1);
5522 else
5523 switch (priorityLevel) {
5524 case 99:
5525 currentTime = 1073741823;
5526 break;
5527 case 98:
5528 currentTime =
5529 1073741821 - 10 * ((((1073741821 - currentTime + 15) / 10) | 0) + 1);
5530 break;
5531 case 97:
5532 case 96:
5533 currentTime =
5534 1073741821 - 25 * ((((1073741821 - currentTime + 500) / 25) | 0) + 1);
5535 break;
5536 case 95:
5537 currentTime = 1;
5538 break;
5539 default:
5540 throw ReactError(Error("Expected a valid priority level"));
5541 }
5542 null !== workInProgressRoot &&
5543 currentTime === renderExpirationTime &&
5544 --currentTime;
5545 return currentTime;
5546}
5547function scheduleUpdateOnFiber(fiber, expirationTime) {
5548 if (50 < nestedUpdateCount)
5549 throw ((nestedUpdateCount = 0),
5550 (rootWithNestedUpdates = null),
5551 ReactError(
5552 Error(
5553 "Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops."
5554 )
5555 ));
5556 fiber = markUpdateTimeFromFiberToRoot(fiber, expirationTime);
5557 if (null !== fiber) {
5558 fiber.pingTime = 0;
5559 var priorityLevel = getCurrentPriorityLevel();
5560 if (1073741823 === expirationTime)
5561 if (
5562 (executionContext & LegacyUnbatchedContext) !== NoContext &&
5563 (executionContext & (RenderContext | CommitContext)) === NoContext
5564 ) {
5565 scheduleInteractions(
5566 fiber,
5567 expirationTime,
5568 tracing.__interactionsRef.current
5569 );
5570 for (
5571 var callback = renderRoot(fiber, 1073741823, !0);
5572 null !== callback;
5573
5574 )
5575 callback = callback(!0);
5576 } else
5577 scheduleCallbackForRoot(fiber, 99, 1073741823),
5578 executionContext === NoContext && flushSyncCallbackQueue();
5579 else scheduleCallbackForRoot(fiber, priorityLevel, expirationTime);
5580 (executionContext & 4) === NoContext ||
5581 (98 !== priorityLevel && 99 !== priorityLevel) ||
5582 (null === rootsWithPendingDiscreteUpdates
5583 ? (rootsWithPendingDiscreteUpdates = new Map([[fiber, expirationTime]]))
5584 : ((priorityLevel = rootsWithPendingDiscreteUpdates.get(fiber)),
5585 (void 0 === priorityLevel || priorityLevel > expirationTime) &&
5586 rootsWithPendingDiscreteUpdates.set(fiber, expirationTime)));
5587 }
5588}
5589function markUpdateTimeFromFiberToRoot(fiber, expirationTime) {
5590 fiber.expirationTime < expirationTime &&
5591 (fiber.expirationTime = expirationTime);
5592 var alternate = fiber.alternate;
5593 null !== alternate &&
5594 alternate.expirationTime < expirationTime &&
5595 (alternate.expirationTime = expirationTime);
5596 var node = fiber.return,
5597 root = null;
5598 if (null === node && 3 === fiber.tag) root = fiber.stateNode;
5599 else
5600 for (; null !== node; ) {
5601 alternate = node.alternate;
5602 node.childExpirationTime < expirationTime &&
5603 (node.childExpirationTime = expirationTime);
5604 null !== alternate &&
5605 alternate.childExpirationTime < expirationTime &&
5606 (alternate.childExpirationTime = expirationTime);
5607 if (null === node.return && 3 === node.tag) {
5608 root = node.stateNode;
5609 break;
5610 }
5611 node = node.return;
5612 }
5613 null !== root &&
5614 (expirationTime > root.firstPendingTime &&
5615 (root.firstPendingTime = expirationTime),
5616 (fiber = root.lastPendingTime),
5617 0 === fiber || expirationTime < fiber) &&
5618 (root.lastPendingTime = expirationTime);
5619 return root;
5620}
5621function scheduleCallbackForRoot(root, priorityLevel, expirationTime) {
5622 if (root.callbackExpirationTime < expirationTime) {
5623 var existingCallbackNode = root.callbackNode;
5624 null !== existingCallbackNode &&
5625 existingCallbackNode !== fakeCallbackNode &&
5626 Scheduler_cancelCallback(existingCallbackNode);
5627 root.callbackExpirationTime = expirationTime;
5628 1073741823 === expirationTime
5629 ? (root.callbackNode = scheduleSyncCallback(
5630 runRootCallback.bind(
5631 null,
5632 root,
5633 renderRoot.bind(null, root, expirationTime)
5634 )
5635 ))
5636 : ((existingCallbackNode = null),
5637 1 !== expirationTime &&
5638 (existingCallbackNode = {
5639 timeout: 10 * (1073741821 - expirationTime) - now()
5640 }),
5641 (root.callbackNode = scheduleCallback(
5642 priorityLevel,
5643 runRootCallback.bind(
5644 null,
5645 root,
5646 renderRoot.bind(null, root, expirationTime)
5647 ),
5648 existingCallbackNode
5649 )));
5650 }
5651 scheduleInteractions(root, expirationTime, tracing.__interactionsRef.current);
5652}
5653function runRootCallback(root, callback, isSync) {
5654 var prevCallbackNode = root.callbackNode,
5655 continuation = null;
5656 try {
5657 return (
5658 (continuation = callback(isSync)),
5659 null !== continuation
5660 ? runRootCallback.bind(null, root, continuation)
5661 : null
5662 );
5663 } finally {
5664 null === continuation &&
5665 prevCallbackNode === root.callbackNode &&
5666 ((root.callbackNode = null), (root.callbackExpirationTime = 0));
5667 }
5668}
5669function resolveLocksOnRoot(root, expirationTime) {
5670 var firstBatch = root.firstBatch;
5671 return null !== firstBatch &&
5672 firstBatch._defer &&
5673 firstBatch._expirationTime >= expirationTime
5674 ? (scheduleCallback(97, function() {
5675 firstBatch._onComplete();
5676 return null;
5677 }),
5678 !0)
5679 : !1;
5680}
5681function flushPendingDiscreteUpdates() {
5682 if (null !== rootsWithPendingDiscreteUpdates) {
5683 var roots = rootsWithPendingDiscreteUpdates;
5684 rootsWithPendingDiscreteUpdates = null;
5685 roots.forEach(function(expirationTime, root) {
5686 scheduleSyncCallback(renderRoot.bind(null, root, expirationTime));
5687 });
5688 flushSyncCallbackQueue();
5689 }
5690}
5691function prepareFreshStack(root, expirationTime) {
5692 root.finishedWork = null;
5693 root.finishedExpirationTime = 0;
5694 var timeoutHandle = root.timeoutHandle;
5695 -1 !== timeoutHandle &&
5696 ((root.timeoutHandle = -1), cancelTimeout(timeoutHandle));
5697 if (null !== workInProgress)
5698 for (timeoutHandle = workInProgress.return; null !== timeoutHandle; ) {
5699 var interruptedWork = timeoutHandle;
5700 switch (interruptedWork.tag) {
5701 case 1:
5702 var childContextTypes = interruptedWork.type.childContextTypes;
5703 null !== childContextTypes &&
5704 void 0 !== childContextTypes &&
5705 popContext(interruptedWork);
5706 break;
5707 case 3:
5708 popHostContainer(interruptedWork);
5709 popTopLevelContextObject(interruptedWork);
5710 break;
5711 case 5:
5712 popHostContext(interruptedWork);
5713 break;
5714 case 4:
5715 popHostContainer(interruptedWork);
5716 break;
5717 case 13:
5718 pop(suspenseStackCursor, interruptedWork);
5719 break;
5720 case 19:
5721 pop(suspenseStackCursor, interruptedWork);
5722 break;
5723 case 10:
5724 popProvider(interruptedWork);
5725 }
5726 timeoutHandle = timeoutHandle.return;
5727 }
5728 workInProgressRoot = root;
5729 workInProgress = createWorkInProgress(root.current, null, expirationTime);
5730 renderExpirationTime = expirationTime;
5731 workInProgressRootExitStatus = RootIncomplete;
5732 workInProgressRootLatestSuspenseTimeout = workInProgressRootLatestProcessedExpirationTime = 1073741823;
5733 workInProgressRootCanSuspendUsingConfig = null;
5734 workInProgressRootHasPendingPing = !1;
5735 spawnedWorkDuringRender = null;
5736}
5737function renderRoot(root$jscomp$0, expirationTime, isSync) {
5738 if ((executionContext & (RenderContext | CommitContext)) !== NoContext)
5739 throw ReactError(Error("Should not already be working."));
5740 if (root$jscomp$0.firstPendingTime < expirationTime) return null;
5741 if (isSync && root$jscomp$0.finishedExpirationTime === expirationTime)
5742 return commitRoot.bind(null, root$jscomp$0);
5743 flushPassiveEffects();
5744 if (
5745 root$jscomp$0 !== workInProgressRoot ||
5746 expirationTime !== renderExpirationTime
5747 )
5748 prepareFreshStack(root$jscomp$0, expirationTime),
5749 startWorkOnPendingInteractions(root$jscomp$0, expirationTime);
5750 else if (workInProgressRootExitStatus === RootSuspendedWithDelay)
5751 if (workInProgressRootHasPendingPing)
5752 prepareFreshStack(root$jscomp$0, expirationTime);
5753 else {
5754 var lastPendingTime = root$jscomp$0.lastPendingTime;
5755 if (lastPendingTime < expirationTime)
5756 return renderRoot.bind(null, root$jscomp$0, lastPendingTime);
5757 }
5758 if (null !== workInProgress) {
5759 lastPendingTime = executionContext;
5760 executionContext |= RenderContext;
5761 var prevDispatcher = ReactCurrentDispatcher.current;
5762 null === prevDispatcher && (prevDispatcher = ContextOnlyDispatcher);
5763 ReactCurrentDispatcher.current = ContextOnlyDispatcher;
5764 var prevInteractions = tracing.__interactionsRef.current;
5765 tracing.__interactionsRef.current = root$jscomp$0.memoizedInteractions;
5766 if (isSync) {
5767 if (1073741823 !== expirationTime) {
5768 var currentTime = requestCurrentTime();
5769 if (currentTime < expirationTime)
5770 return (
5771 (executionContext = lastPendingTime),
5772 resetContextDependencies(),
5773 (ReactCurrentDispatcher.current = prevDispatcher),
5774 (tracing.__interactionsRef.current = prevInteractions),
5775 renderRoot.bind(null, root$jscomp$0, currentTime)
5776 );
5777 }
5778 } else currentEventTime = 0;
5779 do
5780 try {
5781 if (isSync)
5782 for (; null !== workInProgress; )
5783 workInProgress = performUnitOfWork(workInProgress);
5784 else
5785 for (; null !== workInProgress && !Scheduler_shouldYield(); )
5786 workInProgress = performUnitOfWork(workInProgress);
5787 break;
5788 } catch (thrownValue) {
5789 resetContextDependencies();
5790 resetHooks();
5791 currentTime = workInProgress;
5792 if (null === currentTime || null === currentTime.return)
5793 throw (prepareFreshStack(root$jscomp$0, expirationTime),
5794 (executionContext = lastPendingTime),
5795 thrownValue);
5796 currentTime.mode & 8 &&
5797 stopProfilerTimerIfRunningAndRecordDelta(currentTime, !0);
5798 a: {
5799 var root = root$jscomp$0,
5800 returnFiber = currentTime.return,
5801 sourceFiber = currentTime,
5802 value = thrownValue,
5803 renderExpirationTime$jscomp$0 = renderExpirationTime;
5804 sourceFiber.effectTag |= 1024;
5805 sourceFiber.firstEffect = sourceFiber.lastEffect = null;
5806 if (
5807 null !== value &&
5808 "object" === typeof value &&
5809 "function" === typeof value.then
5810 ) {
5811 var thenable = value,
5812 hasInvisibleParentBoundary =
5813 0 !==
5814 (suspenseStackCursor.current & InvisibleParentSuspenseContext);
5815 value = returnFiber;
5816 do {
5817 var JSCompiler_temp;
5818 if ((JSCompiler_temp = 13 === value.tag))
5819 null !== value.memoizedState
5820 ? (JSCompiler_temp = !1)
5821 : ((JSCompiler_temp = value.memoizedProps),
5822 (JSCompiler_temp =
5823 void 0 === JSCompiler_temp.fallback
5824 ? !1
5825 : !0 !== JSCompiler_temp.unstable_avoidThisFallback
5826 ? !0
5827 : hasInvisibleParentBoundary
5828 ? !1
5829 : !0));
5830 if (JSCompiler_temp) {
5831 returnFiber = value.updateQueue;
5832 null === returnFiber
5833 ? ((returnFiber = new Set()),
5834 returnFiber.add(thenable),
5835 (value.updateQueue = returnFiber))
5836 : returnFiber.add(thenable);
5837 if (0 === (value.mode & 2)) {
5838 value.effectTag |= 64;
5839 sourceFiber.effectTag &= -1957;
5840 1 === sourceFiber.tag &&
5841 (null === sourceFiber.alternate
5842 ? (sourceFiber.tag = 17)
5843 : ((renderExpirationTime$jscomp$0 = createUpdate(
5844 1073741823,
5845 null
5846 )),
5847 (renderExpirationTime$jscomp$0.tag = 2),
5848 enqueueUpdate(
5849 sourceFiber,
5850 renderExpirationTime$jscomp$0
5851 )));
5852 sourceFiber.expirationTime = 1073741823;
5853 break a;
5854 }
5855 sourceFiber = root;
5856 root = renderExpirationTime$jscomp$0;
5857 hasInvisibleParentBoundary = sourceFiber.pingCache;
5858 null === hasInvisibleParentBoundary
5859 ? ((hasInvisibleParentBoundary = sourceFiber.pingCache = new PossiblyWeakMap()),
5860 (returnFiber = new Set()),
5861 hasInvisibleParentBoundary.set(thenable, returnFiber))
5862 : ((returnFiber = hasInvisibleParentBoundary.get(thenable)),
5863 void 0 === returnFiber &&
5864 ((returnFiber = new Set()),
5865 hasInvisibleParentBoundary.set(thenable, returnFiber)));
5866 returnFiber.has(root) ||
5867 (returnFiber.add(root),
5868 (sourceFiber = pingSuspendedRoot.bind(
5869 null,
5870 sourceFiber,
5871 thenable,
5872 root
5873 )),
5874 (sourceFiber = tracing.unstable_wrap(sourceFiber)),
5875 thenable.then(sourceFiber, sourceFiber));
5876 value.effectTag |= 2048;
5877 value.expirationTime = renderExpirationTime$jscomp$0;
5878 break a;
5879 }
5880 value = value.return;
5881 } while (null !== value);
5882 value = Error(
5883 (getComponentName(sourceFiber.type) || "A React component") +
5884 " 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." +
5885 getStackByFiberInDevAndProd(sourceFiber)
5886 );
5887 }
5888 workInProgressRootExitStatus !== RootCompleted &&
5889 (workInProgressRootExitStatus = RootErrored);
5890 value = createCapturedValue(value, sourceFiber);
5891 sourceFiber = returnFiber;
5892 do {
5893 switch (sourceFiber.tag) {
5894 case 3:
5895 sourceFiber.effectTag |= 2048;
5896 sourceFiber.expirationTime = renderExpirationTime$jscomp$0;
5897 renderExpirationTime$jscomp$0 = createRootErrorUpdate(
5898 sourceFiber,
5899 value,
5900 renderExpirationTime$jscomp$0
5901 );
5902 enqueueCapturedUpdate(
5903 sourceFiber,
5904 renderExpirationTime$jscomp$0
5905 );
5906 break a;
5907 case 1:
5908 if (
5909 ((thenable = value),
5910 (root = sourceFiber.type),
5911 (returnFiber = sourceFiber.stateNode),
5912 0 === (sourceFiber.effectTag & 64) &&
5913 ("function" === typeof root.getDerivedStateFromError ||
5914 (null !== returnFiber &&
5915 "function" === typeof returnFiber.componentDidCatch &&
5916 (null === legacyErrorBoundariesThatAlreadyFailed ||
5917 !legacyErrorBoundariesThatAlreadyFailed.has(
5918 returnFiber
5919 )))))
5920 ) {
5921 sourceFiber.effectTag |= 2048;
5922 sourceFiber.expirationTime = renderExpirationTime$jscomp$0;
5923 renderExpirationTime$jscomp$0 = createClassErrorUpdate(
5924 sourceFiber,
5925 thenable,
5926 renderExpirationTime$jscomp$0
5927 );
5928 enqueueCapturedUpdate(
5929 sourceFiber,
5930 renderExpirationTime$jscomp$0
5931 );
5932 break a;
5933 }
5934 }
5935 sourceFiber = sourceFiber.return;
5936 } while (null !== sourceFiber);
5937 }
5938 workInProgress = completeUnitOfWork(currentTime);
5939 }
5940 while (1);
5941 executionContext = lastPendingTime;
5942 resetContextDependencies();
5943 ReactCurrentDispatcher.current = prevDispatcher;
5944 tracing.__interactionsRef.current = prevInteractions;
5945 if (null !== workInProgress)
5946 return renderRoot.bind(null, root$jscomp$0, expirationTime);
5947 }
5948 root$jscomp$0.finishedWork = root$jscomp$0.current.alternate;
5949 root$jscomp$0.finishedExpirationTime = expirationTime;
5950 if (resolveLocksOnRoot(root$jscomp$0, expirationTime)) return null;
5951 workInProgressRoot = null;
5952 switch (workInProgressRootExitStatus) {
5953 case RootIncomplete:
5954 throw ReactError(Error("Should have a work-in-progress."));
5955 case RootErrored:
5956 return (
5957 (lastPendingTime = root$jscomp$0.lastPendingTime),
5958 lastPendingTime < expirationTime
5959 ? renderRoot.bind(null, root$jscomp$0, lastPendingTime)
5960 : isSync
5961 ? commitRoot.bind(null, root$jscomp$0)
5962 : (prepareFreshStack(root$jscomp$0, expirationTime),
5963 scheduleSyncCallback(
5964 renderRoot.bind(null, root$jscomp$0, expirationTime)
5965 ),
5966 null)
5967 );
5968 case RootSuspended:
5969 if (
5970 1073741823 === workInProgressRootLatestProcessedExpirationTime &&
5971 !isSync &&
5972 ((isSync = globalMostRecentFallbackTime + FALLBACK_THROTTLE_MS - now()),
5973 10 < isSync)
5974 ) {
5975 if (workInProgressRootHasPendingPing)
5976 return (
5977 prepareFreshStack(root$jscomp$0, expirationTime),
5978 renderRoot.bind(null, root$jscomp$0, expirationTime)
5979 );
5980 lastPendingTime = root$jscomp$0.lastPendingTime;
5981 if (lastPendingTime < expirationTime)
5982 return renderRoot.bind(null, root$jscomp$0, lastPendingTime);
5983 root$jscomp$0.timeoutHandle = scheduleTimeout(
5984 commitRoot.bind(null, root$jscomp$0),
5985 isSync
5986 );
5987 return null;
5988 }
5989 return commitRoot.bind(null, root$jscomp$0);
5990 case RootSuspendedWithDelay:
5991 if (!isSync) {
5992 if (workInProgressRootHasPendingPing)
5993 return (
5994 prepareFreshStack(root$jscomp$0, expirationTime),
5995 renderRoot.bind(null, root$jscomp$0, expirationTime)
5996 );
5997 isSync = root$jscomp$0.lastPendingTime;
5998 if (isSync < expirationTime)
5999 return renderRoot.bind(null, root$jscomp$0, isSync);
6000 1073741823 !== workInProgressRootLatestSuspenseTimeout
6001 ? (isSync =
6002 10 * (1073741821 - workInProgressRootLatestSuspenseTimeout) -
6003 now())
6004 : 1073741823 === workInProgressRootLatestProcessedExpirationTime
6005 ? (isSync = 0)
6006 : ((isSync =
6007 10 *
6008 (1073741821 -
6009 workInProgressRootLatestProcessedExpirationTime) -
6010 5e3),
6011 (lastPendingTime = now()),
6012 (expirationTime =
6013 10 * (1073741821 - expirationTime) - lastPendingTime),
6014 (isSync = lastPendingTime - isSync),
6015 0 > isSync && (isSync = 0),
6016 (isSync =
6017 (120 > isSync
6018 ? 120
6019 : 480 > isSync
6020 ? 480
6021 : 1080 > isSync
6022 ? 1080
6023 : 1920 > isSync
6024 ? 1920
6025 : 3e3 > isSync
6026 ? 3e3
6027 : 4320 > isSync
6028 ? 4320
6029 : 1960 * ceil(isSync / 1960)) - isSync),
6030 expirationTime < isSync && (isSync = expirationTime));
6031 if (10 < isSync)
6032 return (
6033 (root$jscomp$0.timeoutHandle = scheduleTimeout(
6034 commitRoot.bind(null, root$jscomp$0),
6035 isSync
6036 )),
6037 null
6038 );
6039 }
6040 return commitRoot.bind(null, root$jscomp$0);
6041 case RootCompleted:
6042 return !isSync &&
6043 1073741823 !== workInProgressRootLatestProcessedExpirationTime &&
6044 null !== workInProgressRootCanSuspendUsingConfig &&
6045 ((lastPendingTime = workInProgressRootLatestProcessedExpirationTime),
6046 (prevDispatcher = workInProgressRootCanSuspendUsingConfig),
6047 (expirationTime = prevDispatcher.busyMinDurationMs | 0),
6048 0 >= expirationTime
6049 ? (expirationTime = 0)
6050 : ((isSync = prevDispatcher.busyDelayMs | 0),
6051 (lastPendingTime =
6052 now() -
6053 (10 * (1073741821 - lastPendingTime) -
6054 (prevDispatcher.timeoutMs | 0 || 5e3))),
6055 (expirationTime =
6056 lastPendingTime <= isSync
6057 ? 0
6058 : isSync + expirationTime - lastPendingTime)),
6059 10 < expirationTime)
6060 ? ((root$jscomp$0.timeoutHandle = scheduleTimeout(
6061 commitRoot.bind(null, root$jscomp$0),
6062 expirationTime
6063 )),
6064 null)
6065 : commitRoot.bind(null, root$jscomp$0);
6066 default:
6067 throw ReactError(Error("Unknown root exit status."));
6068 }
6069}
6070function markRenderEventTimeAndConfig(expirationTime, suspenseConfig) {
6071 expirationTime < workInProgressRootLatestProcessedExpirationTime &&
6072 1 < expirationTime &&
6073 (workInProgressRootLatestProcessedExpirationTime = expirationTime);
6074 null !== suspenseConfig &&
6075 expirationTime < workInProgressRootLatestSuspenseTimeout &&
6076 1 < expirationTime &&
6077 ((workInProgressRootLatestSuspenseTimeout = expirationTime),
6078 (workInProgressRootCanSuspendUsingConfig = suspenseConfig));
6079}
6080function performUnitOfWork(unitOfWork) {
6081 var current$$1 = unitOfWork.alternate;
6082 0 !== (unitOfWork.mode & 8)
6083 ? ((profilerStartTime = now$1()),
6084 0 > unitOfWork.actualStartTime && (unitOfWork.actualStartTime = now$1()),
6085 (current$$1 = beginWork$$1(current$$1, unitOfWork, renderExpirationTime)),
6086 stopProfilerTimerIfRunningAndRecordDelta(unitOfWork, !0))
6087 : (current$$1 = beginWork$$1(current$$1, unitOfWork, renderExpirationTime));
6088 unitOfWork.memoizedProps = unitOfWork.pendingProps;
6089 null === current$$1 && (current$$1 = completeUnitOfWork(unitOfWork));
6090 ReactCurrentOwner$2.current = null;
6091 return current$$1;
6092}
6093function completeUnitOfWork(unitOfWork) {
6094 workInProgress = unitOfWork;
6095 do {
6096 var current$$1 = workInProgress.alternate;
6097 unitOfWork = workInProgress.return;
6098 if (0 === (workInProgress.effectTag & 1024)) {
6099 if (0 === (workInProgress.mode & 8))
6100 current$$1 = completeWork(
6101 current$$1,
6102 workInProgress,
6103 renderExpirationTime
6104 );
6105 else {
6106 var fiber = workInProgress;
6107 profilerStartTime = now$1();
6108 0 > fiber.actualStartTime && (fiber.actualStartTime = now$1());
6109 current$$1 = completeWork(
6110 current$$1,
6111 workInProgress,
6112 renderExpirationTime
6113 );
6114 stopProfilerTimerIfRunningAndRecordDelta(workInProgress, !1);
6115 }
6116 fiber = workInProgress;
6117 if (1 === renderExpirationTime || 1 !== fiber.childExpirationTime) {
6118 var newChildExpirationTime = 0;
6119 if (0 !== (fiber.mode & 8)) {
6120 for (
6121 var actualDuration = fiber.actualDuration,
6122 treeBaseDuration = fiber.selfBaseDuration,
6123 shouldBubbleActualDurations =
6124 null === fiber.alternate ||
6125 fiber.child !== fiber.alternate.child,
6126 child = fiber.child;
6127 null !== child;
6128
6129 ) {
6130 var childUpdateExpirationTime = child.expirationTime,
6131 childChildExpirationTime = child.childExpirationTime;
6132 childUpdateExpirationTime > newChildExpirationTime &&
6133 (newChildExpirationTime = childUpdateExpirationTime);
6134 childChildExpirationTime > newChildExpirationTime &&
6135 (newChildExpirationTime = childChildExpirationTime);
6136 shouldBubbleActualDurations &&
6137 (actualDuration += child.actualDuration);
6138 treeBaseDuration += child.treeBaseDuration;
6139 child = child.sibling;
6140 }
6141 fiber.actualDuration = actualDuration;
6142 fiber.treeBaseDuration = treeBaseDuration;
6143 } else
6144 for (actualDuration = fiber.child; null !== actualDuration; )
6145 (treeBaseDuration = actualDuration.expirationTime),
6146 (shouldBubbleActualDurations =
6147 actualDuration.childExpirationTime),
6148 treeBaseDuration > newChildExpirationTime &&
6149 (newChildExpirationTime = treeBaseDuration),
6150 shouldBubbleActualDurations > newChildExpirationTime &&
6151 (newChildExpirationTime = shouldBubbleActualDurations),
6152 (actualDuration = actualDuration.sibling);
6153 fiber.childExpirationTime = newChildExpirationTime;
6154 }
6155 if (null !== current$$1) return current$$1;
6156 null !== unitOfWork &&
6157 0 === (unitOfWork.effectTag & 1024) &&
6158 (null === unitOfWork.firstEffect &&
6159 (unitOfWork.firstEffect = workInProgress.firstEffect),
6160 null !== workInProgress.lastEffect &&
6161 (null !== unitOfWork.lastEffect &&
6162 (unitOfWork.lastEffect.nextEffect = workInProgress.firstEffect),
6163 (unitOfWork.lastEffect = workInProgress.lastEffect)),
6164 1 < workInProgress.effectTag &&
6165 (null !== unitOfWork.lastEffect
6166 ? (unitOfWork.lastEffect.nextEffect = workInProgress)
6167 : (unitOfWork.firstEffect = workInProgress),
6168 (unitOfWork.lastEffect = workInProgress)));
6169 } else {
6170 current$$1 = unwindWork(workInProgress, renderExpirationTime);
6171 if (0 !== (workInProgress.mode & 8)) {
6172 stopProfilerTimerIfRunningAndRecordDelta(workInProgress, !1);
6173 fiber = workInProgress.actualDuration;
6174 for (
6175 newChildExpirationTime = workInProgress.child;
6176 null !== newChildExpirationTime;
6177
6178 )
6179 (fiber += newChildExpirationTime.actualDuration),
6180 (newChildExpirationTime = newChildExpirationTime.sibling);
6181 workInProgress.actualDuration = fiber;
6182 }
6183 if (null !== current$$1)
6184 return (current$$1.effectTag &= 1023), current$$1;
6185 null !== unitOfWork &&
6186 ((unitOfWork.firstEffect = unitOfWork.lastEffect = null),
6187 (unitOfWork.effectTag |= 1024));
6188 }
6189 current$$1 = workInProgress.sibling;
6190 if (null !== current$$1) return current$$1;
6191 workInProgress = unitOfWork;
6192 } while (null !== workInProgress);
6193 workInProgressRootExitStatus === RootIncomplete &&
6194 (workInProgressRootExitStatus = RootCompleted);
6195 return null;
6196}
6197function commitRoot(root) {
6198 var renderPriorityLevel = getCurrentPriorityLevel();
6199 runWithPriority$1(99, commitRootImpl.bind(null, root, renderPriorityLevel));
6200 null !== rootWithPendingPassiveEffects &&
6201 scheduleCallback(97, function() {
6202 flushPassiveEffects();
6203 return null;
6204 });
6205 return null;
6206}
6207function commitRootImpl(root, renderPriorityLevel) {
6208 flushPassiveEffects();
6209 if ((executionContext & (RenderContext | CommitContext)) !== NoContext)
6210 throw ReactError(Error("Should not already be working."));
6211 var finishedWork = root.finishedWork,
6212 expirationTime = root.finishedExpirationTime;
6213 if (null === finishedWork) return null;
6214 root.finishedWork = null;
6215 root.finishedExpirationTime = 0;
6216 if (finishedWork === root.current)
6217 throw ReactError(
6218 Error(
6219 "Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue."
6220 )
6221 );
6222 root.callbackNode = null;
6223 root.callbackExpirationTime = 0;
6224 var updateExpirationTimeBeforeCommit = finishedWork.expirationTime,
6225 childExpirationTimeBeforeCommit = finishedWork.childExpirationTime;
6226 updateExpirationTimeBeforeCommit =
6227 childExpirationTimeBeforeCommit > updateExpirationTimeBeforeCommit
6228 ? childExpirationTimeBeforeCommit
6229 : updateExpirationTimeBeforeCommit;
6230 root.firstPendingTime = updateExpirationTimeBeforeCommit;
6231 updateExpirationTimeBeforeCommit < root.lastPendingTime &&
6232 (root.lastPendingTime = updateExpirationTimeBeforeCommit);
6233 root === workInProgressRoot &&
6234 ((workInProgress = workInProgressRoot = null), (renderExpirationTime = 0));
6235 1 < finishedWork.effectTag
6236 ? null !== finishedWork.lastEffect
6237 ? ((finishedWork.lastEffect.nextEffect = finishedWork),
6238 (updateExpirationTimeBeforeCommit = finishedWork.firstEffect))
6239 : (updateExpirationTimeBeforeCommit = finishedWork)
6240 : (updateExpirationTimeBeforeCommit = finishedWork.firstEffect);
6241 if (null !== updateExpirationTimeBeforeCommit) {
6242 childExpirationTimeBeforeCommit = executionContext;
6243 executionContext |= CommitContext;
6244 var prevInteractions = tracing.__interactionsRef.current;
6245 tracing.__interactionsRef.current = root.memoizedInteractions;
6246 ReactCurrentOwner$2.current = null;
6247 nextEffect = updateExpirationTimeBeforeCommit;
6248 do
6249 try {
6250 for (; null !== nextEffect; ) {
6251 if (0 !== (nextEffect.effectTag & 256)) {
6252 var current$$1 = nextEffect.alternate,
6253 finishedWork$jscomp$0 = nextEffect;
6254 switch (finishedWork$jscomp$0.tag) {
6255 case 0:
6256 case 11:
6257 case 15:
6258 commitHookEffectList(
6259 UnmountSnapshot,
6260 NoEffect$1,
6261 finishedWork$jscomp$0
6262 );
6263 break;
6264 case 1:
6265 if (
6266 finishedWork$jscomp$0.effectTag & 256 &&
6267 null !== current$$1
6268 ) {
6269 var prevProps = current$$1.memoizedProps,
6270 prevState = current$$1.memoizedState,
6271 instance = finishedWork$jscomp$0.stateNode,
6272 snapshot = instance.getSnapshotBeforeUpdate(
6273 finishedWork$jscomp$0.elementType ===
6274 finishedWork$jscomp$0.type
6275 ? prevProps
6276 : resolveDefaultProps(
6277 finishedWork$jscomp$0.type,
6278 prevProps
6279 ),
6280 prevState
6281 );
6282 instance.__reactInternalSnapshotBeforeUpdate = snapshot;
6283 }
6284 break;
6285 case 3:
6286 case 5:
6287 case 6:
6288 case 4:
6289 case 17:
6290 break;
6291 default:
6292 throw ReactError(
6293 Error(
6294 "This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue."
6295 )
6296 );
6297 }
6298 }
6299 nextEffect = nextEffect.nextEffect;
6300 }
6301 } catch (error) {
6302 if (null === nextEffect)
6303 throw ReactError(Error("Should be working on an effect."));
6304 captureCommitPhaseError(nextEffect, error);
6305 nextEffect = nextEffect.nextEffect;
6306 }
6307 while (null !== nextEffect);
6308 commitTime = now$1();
6309 nextEffect = updateExpirationTimeBeforeCommit;
6310 do
6311 try {
6312 for (current$$1 = renderPriorityLevel; null !== nextEffect; ) {
6313 var effectTag = nextEffect.effectTag;
6314 if (effectTag & 128) {
6315 var current$$1$jscomp$0 = nextEffect.alternate;
6316 if (null !== current$$1$jscomp$0) {
6317 var currentRef = current$$1$jscomp$0.ref;
6318 null !== currentRef &&
6319 ("function" === typeof currentRef
6320 ? currentRef(null)
6321 : (currentRef.current = null));
6322 }
6323 }
6324 switch (effectTag & 14) {
6325 case 2:
6326 nextEffect.effectTag &= -3;
6327 break;
6328 case 6:
6329 nextEffect.effectTag &= -3;
6330 commitWork(nextEffect.alternate, nextEffect);
6331 break;
6332 case 4:
6333 commitWork(nextEffect.alternate, nextEffect);
6334 break;
6335 case 8:
6336 prevProps = nextEffect;
6337 a: for (
6338 prevState = prevProps,
6339 instance = current$$1,
6340 snapshot = prevState;
6341 ;
6342
6343 )
6344 if (
6345 (commitUnmount(snapshot, instance), null !== snapshot.child)
6346 )
6347 (snapshot.child.return = snapshot),
6348 (snapshot = snapshot.child);
6349 else {
6350 if (snapshot === prevState) break;
6351 for (; null === snapshot.sibling; ) {
6352 if (
6353 null === snapshot.return ||
6354 snapshot.return === prevState
6355 )
6356 break a;
6357 snapshot = snapshot.return;
6358 }
6359 snapshot.sibling.return = snapshot.return;
6360 snapshot = snapshot.sibling;
6361 }
6362 detachFiber(prevProps);
6363 }
6364 nextEffect = nextEffect.nextEffect;
6365 }
6366 } catch (error) {
6367 if (null === nextEffect)
6368 throw ReactError(Error("Should be working on an effect."));
6369 captureCommitPhaseError(nextEffect, error);
6370 nextEffect = nextEffect.nextEffect;
6371 }
6372 while (null !== nextEffect);
6373 root.current = finishedWork;
6374 nextEffect = updateExpirationTimeBeforeCommit;
6375 do
6376 try {
6377 for (
6378 effectTag = root, current$$1$jscomp$0 = expirationTime;
6379 null !== nextEffect;
6380
6381 ) {
6382 var effectTag$jscomp$0 = nextEffect.effectTag;
6383 if (effectTag$jscomp$0 & 36) {
6384 prevProps = effectTag;
6385 var current$$1$jscomp$1 = nextEffect.alternate;
6386 currentRef = nextEffect;
6387 current$$1 = current$$1$jscomp$0;
6388 switch (currentRef.tag) {
6389 case 0:
6390 case 11:
6391 case 15:
6392 commitHookEffectList(UnmountLayout, MountLayout, currentRef);
6393 break;
6394 case 1:
6395 var instance$jscomp$0 = currentRef.stateNode;
6396 if (currentRef.effectTag & 4)
6397 if (null === current$$1$jscomp$1)
6398 instance$jscomp$0.componentDidMount();
6399 else {
6400 var prevProps$jscomp$0 =
6401 currentRef.elementType === currentRef.type
6402 ? current$$1$jscomp$1.memoizedProps
6403 : resolveDefaultProps(
6404 currentRef.type,
6405 current$$1$jscomp$1.memoizedProps
6406 );
6407 instance$jscomp$0.componentDidUpdate(
6408 prevProps$jscomp$0,
6409 current$$1$jscomp$1.memoizedState,
6410 instance$jscomp$0.__reactInternalSnapshotBeforeUpdate
6411 );
6412 }
6413 var updateQueue = currentRef.updateQueue;
6414 null !== updateQueue &&
6415 commitUpdateQueue(
6416 currentRef,
6417 updateQueue,
6418 instance$jscomp$0,
6419 current$$1
6420 );
6421 break;
6422 case 3:
6423 var _updateQueue = currentRef.updateQueue;
6424 if (null !== _updateQueue) {
6425 prevProps = null;
6426 if (null !== currentRef.child)
6427 switch (currentRef.child.tag) {
6428 case 5:
6429 prevProps = currentRef.child.stateNode.canonical;
6430 break;
6431 case 1:
6432 prevProps = currentRef.child.stateNode;
6433 }
6434 commitUpdateQueue(
6435 currentRef,
6436 _updateQueue,
6437 prevProps,
6438 current$$1
6439 );
6440 }
6441 break;
6442 case 5:
6443 if (null === current$$1$jscomp$1 && currentRef.effectTag & 4)
6444 throw ReactError(
6445 Error(
6446 "The current renderer does not support mutation. This error is likely caused by a bug in React. Please file an issue."
6447 )
6448 );
6449 break;
6450 case 6:
6451 break;
6452 case 4:
6453 break;
6454 case 12:
6455 var onRender = currentRef.memoizedProps.onRender;
6456 "function" === typeof onRender &&
6457 onRender(
6458 currentRef.memoizedProps.id,
6459 null === current$$1$jscomp$1 ? "mount" : "update",
6460 currentRef.actualDuration,
6461 currentRef.treeBaseDuration,
6462 currentRef.actualStartTime,
6463 commitTime,
6464 prevProps.memoizedInteractions
6465 );
6466 break;
6467 case 13:
6468 case 19:
6469 case 17:
6470 case 20:
6471 break;
6472 default:
6473 throw ReactError(
6474 Error(
6475 "This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue."
6476 )
6477 );
6478 }
6479 }
6480 if (effectTag$jscomp$0 & 128) {
6481 var ref = nextEffect.ref;
6482 if (null !== ref) {
6483 var instance$jscomp$1 = nextEffect.stateNode;
6484 switch (nextEffect.tag) {
6485 case 5:
6486 var instanceToUse = instance$jscomp$1.canonical;
6487 break;
6488 default:
6489 instanceToUse = instance$jscomp$1;
6490 }
6491 "function" === typeof ref
6492 ? ref(instanceToUse)
6493 : (ref.current = instanceToUse);
6494 }
6495 }
6496 effectTag$jscomp$0 & 512 && (rootDoesHavePassiveEffects = !0);
6497 nextEffect = nextEffect.nextEffect;
6498 }
6499 } catch (error) {
6500 if (null === nextEffect)
6501 throw ReactError(Error("Should be working on an effect."));
6502 captureCommitPhaseError(nextEffect, error);
6503 nextEffect = nextEffect.nextEffect;
6504 }
6505 while (null !== nextEffect);
6506 nextEffect = null;
6507 requestPaint();
6508 tracing.__interactionsRef.current = prevInteractions;
6509 executionContext = childExpirationTimeBeforeCommit;
6510 } else (root.current = finishedWork), (commitTime = now$1());
6511 if ((effectTag$jscomp$0 = rootDoesHavePassiveEffects))
6512 (rootDoesHavePassiveEffects = !1),
6513 (rootWithPendingPassiveEffects = root),
6514 (pendingPassiveEffectsExpirationTime = expirationTime),
6515 (pendingPassiveEffectsRenderPriority = renderPriorityLevel);
6516 else
6517 for (nextEffect = updateExpirationTimeBeforeCommit; null !== nextEffect; )
6518 (renderPriorityLevel = nextEffect.nextEffect),
6519 (nextEffect.nextEffect = null),
6520 (nextEffect = renderPriorityLevel);
6521 renderPriorityLevel = root.firstPendingTime;
6522 if (0 !== renderPriorityLevel) {
6523 current$$1$jscomp$1 = requestCurrentTime();
6524 current$$1$jscomp$1 = inferPriorityFromExpirationTime(
6525 current$$1$jscomp$1,
6526 renderPriorityLevel
6527 );
6528 if (null !== spawnedWorkDuringRender)
6529 for (
6530 instance$jscomp$0 = spawnedWorkDuringRender,
6531 spawnedWorkDuringRender = null,
6532 prevProps$jscomp$0 = 0;
6533 prevProps$jscomp$0 < instance$jscomp$0.length;
6534 prevProps$jscomp$0++
6535 )
6536 scheduleInteractions(
6537 root,
6538 instance$jscomp$0[prevProps$jscomp$0],
6539 root.memoizedInteractions
6540 );
6541 scheduleCallbackForRoot(root, current$$1$jscomp$1, renderPriorityLevel);
6542 } else legacyErrorBoundariesThatAlreadyFailed = null;
6543 effectTag$jscomp$0 || finishPendingInteractions(root, expirationTime);
6544 "function" === typeof onCommitFiberRoot &&
6545 onCommitFiberRoot(finishedWork.stateNode, expirationTime);
6546 1073741823 === renderPriorityLevel
6547 ? root === rootWithNestedUpdates
6548 ? nestedUpdateCount++
6549 : ((nestedUpdateCount = 0), (rootWithNestedUpdates = root))
6550 : (nestedUpdateCount = 0);
6551 if (hasUncaughtError)
6552 throw ((hasUncaughtError = !1),
6553 (root = firstUncaughtError),
6554 (firstUncaughtError = null),
6555 root);
6556 if ((executionContext & LegacyUnbatchedContext) !== NoContext) return null;
6557 flushSyncCallbackQueue();
6558 return null;
6559}
6560function flushPassiveEffects() {
6561 if (null === rootWithPendingPassiveEffects) return !1;
6562 var root = rootWithPendingPassiveEffects,
6563 expirationTime = pendingPassiveEffectsExpirationTime,
6564 renderPriorityLevel = pendingPassiveEffectsRenderPriority;
6565 rootWithPendingPassiveEffects = null;
6566 pendingPassiveEffectsExpirationTime = 0;
6567 pendingPassiveEffectsRenderPriority = 90;
6568 return runWithPriority$1(
6569 97 < renderPriorityLevel ? 97 : renderPriorityLevel,
6570 flushPassiveEffectsImpl.bind(null, root, expirationTime)
6571 );
6572}
6573function flushPassiveEffectsImpl(root, expirationTime) {
6574 var prevInteractions = tracing.__interactionsRef.current;
6575 tracing.__interactionsRef.current = root.memoizedInteractions;
6576 if ((executionContext & (RenderContext | CommitContext)) !== NoContext)
6577 throw ReactError(
6578 Error("Cannot flush passive effects while already rendering.")
6579 );
6580 var prevExecutionContext = executionContext;
6581 executionContext |= CommitContext;
6582 for (var effect = root.current.firstEffect; null !== effect; ) {
6583 try {
6584 var finishedWork = effect;
6585 if (0 !== (finishedWork.effectTag & 512))
6586 switch (finishedWork.tag) {
6587 case 0:
6588 case 11:
6589 case 15:
6590 commitHookEffectList(UnmountPassive, NoEffect$1, finishedWork),
6591 commitHookEffectList(NoEffect$1, MountPassive, finishedWork);
6592 }
6593 } catch (error) {
6594 if (null === effect)
6595 throw ReactError(Error("Should be working on an effect."));
6596 captureCommitPhaseError(effect, error);
6597 }
6598 finishedWork = effect.nextEffect;
6599 effect.nextEffect = null;
6600 effect = finishedWork;
6601 }
6602 tracing.__interactionsRef.current = prevInteractions;
6603 finishPendingInteractions(root, expirationTime);
6604 executionContext = prevExecutionContext;
6605 flushSyncCallbackQueue();
6606 return !0;
6607}
6608function captureCommitPhaseErrorOnRoot(rootFiber, sourceFiber, error) {
6609 sourceFiber = createCapturedValue(error, sourceFiber);
6610 sourceFiber = createRootErrorUpdate(rootFiber, sourceFiber, 1073741823);
6611 enqueueUpdate(rootFiber, sourceFiber);
6612 rootFiber = markUpdateTimeFromFiberToRoot(rootFiber, 1073741823);
6613 null !== rootFiber && scheduleCallbackForRoot(rootFiber, 99, 1073741823);
6614}
6615function captureCommitPhaseError(sourceFiber, error) {
6616 if (3 === sourceFiber.tag)
6617 captureCommitPhaseErrorOnRoot(sourceFiber, sourceFiber, error);
6618 else
6619 for (var fiber = sourceFiber.return; null !== fiber; ) {
6620 if (3 === fiber.tag) {
6621 captureCommitPhaseErrorOnRoot(fiber, sourceFiber, error);
6622 break;
6623 } else if (1 === fiber.tag) {
6624 var instance = fiber.stateNode;
6625 if (
6626 "function" === typeof fiber.type.getDerivedStateFromError ||
6627 ("function" === typeof instance.componentDidCatch &&
6628 (null === legacyErrorBoundariesThatAlreadyFailed ||
6629 !legacyErrorBoundariesThatAlreadyFailed.has(instance)))
6630 ) {
6631 sourceFiber = createCapturedValue(error, sourceFiber);
6632 sourceFiber = createClassErrorUpdate(fiber, sourceFiber, 1073741823);
6633 enqueueUpdate(fiber, sourceFiber);
6634 fiber = markUpdateTimeFromFiberToRoot(fiber, 1073741823);
6635 null !== fiber && scheduleCallbackForRoot(fiber, 99, 1073741823);
6636 break;
6637 }
6638 }
6639 fiber = fiber.return;
6640 }
6641}
6642function pingSuspendedRoot(root, thenable, suspendedTime) {
6643 var pingCache = root.pingCache;
6644 null !== pingCache && pingCache.delete(thenable);
6645 workInProgressRoot === root && renderExpirationTime === suspendedTime
6646 ? workInProgressRootExitStatus === RootSuspendedWithDelay ||
6647 (workInProgressRootExitStatus === RootSuspended &&
6648 1073741823 === workInProgressRootLatestProcessedExpirationTime &&
6649 now() - globalMostRecentFallbackTime < FALLBACK_THROTTLE_MS)
6650 ? prepareFreshStack(root, renderExpirationTime)
6651 : (workInProgressRootHasPendingPing = !0)
6652 : root.lastPendingTime < suspendedTime ||
6653 ((thenable = root.pingTime),
6654 (0 !== thenable && thenable < suspendedTime) ||
6655 ((root.pingTime = suspendedTime),
6656 root.finishedExpirationTime === suspendedTime &&
6657 ((root.finishedExpirationTime = 0), (root.finishedWork = null)),
6658 (thenable = requestCurrentTime()),
6659 (thenable = inferPriorityFromExpirationTime(thenable, suspendedTime)),
6660 scheduleCallbackForRoot(root, thenable, suspendedTime)));
6661}
6662function resolveRetryThenable(boundaryFiber, thenable) {
6663 var retryCache = boundaryFiber.stateNode;
6664 null !== retryCache && retryCache.delete(thenable);
6665 retryCache = requestCurrentTime();
6666 thenable = computeExpirationForFiber(retryCache, boundaryFiber, null);
6667 retryCache = inferPriorityFromExpirationTime(retryCache, thenable);
6668 boundaryFiber = markUpdateTimeFromFiberToRoot(boundaryFiber, thenable);
6669 null !== boundaryFiber &&
6670 scheduleCallbackForRoot(boundaryFiber, retryCache, thenable);
6671}
6672var beginWork$$1 = void 0;
6673beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
6674 var updateExpirationTime = workInProgress.expirationTime;
6675 if (null !== current$$1)
6676 if (
6677 current$$1.memoizedProps !== workInProgress.pendingProps ||
6678 didPerformWorkStackCursor.current
6679 )
6680 didReceiveUpdate = !0;
6681 else {
6682 if (updateExpirationTime < renderExpirationTime) {
6683 didReceiveUpdate = !1;
6684 switch (workInProgress.tag) {
6685 case 3:
6686 pushHostRootContext(workInProgress);
6687 break;
6688 case 5:
6689 pushHostContext(workInProgress);
6690 break;
6691 case 1:
6692 isContextProvider(workInProgress.type) &&
6693 pushContextProvider(workInProgress);
6694 break;
6695 case 4:
6696 pushHostContainer(
6697 workInProgress,
6698 workInProgress.stateNode.containerInfo
6699 );
6700 break;
6701 case 10:
6702 pushProvider(workInProgress, workInProgress.memoizedProps.value);
6703 break;
6704 case 12:
6705 workInProgress.effectTag |= 4;
6706 break;
6707 case 13:
6708 if (null !== workInProgress.memoizedState) {
6709 updateExpirationTime = workInProgress.child.childExpirationTime;
6710 if (
6711 0 !== updateExpirationTime &&
6712 updateExpirationTime >= renderExpirationTime
6713 )
6714 return updateSuspenseComponent(
6715 current$$1,
6716 workInProgress,
6717 renderExpirationTime
6718 );
6719 push(
6720 suspenseStackCursor,
6721 suspenseStackCursor.current & SubtreeSuspenseContextMask,
6722 workInProgress
6723 );
6724 workInProgress = bailoutOnAlreadyFinishedWork(
6725 current$$1,
6726 workInProgress,
6727 renderExpirationTime
6728 );
6729 return null !== workInProgress ? workInProgress.sibling : null;
6730 }
6731 push(
6732 suspenseStackCursor,
6733 suspenseStackCursor.current & SubtreeSuspenseContextMask,
6734 workInProgress
6735 );
6736 break;
6737 case 19:
6738 updateExpirationTime =
6739 workInProgress.childExpirationTime >= renderExpirationTime;
6740 if (0 !== (current$$1.effectTag & 64)) {
6741 if (updateExpirationTime)
6742 return updateSuspenseListComponent(
6743 current$$1,
6744 workInProgress,
6745 renderExpirationTime
6746 );
6747 workInProgress.effectTag |= 64;
6748 }
6749 var renderState = workInProgress.memoizedState;
6750 null !== renderState &&
6751 ((renderState.rendering = null), (renderState.tail = null));
6752 push(
6753 suspenseStackCursor,
6754 suspenseStackCursor.current,
6755 workInProgress
6756 );
6757 if (!updateExpirationTime) return null;
6758 }
6759 return bailoutOnAlreadyFinishedWork(
6760 current$$1,
6761 workInProgress,
6762 renderExpirationTime
6763 );
6764 }
6765 }
6766 else didReceiveUpdate = !1;
6767 workInProgress.expirationTime = 0;
6768 switch (workInProgress.tag) {
6769 case 2:
6770 updateExpirationTime = workInProgress.type;
6771 null !== current$$1 &&
6772 ((current$$1.alternate = null),
6773 (workInProgress.alternate = null),
6774 (workInProgress.effectTag |= 2));
6775 current$$1 = workInProgress.pendingProps;
6776 renderState = getMaskedContext(
6777 workInProgress,
6778 contextStackCursor.current
6779 );
6780 prepareToReadContext(workInProgress, renderExpirationTime);
6781 renderState = renderWithHooks(
6782 null,
6783 workInProgress,
6784 updateExpirationTime,
6785 current$$1,
6786 renderState,
6787 renderExpirationTime
6788 );
6789 workInProgress.effectTag |= 1;
6790 if (
6791 "object" === typeof renderState &&
6792 null !== renderState &&
6793 "function" === typeof renderState.render &&
6794 void 0 === renderState.$$typeof
6795 ) {
6796 workInProgress.tag = 1;
6797 resetHooks();
6798 if (isContextProvider(updateExpirationTime)) {
6799 var hasContext = !0;
6800 pushContextProvider(workInProgress);
6801 } else hasContext = !1;
6802 workInProgress.memoizedState =
6803 null !== renderState.state && void 0 !== renderState.state
6804 ? renderState.state
6805 : null;
6806 var getDerivedStateFromProps =
6807 updateExpirationTime.getDerivedStateFromProps;
6808 "function" === typeof getDerivedStateFromProps &&
6809 applyDerivedStateFromProps(
6810 workInProgress,
6811 updateExpirationTime,
6812 getDerivedStateFromProps,
6813 current$$1
6814 );
6815 renderState.updater = classComponentUpdater;
6816 workInProgress.stateNode = renderState;
6817 renderState._reactInternalFiber = workInProgress;
6818 mountClassInstance(
6819 workInProgress,
6820 updateExpirationTime,
6821 current$$1,
6822 renderExpirationTime
6823 );
6824 workInProgress = finishClassComponent(
6825 null,
6826 workInProgress,
6827 updateExpirationTime,
6828 !0,
6829 hasContext,
6830 renderExpirationTime
6831 );
6832 } else
6833 (workInProgress.tag = 0),
6834 reconcileChildren(
6835 null,
6836 workInProgress,
6837 renderState,
6838 renderExpirationTime
6839 ),
6840 (workInProgress = workInProgress.child);
6841 return workInProgress;
6842 case 16:
6843 renderState = workInProgress.elementType;
6844 null !== current$$1 &&
6845 ((current$$1.alternate = null),
6846 (workInProgress.alternate = null),
6847 (workInProgress.effectTag |= 2));
6848 current$$1 = workInProgress.pendingProps;
6849 renderState = readLazyComponentType(renderState);
6850 workInProgress.type = renderState;
6851 hasContext = workInProgress.tag = resolveLazyComponentTag(renderState);
6852 current$$1 = resolveDefaultProps(renderState, current$$1);
6853 switch (hasContext) {
6854 case 0:
6855 workInProgress = updateFunctionComponent(
6856 null,
6857 workInProgress,
6858 renderState,
6859 current$$1,
6860 renderExpirationTime
6861 );
6862 break;
6863 case 1:
6864 workInProgress = updateClassComponent(
6865 null,
6866 workInProgress,
6867 renderState,
6868 current$$1,
6869 renderExpirationTime
6870 );
6871 break;
6872 case 11:
6873 workInProgress = updateForwardRef(
6874 null,
6875 workInProgress,
6876 renderState,
6877 current$$1,
6878 renderExpirationTime
6879 );
6880 break;
6881 case 14:
6882 workInProgress = updateMemoComponent(
6883 null,
6884 workInProgress,
6885 renderState,
6886 resolveDefaultProps(renderState.type, current$$1),
6887 updateExpirationTime,
6888 renderExpirationTime
6889 );
6890 break;
6891 default:
6892 throw ReactError(
6893 Error(
6894 "Element type is invalid. Received a promise that resolves to: " +
6895 renderState +
6896 ". Lazy element type must resolve to a class or function."
6897 )
6898 );
6899 }
6900 return workInProgress;
6901 case 0:
6902 return (
6903 (updateExpirationTime = workInProgress.type),
6904 (renderState = workInProgress.pendingProps),
6905 (renderState =
6906 workInProgress.elementType === updateExpirationTime
6907 ? renderState
6908 : resolveDefaultProps(updateExpirationTime, renderState)),
6909 updateFunctionComponent(
6910 current$$1,
6911 workInProgress,
6912 updateExpirationTime,
6913 renderState,
6914 renderExpirationTime
6915 )
6916 );
6917 case 1:
6918 return (
6919 (updateExpirationTime = workInProgress.type),
6920 (renderState = workInProgress.pendingProps),
6921 (renderState =
6922 workInProgress.elementType === updateExpirationTime
6923 ? renderState
6924 : resolveDefaultProps(updateExpirationTime, renderState)),
6925 updateClassComponent(
6926 current$$1,
6927 workInProgress,
6928 updateExpirationTime,
6929 renderState,
6930 renderExpirationTime
6931 )
6932 );
6933 case 3:
6934 pushHostRootContext(workInProgress);
6935 updateExpirationTime = workInProgress.updateQueue;
6936 if (null === updateExpirationTime)
6937 throw ReactError(
6938 Error(
6939 "If the root does not have an updateQueue, we should have already bailed out. This error is likely caused by a bug in React. Please file an issue."
6940 )
6941 );
6942 renderState = workInProgress.memoizedState;
6943 renderState = null !== renderState ? renderState.element : null;
6944 processUpdateQueue(
6945 workInProgress,
6946 updateExpirationTime,
6947 workInProgress.pendingProps,
6948 null,
6949 renderExpirationTime
6950 );
6951 updateExpirationTime = workInProgress.memoizedState.element;
6952 updateExpirationTime === renderState
6953 ? (workInProgress = bailoutOnAlreadyFinishedWork(
6954 current$$1,
6955 workInProgress,
6956 renderExpirationTime
6957 ))
6958 : (reconcileChildren(
6959 current$$1,
6960 workInProgress,
6961 updateExpirationTime,
6962 renderExpirationTime
6963 ),
6964 (workInProgress = workInProgress.child));
6965 return workInProgress;
6966 case 5:
6967 return (
6968 pushHostContext(workInProgress),
6969 null === current$$1 && tryToClaimNextHydratableInstance(workInProgress),
6970 (updateExpirationTime = workInProgress.pendingProps.children),
6971 markRef(current$$1, workInProgress),
6972 reconcileChildren(
6973 current$$1,
6974 workInProgress,
6975 updateExpirationTime,
6976 renderExpirationTime
6977 ),
6978 workInProgress.child
6979 );
6980 case 6:
6981 return (
6982 null === current$$1 && tryToClaimNextHydratableInstance(workInProgress),
6983 null
6984 );
6985 case 13:
6986 return updateSuspenseComponent(
6987 current$$1,
6988 workInProgress,
6989 renderExpirationTime
6990 );
6991 case 4:
6992 return (
6993 pushHostContainer(
6994 workInProgress,
6995 workInProgress.stateNode.containerInfo
6996 ),
6997 (updateExpirationTime = workInProgress.pendingProps),
6998 null === current$$1
6999 ? (workInProgress.child = reconcileChildFibers(
7000 workInProgress,
7001 null,
7002 updateExpirationTime,
7003 renderExpirationTime
7004 ))
7005 : reconcileChildren(
7006 current$$1,
7007 workInProgress,
7008 updateExpirationTime,
7009 renderExpirationTime
7010 ),
7011 workInProgress.child
7012 );
7013 case 11:
7014 return (
7015 (updateExpirationTime = workInProgress.type),
7016 (renderState = workInProgress.pendingProps),
7017 (renderState =
7018 workInProgress.elementType === updateExpirationTime
7019 ? renderState
7020 : resolveDefaultProps(updateExpirationTime, renderState)),
7021 updateForwardRef(
7022 current$$1,
7023 workInProgress,
7024 updateExpirationTime,
7025 renderState,
7026 renderExpirationTime
7027 )
7028 );
7029 case 7:
7030 return (
7031 reconcileChildren(
7032 current$$1,
7033 workInProgress,
7034 workInProgress.pendingProps,
7035 renderExpirationTime
7036 ),
7037 workInProgress.child
7038 );
7039 case 8:
7040 return (
7041 reconcileChildren(
7042 current$$1,
7043 workInProgress,
7044 workInProgress.pendingProps.children,
7045 renderExpirationTime
7046 ),
7047 workInProgress.child
7048 );
7049 case 12:
7050 return (
7051 (workInProgress.effectTag |= 4),
7052 reconcileChildren(
7053 current$$1,
7054 workInProgress,
7055 workInProgress.pendingProps.children,
7056 renderExpirationTime
7057 ),
7058 workInProgress.child
7059 );
7060 case 10:
7061 a: {
7062 updateExpirationTime = workInProgress.type._context;
7063 renderState = workInProgress.pendingProps;
7064 getDerivedStateFromProps = workInProgress.memoizedProps;
7065 hasContext = renderState.value;
7066 pushProvider(workInProgress, hasContext);
7067 if (null !== getDerivedStateFromProps) {
7068 var oldValue = getDerivedStateFromProps.value;
7069 hasContext = is(oldValue, hasContext)
7070 ? 0
7071 : ("function" === typeof updateExpirationTime._calculateChangedBits
7072 ? updateExpirationTime._calculateChangedBits(
7073 oldValue,
7074 hasContext
7075 )
7076 : 1073741823) | 0;
7077 if (0 === hasContext) {
7078 if (
7079 getDerivedStateFromProps.children === renderState.children &&
7080 !didPerformWorkStackCursor.current
7081 ) {
7082 workInProgress = bailoutOnAlreadyFinishedWork(
7083 current$$1,
7084 workInProgress,
7085 renderExpirationTime
7086 );
7087 break a;
7088 }
7089 } else
7090 for (
7091 oldValue = workInProgress.child,
7092 null !== oldValue && (oldValue.return = workInProgress);
7093 null !== oldValue;
7094
7095 ) {
7096 var list = oldValue.dependencies;
7097 if (null !== list) {
7098 getDerivedStateFromProps = oldValue.child;
7099 for (
7100 var dependency = list.firstContext;
7101 null !== dependency;
7102
7103 ) {
7104 if (
7105 dependency.context === updateExpirationTime &&
7106 0 !== (dependency.observedBits & hasContext)
7107 ) {
7108 1 === oldValue.tag &&
7109 ((dependency = createUpdate(renderExpirationTime, null)),
7110 (dependency.tag = 2),
7111 enqueueUpdate(oldValue, dependency));
7112 oldValue.expirationTime < renderExpirationTime &&
7113 (oldValue.expirationTime = renderExpirationTime);
7114 dependency = oldValue.alternate;
7115 null !== dependency &&
7116 dependency.expirationTime < renderExpirationTime &&
7117 (dependency.expirationTime = renderExpirationTime);
7118 scheduleWorkOnParentPath(
7119 oldValue.return,
7120 renderExpirationTime
7121 );
7122 list.expirationTime < renderExpirationTime &&
7123 (list.expirationTime = renderExpirationTime);
7124 break;
7125 }
7126 dependency = dependency.next;
7127 }
7128 } else
7129 getDerivedStateFromProps =
7130 10 === oldValue.tag
7131 ? oldValue.type === workInProgress.type
7132 ? null
7133 : oldValue.child
7134 : oldValue.child;
7135 if (null !== getDerivedStateFromProps)
7136 getDerivedStateFromProps.return = oldValue;
7137 else
7138 for (
7139 getDerivedStateFromProps = oldValue;
7140 null !== getDerivedStateFromProps;
7141
7142 ) {
7143 if (getDerivedStateFromProps === workInProgress) {
7144 getDerivedStateFromProps = null;
7145 break;
7146 }
7147 oldValue = getDerivedStateFromProps.sibling;
7148 if (null !== oldValue) {
7149 oldValue.return = getDerivedStateFromProps.return;
7150 getDerivedStateFromProps = oldValue;
7151 break;
7152 }
7153 getDerivedStateFromProps = getDerivedStateFromProps.return;
7154 }
7155 oldValue = getDerivedStateFromProps;
7156 }
7157 }
7158 reconcileChildren(
7159 current$$1,
7160 workInProgress,
7161 renderState.children,
7162 renderExpirationTime
7163 );
7164 workInProgress = workInProgress.child;
7165 }
7166 return workInProgress;
7167 case 9:
7168 return (
7169 (renderState = workInProgress.type),
7170 (hasContext = workInProgress.pendingProps),
7171 (updateExpirationTime = hasContext.children),
7172 prepareToReadContext(workInProgress, renderExpirationTime),
7173 (renderState = readContext(
7174 renderState,
7175 hasContext.unstable_observedBits
7176 )),
7177 (updateExpirationTime = updateExpirationTime(renderState)),
7178 (workInProgress.effectTag |= 1),
7179 reconcileChildren(
7180 current$$1,
7181 workInProgress,
7182 updateExpirationTime,
7183 renderExpirationTime
7184 ),
7185 workInProgress.child
7186 );
7187 case 14:
7188 return (
7189 (renderState = workInProgress.type),
7190 (hasContext = resolveDefaultProps(
7191 renderState,
7192 workInProgress.pendingProps
7193 )),
7194 (hasContext = resolveDefaultProps(renderState.type, hasContext)),
7195 updateMemoComponent(
7196 current$$1,
7197 workInProgress,
7198 renderState,
7199 hasContext,
7200 updateExpirationTime,
7201 renderExpirationTime
7202 )
7203 );
7204 case 15:
7205 return updateSimpleMemoComponent(
7206 current$$1,
7207 workInProgress,
7208 workInProgress.type,
7209 workInProgress.pendingProps,
7210 updateExpirationTime,
7211 renderExpirationTime
7212 );
7213 case 17:
7214 return (
7215 (updateExpirationTime = workInProgress.type),
7216 (renderState = workInProgress.pendingProps),
7217 (renderState =
7218 workInProgress.elementType === updateExpirationTime
7219 ? renderState
7220 : resolveDefaultProps(updateExpirationTime, renderState)),
7221 null !== current$$1 &&
7222 ((current$$1.alternate = null),
7223 (workInProgress.alternate = null),
7224 (workInProgress.effectTag |= 2)),
7225 (workInProgress.tag = 1),
7226 isContextProvider(updateExpirationTime)
7227 ? ((current$$1 = !0), pushContextProvider(workInProgress))
7228 : (current$$1 = !1),
7229 prepareToReadContext(workInProgress, renderExpirationTime),
7230 constructClassInstance(
7231 workInProgress,
7232 updateExpirationTime,
7233 renderState,
7234 renderExpirationTime
7235 ),
7236 mountClassInstance(
7237 workInProgress,
7238 updateExpirationTime,
7239 renderState,
7240 renderExpirationTime
7241 ),
7242 finishClassComponent(
7243 null,
7244 workInProgress,
7245 updateExpirationTime,
7246 !0,
7247 current$$1,
7248 renderExpirationTime
7249 )
7250 );
7251 case 19:
7252 return updateSuspenseListComponent(
7253 current$$1,
7254 workInProgress,
7255 renderExpirationTime
7256 );
7257 }
7258 throw ReactError(
7259 Error(
7260 "Unknown unit of work tag. This error is likely caused by a bug in React. Please file an issue."
7261 )
7262 );
7263};
7264function scheduleInteractions(root, expirationTime, interactions) {
7265 if (0 < interactions.size) {
7266 var pendingInteractionMap = root.pendingInteractionMap,
7267 pendingInteractions = pendingInteractionMap.get(expirationTime);
7268 null != pendingInteractions
7269 ? interactions.forEach(function(interaction) {
7270 pendingInteractions.has(interaction) || interaction.__count++;
7271 pendingInteractions.add(interaction);
7272 })
7273 : (pendingInteractionMap.set(expirationTime, new Set(interactions)),
7274 interactions.forEach(function(interaction) {
7275 interaction.__count++;
7276 }));
7277 pendingInteractionMap = tracing.__subscriberRef.current;
7278 if (null !== pendingInteractionMap)
7279 pendingInteractionMap.onWorkScheduled(
7280 interactions,
7281 1e3 * expirationTime + root.interactionThreadID
7282 );
7283 }
7284}
7285function startWorkOnPendingInteractions(root, expirationTime) {
7286 var interactions = new Set();
7287 root.pendingInteractionMap.forEach(function(
7288 scheduledInteractions,
7289 scheduledExpirationTime
7290 ) {
7291 scheduledExpirationTime >= expirationTime &&
7292 scheduledInteractions.forEach(function(interaction) {
7293 return interactions.add(interaction);
7294 });
7295 });
7296 root.memoizedInteractions = interactions;
7297 if (0 < interactions.size) {
7298 var subscriber = tracing.__subscriberRef.current;
7299 if (null !== subscriber) {
7300 root = 1e3 * expirationTime + root.interactionThreadID;
7301 try {
7302 subscriber.onWorkStarted(interactions, root);
7303 } catch (error) {
7304 scheduleCallback(99, function() {
7305 throw error;
7306 });
7307 }
7308 }
7309 }
7310}
7311function finishPendingInteractions(root, committedExpirationTime) {
7312 var earliestRemainingTimeAfterCommit = root.firstPendingTime,
7313 subscriber = void 0;
7314 try {
7315 if (
7316 ((subscriber = tracing.__subscriberRef.current),
7317 null !== subscriber && 0 < root.memoizedInteractions.size)
7318 )
7319 subscriber.onWorkStopped(
7320 root.memoizedInteractions,
7321 1e3 * committedExpirationTime + root.interactionThreadID
7322 );
7323 } catch (error) {
7324 scheduleCallback(99, function() {
7325 throw error;
7326 });
7327 } finally {
7328 var pendingInteractionMap = root.pendingInteractionMap;
7329 pendingInteractionMap.forEach(function(
7330 scheduledInteractions,
7331 scheduledExpirationTime
7332 ) {
7333 scheduledExpirationTime > earliestRemainingTimeAfterCommit &&
7334 (pendingInteractionMap.delete(scheduledExpirationTime),
7335 scheduledInteractions.forEach(function(interaction) {
7336 interaction.__count--;
7337 if (null !== subscriber && 0 === interaction.__count)
7338 try {
7339 subscriber.onInteractionScheduledWorkCompleted(interaction);
7340 } catch (error) {
7341 scheduleCallback(99, function() {
7342 throw error;
7343 });
7344 }
7345 }));
7346 });
7347 }
7348}
7349var onCommitFiberRoot = null,
7350 onCommitFiberUnmount = null,
7351 isDevToolsPresent = "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__;
7352function injectInternals(internals) {
7353 if ("undefined" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) return !1;
7354 var hook = __REACT_DEVTOOLS_GLOBAL_HOOK__;
7355 if (hook.isDisabled || !hook.supportsFiber) return !0;
7356 try {
7357 var rendererID = hook.inject(internals);
7358 onCommitFiberRoot = function(root, expirationTime) {
7359 try {
7360 var didError = 64 === (root.current.effectTag & 64),
7361 currentTime = requestCurrentTime(),
7362 priorityLevel = inferPriorityFromExpirationTime(
7363 currentTime,
7364 expirationTime
7365 );
7366 hook.onCommitFiberRoot(rendererID, root, priorityLevel, didError);
7367 } catch (err) {}
7368 };
7369 onCommitFiberUnmount = function(fiber) {
7370 try {
7371 hook.onCommitFiberUnmount(rendererID, fiber);
7372 } catch (err) {}
7373 };
7374 } catch (err) {}
7375 return !0;
7376}
7377function FiberNode(tag, pendingProps, key, mode) {
7378 this.tag = tag;
7379 this.key = key;
7380 this.sibling = this.child = this.return = this.stateNode = this.type = this.elementType = null;
7381 this.index = 0;
7382 this.ref = null;
7383 this.pendingProps = pendingProps;
7384 this.dependencies = this.memoizedState = this.updateQueue = this.memoizedProps = null;
7385 this.mode = mode;
7386 this.effectTag = 0;
7387 this.lastEffect = this.firstEffect = this.nextEffect = null;
7388 this.childExpirationTime = this.expirationTime = 0;
7389 this.alternate = null;
7390 this.actualDuration = 0;
7391 this.actualStartTime = -1;
7392 this.treeBaseDuration = this.selfBaseDuration = 0;
7393}
7394function createFiber(tag, pendingProps, key, mode) {
7395 return new FiberNode(tag, pendingProps, key, mode);
7396}
7397function shouldConstruct(Component) {
7398 Component = Component.prototype;
7399 return !(!Component || !Component.isReactComponent);
7400}
7401function resolveLazyComponentTag(Component) {
7402 if ("function" === typeof Component)
7403 return shouldConstruct(Component) ? 1 : 0;
7404 if (void 0 !== Component && null !== Component) {
7405 Component = Component.$$typeof;
7406 if (Component === REACT_FORWARD_REF_TYPE) return 11;
7407 if (Component === REACT_MEMO_TYPE) return 14;
7408 }
7409 return 2;
7410}
7411function createWorkInProgress(current, pendingProps) {
7412 var workInProgress = current.alternate;
7413 null === workInProgress
7414 ? ((workInProgress = createFiber(
7415 current.tag,
7416 pendingProps,
7417 current.key,
7418 current.mode
7419 )),
7420 (workInProgress.elementType = current.elementType),
7421 (workInProgress.type = current.type),
7422 (workInProgress.stateNode = current.stateNode),
7423 (workInProgress.alternate = current),
7424 (current.alternate = workInProgress))
7425 : ((workInProgress.pendingProps = pendingProps),
7426 (workInProgress.effectTag = 0),
7427 (workInProgress.nextEffect = null),
7428 (workInProgress.firstEffect = null),
7429 (workInProgress.lastEffect = null),
7430 (workInProgress.actualDuration = 0),
7431 (workInProgress.actualStartTime = -1));
7432 workInProgress.childExpirationTime = current.childExpirationTime;
7433 workInProgress.expirationTime = current.expirationTime;
7434 workInProgress.child = current.child;
7435 workInProgress.memoizedProps = current.memoizedProps;
7436 workInProgress.memoizedState = current.memoizedState;
7437 workInProgress.updateQueue = current.updateQueue;
7438 pendingProps = current.dependencies;
7439 workInProgress.dependencies =
7440 null === pendingProps
7441 ? null
7442 : {
7443 expirationTime: pendingProps.expirationTime,
7444 firstContext: pendingProps.firstContext,
7445 responders: pendingProps.responders
7446 };
7447 workInProgress.sibling = current.sibling;
7448 workInProgress.index = current.index;
7449 workInProgress.ref = current.ref;
7450 workInProgress.selfBaseDuration = current.selfBaseDuration;
7451 workInProgress.treeBaseDuration = current.treeBaseDuration;
7452 return workInProgress;
7453}
7454function createFiberFromTypeAndProps(
7455 type,
7456 key,
7457 pendingProps,
7458 owner,
7459 mode,
7460 expirationTime
7461) {
7462 var fiberTag = 2;
7463 owner = type;
7464 if ("function" === typeof type) shouldConstruct(type) && (fiberTag = 1);
7465 else if ("string" === typeof type) fiberTag = 5;
7466 else
7467 a: switch (type) {
7468 case REACT_FRAGMENT_TYPE:
7469 return createFiberFromFragment(
7470 pendingProps.children,
7471 mode,
7472 expirationTime,
7473 key
7474 );
7475 case REACT_CONCURRENT_MODE_TYPE:
7476 fiberTag = 8;
7477 mode |= 7;
7478 break;
7479 case REACT_STRICT_MODE_TYPE:
7480 fiberTag = 8;
7481 mode |= 1;
7482 break;
7483 case REACT_PROFILER_TYPE:
7484 return (
7485 (type = createFiber(12, pendingProps, key, mode | 8)),
7486 (type.elementType = REACT_PROFILER_TYPE),
7487 (type.type = REACT_PROFILER_TYPE),
7488 (type.expirationTime = expirationTime),
7489 type
7490 );
7491 case REACT_SUSPENSE_TYPE:
7492 return (
7493 (type = createFiber(13, pendingProps, key, mode)),
7494 (type.type = REACT_SUSPENSE_TYPE),
7495 (type.elementType = REACT_SUSPENSE_TYPE),
7496 (type.expirationTime = expirationTime),
7497 type
7498 );
7499 case REACT_SUSPENSE_LIST_TYPE:
7500 return (
7501 (type = createFiber(19, pendingProps, key, mode)),
7502 (type.elementType = REACT_SUSPENSE_LIST_TYPE),
7503 (type.expirationTime = expirationTime),
7504 type
7505 );
7506 default:
7507 if ("object" === typeof type && null !== type)
7508 switch (type.$$typeof) {
7509 case REACT_PROVIDER_TYPE:
7510 fiberTag = 10;
7511 break a;
7512 case REACT_CONTEXT_TYPE:
7513 fiberTag = 9;
7514 break a;
7515 case REACT_FORWARD_REF_TYPE:
7516 fiberTag = 11;
7517 break a;
7518 case REACT_MEMO_TYPE:
7519 fiberTag = 14;
7520 break a;
7521 case REACT_LAZY_TYPE:
7522 fiberTag = 16;
7523 owner = null;
7524 break a;
7525 }
7526 throw ReactError(
7527 Error(
7528 "Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: " +
7529 (null == type ? type : typeof type) +
7530 "."
7531 )
7532 );
7533 }
7534 key = createFiber(fiberTag, pendingProps, key, mode);
7535 key.elementType = type;
7536 key.type = owner;
7537 key.expirationTime = expirationTime;
7538 return key;
7539}
7540function createFiberFromFragment(elements, mode, expirationTime, key) {
7541 elements = createFiber(7, elements, key, mode);
7542 elements.expirationTime = expirationTime;
7543 return elements;
7544}
7545function createFiberFromText(content, mode, expirationTime) {
7546 content = createFiber(6, content, null, mode);
7547 content.expirationTime = expirationTime;
7548 return content;
7549}
7550function createFiberFromPortal(portal, mode, expirationTime) {
7551 mode = createFiber(
7552 4,
7553 null !== portal.children ? portal.children : [],
7554 portal.key,
7555 mode
7556 );
7557 mode.expirationTime = expirationTime;
7558 mode.stateNode = {
7559 containerInfo: portal.containerInfo,
7560 pendingChildren: null,
7561 implementation: portal.implementation
7562 };
7563 return mode;
7564}
7565function FiberRootNode(containerInfo, tag, hydrate) {
7566 this.tag = tag;
7567 this.current = null;
7568 this.containerInfo = containerInfo;
7569 this.pingCache = this.pendingChildren = null;
7570 this.finishedExpirationTime = 0;
7571 this.finishedWork = null;
7572 this.timeoutHandle = -1;
7573 this.pendingContext = this.context = null;
7574 this.hydrate = hydrate;
7575 this.callbackNode = this.firstBatch = null;
7576 this.pingTime = this.lastPendingTime = this.firstPendingTime = this.callbackExpirationTime = 0;
7577 this.interactionThreadID = tracing.unstable_getThreadID();
7578 this.memoizedInteractions = new Set();
7579 this.pendingInteractionMap = new Map();
7580}
7581function findHostInstance(component) {
7582 var fiber = component._reactInternalFiber;
7583 if (void 0 === fiber) {
7584 if ("function" === typeof component.render)
7585 throw ReactError(Error("Unable to find node on an unmounted component."));
7586 throw ReactError(
7587 Error(
7588 "Argument appears to not be a ReactComponent. Keys: " +
7589 Object.keys(component)
7590 )
7591 );
7592 }
7593 component = findCurrentHostFiber(fiber);
7594 return null === component ? null : component.stateNode;
7595}
7596function updateContainer(element, container, parentComponent, callback) {
7597 var current$$1 = container.current,
7598 currentTime = requestCurrentTime(),
7599 suspenseConfig = ReactCurrentBatchConfig.suspense;
7600 current$$1 = computeExpirationForFiber(
7601 currentTime,
7602 current$$1,
7603 suspenseConfig
7604 );
7605 currentTime = container.current;
7606 a: if (parentComponent) {
7607 parentComponent = parentComponent._reactInternalFiber;
7608 b: {
7609 if (
7610 2 !== isFiberMountedImpl(parentComponent) ||
7611 1 !== parentComponent.tag
7612 )
7613 throw ReactError(
7614 Error(
7615 "Expected subtree parent to be a mounted class component. This error is likely caused by a bug in React. Please file an issue."
7616 )
7617 );
7618 var parentContext = parentComponent;
7619 do {
7620 switch (parentContext.tag) {
7621 case 3:
7622 parentContext = parentContext.stateNode.context;
7623 break b;
7624 case 1:
7625 if (isContextProvider(parentContext.type)) {
7626 parentContext =
7627 parentContext.stateNode
7628 .__reactInternalMemoizedMergedChildContext;
7629 break b;
7630 }
7631 }
7632 parentContext = parentContext.return;
7633 } while (null !== parentContext);
7634 throw ReactError(
7635 Error(
7636 "Found unexpected detached subtree parent. This error is likely caused by a bug in React. Please file an issue."
7637 )
7638 );
7639 }
7640 if (1 === parentComponent.tag) {
7641 var Component = parentComponent.type;
7642 if (isContextProvider(Component)) {
7643 parentComponent = processChildContext(
7644 parentComponent,
7645 Component,
7646 parentContext
7647 );
7648 break a;
7649 }
7650 }
7651 parentComponent = parentContext;
7652 } else parentComponent = emptyContextObject;
7653 null === container.context
7654 ? (container.context = parentComponent)
7655 : (container.pendingContext = parentComponent);
7656 container = callback;
7657 suspenseConfig = createUpdate(current$$1, suspenseConfig);
7658 suspenseConfig.payload = { element: element };
7659 container = void 0 === container ? null : container;
7660 null !== container && (suspenseConfig.callback = container);
7661 enqueueUpdate(currentTime, suspenseConfig);
7662 scheduleUpdateOnFiber(currentTime, current$$1);
7663 return current$$1;
7664}
7665function createPortal(children, containerInfo, implementation) {
7666 var key =
7667 3 < arguments.length && void 0 !== arguments[3] ? arguments[3] : null;
7668 return {
7669 $$typeof: REACT_PORTAL_TYPE,
7670 key: null == key ? null : "" + key,
7671 children: children,
7672 containerInfo: containerInfo,
7673 implementation: implementation
7674 };
7675}
7676function _inherits$1(subClass, superClass) {
7677 if ("function" !== typeof superClass && null !== superClass)
7678 throw new TypeError(
7679 "Super expression must either be null or a function, not " +
7680 typeof superClass
7681 );
7682 subClass.prototype = Object.create(superClass && superClass.prototype, {
7683 constructor: {
7684 value: subClass,
7685 enumerable: !1,
7686 writable: !0,
7687 configurable: !0
7688 }
7689 });
7690 superClass &&
7691 (Object.setPrototypeOf
7692 ? Object.setPrototypeOf(subClass, superClass)
7693 : (subClass.__proto__ = superClass));
7694}
7695var getInspectorDataForViewTag = void 0;
7696getInspectorDataForViewTag = function() {
7697 throw ReactError(
7698 Error("getInspectorDataForViewTag() is not available in production")
7699 );
7700};
7701var fabricDispatchCommand = nativeFabricUIManager.dispatchCommand;
7702function findNodeHandle(componentOrHandle) {
7703 if (null == componentOrHandle) return null;
7704 if ("number" === typeof componentOrHandle) return componentOrHandle;
7705 if (componentOrHandle._nativeTag) return componentOrHandle._nativeTag;
7706 if (componentOrHandle.canonical && componentOrHandle.canonical._nativeTag)
7707 return componentOrHandle.canonical._nativeTag;
7708 componentOrHandle = findHostInstance(componentOrHandle);
7709 return null == componentOrHandle
7710 ? componentOrHandle
7711 : componentOrHandle.canonical
7712 ? componentOrHandle.canonical._nativeTag
7713 : componentOrHandle._nativeTag;
7714}
7715batchedUpdatesImpl = function(fn, a) {
7716 var prevExecutionContext = executionContext;
7717 executionContext |= 1;
7718 try {
7719 return fn(a);
7720 } finally {
7721 (executionContext = prevExecutionContext),
7722 executionContext === NoContext && flushSyncCallbackQueue();
7723 }
7724};
7725flushDiscreteUpdatesImpl = function() {
7726 (executionContext & (1 | RenderContext | CommitContext)) === NoContext &&
7727 (flushPendingDiscreteUpdates(), flushPassiveEffects());
7728};
7729var roots = new Map(),
7730 ReactFabric = {
7731 NativeComponent: (function(findNodeHandle, findHostInstance) {
7732 return (function(_React$Component) {
7733 function ReactNativeComponent() {
7734 if (!(this instanceof ReactNativeComponent))
7735 throw new TypeError("Cannot call a class as a function");
7736 var call = _React$Component.apply(this, arguments);
7737 if (!this)
7738 throw new ReferenceError(
7739 "this hasn't been initialised - super() hasn't been called"
7740 );
7741 return !call ||
7742 ("object" !== typeof call && "function" !== typeof call)
7743 ? this
7744 : call;
7745 }
7746 _inherits$1(ReactNativeComponent, _React$Component);
7747 ReactNativeComponent.prototype.blur = function() {
7748 ReactNativePrivateInterface.TextInputState.blurTextInput(
7749 findNodeHandle(this)
7750 );
7751 };
7752 ReactNativeComponent.prototype.focus = function() {
7753 ReactNativePrivateInterface.TextInputState.focusTextInput(
7754 findNodeHandle(this)
7755 );
7756 };
7757 ReactNativeComponent.prototype.measure = function(callback) {
7758 var maybeInstance = void 0;
7759 try {
7760 maybeInstance = findHostInstance(this);
7761 } catch (error) {}
7762 null != maybeInstance &&
7763 (maybeInstance.canonical
7764 ? nativeFabricUIManager.measure(
7765 maybeInstance.node,
7766 mountSafeCallback_NOT_REALLY_SAFE(this, callback)
7767 )
7768 : ReactNativePrivateInterface.UIManager.measure(
7769 findNodeHandle(this),
7770 mountSafeCallback_NOT_REALLY_SAFE(this, callback)
7771 ));
7772 };
7773 ReactNativeComponent.prototype.measureInWindow = function(callback) {
7774 var maybeInstance = void 0;
7775 try {
7776 maybeInstance = findHostInstance(this);
7777 } catch (error) {}
7778 null != maybeInstance &&
7779 (maybeInstance.canonical
7780 ? nativeFabricUIManager.measureInWindow(
7781 maybeInstance.node,
7782 mountSafeCallback_NOT_REALLY_SAFE(this, callback)
7783 )
7784 : ReactNativePrivateInterface.UIManager.measureInWindow(
7785 findNodeHandle(this),
7786 mountSafeCallback_NOT_REALLY_SAFE(this, callback)
7787 ));
7788 };
7789 ReactNativeComponent.prototype.measureLayout = function(
7790 relativeToNativeNode,
7791 onSuccess,
7792 onFail
7793 ) {
7794 var maybeInstance = void 0;
7795 try {
7796 maybeInstance = findHostInstance(this);
7797 } catch (error) {}
7798 null == maybeInstance ||
7799 maybeInstance.canonical ||
7800 ((maybeInstance = void 0),
7801 "number" === typeof relativeToNativeNode
7802 ? (maybeInstance = relativeToNativeNode)
7803 : relativeToNativeNode._nativeTag &&
7804 (maybeInstance = relativeToNativeNode._nativeTag),
7805 null != maybeInstance &&
7806 ReactNativePrivateInterface.UIManager.measureLayout(
7807 findNodeHandle(this),
7808 maybeInstance,
7809 mountSafeCallback_NOT_REALLY_SAFE(this, onFail),
7810 mountSafeCallback_NOT_REALLY_SAFE(this, onSuccess)
7811 ));
7812 };
7813 ReactNativeComponent.prototype.setNativeProps = function(nativeProps) {
7814 var maybeInstance = void 0;
7815 try {
7816 maybeInstance = findHostInstance(this);
7817 } catch (error) {}
7818 if (null != maybeInstance && !maybeInstance.canonical) {
7819 var nativeTag =
7820 maybeInstance._nativeTag || maybeInstance.canonical._nativeTag;
7821 maybeInstance =
7822 maybeInstance.viewConfig || maybeInstance.canonical.viewConfig;
7823 nativeProps = diffProperties(
7824 null,
7825 emptyObject,
7826 nativeProps,
7827 maybeInstance.validAttributes
7828 );
7829 null != nativeProps &&
7830 ReactNativePrivateInterface.UIManager.updateView(
7831 nativeTag,
7832 maybeInstance.uiViewClassName,
7833 nativeProps
7834 );
7835 }
7836 };
7837 return ReactNativeComponent;
7838 })(React.Component);
7839 })(findNodeHandle, findHostInstance),
7840 findNodeHandle: findNodeHandle,
7841 setNativeProps: function() {},
7842 dispatchCommand: function(handle, command, args) {
7843 null != handle._nativeTag &&
7844 null != handle._internalInstanceHandle &&
7845 fabricDispatchCommand(
7846 handle._internalInstanceHandle.stateNode.node,
7847 command,
7848 args
7849 );
7850 },
7851 render: function(element, containerTag, callback) {
7852 var root = roots.get(containerTag);
7853 if (!root) {
7854 root = new FiberRootNode(containerTag, 0, !1);
7855 var uninitializedFiber = 0;
7856 isDevToolsPresent && (uninitializedFiber |= 8);
7857 uninitializedFiber = createFiber(3, null, null, uninitializedFiber);
7858 root.current = uninitializedFiber;
7859 uninitializedFiber.stateNode = root;
7860 roots.set(containerTag, root);
7861 }
7862 updateContainer(element, root, null, callback);
7863 a: if (((element = root.current), element.child))
7864 switch (element.child.tag) {
7865 case 5:
7866 element = element.child.stateNode.canonical;
7867 break a;
7868 default:
7869 element = element.child.stateNode;
7870 }
7871 else element = null;
7872 return element;
7873 },
7874 unmountComponentAtNode: function(containerTag) {
7875 var root = roots.get(containerTag);
7876 root &&
7877 updateContainer(null, root, null, function() {
7878 roots.delete(containerTag);
7879 });
7880 },
7881 createPortal: function(children, containerTag) {
7882 return createPortal(
7883 children,
7884 containerTag,
7885 null,
7886 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : null
7887 );
7888 },
7889 __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: {
7890 NativeMethodsMixin: (function(findNodeHandle, findHostInstance) {
7891 return {
7892 measure: function(callback) {
7893 var maybeInstance = void 0;
7894 try {
7895 maybeInstance = findHostInstance(this);
7896 } catch (error) {}
7897 null != maybeInstance &&
7898 (maybeInstance.canonical
7899 ? nativeFabricUIManager.measure(
7900 maybeInstance.node,
7901 mountSafeCallback_NOT_REALLY_SAFE(this, callback)
7902 )
7903 : ReactNativePrivateInterface.UIManager.measure(
7904 findNodeHandle(this),
7905 mountSafeCallback_NOT_REALLY_SAFE(this, callback)
7906 ));
7907 },
7908 measureInWindow: function(callback) {
7909 var maybeInstance = void 0;
7910 try {
7911 maybeInstance = findHostInstance(this);
7912 } catch (error) {}
7913 null != maybeInstance &&
7914 (maybeInstance.canonical
7915 ? nativeFabricUIManager.measureInWindow(
7916 maybeInstance.node,
7917 mountSafeCallback_NOT_REALLY_SAFE(this, callback)
7918 )
7919 : ReactNativePrivateInterface.UIManager.measureInWindow(
7920 findNodeHandle(this),
7921 mountSafeCallback_NOT_REALLY_SAFE(this, callback)
7922 ));
7923 },
7924 measureLayout: function(relativeToNativeNode, onSuccess, onFail) {
7925 var maybeInstance = void 0;
7926 try {
7927 maybeInstance = findHostInstance(this);
7928 } catch (error) {}
7929 null == maybeInstance ||
7930 maybeInstance.canonical ||
7931 ((maybeInstance = void 0),
7932 "number" === typeof relativeToNativeNode
7933 ? (maybeInstance = relativeToNativeNode)
7934 : relativeToNativeNode._nativeTag &&
7935 (maybeInstance = relativeToNativeNode._nativeTag),
7936 null != maybeInstance &&
7937 ReactNativePrivateInterface.UIManager.measureLayout(
7938 findNodeHandle(this),
7939 maybeInstance,
7940 mountSafeCallback_NOT_REALLY_SAFE(this, onFail),
7941 mountSafeCallback_NOT_REALLY_SAFE(this, onSuccess)
7942 ));
7943 },
7944 setNativeProps: function(nativeProps) {
7945 var maybeInstance = void 0;
7946 try {
7947 maybeInstance = findHostInstance(this);
7948 } catch (error) {}
7949 if (null != maybeInstance && !maybeInstance.canonical) {
7950 var nativeTag =
7951 maybeInstance._nativeTag || maybeInstance.canonical._nativeTag;
7952 maybeInstance =
7953 maybeInstance.viewConfig || maybeInstance.canonical.viewConfig;
7954 nativeProps = diffProperties(
7955 null,
7956 emptyObject,
7957 nativeProps,
7958 maybeInstance.validAttributes
7959 );
7960 null != nativeProps &&
7961 ReactNativePrivateInterface.UIManager.updateView(
7962 nativeTag,
7963 maybeInstance.uiViewClassName,
7964 nativeProps
7965 );
7966 }
7967 },
7968 focus: function() {
7969 ReactNativePrivateInterface.TextInputState.focusTextInput(
7970 findNodeHandle(this)
7971 );
7972 },
7973 blur: function() {
7974 ReactNativePrivateInterface.TextInputState.blurTextInput(
7975 findNodeHandle(this)
7976 );
7977 }
7978 };
7979 })(findNodeHandle, findHostInstance)
7980 }
7981 };
7982(function(devToolsConfig) {
7983 var findFiberByHostInstance = devToolsConfig.findFiberByHostInstance;
7984 return injectInternals(
7985 Object.assign({}, devToolsConfig, {
7986 overrideHookState: null,
7987 overrideProps: null,
7988 setSuspenseHandler: null,
7989 scheduleUpdate: null,
7990 currentDispatcherRef: ReactSharedInternals.ReactCurrentDispatcher,
7991 findHostInstanceByFiber: function(fiber) {
7992 fiber = findCurrentHostFiber(fiber);
7993 return null === fiber ? null : fiber.stateNode;
7994 },
7995 findFiberByHostInstance: function(instance) {
7996 return findFiberByHostInstance
7997 ? findFiberByHostInstance(instance)
7998 : null;
7999 },
8000 findHostInstancesForRefresh: null,
8001 scheduleRefresh: null,
8002 scheduleRoot: null,
8003 setRefreshHandler: null,
8004 getCurrentFiber: null
8005 })
8006 );
8007})({
8008 findFiberByHostInstance: getInstanceFromInstance,
8009 getInspectorDataForViewTag: getInspectorDataForViewTag,
8010 bundleType: 0,
8011 version: "16.8.6",
8012 rendererPackageName: "react-native-renderer"
8013});
8014var ReactFabric$2 = { default: ReactFabric },
8015 ReactFabric$3 = (ReactFabric$2 && ReactFabric) || ReactFabric$2;
8016module.exports = ReactFabric$3.default || ReactFabric$3;