@office-iss/react-native-win32 0.68.0 → 0.69.0-preview.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (180) hide show
  1. package/.flowconfig +1 -3
  2. package/CHANGELOG.json +356 -32
  3. package/CHANGELOG.md +150 -19
  4. package/IntegrationTests/BUCK +4 -1
  5. package/Libraries/ActionSheetIOS/ActionSheetIOS.js +7 -0
  6. package/Libraries/ActionSheetIOS/NativeActionSheetManager.js +1 -0
  7. package/Libraries/Alert/Alert.win32.js +1 -1
  8. package/Libraries/Animated/AnimatedImplementation.js +1 -1
  9. package/Libraries/Animated/NativeAnimatedHelper.js +55 -9
  10. package/Libraries/Animated/NativeAnimatedModule.js +1 -0
  11. package/Libraries/Animated/NativeAnimatedTurboModule.js +1 -0
  12. package/Libraries/Animated/animations/TimingAnimation.js +6 -11
  13. package/Libraries/Animated/createAnimatedComponent.js +2 -2
  14. package/Libraries/Animated/nodes/AnimatedColor.js +95 -29
  15. package/Libraries/Animated/nodes/AnimatedInterpolation.js +19 -22
  16. package/Libraries/Animated/nodes/AnimatedNode.js +2 -2
  17. package/Libraries/Animated/nodes/AnimatedValue.js +1 -1
  18. package/Libraries/AppState/AppState.js +1 -1
  19. package/Libraries/Blob/URL.js +7 -1
  20. package/Libraries/Components/Button.js +3 -0
  21. package/Libraries/Components/DatePickerAndroid/NativeDatePickerAndroid.js +5 -0
  22. package/Libraries/Components/Pressable/Pressable.js +3 -3
  23. package/Libraries/Components/Pressable/Pressable.win32.js +3 -3
  24. package/Libraries/Components/ScrollView/AndroidHorizontalScrollViewNativeComponent.js +47 -38
  25. package/Libraries/Components/ScrollView/ScrollContentViewNativeComponent.js +15 -7
  26. package/Libraries/Components/ScrollView/ScrollView.js +1 -1
  27. package/Libraries/Components/ScrollView/ScrollViewNativeComponent.js +16 -3
  28. package/Libraries/Components/ScrollView/ScrollViewStickyHeader.js +3 -1
  29. package/Libraries/Components/Slider/Slider.js +0 -2
  30. package/Libraries/Components/Slider/SliderNativeComponent.js +0 -1
  31. package/Libraries/Components/StatusBar/StatusBar.js +6 -1
  32. package/Libraries/Components/Switch/Switch.js +11 -1
  33. package/Libraries/Components/TextInput/AndroidTextInputNativeComponent.js +114 -109
  34. package/Libraries/Components/TextInput/RCTMultilineTextInputNativeComponent.js +17 -9
  35. package/Libraries/Components/TextInput/RCTSingelineTextInputNativeComponent.js +13 -5
  36. package/Libraries/Components/TextInput/RCTTextInputViewConfig.js +10 -0
  37. package/Libraries/Components/TextInput/TextInput.js +1 -8
  38. package/Libraries/Components/TextInput/TextInputState.js +10 -2
  39. package/Libraries/Components/TextInput/TextInputState.win32.js +10 -2
  40. package/Libraries/Components/Touchable/Tests/TouchableWin32Test.js.map +1 -1
  41. package/Libraries/Components/Touchable/TouchableBounce.js +1 -0
  42. package/Libraries/Components/Touchable/TouchableHighlight.js +1 -0
  43. package/Libraries/Components/Touchable/TouchableNativeFeedback.js +1 -0
  44. package/Libraries/Components/Touchable/TouchableOpacity.js +7 -1
  45. package/Libraries/Components/Touchable/TouchableWin32.Props.d.ts +3 -1
  46. package/Libraries/Components/Touchable/TouchableWin32.Props.js.map +1 -1
  47. package/Libraries/Components/Touchable/TouchableWithoutFeedback.js +2 -0
  48. package/Libraries/Components/View/ReactNativeViewAttributes.js +1 -0
  49. package/Libraries/Components/View/ReactNativeViewAttributes.win32.js +1 -0
  50. package/Libraries/Components/View/View.win32.js +33 -1
  51. package/Libraries/Components/View/ViewNativeComponent.js +68 -8
  52. package/Libraries/Components/View/ViewPropTypes.js +36 -4
  53. package/Libraries/Components/View/ViewPropTypes.win32.js +36 -4
  54. package/Libraries/Components/View/ViewWin32.Props.d.ts +1 -1
  55. package/Libraries/Components/View/ViewWin32.Props.js.map +1 -1
  56. package/Libraries/Core/Devtools/parseHermesStack.js +1 -1
  57. package/Libraries/Core/ExceptionsManager.js +1 -1
  58. package/Libraries/Core/RawEventEmitter.js +38 -0
  59. package/Libraries/Core/ReactNativeVersion.js +2 -2
  60. package/Libraries/Core/polyfillPromise.js +32 -0
  61. package/Libraries/Core/setUpReactDevTools.js +3 -2
  62. package/Libraries/EventEmitter/NativeEventEmitter.js +3 -3
  63. package/Libraries/EventEmitter/RCTDeviceEventEmitter.js +2 -1
  64. package/Libraries/EventEmitter/__mocks__/NativeEventEmitter.js +3 -3
  65. package/Libraries/Events/CustomEvent.js +32 -0
  66. package/Libraries/Events/EventPolyfill.js +239 -0
  67. package/Libraries/Image/Image.android.js +0 -6
  68. package/Libraries/Image/Image.ios.js +0 -6
  69. package/Libraries/Image/Image.win32.js +2 -8
  70. package/Libraries/Image/ImageViewNativeComponent.js +18 -3
  71. package/Libraries/Image/TextInlineImageNativeComponent.js +23 -15
  72. package/Libraries/Image/resolveAssetSource.win32.js +1 -1
  73. package/Libraries/Inspector/Inspector.js +2 -4
  74. package/Libraries/Inspector/Inspector.win32.js +7 -9
  75. package/Libraries/Interaction/BridgeSpyStallHandler.js +4 -3
  76. package/Libraries/Interaction/InteractionManager.js +1 -12
  77. package/Libraries/Interaction/TaskQueue.js +5 -4
  78. package/Libraries/LayoutAnimation/LayoutAnimation.js +13 -0
  79. package/Libraries/Linking/Linking.js +1 -1
  80. package/Libraries/Lists/FlatList.js +27 -6
  81. package/Libraries/Lists/VirtualizedList.js +71 -55
  82. package/Libraries/Lists/VirtualizedListContext.js +7 -3
  83. package/Libraries/Lists/VirtualizedSectionList.js +2 -2
  84. package/Libraries/Lists/__tests__/{FillRateHelper-test.windows.js → FillRateHelper-test.js} +2 -2
  85. package/Libraries/Lists/__tests__/{FlatList-test.windows.js → FlatList-test.js} +2 -2
  86. package/Libraries/Lists/__tests__/{SectionList-test.windows.js → SectionList-test.js} +14 -14
  87. package/Libraries/Lists/__tests__/{VirtualizeUtils-test.windows.js → VirtualizeUtils-test.js} +3 -3
  88. package/Libraries/Lists/__tests__/{VirtualizedList-test.windows.js → VirtualizedList-test.js} +92 -43
  89. package/Libraries/Lists/__tests__/{VirtualizedSectionList-test.windows.js → VirtualizedSectionList-test.js} +16 -14
  90. package/Libraries/LogBox/Data/LogBoxData.js +2 -2
  91. package/Libraries/LogBox/Data/LogBoxLog.js +1 -1
  92. package/Libraries/LogBox/Data/LogBoxSymbolication.js +1 -1
  93. package/Libraries/LogBox/Data/parseLogBoxLog.js +1 -1
  94. package/Libraries/LogBox/LogBox.js +2 -21
  95. package/Libraries/LogBox/UI/LogBoxInspectorFooter.js +1 -0
  96. package/Libraries/LogBox/UI/LogBoxInspectorHeader.js +2 -1
  97. package/Libraries/NativeComponent/BaseViewConfig.android.js +295 -0
  98. package/Libraries/NativeComponent/BaseViewConfig.ios.js +333 -0
  99. package/Libraries/NativeComponent/BaseViewConfig.win32.js +334 -0
  100. package/Libraries/NativeComponent/NativeComponentRegistry.js +0 -2
  101. package/Libraries/NativeComponent/PlatformBaseViewConfig.js +24 -0
  102. package/Libraries/NativeComponent/StaticViewConfigValidator.js +7 -42
  103. package/Libraries/NativeComponent/ViewConfig.js +4 -4
  104. package/Libraries/NativeComponent/ViewConfigIgnore.js +54 -0
  105. package/Libraries/Network/FormData.js +7 -1
  106. package/Libraries/Network/RCTNetworking.win32.js +1 -1
  107. package/Libraries/Pressability/Pressability.js +115 -46
  108. package/Libraries/Pressability/Pressability.win32.js +174 -69
  109. package/Libraries/Pressability/PressabilityDebug.js +5 -9
  110. package/Libraries/PushNotificationIOS/NativePushNotificationManagerIOS.js +1 -0
  111. package/Libraries/ReactNative/AppContainer.js +1 -1
  112. package/Libraries/ReactNative/{DummyUIManager.js → BridgelessUIManager.js} +62 -40
  113. package/Libraries/ReactNative/PaperUIManager.win32.js +5 -5
  114. package/Libraries/ReactNative/ReactNativeFeatureFlags.js +39 -0
  115. package/Libraries/ReactNative/UIManager.js +2 -3
  116. package/Libraries/ReactNative/renderApplication.js +4 -0
  117. package/Libraries/ReactPrivate/ReactNativePrivateInterface.js +8 -0
  118. package/Libraries/Renderer/implementations/ReactFabric-dev.js +5908 -4906
  119. package/Libraries/Renderer/implementations/ReactFabric-prod.js +2100 -1918
  120. package/Libraries/Renderer/implementations/ReactFabric-profiling.js +2567 -2352
  121. package/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js +5610 -4844
  122. package/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js +1710 -1556
  123. package/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js +1830 -1639
  124. package/Libraries/Renderer/shims/ReactNativeTypes.js +2 -1
  125. package/Libraries/Renderer/shims/ReactNativeViewConfigRegistry.js +2 -1
  126. package/Libraries/StyleSheet/EdgeInsetsPropType.js +4 -1
  127. package/Libraries/StyleSheet/StyleSheetTypes.js +59 -66
  128. package/Libraries/StyleSheet/normalizeColor.js +1 -1
  129. package/Libraries/StyleSheet/private/_StyleSheetTypesOverrides.js +15 -0
  130. package/Libraries/StyleSheet/private/_TransformStyle.js +53 -0
  131. package/Libraries/Text/Text.js +13 -7
  132. package/Libraries/Text/TextNativeComponent.js +2 -0
  133. package/Libraries/Text/TextNativeComponent.win32.js +2 -0
  134. package/Libraries/Text/TextProps.js +10 -0
  135. package/Libraries/Types/CoreEventTypes.js +13 -1
  136. package/Libraries/Types/CoreEventTypes.win32.js +26 -1
  137. package/Libraries/Utilities/Appearance.js +0 -8
  138. package/Libraries/Utilities/HMRClient.js +1 -1
  139. package/Libraries/Utilities/ReactNativeTestTools.js +1 -0
  140. package/Libraries/Utilities/codegenNativeComponent.js +17 -6
  141. package/Libraries/Utilities/stringifySafe.js +4 -1
  142. package/Libraries/Utilities/verifyComponentAttributeEquivalence.js +3 -3
  143. package/Libraries/WebSocket/WebSocket.js +1 -1
  144. package/Libraries/vendor/emitter/_EmitterSubscription.js +1 -1
  145. package/Libraries/vendor/emitter/_EventEmitter.js +1 -1
  146. package/Libraries/vendor/emitter/_EventSubscription.js +1 -1
  147. package/index.js +30 -25
  148. package/index.win32.js +30 -25
  149. package/jest/preprocessor.js +24 -107
  150. package/jest/preprocessor_DO_NOT_USE.js +122 -0
  151. package/metro.config.js +3 -47
  152. package/overrides.json +39 -46
  153. package/package.json +30 -29
  154. package/rntypes/index.d.ts +19 -7
  155. package/src/Libraries/Components/Touchable/Tests/TouchableWin32Test.tsx +1 -1
  156. package/src/Libraries/Components/Touchable/TouchableWin32.Props.tsx +3 -1
  157. package/src/Libraries/Components/View/ViewWin32.Props.ts +1 -0
  158. package/src/Libraries/Lists/__tests__/__snapshots__/FlatList-test.js.snap +427 -0
  159. package/src/Libraries/Lists/__tests__/__snapshots__/SectionList-test.js.snap +391 -0
  160. package/src/Libraries/Lists/__tests__/__snapshots__/VirtualizeUtils-test.js.snap +3 -0
  161. package/src/Libraries/Lists/__tests__/__snapshots__/VirtualizedList-test.js.snap +4565 -0
  162. package/src/Libraries/Lists/__tests__/__snapshots__/VirtualizedSectionList-test.js.snap +1153 -0
  163. package/src/rntypes/index.d.ts +19 -7
  164. package/typings-index.js +5 -1
  165. package/typings-index.js.map +1 -1
  166. package/Libraries/Components/SegmentedControlIOS/RCTSegmentedControlNativeComponent.js +0 -44
  167. package/Libraries/Components/SegmentedControlIOS/SegmentedControlIOS.android.js +0 -45
  168. package/Libraries/Components/SegmentedControlIOS/SegmentedControlIOS.ios.js +0 -123
  169. package/Libraries/Components/SegmentedControlIOS/SegmentedControlIOS.js +0 -45
  170. package/Libraries/Components/View/ReactNativeViewViewConfig.js +0 -360
  171. package/Libraries/Components/View/ReactNativeViewViewConfig.win32.js +0 -401
  172. package/Libraries/Components/View/ReactNativeViewViewConfigAndroid.js +0 -83
  173. package/Libraries/ReactNative/UIManagerInjection.js +0 -15
  174. package/Libraries/Renderer/implementations/ReactFabric-dev.fb.js +0 -24527
  175. package/Libraries/Renderer/implementations/ReactFabric-prod.fb.js +0 -8309
  176. package/Libraries/Renderer/implementations/ReactFabric-profiling.fb.js +0 -8961
  177. package/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js +0 -24948
  178. package/Libraries/Renderer/implementations/ReactNativeRenderer-prod.fb.js +0 -8400
  179. package/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.fb.js +0 -9049
  180. package/flow/Promise.js +0 -47
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (c) Meta Platforms, Inc. and affiliates.
2
+ * Copyright (c) Facebook, Inc. and its affiliates.
3
3
  *
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
@@ -8,7 +8,7 @@
8
8
  * @nolint
9
9
  * @providesModule ReactNativeRenderer-prod
10
10
  * @preventMunge
11
- * @generated SignedSource<<c288080247bc17356dfdc8cf466cc543>>
11
+ * @generated SignedSource<<08a279093988c36b477bd72fa59e144d>>
12
12
  */
13
13
 
14
14
  "use strict";
@@ -87,6 +87,7 @@ function executeDirectDispatch(event) {
87
87
  event._dispatchInstances = null;
88
88
  return dispatchListener;
89
89
  }
90
+ var assign = Object.assign;
90
91
  function functionThatReturnsTrue() {
91
92
  return !0;
92
93
  }
@@ -119,7 +120,7 @@ function SyntheticEvent(
119
120
  this.isPropagationStopped = functionThatReturnsFalse;
120
121
  return this;
121
122
  }
122
- Object.assign(SyntheticEvent.prototype, {
123
+ assign(SyntheticEvent.prototype, {
123
124
  preventDefault: function() {
124
125
  this.defaultPrevented = !0;
125
126
  var event = this.nativeEvent;
@@ -173,10 +174,10 @@ SyntheticEvent.extend = function(Interface) {
173
174
  var Super = this;
174
175
  E.prototype = Super.prototype;
175
176
  var prototype = new E();
176
- Object.assign(prototype, Class.prototype);
177
+ assign(prototype, Class.prototype);
177
178
  Class.prototype = prototype;
178
179
  Class.prototype.constructor = Class;
179
- Class.Interface = Object.assign({}, Super.Interface, Interface);
180
+ Class.Interface = assign({}, Super.Interface, Interface);
180
181
  Class.extend = Super.extend;
181
182
  addEventPoolingTo(Class);
182
183
  return Class;
@@ -783,18 +784,16 @@ function recomputePluginOrdering() {
783
784
  for (var pluginName in namesToPlugins) {
784
785
  var pluginModule = namesToPlugins[pluginName],
785
786
  pluginIndex = eventPluginOrder.indexOf(pluginName);
786
- if (!(-1 < pluginIndex))
787
+ if (-1 >= pluginIndex)
787
788
  throw Error(
788
789
  "EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `" +
789
- pluginName +
790
- "`."
790
+ (pluginName + "`.")
791
791
  );
792
792
  if (!plugins[pluginIndex]) {
793
793
  if (!pluginModule.extractEvents)
794
794
  throw Error(
795
795
  "EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `" +
796
- pluginName +
797
- "` does not."
796
+ (pluginName + "` does not.")
798
797
  );
799
798
  plugins[pluginIndex] = pluginModule;
800
799
  pluginIndex = pluginModule.eventTypes;
@@ -805,8 +804,7 @@ function recomputePluginOrdering() {
805
804
  if (eventNameDispatchConfigs.hasOwnProperty(eventName$jscomp$0))
806
805
  throw Error(
807
806
  "EventPluginRegistry: More than one plugin attempted to publish the same event name, `" +
808
- eventName$jscomp$0 +
809
- "`."
807
+ (eventName$jscomp$0 + "`.")
810
808
  );
811
809
  eventNameDispatchConfigs[eventName$jscomp$0] = dispatchConfig;
812
810
  var phasedRegistrationNames = dispatchConfig.phasedRegistrationNames;
@@ -846,18 +844,22 @@ function publishRegistrationName(registrationName, pluginModule) {
846
844
  if (registrationNameModules[registrationName])
847
845
  throw Error(
848
846
  "EventPluginRegistry: More than one plugin attempted to publish the same registration name, `" +
849
- registrationName +
850
- "`."
847
+ (registrationName + "`.")
851
848
  );
852
849
  registrationNameModules[registrationName] = pluginModule;
853
850
  }
854
851
  var plugins = [],
855
852
  eventNameDispatchConfigs = {},
856
853
  registrationNameModules = {};
857
- function getListener$1(inst, registrationName) {
858
- inst = inst.stateNode;
859
- if (null === inst) return null;
860
- inst = getFiberCurrentPropsFromNode(inst);
854
+ function getListeners(
855
+ inst,
856
+ registrationName,
857
+ phase,
858
+ dispatchToImperativeListeners
859
+ ) {
860
+ var stateNode = inst.stateNode;
861
+ if (null === stateNode) return null;
862
+ inst = getFiberCurrentPropsFromNode(stateNode);
861
863
  if (null === inst) return null;
862
864
  if ((inst = inst[registrationName]) && "function" !== typeof inst)
863
865
  throw Error(
@@ -867,7 +869,67 @@ function getListener$1(inst, registrationName) {
867
869
  typeof inst +
868
870
  "` type."
869
871
  );
870
- return inst;
872
+ if (
873
+ !(
874
+ dispatchToImperativeListeners &&
875
+ stateNode.canonical &&
876
+ stateNode.canonical._eventListeners
877
+ )
878
+ )
879
+ return inst;
880
+ var listeners = [];
881
+ inst && listeners.push(inst);
882
+ var requestedPhaseIsCapture = "captured" === phase,
883
+ mangledImperativeRegistrationName = requestedPhaseIsCapture
884
+ ? "rn:" + registrationName.replace(/Capture$/, "")
885
+ : "rn:" + registrationName;
886
+ stateNode.canonical._eventListeners[mangledImperativeRegistrationName] &&
887
+ 0 <
888
+ stateNode.canonical._eventListeners[mangledImperativeRegistrationName]
889
+ .length &&
890
+ stateNode.canonical._eventListeners[
891
+ mangledImperativeRegistrationName
892
+ ].forEach(function(listenerObj) {
893
+ if (
894
+ (null != listenerObj.options.capture && listenerObj.options.capture) ===
895
+ requestedPhaseIsCapture
896
+ ) {
897
+ var listenerFnWrapper = function(syntheticEvent) {
898
+ var eventInst = new ReactNativePrivateInterface.CustomEvent(
899
+ mangledImperativeRegistrationName,
900
+ { detail: syntheticEvent.nativeEvent }
901
+ );
902
+ eventInst.isTrusted = !0;
903
+ eventInst.setSyntheticEvent(syntheticEvent);
904
+ for (
905
+ var _len = arguments.length,
906
+ args = Array(1 < _len ? _len - 1 : 0),
907
+ _key = 1;
908
+ _key < _len;
909
+ _key++
910
+ )
911
+ args[_key - 1] = arguments[_key];
912
+ listenerObj.listener.apply(listenerObj, [eventInst].concat(args));
913
+ };
914
+ listenerObj.options.once
915
+ ? listeners.push(function() {
916
+ stateNode.canonical.removeEventListener_unstable(
917
+ mangledImperativeRegistrationName,
918
+ listenerObj.listener,
919
+ listenerObj.capture
920
+ );
921
+ listenerObj.invalidated ||
922
+ ((listenerObj.invalidated = !0),
923
+ listenerObj.listener.apply(listenerObj, arguments));
924
+ })
925
+ : listeners.push(listenerFnWrapper);
926
+ }
927
+ });
928
+ return 0 === listeners.length
929
+ ? null
930
+ : 1 === listeners.length
931
+ ? listeners[0]
932
+ : listeners;
871
933
  }
872
934
  var customBubblingEventTypes =
873
935
  ReactNativePrivateInterface.ReactNativeViewConfigRegistry
@@ -875,50 +937,74 @@ var customBubblingEventTypes =
875
937
  customDirectEventTypes =
876
938
  ReactNativePrivateInterface.ReactNativeViewConfigRegistry
877
939
  .customDirectEventTypes;
940
+ function accumulateListenersAndInstances(inst, event, listeners) {
941
+ var listenersLength = listeners
942
+ ? isArrayImpl(listeners)
943
+ ? listeners.length
944
+ : 1
945
+ : 0;
946
+ if (0 < listenersLength)
947
+ if (
948
+ ((event._dispatchListeners = accumulateInto(
949
+ event._dispatchListeners,
950
+ listeners
951
+ )),
952
+ null == event._dispatchInstances && 1 === listenersLength)
953
+ )
954
+ event._dispatchInstances = inst;
955
+ else
956
+ for (
957
+ event._dispatchInstances = event._dispatchInstances || [],
958
+ isArrayImpl(event._dispatchInstances) ||
959
+ (event._dispatchInstances = [event._dispatchInstances]),
960
+ listeners = 0;
961
+ listeners < listenersLength;
962
+ listeners++
963
+ )
964
+ event._dispatchInstances.push(inst);
965
+ }
878
966
  function accumulateDirectionalDispatches$1(inst, phase, event) {
879
- if (
880
- (phase = getListener$1(
881
- inst,
882
- event.dispatchConfig.phasedRegistrationNames[phase]
883
- ))
884
- )
885
- (event._dispatchListeners = accumulateInto(
886
- event._dispatchListeners,
887
- phase
888
- )),
889
- (event._dispatchInstances = accumulateInto(
890
- event._dispatchInstances,
891
- inst
892
- ));
967
+ phase = getListeners(
968
+ inst,
969
+ event.dispatchConfig.phasedRegistrationNames[phase],
970
+ phase,
971
+ !0
972
+ );
973
+ accumulateListenersAndInstances(inst, event, phase);
974
+ }
975
+ function traverseTwoPhase$1(inst, fn, arg, skipBubbling) {
976
+ for (var path = []; inst; ) {
977
+ path.push(inst);
978
+ do inst = inst.return;
979
+ while (inst && 5 !== inst.tag);
980
+ inst = inst ? inst : null;
981
+ }
982
+ for (inst = path.length; 0 < inst--; ) fn(path[inst], "captured", arg);
983
+ if (skipBubbling) fn(path[0], "bubbled", arg);
984
+ else
985
+ for (inst = 0; inst < path.length; inst++) fn(path[inst], "bubbled", arg);
893
986
  }
894
987
  function accumulateTwoPhaseDispatchesSingle$1(event) {
895
- if (event && event.dispatchConfig.phasedRegistrationNames) {
896
- for (var inst = event._targetInst, path = []; inst; ) {
897
- path.push(inst);
898
- do inst = inst.return;
899
- while (inst && 5 !== inst.tag);
900
- inst = inst ? inst : null;
901
- }
902
- for (inst = path.length; 0 < inst--; )
903
- accumulateDirectionalDispatches$1(path[inst], "captured", event);
904
- for (inst = 0; inst < path.length; inst++)
905
- accumulateDirectionalDispatches$1(path[inst], "bubbled", event);
906
- }
988
+ event &&
989
+ event.dispatchConfig.phasedRegistrationNames &&
990
+ traverseTwoPhase$1(
991
+ event._targetInst,
992
+ accumulateDirectionalDispatches$1,
993
+ event,
994
+ !1
995
+ );
907
996
  }
908
997
  function accumulateDirectDispatchesSingle$1(event) {
909
998
  if (event && event.dispatchConfig.registrationName) {
910
999
  var inst = event._targetInst;
911
1000
  if (inst && event && event.dispatchConfig.registrationName) {
912
- var listener = getListener$1(inst, event.dispatchConfig.registrationName);
913
- listener &&
914
- ((event._dispatchListeners = accumulateInto(
915
- event._dispatchListeners,
916
- listener
917
- )),
918
- (event._dispatchInstances = accumulateInto(
919
- event._dispatchInstances,
920
- inst
921
- )));
1001
+ var listeners = getListeners(
1002
+ inst,
1003
+ event.dispatchConfig.registrationName,
1004
+ "bubbled",
1005
+ !1
1006
+ );
1007
+ accumulateListenersAndInstances(inst, event, listeners);
922
1008
  }
923
1009
  }
924
1010
  }
@@ -931,7 +1017,7 @@ eventPluginOrder = Array.prototype.slice.call([
931
1017
  "ReactNativeBridgeEventPlugin"
932
1018
  ]);
933
1019
  recomputePluginOrdering();
934
- var injectedNamesToPlugins$jscomp$inline_219 = {
1020
+ var injectedNamesToPlugins$jscomp$inline_220 = {
935
1021
  ResponderEventPlugin: ResponderEventPlugin,
936
1022
  ReactNativeBridgeEventPlugin: {
937
1023
  eventTypes: {},
@@ -955,10 +1041,21 @@ var injectedNamesToPlugins$jscomp$inline_219 = {
955
1041
  nativeEventTarget
956
1042
  );
957
1043
  if (bubbleDispatchConfig)
958
- forEachAccumulated(
959
- topLevelType,
960
- accumulateTwoPhaseDispatchesSingle$1
961
- );
1044
+ null != topLevelType &&
1045
+ null != topLevelType.dispatchConfig.phasedRegistrationNames &&
1046
+ topLevelType.dispatchConfig.phasedRegistrationNames.skipBubbling
1047
+ ? topLevelType &&
1048
+ topLevelType.dispatchConfig.phasedRegistrationNames &&
1049
+ traverseTwoPhase$1(
1050
+ topLevelType._targetInst,
1051
+ accumulateDirectionalDispatches$1,
1052
+ topLevelType,
1053
+ !0
1054
+ )
1055
+ : forEachAccumulated(
1056
+ topLevelType,
1057
+ accumulateTwoPhaseDispatchesSingle$1
1058
+ );
962
1059
  else if (directDispatchConfig)
963
1060
  forEachAccumulated(topLevelType, accumulateDirectDispatchesSingle$1);
964
1061
  else return null;
@@ -966,34 +1063,33 @@ var injectedNamesToPlugins$jscomp$inline_219 = {
966
1063
  }
967
1064
  }
968
1065
  },
969
- isOrderingDirty$jscomp$inline_220 = !1,
970
- pluginName$jscomp$inline_221;
971
- for (pluginName$jscomp$inline_221 in injectedNamesToPlugins$jscomp$inline_219)
1066
+ isOrderingDirty$jscomp$inline_221 = !1,
1067
+ pluginName$jscomp$inline_222;
1068
+ for (pluginName$jscomp$inline_222 in injectedNamesToPlugins$jscomp$inline_220)
972
1069
  if (
973
- injectedNamesToPlugins$jscomp$inline_219.hasOwnProperty(
974
- pluginName$jscomp$inline_221
1070
+ injectedNamesToPlugins$jscomp$inline_220.hasOwnProperty(
1071
+ pluginName$jscomp$inline_222
975
1072
  )
976
1073
  ) {
977
- var pluginModule$jscomp$inline_222 =
978
- injectedNamesToPlugins$jscomp$inline_219[pluginName$jscomp$inline_221];
1074
+ var pluginModule$jscomp$inline_223 =
1075
+ injectedNamesToPlugins$jscomp$inline_220[pluginName$jscomp$inline_222];
979
1076
  if (
980
- !namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_221) ||
981
- namesToPlugins[pluginName$jscomp$inline_221] !==
982
- pluginModule$jscomp$inline_222
1077
+ !namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_222) ||
1078
+ namesToPlugins[pluginName$jscomp$inline_222] !==
1079
+ pluginModule$jscomp$inline_223
983
1080
  ) {
984
- if (namesToPlugins[pluginName$jscomp$inline_221])
1081
+ if (namesToPlugins[pluginName$jscomp$inline_222])
985
1082
  throw Error(
986
1083
  "EventPluginRegistry: Cannot inject two different event plugins using the same name, `" +
987
- pluginName$jscomp$inline_221 +
988
- "`."
1084
+ (pluginName$jscomp$inline_222 + "`.")
989
1085
  );
990
1086
  namesToPlugins[
991
- pluginName$jscomp$inline_221
992
- ] = pluginModule$jscomp$inline_222;
993
- isOrderingDirty$jscomp$inline_220 = !0;
1087
+ pluginName$jscomp$inline_222
1088
+ ] = pluginModule$jscomp$inline_223;
1089
+ isOrderingDirty$jscomp$inline_221 = !0;
994
1090
  }
995
1091
  }
996
- isOrderingDirty$jscomp$inline_220 && recomputePluginOrdering();
1092
+ isOrderingDirty$jscomp$inline_221 && recomputePluginOrdering();
997
1093
  var instanceCache = new Map(),
998
1094
  instanceProps = new Map();
999
1095
  function getInstanceFromTag(tag) {
@@ -1137,43 +1233,25 @@ ResponderEventPlugin.injection.injectGlobalResponderHandler({
1137
1233
  });
1138
1234
  var ReactSharedInternals =
1139
1235
  React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,
1140
- REACT_ELEMENT_TYPE = 60103,
1141
- REACT_PORTAL_TYPE = 60106,
1142
- REACT_FRAGMENT_TYPE = 60107,
1143
- REACT_STRICT_MODE_TYPE = 60108,
1144
- REACT_PROFILER_TYPE = 60114,
1145
- REACT_PROVIDER_TYPE = 60109,
1146
- REACT_CONTEXT_TYPE = 60110,
1147
- REACT_FORWARD_REF_TYPE = 60112,
1148
- REACT_SUSPENSE_TYPE = 60113,
1149
- REACT_SUSPENSE_LIST_TYPE = 60120,
1150
- REACT_MEMO_TYPE = 60115,
1151
- REACT_LAZY_TYPE = 60116,
1152
- REACT_DEBUG_TRACING_MODE_TYPE = 60129,
1153
- REACT_OFFSCREEN_TYPE = 60130,
1154
- REACT_LEGACY_HIDDEN_TYPE = 60131,
1155
- REACT_CACHE_TYPE = 60132;
1156
- if ("function" === typeof Symbol && Symbol.for) {
1157
- var symbolFor = Symbol.for;
1158
- REACT_ELEMENT_TYPE = symbolFor("react.element");
1159
- REACT_PORTAL_TYPE = symbolFor("react.portal");
1160
- REACT_FRAGMENT_TYPE = symbolFor("react.fragment");
1161
- REACT_STRICT_MODE_TYPE = symbolFor("react.strict_mode");
1162
- REACT_PROFILER_TYPE = symbolFor("react.profiler");
1163
- REACT_PROVIDER_TYPE = symbolFor("react.provider");
1164
- REACT_CONTEXT_TYPE = symbolFor("react.context");
1165
- REACT_FORWARD_REF_TYPE = symbolFor("react.forward_ref");
1166
- REACT_SUSPENSE_TYPE = symbolFor("react.suspense");
1167
- REACT_SUSPENSE_LIST_TYPE = symbolFor("react.suspense_list");
1168
- REACT_MEMO_TYPE = symbolFor("react.memo");
1169
- REACT_LAZY_TYPE = symbolFor("react.lazy");
1170
- symbolFor("react.scope");
1171
- REACT_DEBUG_TRACING_MODE_TYPE = symbolFor("react.debug_trace_mode");
1172
- REACT_OFFSCREEN_TYPE = symbolFor("react.offscreen");
1173
- REACT_LEGACY_HIDDEN_TYPE = symbolFor("react.legacy_hidden");
1174
- REACT_CACHE_TYPE = symbolFor("react.cache");
1175
- }
1176
- var MAYBE_ITERATOR_SYMBOL = "function" === typeof Symbol && Symbol.iterator;
1236
+ REACT_ELEMENT_TYPE = Symbol.for("react.element"),
1237
+ REACT_PORTAL_TYPE = Symbol.for("react.portal"),
1238
+ REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
1239
+ REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
1240
+ REACT_PROFILER_TYPE = Symbol.for("react.profiler"),
1241
+ REACT_PROVIDER_TYPE = Symbol.for("react.provider"),
1242
+ REACT_CONTEXT_TYPE = Symbol.for("react.context"),
1243
+ REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"),
1244
+ REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"),
1245
+ REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"),
1246
+ REACT_MEMO_TYPE = Symbol.for("react.memo"),
1247
+ REACT_LAZY_TYPE = Symbol.for("react.lazy");
1248
+ Symbol.for("react.scope");
1249
+ Symbol.for("react.debug_trace_mode");
1250
+ var REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen");
1251
+ Symbol.for("react.legacy_hidden");
1252
+ Symbol.for("react.cache");
1253
+ Symbol.for("react.tracing_marker");
1254
+ var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
1177
1255
  function getIteratorFn(maybeIterable) {
1178
1256
  if (null === maybeIterable || "object" !== typeof maybeIterable) return null;
1179
1257
  maybeIterable =
@@ -1198,8 +1276,6 @@ function getComponentNameFromType(type) {
1198
1276
  return "Suspense";
1199
1277
  case REACT_SUSPENSE_LIST_TYPE:
1200
1278
  return "SuspenseList";
1201
- case REACT_CACHE_TYPE:
1202
- return "Cache";
1203
1279
  }
1204
1280
  if ("object" === typeof type)
1205
1281
  switch (type.$$typeof) {
@@ -1260,8 +1336,6 @@ function getComponentNameFromFiber(fiber) {
1260
1336
  return "Text";
1261
1337
  case 16:
1262
1338
  return getComponentNameFromType(type);
1263
- case 23:
1264
- return "LegacyHidden";
1265
1339
  case 8:
1266
1340
  return type === REACT_STRICT_MODE_TYPE ? "StrictMode" : "Mode";
1267
1341
  case 22:
@@ -1274,6 +1348,8 @@ function getComponentNameFromFiber(fiber) {
1274
1348
  return "Suspense";
1275
1349
  case 19:
1276
1350
  return "SuspenseList";
1351
+ case 25:
1352
+ return "TracingMarker";
1277
1353
  case 1:
1278
1354
  case 0:
1279
1355
  case 17:
@@ -1294,7 +1370,7 @@ function getNearestMountedFiber(fiber) {
1294
1370
  fiber = node;
1295
1371
  do
1296
1372
  (node = fiber),
1297
- 0 !== (node.flags & 2050) && (nearestMounted = node.return),
1373
+ 0 !== (node.flags & 4098) && (nearestMounted = node.return),
1298
1374
  (fiber = node.return);
1299
1375
  while (fiber);
1300
1376
  }
@@ -1703,6 +1779,13 @@ function onCommitRoot(root) {
1703
1779
  );
1704
1780
  } catch (err) {}
1705
1781
  }
1782
+ var clz32 = Math.clz32 ? Math.clz32 : clz32Fallback,
1783
+ log = Math.log,
1784
+ LN2 = Math.LN2;
1785
+ function clz32Fallback(x) {
1786
+ x >>>= 0;
1787
+ return 0 === x ? 32 : (31 - ((log(x) / LN2) | 0)) | 0;
1788
+ }
1706
1789
  var nextTransitionLane = 64,
1707
1790
  nextRetryLane = 4194304;
1708
1791
  function getHighestPriorityLanes(lanes) {
@@ -1881,12 +1964,6 @@ function markRootEntangled(root, entangledLanes) {
1881
1964
  rootEntangledLanes &= ~lane;
1882
1965
  }
1883
1966
  }
1884
- var clz32 = Math.clz32 ? Math.clz32 : clz32Fallback,
1885
- log = Math.log,
1886
- LN2 = Math.LN2;
1887
- function clz32Fallback(lanes) {
1888
- return 0 === lanes ? 32 : (31 - ((log(lanes) / LN2) | 0)) | 0;
1889
- }
1890
1967
  var currentUpdatePriority = 0;
1891
1968
  function lanesToEventPriority(lanes) {
1892
1969
  lanes &= -lanes;
@@ -2012,7 +2089,7 @@ function processChildContext(fiber, type, parentContext) {
2012
2089
  contextKey +
2013
2090
  '" is not defined in childContextTypes.'
2014
2091
  );
2015
- return Object.assign({}, parentContext, instance);
2092
+ return assign({}, parentContext, instance);
2016
2093
  }
2017
2094
  function pushContextProvider(workInProgress) {
2018
2095
  workInProgress =
@@ -2043,7 +2120,11 @@ function invalidateContextProvider(workInProgress, type, didChange) {
2043
2120
  : pop(didPerformWorkStackCursor);
2044
2121
  push(didPerformWorkStackCursor, didChange);
2045
2122
  }
2046
- var syncQueue = null,
2123
+ function is(x, y) {
2124
+ return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);
2125
+ }
2126
+ var objectIs = "function" === typeof Object.is ? Object.is : is,
2127
+ syncQueue = null,
2047
2128
  includesLegacySyncCallbacks = !1,
2048
2129
  isFlushingSyncQueue = !1;
2049
2130
  function flushSyncCallbacks() {
@@ -2072,10 +2153,6 @@ function flushSyncCallbacks() {
2072
2153
  return null;
2073
2154
  }
2074
2155
  var ReactCurrentBatchConfig = ReactSharedInternals.ReactCurrentBatchConfig;
2075
- function is(x, y) {
2076
- return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);
2077
- }
2078
- var objectIs = "function" === typeof Object.is ? Object.is : is;
2079
2156
  function shallowEqual(objA, objB) {
2080
2157
  if (objectIs(objA, objB)) return !0;
2081
2158
  if (
@@ -2088,12 +2165,14 @@ function shallowEqual(objA, objB) {
2088
2165
  var keysA = Object.keys(objA),
2089
2166
  keysB = Object.keys(objB);
2090
2167
  if (keysA.length !== keysB.length) return !1;
2091
- for (keysB = 0; keysB < keysA.length; keysB++)
2168
+ for (keysB = 0; keysB < keysA.length; keysB++) {
2169
+ var currentKey = keysA[keysB];
2092
2170
  if (
2093
- !hasOwnProperty.call(objB, keysA[keysB]) ||
2094
- !objectIs(objA[keysA[keysB]], objB[keysA[keysB]])
2171
+ !hasOwnProperty.call(objB, currentKey) ||
2172
+ !objectIs(objA[currentKey], objB[currentKey])
2095
2173
  )
2096
2174
  return !1;
2175
+ }
2097
2176
  return !0;
2098
2177
  }
2099
2178
  function describeFiber(fiber) {
@@ -2132,7 +2211,7 @@ function getStackByFiberInDevAndProd(workInProgress) {
2132
2211
  }
2133
2212
  function resolveDefaultProps(Component, baseProps) {
2134
2213
  if (Component && Component.defaultProps) {
2135
- baseProps = Object.assign({}, baseProps);
2214
+ baseProps = assign({}, baseProps);
2136
2215
  Component = Component.defaultProps;
2137
2216
  for (var propName in Component)
2138
2217
  void 0 === baseProps[propName] &&
@@ -2153,19 +2232,16 @@ function popProvider(context) {
2153
2232
  pop(valueCursor);
2154
2233
  context._currentValue = currentValue;
2155
2234
  }
2156
- function scheduleWorkOnParentPath(parent, renderLanes) {
2235
+ function scheduleContextWorkOnParentPath(parent, renderLanes, propagationRoot) {
2157
2236
  for (; null !== parent; ) {
2158
2237
  var alternate = parent.alternate;
2159
- if ((parent.childLanes & renderLanes) === renderLanes)
2160
- if (
2161
- null === alternate ||
2162
- (alternate.childLanes & renderLanes) === renderLanes
2163
- )
2164
- break;
2165
- else alternate.childLanes |= renderLanes;
2166
- else
2167
- (parent.childLanes |= renderLanes),
2168
- null !== alternate && (alternate.childLanes |= renderLanes);
2238
+ (parent.childLanes & renderLanes) !== renderLanes
2239
+ ? ((parent.childLanes |= renderLanes),
2240
+ null !== alternate && (alternate.childLanes |= renderLanes))
2241
+ : null !== alternate &&
2242
+ (alternate.childLanes & renderLanes) !== renderLanes &&
2243
+ (alternate.childLanes |= renderLanes);
2244
+ if (parent === propagationRoot) break;
2169
2245
  parent = parent.return;
2170
2246
  }
2171
2247
  }
@@ -2235,7 +2311,7 @@ function enqueueUpdate(fiber, update) {
2235
2311
  ((updateQueue = updateQueue.shared),
2236
2312
  null !== workInProgressRoot &&
2237
2313
  0 !== (fiber.mode & 1) &&
2238
- 0 === (executionContext & 8)
2314
+ 0 === (executionContext & 2)
2239
2315
  ? ((fiber = updateQueue.interleaved),
2240
2316
  null === fiber
2241
2317
  ? ((update.next = update),
@@ -2372,7 +2448,7 @@ function processUpdateQueue(
2372
2448
  newState = workInProgress;
2373
2449
  break a;
2374
2450
  case 3:
2375
- workInProgress.flags = (workInProgress.flags & -16385) | 128;
2451
+ workInProgress.flags = (workInProgress.flags & -65537) | 128;
2376
2452
  case 0:
2377
2453
  workInProgress = update.payload;
2378
2454
  updateLane =
@@ -2380,7 +2456,7 @@ function processUpdateQueue(
2380
2456
  ? workInProgress.call(updateEventTime, newState, updateLane)
2381
2457
  : workInProgress;
2382
2458
  if (null === updateLane || void 0 === updateLane) break a;
2383
- newState = Object.assign({}, newState, updateLane);
2459
+ newState = assign({}, newState, updateLane);
2384
2460
  break a;
2385
2461
  case 2:
2386
2462
  hasForceUpdate = !0;
@@ -2467,7 +2543,7 @@ function applyDerivedStateFromProps(
2467
2543
  getDerivedStateFromProps =
2468
2544
  null === getDerivedStateFromProps || void 0 === getDerivedStateFromProps
2469
2545
  ? ctor
2470
- : Object.assign({}, ctor, getDerivedStateFromProps);
2546
+ : assign({}, ctor, getDerivedStateFromProps);
2471
2547
  workInProgress.memoizedState = getDerivedStateFromProps;
2472
2548
  0 === workInProgress.lanes &&
2473
2549
  (workInProgress.updateQueue.baseState = getDerivedStateFromProps);
@@ -2603,6 +2679,26 @@ function mountClassInstance(workInProgress, ctor, newProps, renderLanes) {
2603
2679
  "function" === typeof instance.componentDidMount &&
2604
2680
  (workInProgress.flags |= 4);
2605
2681
  }
2682
+ var forkStack = [],
2683
+ forkStackIndex = 0,
2684
+ treeForkProvider = null,
2685
+ idStack = [],
2686
+ idStackIndex = 0,
2687
+ treeContextProvider = null;
2688
+ function popTreeContext(workInProgress) {
2689
+ for (; workInProgress === treeForkProvider; )
2690
+ (treeForkProvider = forkStack[--forkStackIndex]),
2691
+ (forkStack[forkStackIndex] = null),
2692
+ --forkStackIndex,
2693
+ (forkStack[forkStackIndex] = null);
2694
+ for (; workInProgress === treeContextProvider; )
2695
+ (treeContextProvider = idStack[--idStackIndex]),
2696
+ (idStack[idStackIndex] = null),
2697
+ --idStackIndex,
2698
+ (idStack[idStackIndex] = null),
2699
+ --idStackIndex,
2700
+ (idStack[idStackIndex] = null);
2701
+ }
2606
2702
  function coerceRef(returnFiber, current, element) {
2607
2703
  returnFiber = element.ref;
2608
2704
  if (
@@ -2625,7 +2721,8 @@ function coerceRef(returnFiber, current, element) {
2625
2721
  returnFiber +
2626
2722
  ". This error is likely caused by a bug in React. Please file an issue."
2627
2723
  );
2628
- var stringRef = "" + returnFiber;
2724
+ var resolvedInst = inst,
2725
+ stringRef = "" + returnFiber;
2629
2726
  if (
2630
2727
  null !== current &&
2631
2728
  null !== current.ref &&
@@ -2634,8 +2731,8 @@ function coerceRef(returnFiber, current, element) {
2634
2731
  )
2635
2732
  return current.ref;
2636
2733
  current = function(value) {
2637
- var refs = inst.refs;
2638
- refs === emptyRefsObject && (refs = inst.refs = {});
2734
+ var refs = resolvedInst.refs;
2735
+ refs === emptyRefsObject && (refs = resolvedInst.refs = {});
2639
2736
  null === value ? delete refs[stringRef] : (refs[stringRef] = value);
2640
2737
  };
2641
2738
  current._stringRef = stringRef;
@@ -2696,7 +2793,8 @@ function ChildReconciler(shouldTrackSideEffects) {
2696
2793
  }
2697
2794
  function placeChild(newFiber, lastPlacedIndex, newIndex) {
2698
2795
  newFiber.index = newIndex;
2699
- if (!shouldTrackSideEffects) return lastPlacedIndex;
2796
+ if (!shouldTrackSideEffects)
2797
+ return (newFiber.flags |= 1048576), lastPlacedIndex;
2700
2798
  newIndex = newFiber.alternate;
2701
2799
  if (null !== newIndex)
2702
2800
  return (
@@ -2787,7 +2885,10 @@ function ChildReconciler(shouldTrackSideEffects) {
2787
2885
  return current;
2788
2886
  }
2789
2887
  function createChild(returnFiber, newChild, lanes) {
2790
- if ("string" === typeof newChild || "number" === typeof newChild)
2888
+ if (
2889
+ ("string" === typeof newChild && "" !== newChild) ||
2890
+ "number" === typeof newChild
2891
+ )
2791
2892
  return (
2792
2893
  (newChild = createFiberFromText(
2793
2894
  "" + newChild,
@@ -2841,7 +2942,10 @@ function ChildReconciler(shouldTrackSideEffects) {
2841
2942
  }
2842
2943
  function updateSlot(returnFiber, oldFiber, newChild, lanes) {
2843
2944
  var key = null !== oldFiber ? oldFiber.key : null;
2844
- if ("string" === typeof newChild || "number" === typeof newChild)
2945
+ if (
2946
+ ("string" === typeof newChild && "" !== newChild) ||
2947
+ "number" === typeof newChild
2948
+ )
2845
2949
  return null !== key
2846
2950
  ? null
2847
2951
  : updateTextNode(returnFiber, oldFiber, "" + newChild, lanes);
@@ -2871,7 +2975,10 @@ function ChildReconciler(shouldTrackSideEffects) {
2871
2975
  newChild,
2872
2976
  lanes
2873
2977
  ) {
2874
- if ("string" === typeof newChild || "number" === typeof newChild)
2978
+ if (
2979
+ ("string" === typeof newChild && "" !== newChild) ||
2980
+ "number" === typeof newChild
2981
+ )
2875
2982
  return (
2876
2983
  (existingChildren = existingChildren.get(newIdx) || null),
2877
2984
  updateTextNode(returnFiber, existingChildren, "" + newChild, lanes)
@@ -3072,60 +3179,49 @@ function ChildReconciler(shouldTrackSideEffects) {
3072
3179
  return iteratorFn;
3073
3180
  }
3074
3181
  return function(returnFiber, currentFirstChild, newChild, lanes) {
3075
- var isUnkeyedTopLevelFragment =
3076
- "object" === typeof newChild &&
3182
+ "object" === typeof newChild &&
3077
3183
  null !== newChild &&
3078
3184
  newChild.type === REACT_FRAGMENT_TYPE &&
3079
- null === newChild.key;
3080
- isUnkeyedTopLevelFragment && (newChild = newChild.props.children);
3185
+ null === newChild.key &&
3186
+ (newChild = newChild.props.children);
3081
3187
  if ("object" === typeof newChild && null !== newChild) {
3082
3188
  switch (newChild.$$typeof) {
3083
3189
  case REACT_ELEMENT_TYPE:
3084
3190
  a: {
3085
- var key = newChild.key;
3086
3191
  for (
3087
- isUnkeyedTopLevelFragment = currentFirstChild;
3088
- null !== isUnkeyedTopLevelFragment;
3192
+ var key = newChild.key, child = currentFirstChild;
3193
+ null !== child;
3089
3194
 
3090
3195
  ) {
3091
- if (isUnkeyedTopLevelFragment.key === key) {
3196
+ if (child.key === key) {
3092
3197
  key = newChild.type;
3093
3198
  if (key === REACT_FRAGMENT_TYPE) {
3094
- if (7 === isUnkeyedTopLevelFragment.tag) {
3095
- deleteRemainingChildren(
3096
- returnFiber,
3097
- isUnkeyedTopLevelFragment.sibling
3098
- );
3199
+ if (7 === child.tag) {
3200
+ deleteRemainingChildren(returnFiber, child.sibling);
3099
3201
  currentFirstChild = useFiber(
3100
- isUnkeyedTopLevelFragment,
3202
+ child,
3101
3203
  newChild.props.children
3102
3204
  );
3103
3205
  currentFirstChild.return = returnFiber;
3104
3206
  returnFiber = currentFirstChild;
3105
3207
  break a;
3106
3208
  }
3107
- } else if (isUnkeyedTopLevelFragment.elementType === key) {
3108
- deleteRemainingChildren(
3109
- returnFiber,
3110
- isUnkeyedTopLevelFragment.sibling
3111
- );
3112
- currentFirstChild = useFiber(
3113
- isUnkeyedTopLevelFragment,
3114
- newChild.props
3115
- );
3209
+ } else if (child.elementType === key) {
3210
+ deleteRemainingChildren(returnFiber, child.sibling);
3211
+ currentFirstChild = useFiber(child, newChild.props);
3116
3212
  currentFirstChild.ref = coerceRef(
3117
3213
  returnFiber,
3118
- isUnkeyedTopLevelFragment,
3214
+ child,
3119
3215
  newChild
3120
3216
  );
3121
3217
  currentFirstChild.return = returnFiber;
3122
3218
  returnFiber = currentFirstChild;
3123
3219
  break a;
3124
3220
  }
3125
- deleteRemainingChildren(returnFiber, isUnkeyedTopLevelFragment);
3221
+ deleteRemainingChildren(returnFiber, child);
3126
3222
  break;
3127
- } else deleteChild(returnFiber, isUnkeyedTopLevelFragment);
3128
- isUnkeyedTopLevelFragment = isUnkeyedTopLevelFragment.sibling;
3223
+ } else deleteChild(returnFiber, child);
3224
+ child = child.sibling;
3129
3225
  }
3130
3226
  newChild.type === REACT_FRAGMENT_TYPE
3131
3227
  ? ((currentFirstChild = createFiberFromFragment(
@@ -3155,12 +3251,8 @@ function ChildReconciler(shouldTrackSideEffects) {
3155
3251
  return placeSingleChild(returnFiber);
3156
3252
  case REACT_PORTAL_TYPE:
3157
3253
  a: {
3158
- for (
3159
- isUnkeyedTopLevelFragment = newChild.key;
3160
- null !== currentFirstChild;
3161
-
3162
- ) {
3163
- if (currentFirstChild.key === isUnkeyedTopLevelFragment)
3254
+ for (child = newChild.key; null !== currentFirstChild; ) {
3255
+ if (currentFirstChild.key === child)
3164
3256
  if (
3165
3257
  4 === currentFirstChild.tag &&
3166
3258
  currentFirstChild.stateNode.containerInfo ===
@@ -3212,9 +3304,9 @@ function ChildReconciler(shouldTrackSideEffects) {
3212
3304
  );
3213
3305
  throwOnInvalidObjectType(returnFiber, newChild);
3214
3306
  }
3215
- if ("string" === typeof newChild || "number" === typeof newChild)
3216
- return (
3217
- (newChild = "" + newChild),
3307
+ return ("string" === typeof newChild && "" !== newChild) ||
3308
+ "number" === typeof newChild
3309
+ ? ((newChild = "" + newChild),
3218
3310
  null !== currentFirstChild && 6 === currentFirstChild.tag
3219
3311
  ? (deleteRemainingChildren(returnFiber, currentFirstChild.sibling),
3220
3312
  (currentFirstChild = useFiber(currentFirstChild, newChild)),
@@ -3228,20 +3320,8 @@ function ChildReconciler(shouldTrackSideEffects) {
3228
3320
  )),
3229
3321
  (currentFirstChild.return = returnFiber),
3230
3322
  (returnFiber = currentFirstChild)),
3231
- placeSingleChild(returnFiber)
3232
- );
3233
- if ("undefined" === typeof newChild && !isUnkeyedTopLevelFragment)
3234
- switch (returnFiber.tag) {
3235
- case 1:
3236
- case 0:
3237
- case 11:
3238
- case 15:
3239
- throw Error(
3240
- (getComponentNameFromFiber(returnFiber) || "Component") +
3241
- "(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null."
3242
- );
3243
- }
3244
- return deleteRemainingChildren(returnFiber, currentFirstChild);
3323
+ placeSingleChild(returnFiber))
3324
+ : deleteRemainingChildren(returnFiber, currentFirstChild);
3245
3325
  };
3246
3326
  }
3247
3327
  var reconcileChildFibers = ChildReconciler(!0),
@@ -3328,7 +3408,8 @@ var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher,
3328
3408
  currentHook = null,
3329
3409
  workInProgressHook = null,
3330
3410
  didScheduleRenderPhaseUpdate = !1,
3331
- didScheduleRenderPhaseUpdateDuringThisPass = !1;
3411
+ didScheduleRenderPhaseUpdateDuringThisPass = !1,
3412
+ globalClientIdCounter = 0;
3332
3413
  function throwInvalidHookError() {
3333
3414
  throw Error(
3334
3415
  "Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem."
@@ -3362,7 +3443,7 @@ function renderWithHooks(
3362
3443
  nextRenderLanes = 0;
3363
3444
  do {
3364
3445
  didScheduleRenderPhaseUpdateDuringThisPass = !1;
3365
- if (!(25 > nextRenderLanes))
3446
+ if (25 <= nextRenderLanes)
3366
3447
  throw Error(
3367
3448
  "Too many re-renders. React limits the number of renders to prevent an infinite loop."
3368
3449
  );
@@ -3463,19 +3544,18 @@ function updateReducer(reducer) {
3463
3544
  (newBaseQueueLast = newBaseQueueLast.next = {
3464
3545
  lane: 0,
3465
3546
  action: update.action,
3466
- eagerReducer: update.eagerReducer,
3547
+ hasEagerState: update.hasEagerState,
3467
3548
  eagerState: update.eagerState,
3468
3549
  next: null
3469
3550
  }),
3470
- (current =
3471
- update.eagerReducer === reducer
3472
- ? update.eagerState
3473
- : reducer(current, update.action));
3551
+ (current = update.hasEagerState
3552
+ ? update.eagerState
3553
+ : reducer(current, update.action));
3474
3554
  else {
3475
3555
  var clone = {
3476
3556
  lane: updateLane,
3477
3557
  action: update.action,
3478
- eagerReducer: update.eagerReducer,
3558
+ hasEagerState: update.hasEagerState,
3479
3559
  eagerState: update.eagerState,
3480
3560
  next: null
3481
3561
  };
@@ -3532,109 +3612,77 @@ function rerenderReducer(reducer) {
3532
3612
  }
3533
3613
  return [newState, dispatch];
3534
3614
  }
3535
- function readFromUnsubcribedMutableSource(root, source, getSnapshot) {
3536
- var getVersion = source._getVersion;
3537
- getVersion = getVersion(source._source);
3538
- var JSCompiler_inline_result = source._workInProgressVersionPrimary;
3539
- if (null !== JSCompiler_inline_result)
3540
- root = JSCompiler_inline_result === getVersion;
3541
- else if (
3542
- ((root = root.mutableReadLanes), (root = (renderLanes & root) === root))
3543
- )
3544
- (source._workInProgressVersionPrimary = getVersion),
3545
- workInProgressSources.push(source);
3546
- if (root) return getSnapshot(source._source);
3547
- workInProgressSources.push(source);
3548
- throw Error(
3549
- "Cannot read from mutable source during the current render without tearing. This may be a bug in React. Please file an issue."
3550
- );
3551
- }
3552
- function useMutableSource(hook, source, getSnapshot, subscribe) {
3553
- var root = workInProgressRoot;
3554
- if (null === root)
3555
- throw Error(
3556
- "Expected a work-in-progress root. This is a bug in React. Please file an issue."
3615
+ function updateMutableSource() {}
3616
+ function updateSyncExternalStore(subscribe, getSnapshot) {
3617
+ var fiber = currentlyRenderingFiber$1,
3618
+ hook = updateWorkInProgressHook(),
3619
+ nextSnapshot = getSnapshot(),
3620
+ snapshotChanged = !objectIs(hook.memoizedState, nextSnapshot);
3621
+ snapshotChanged &&
3622
+ ((hook.memoizedState = nextSnapshot), (didReceiveUpdate = !0));
3623
+ hook = hook.queue;
3624
+ updateEffect(subscribeToStore.bind(null, fiber, hook, subscribe), [
3625
+ subscribe
3626
+ ]);
3627
+ if (
3628
+ hook.getSnapshot !== getSnapshot ||
3629
+ snapshotChanged ||
3630
+ (null !== workInProgressHook && workInProgressHook.memoizedState.tag & 1)
3631
+ ) {
3632
+ fiber.flags |= 2048;
3633
+ pushEffect(
3634
+ 9,
3635
+ updateStoreInstance.bind(null, fiber, hook, nextSnapshot, getSnapshot),
3636
+ void 0,
3637
+ null
3557
3638
  );
3558
- var getVersion = source._getVersion,
3559
- version = getVersion(source._source),
3560
- dispatcher = ReactCurrentDispatcher$1.current,
3561
- _dispatcher$useState = dispatcher.useState(function() {
3562
- return readFromUnsubcribedMutableSource(root, source, getSnapshot);
3563
- }),
3564
- setSnapshot = _dispatcher$useState[1],
3565
- snapshot = _dispatcher$useState[0];
3566
- _dispatcher$useState = workInProgressHook;
3567
- var memoizedState = hook.memoizedState,
3568
- refs = memoizedState.refs,
3569
- prevGetSnapshot = refs.getSnapshot,
3570
- prevSource = memoizedState.source;
3571
- memoizedState = memoizedState.subscribe;
3572
- var fiber = currentlyRenderingFiber$1;
3573
- hook.memoizedState = { refs: refs, source: source, subscribe: subscribe };
3574
- dispatcher.useEffect(
3575
- function() {
3576
- refs.getSnapshot = getSnapshot;
3577
- refs.setSnapshot = setSnapshot;
3578
- var maybeNewVersion = getVersion(source._source);
3579
- objectIs(version, maybeNewVersion) ||
3580
- ((maybeNewVersion = getSnapshot(source._source)),
3581
- objectIs(snapshot, maybeNewVersion) ||
3582
- (setSnapshot(maybeNewVersion),
3583
- (maybeNewVersion = requestUpdateLane(fiber)),
3584
- (root.mutableReadLanes |= maybeNewVersion & root.pendingLanes)),
3585
- markRootEntangled(root, root.mutableReadLanes));
3586
- },
3587
- [getSnapshot, source, subscribe]
3588
- );
3589
- dispatcher.useEffect(
3590
- function() {
3591
- return subscribe(source._source, function() {
3592
- var latestGetSnapshot = refs.getSnapshot,
3593
- latestSetSnapshot = refs.setSnapshot;
3594
- try {
3595
- latestSetSnapshot(latestGetSnapshot(source._source));
3596
- var lane = requestUpdateLane(fiber);
3597
- root.mutableReadLanes |= lane & root.pendingLanes;
3598
- } catch (error) {
3599
- latestSetSnapshot(function() {
3600
- throw error;
3601
- });
3602
- }
3603
- });
3604
- },
3605
- [source, subscribe]
3606
- );
3607
- (objectIs(prevGetSnapshot, getSnapshot) &&
3608
- objectIs(prevSource, source) &&
3609
- objectIs(memoizedState, subscribe)) ||
3610
- ((hook = {
3611
- pending: null,
3612
- interleaved: null,
3613
- lanes: 0,
3614
- dispatch: null,
3615
- lastRenderedReducer: basicStateReducer,
3616
- lastRenderedState: snapshot
3617
- }),
3618
- (hook.dispatch = setSnapshot = dispatchAction.bind(
3619
- null,
3620
- currentlyRenderingFiber$1,
3621
- hook
3622
- )),
3623
- (_dispatcher$useState.queue = hook),
3624
- (_dispatcher$useState.baseQueue = null),
3625
- (snapshot = readFromUnsubcribedMutableSource(root, source, getSnapshot)),
3626
- (_dispatcher$useState.memoizedState = _dispatcher$useState.baseState = snapshot));
3627
- return snapshot;
3639
+ if (null === workInProgressRoot)
3640
+ throw Error(
3641
+ "Expected a work-in-progress root. This is a bug in React. Please file an issue."
3642
+ );
3643
+ 0 !== (renderLanes & 30) ||
3644
+ pushStoreConsistencyCheck(fiber, getSnapshot, nextSnapshot);
3645
+ }
3646
+ return nextSnapshot;
3647
+ }
3648
+ function pushStoreConsistencyCheck(fiber, getSnapshot, renderedSnapshot) {
3649
+ fiber.flags |= 16384;
3650
+ fiber = { getSnapshot: getSnapshot, value: renderedSnapshot };
3651
+ getSnapshot = currentlyRenderingFiber$1.updateQueue;
3652
+ null === getSnapshot
3653
+ ? ((getSnapshot = { lastEffect: null, stores: null }),
3654
+ (currentlyRenderingFiber$1.updateQueue = getSnapshot),
3655
+ (getSnapshot.stores = [fiber]))
3656
+ : ((renderedSnapshot = getSnapshot.stores),
3657
+ null === renderedSnapshot
3658
+ ? (getSnapshot.stores = [fiber])
3659
+ : renderedSnapshot.push(fiber));
3660
+ }
3661
+ function updateStoreInstance(fiber, inst, nextSnapshot, getSnapshot) {
3662
+ inst.value = nextSnapshot;
3663
+ inst.getSnapshot = getSnapshot;
3664
+ checkIfSnapshotChanged(inst) && scheduleUpdateOnFiber(fiber, 1, -1);
3665
+ }
3666
+ function subscribeToStore(fiber, inst, subscribe) {
3667
+ return subscribe(function() {
3668
+ checkIfSnapshotChanged(inst) && scheduleUpdateOnFiber(fiber, 1, -1);
3669
+ });
3628
3670
  }
3629
- function updateMutableSource(source, getSnapshot, subscribe) {
3630
- var hook = updateWorkInProgressHook();
3631
- return useMutableSource(hook, source, getSnapshot, subscribe);
3671
+ function checkIfSnapshotChanged(inst) {
3672
+ var latestGetSnapshot = inst.getSnapshot;
3673
+ inst = inst.value;
3674
+ try {
3675
+ var nextValue = latestGetSnapshot();
3676
+ return !objectIs(inst, nextValue);
3677
+ } catch (error) {
3678
+ return !0;
3679
+ }
3632
3680
  }
3633
3681
  function mountState(initialState) {
3634
3682
  var hook = mountWorkInProgressHook();
3635
3683
  "function" === typeof initialState && (initialState = initialState());
3636
3684
  hook.memoizedState = hook.baseState = initialState;
3637
- initialState = hook.queue = {
3685
+ initialState = {
3638
3686
  pending: null,
3639
3687
  interleaved: null,
3640
3688
  lanes: 0,
@@ -3642,7 +3690,8 @@ function mountState(initialState) {
3642
3690
  lastRenderedReducer: basicStateReducer,
3643
3691
  lastRenderedState: initialState
3644
3692
  };
3645
- initialState = initialState.dispatch = dispatchAction.bind(
3693
+ hook.queue = initialState;
3694
+ initialState = initialState.dispatch = dispatchSetState.bind(
3646
3695
  null,
3647
3696
  currentlyRenderingFiber$1,
3648
3697
  initialState
@@ -3653,7 +3702,7 @@ function pushEffect(tag, create, destroy, deps) {
3653
3702
  tag = { tag: tag, create: create, destroy: destroy, deps: deps, next: null };
3654
3703
  create = currentlyRenderingFiber$1.updateQueue;
3655
3704
  null === create
3656
- ? ((create = { lastEffect: null }),
3705
+ ? ((create = { lastEffect: null, stores: null }),
3657
3706
  (currentlyRenderingFiber$1.updateQueue = create),
3658
3707
  (create.lastEffect = tag.next = tag))
3659
3708
  : ((destroy = create.lastEffect),
@@ -3694,14 +3743,17 @@ function updateEffectImpl(fiberFlags, hookFlags, create, deps) {
3694
3743
  hook.memoizedState = pushEffect(1 | hookFlags, create, destroy, deps);
3695
3744
  }
3696
3745
  function mountEffect(create, deps) {
3697
- return mountEffectImpl(1049600, 4, create, deps);
3746
+ return mountEffectImpl(8390656, 8, create, deps);
3698
3747
  }
3699
3748
  function updateEffect(create, deps) {
3700
- return updateEffectImpl(1024, 4, create, deps);
3749
+ return updateEffectImpl(2048, 8, create, deps);
3701
3750
  }
3702
- function updateLayoutEffect(create, deps) {
3751
+ function updateInsertionEffect(create, deps) {
3703
3752
  return updateEffectImpl(4, 2, create, deps);
3704
3753
  }
3754
+ function updateLayoutEffect(create, deps) {
3755
+ return updateEffectImpl(4, 4, create, deps);
3756
+ }
3705
3757
  function imperativeHandleEffect(create, ref) {
3706
3758
  if ("function" === typeof ref)
3707
3759
  return (
@@ -3724,7 +3776,7 @@ function updateImperativeHandle(ref, create, deps) {
3724
3776
  deps = null !== deps && void 0 !== deps ? deps.concat([ref]) : null;
3725
3777
  return updateEffectImpl(
3726
3778
  4,
3727
- 2,
3779
+ 4,
3728
3780
  imperativeHandleEffect.bind(null, create, ref),
3729
3781
  deps
3730
3782
  );
@@ -3763,7 +3815,7 @@ function startTransition(setPending, callback) {
3763
3815
  0 !== previousPriority && 4 > previousPriority ? previousPriority : 4;
3764
3816
  setPending(!0);
3765
3817
  var prevTransition = ReactCurrentBatchConfig$1.transition;
3766
- ReactCurrentBatchConfig$1.transition = 1;
3818
+ ReactCurrentBatchConfig$1.transition = {};
3767
3819
  try {
3768
3820
  setPending(!1), callback();
3769
3821
  } finally {
@@ -3771,47 +3823,38 @@ function startTransition(setPending, callback) {
3771
3823
  (ReactCurrentBatchConfig$1.transition = prevTransition);
3772
3824
  }
3773
3825
  }
3774
- function dispatchAction(fiber, queue, action) {
3775
- var eventTime = requestEventTime(),
3776
- lane = requestUpdateLane(fiber),
3826
+ function updateId() {
3827
+ return updateWorkInProgressHook().memoizedState;
3828
+ }
3829
+ function dispatchReducerAction(fiber, queue, action) {
3830
+ var lane = requestUpdateLane(fiber);
3831
+ action = {
3832
+ lane: lane,
3833
+ action: action,
3834
+ hasEagerState: !1,
3835
+ eagerState: null,
3836
+ next: null
3837
+ };
3838
+ isRenderPhaseUpdate(fiber)
3839
+ ? enqueueRenderPhaseUpdate(queue, action)
3840
+ : (enqueueUpdate$1(fiber, queue, action),
3841
+ (action = requestEventTime()),
3842
+ (fiber = scheduleUpdateOnFiber(fiber, lane, action)),
3843
+ null !== fiber && entangleTransitionUpdate(fiber, queue, lane));
3844
+ }
3845
+ function dispatchSetState(fiber, queue, action) {
3846
+ var lane = requestUpdateLane(fiber),
3777
3847
  update = {
3778
3848
  lane: lane,
3779
3849
  action: action,
3780
- eagerReducer: null,
3850
+ hasEagerState: !1,
3781
3851
  eagerState: null,
3782
3852
  next: null
3783
- },
3784
- alternate = fiber.alternate;
3785
- if (
3786
- fiber === currentlyRenderingFiber$1 ||
3787
- (null !== alternate && alternate === currentlyRenderingFiber$1)
3788
- )
3789
- (didScheduleRenderPhaseUpdateDuringThisPass = didScheduleRenderPhaseUpdate = !0),
3790
- (lane = queue.pending),
3791
- null === lane
3792
- ? (update.next = update)
3793
- : ((update.next = lane.next), (lane.next = update)),
3794
- (queue.pending = update);
3853
+ };
3854
+ if (isRenderPhaseUpdate(fiber)) enqueueRenderPhaseUpdate(queue, update);
3795
3855
  else {
3796
- if (
3797
- null !== workInProgressRoot &&
3798
- 0 !== (fiber.mode & 1) &&
3799
- 0 === (executionContext & 8)
3800
- ) {
3801
- var interleaved = queue.interleaved;
3802
- null === interleaved
3803
- ? ((update.next = update),
3804
- null === interleavedQueues
3805
- ? (interleavedQueues = [queue])
3806
- : interleavedQueues.push(queue))
3807
- : ((update.next = interleaved.next), (interleaved.next = update));
3808
- queue.interleaved = update;
3809
- } else
3810
- (interleaved = queue.pending),
3811
- null === interleaved
3812
- ? (update.next = update)
3813
- : ((update.next = interleaved.next), (interleaved.next = update)),
3814
- (queue.pending = update);
3856
+ enqueueUpdate$1(fiber, queue, update);
3857
+ var alternate = fiber.alternate;
3815
3858
  if (
3816
3859
  0 === fiber.lanes &&
3817
3860
  (null === alternate || 0 === alternate.lanes) &&
@@ -3820,20 +3863,57 @@ function dispatchAction(fiber, queue, action) {
3820
3863
  try {
3821
3864
  var currentState = queue.lastRenderedState,
3822
3865
  eagerState = alternate(currentState, action);
3823
- update.eagerReducer = alternate;
3866
+ update.hasEagerState = !0;
3824
3867
  update.eagerState = eagerState;
3825
3868
  if (objectIs(eagerState, currentState)) return;
3826
3869
  } catch (error) {
3827
3870
  } finally {
3828
3871
  }
3829
- update = scheduleUpdateOnFiber(fiber, lane, eventTime);
3830
- 0 !== (lane & 4194240) &&
3831
- null !== update &&
3832
- ((fiber = queue.lanes),
3833
- (fiber &= update.pendingLanes),
3834
- (lane |= fiber),
3835
- (queue.lanes = lane),
3836
- markRootEntangled(update, lane));
3872
+ action = requestEventTime();
3873
+ fiber = scheduleUpdateOnFiber(fiber, lane, action);
3874
+ null !== fiber && entangleTransitionUpdate(fiber, queue, lane);
3875
+ }
3876
+ }
3877
+ function isRenderPhaseUpdate(fiber) {
3878
+ var alternate = fiber.alternate;
3879
+ return (
3880
+ fiber === currentlyRenderingFiber$1 ||
3881
+ (null !== alternate && alternate === currentlyRenderingFiber$1)
3882
+ );
3883
+ }
3884
+ function enqueueRenderPhaseUpdate(queue, update) {
3885
+ didScheduleRenderPhaseUpdateDuringThisPass = didScheduleRenderPhaseUpdate = !0;
3886
+ var pending = queue.pending;
3887
+ null === pending
3888
+ ? (update.next = update)
3889
+ : ((update.next = pending.next), (pending.next = update));
3890
+ queue.pending = update;
3891
+ }
3892
+ function enqueueUpdate$1(fiber, queue, update) {
3893
+ null !== workInProgressRoot &&
3894
+ 0 !== (fiber.mode & 1) &&
3895
+ 0 === (executionContext & 2)
3896
+ ? ((fiber = queue.interleaved),
3897
+ null === fiber
3898
+ ? ((update.next = update),
3899
+ null === interleavedQueues
3900
+ ? (interleavedQueues = [queue])
3901
+ : interleavedQueues.push(queue))
3902
+ : ((update.next = fiber.next), (fiber.next = update)),
3903
+ (queue.interleaved = update))
3904
+ : ((fiber = queue.pending),
3905
+ null === fiber
3906
+ ? (update.next = update)
3907
+ : ((update.next = fiber.next), (fiber.next = update)),
3908
+ (queue.pending = update));
3909
+ }
3910
+ function entangleTransitionUpdate(root, queue, lane) {
3911
+ if (0 !== (lane & 4194240)) {
3912
+ var queueLanes = queue.lanes;
3913
+ queueLanes &= root.pendingLanes;
3914
+ lane |= queueLanes;
3915
+ queue.lanes = lane;
3916
+ markRootEntangled(root, lane);
3837
3917
  }
3838
3918
  }
3839
3919
  var ContextOnlyDispatcher = {
@@ -3842,6 +3922,7 @@ var ContextOnlyDispatcher = {
3842
3922
  useContext: throwInvalidHookError,
3843
3923
  useEffect: throwInvalidHookError,
3844
3924
  useImperativeHandle: throwInvalidHookError,
3925
+ useInsertionEffect: throwInvalidHookError,
3845
3926
  useLayoutEffect: throwInvalidHookError,
3846
3927
  useMemo: throwInvalidHookError,
3847
3928
  useReducer: throwInvalidHookError,
@@ -3851,7 +3932,8 @@ var ContextOnlyDispatcher = {
3851
3932
  useDeferredValue: throwInvalidHookError,
3852
3933
  useTransition: throwInvalidHookError,
3853
3934
  useMutableSource: throwInvalidHookError,
3854
- useOpaqueIdentifier: throwInvalidHookError,
3935
+ useSyncExternalStore: throwInvalidHookError,
3936
+ useId: throwInvalidHookError,
3855
3937
  unstable_isNewReconciler: !1
3856
3938
  },
3857
3939
  HooksDispatcherOnMount = {
@@ -3869,12 +3951,15 @@ var ContextOnlyDispatcher = {
3869
3951
  deps = null !== deps && void 0 !== deps ? deps.concat([ref]) : null;
3870
3952
  return mountEffectImpl(
3871
3953
  4,
3872
- 2,
3954
+ 4,
3873
3955
  imperativeHandleEffect.bind(null, create, ref),
3874
3956
  deps
3875
3957
  );
3876
3958
  },
3877
3959
  useLayoutEffect: function(create, deps) {
3960
+ return mountEffectImpl(4, 4, create, deps);
3961
+ },
3962
+ useInsertionEffect: function(create, deps) {
3878
3963
  return mountEffectImpl(4, 2, create, deps);
3879
3964
  },
3880
3965
  useMemo: function(nextCreate, deps) {
@@ -3888,7 +3973,7 @@ var ContextOnlyDispatcher = {
3888
3973
  var hook = mountWorkInProgressHook();
3889
3974
  initialArg = void 0 !== init ? init(initialArg) : initialArg;
3890
3975
  hook.memoizedState = hook.baseState = initialArg;
3891
- reducer = hook.queue = {
3976
+ reducer = {
3892
3977
  pending: null,
3893
3978
  interleaved: null,
3894
3979
  lanes: 0,
@@ -3896,7 +3981,8 @@ var ContextOnlyDispatcher = {
3896
3981
  lastRenderedReducer: reducer,
3897
3982
  lastRenderedState: initialArg
3898
3983
  };
3899
- reducer = reducer.dispatch = dispatchAction.bind(
3984
+ hook.queue = reducer;
3985
+ reducer = reducer.dispatch = dispatchReducerAction.bind(
3900
3986
  null,
3901
3987
  currentlyRenderingFiber$1,
3902
3988
  reducer
@@ -3917,7 +4003,7 @@ var ContextOnlyDispatcher = {
3917
4003
  mountEffect(
3918
4004
  function() {
3919
4005
  var prevTransition = ReactCurrentBatchConfig$1.transition;
3920
- ReactCurrentBatchConfig$1.transition = 1;
4006
+ ReactCurrentBatchConfig$1.transition = {};
3921
4007
  try {
3922
4008
  setValue(value);
3923
4009
  } finally {
@@ -3935,17 +4021,39 @@ var ContextOnlyDispatcher = {
3935
4021
  mountWorkInProgressHook().memoizedState = _mountState2;
3936
4022
  return [isPending, _mountState2];
3937
4023
  },
3938
- useMutableSource: function(source, getSnapshot, subscribe) {
3939
- var hook = mountWorkInProgressHook();
3940
- hook.memoizedState = {
3941
- refs: { getSnapshot: getSnapshot, setSnapshot: null },
3942
- source: source,
3943
- subscribe: subscribe
3944
- };
3945
- return useMutableSource(hook, source, getSnapshot, subscribe);
4024
+ useMutableSource: function() {},
4025
+ useSyncExternalStore: function(subscribe, getSnapshot) {
4026
+ var fiber = currentlyRenderingFiber$1,
4027
+ hook = mountWorkInProgressHook();
4028
+ var nextSnapshot = getSnapshot();
4029
+ if (null === workInProgressRoot)
4030
+ throw Error(
4031
+ "Expected a work-in-progress root. This is a bug in React. Please file an issue."
4032
+ );
4033
+ 0 !== (renderLanes & 30) ||
4034
+ pushStoreConsistencyCheck(fiber, getSnapshot, nextSnapshot);
4035
+ hook.memoizedState = nextSnapshot;
4036
+ var inst = { value: nextSnapshot, getSnapshot: getSnapshot };
4037
+ hook.queue = inst;
4038
+ mountEffect(subscribeToStore.bind(null, fiber, inst, subscribe), [
4039
+ subscribe
4040
+ ]);
4041
+ fiber.flags |= 2048;
4042
+ pushEffect(
4043
+ 9,
4044
+ updateStoreInstance.bind(null, fiber, inst, nextSnapshot, getSnapshot),
4045
+ void 0,
4046
+ null
4047
+ );
4048
+ return nextSnapshot;
3946
4049
  },
3947
- useOpaqueIdentifier: function() {
3948
- throw Error("Not yet implemented");
4050
+ useId: function() {
4051
+ var hook = mountWorkInProgressHook(),
4052
+ identifierPrefix = workInProgressRoot.identifierPrefix,
4053
+ globalClientId = globalClientIdCounter++;
4054
+ identifierPrefix =
4055
+ ":" + identifierPrefix + "r" + globalClientId.toString(32) + ":";
4056
+ return (hook.memoizedState = identifierPrefix);
3949
4057
  },
3950
4058
  unstable_isNewReconciler: !1
3951
4059
  },
@@ -3955,6 +4063,7 @@ var ContextOnlyDispatcher = {
3955
4063
  useContext: readContext,
3956
4064
  useEffect: updateEffect,
3957
4065
  useImperativeHandle: updateImperativeHandle,
4066
+ useInsertionEffect: updateInsertionEffect,
3958
4067
  useLayoutEffect: updateLayoutEffect,
3959
4068
  useMemo: updateMemo,
3960
4069
  useReducer: updateReducer,
@@ -3970,7 +4079,7 @@ var ContextOnlyDispatcher = {
3970
4079
  updateEffect(
3971
4080
  function() {
3972
4081
  var prevTransition = ReactCurrentBatchConfig$1.transition;
3973
- ReactCurrentBatchConfig$1.transition = 1;
4082
+ ReactCurrentBatchConfig$1.transition = {};
3974
4083
  try {
3975
4084
  setValue(value);
3976
4085
  } finally {
@@ -3987,9 +4096,8 @@ var ContextOnlyDispatcher = {
3987
4096
  return [isPending, start];
3988
4097
  },
3989
4098
  useMutableSource: updateMutableSource,
3990
- useOpaqueIdentifier: function() {
3991
- return updateReducer(basicStateReducer)[0];
3992
- },
4099
+ useSyncExternalStore: updateSyncExternalStore,
4100
+ useId: updateId,
3993
4101
  unstable_isNewReconciler: !1
3994
4102
  },
3995
4103
  HooksDispatcherOnRerender = {
@@ -3998,6 +4106,7 @@ var ContextOnlyDispatcher = {
3998
4106
  useContext: readContext,
3999
4107
  useEffect: updateEffect,
4000
4108
  useImperativeHandle: updateImperativeHandle,
4109
+ useInsertionEffect: updateInsertionEffect,
4001
4110
  useLayoutEffect: updateLayoutEffect,
4002
4111
  useMemo: updateMemo,
4003
4112
  useReducer: rerenderReducer,
@@ -4013,7 +4122,7 @@ var ContextOnlyDispatcher = {
4013
4122
  updateEffect(
4014
4123
  function() {
4015
4124
  var prevTransition = ReactCurrentBatchConfig$1.transition;
4016
- ReactCurrentBatchConfig$1.transition = 1;
4125
+ ReactCurrentBatchConfig$1.transition = {};
4017
4126
  try {
4018
4127
  setValue(value);
4019
4128
  } finally {
@@ -4030,9 +4139,8 @@ var ContextOnlyDispatcher = {
4030
4139
  return [isPending, start];
4031
4140
  },
4032
4141
  useMutableSource: updateMutableSource,
4033
- useOpaqueIdentifier: function() {
4034
- return rerenderReducer(basicStateReducer)[0];
4035
- },
4142
+ useSyncExternalStore: updateSyncExternalStore,
4143
+ useId: updateId,
4036
4144
  unstable_isNewReconciler: !1
4037
4145
  };
4038
4146
  function createCapturedValue(value, source) {
@@ -4083,19 +4191,21 @@ function createClassErrorUpdate(fiber, errorInfo, lane) {
4083
4191
  if ("function" === typeof getDerivedStateFromError) {
4084
4192
  var error = errorInfo.value;
4085
4193
  lane.payload = function() {
4086
- logCapturedError(fiber, errorInfo);
4087
4194
  return getDerivedStateFromError(error);
4088
4195
  };
4196
+ lane.callback = function() {
4197
+ logCapturedError(fiber, errorInfo);
4198
+ };
4089
4199
  }
4090
4200
  var inst = fiber.stateNode;
4091
4201
  null !== inst &&
4092
4202
  "function" === typeof inst.componentDidCatch &&
4093
4203
  (lane.callback = function() {
4204
+ logCapturedError(fiber, errorInfo);
4094
4205
  "function" !== typeof getDerivedStateFromError &&
4095
4206
  (null === legacyErrorBoundariesThatAlreadyFailed
4096
4207
  ? (legacyErrorBoundariesThatAlreadyFailed = new Set([this]))
4097
- : legacyErrorBoundariesThatAlreadyFailed.add(this),
4098
- logCapturedError(fiber, errorInfo));
4208
+ : legacyErrorBoundariesThatAlreadyFailed.add(this));
4099
4209
  var stack = errorInfo.stack;
4100
4210
  this.componentDidCatch(errorInfo.value, {
4101
4211
  componentStack: null !== stack ? stack : ""
@@ -4103,25 +4213,422 @@ function createClassErrorUpdate(fiber, errorInfo, lane) {
4103
4213
  });
4104
4214
  return lane;
4105
4215
  }
4106
- var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner,
4107
- didReceiveUpdate = !1;
4108
- function reconcileChildren(current, workInProgress, nextChildren, renderLanes) {
4109
- workInProgress.child =
4110
- null === current
4111
- ? mountChildFibers(workInProgress, null, nextChildren, renderLanes)
4112
- : reconcileChildFibers(
4113
- workInProgress,
4114
- current.child,
4115
- nextChildren,
4116
- renderLanes
4117
- );
4216
+ function attachPingListener(root, wakeable, lanes) {
4217
+ var pingCache = root.pingCache;
4218
+ if (null === pingCache) {
4219
+ pingCache = root.pingCache = new PossiblyWeakMap();
4220
+ var threadIDs = new Set();
4221
+ pingCache.set(wakeable, threadIDs);
4222
+ } else
4223
+ (threadIDs = pingCache.get(wakeable)),
4224
+ void 0 === threadIDs &&
4225
+ ((threadIDs = new Set()), pingCache.set(wakeable, threadIDs));
4226
+ threadIDs.has(lanes) ||
4227
+ (threadIDs.add(lanes),
4228
+ (root = pingSuspendedRoot.bind(null, root, wakeable, lanes)),
4229
+ wakeable.then(root, root));
4230
+ }
4231
+ var appendAllChildren, updateHostContainer, updateHostComponent, updateHostText;
4232
+ appendAllChildren = function(parent, workInProgress) {
4233
+ for (var node = workInProgress.child; null !== node; ) {
4234
+ if (5 === node.tag || 6 === node.tag) parent._children.push(node.stateNode);
4235
+ else if (4 !== node.tag && null !== node.child) {
4236
+ node.child.return = node;
4237
+ node = node.child;
4238
+ continue;
4239
+ }
4240
+ if (node === workInProgress) break;
4241
+ for (; null === node.sibling; ) {
4242
+ if (null === node.return || node.return === workInProgress) return;
4243
+ node = node.return;
4244
+ }
4245
+ node.sibling.return = node.return;
4246
+ node = node.sibling;
4247
+ }
4248
+ };
4249
+ updateHostContainer = function() {};
4250
+ updateHostComponent = function(current, workInProgress, type, newProps) {
4251
+ current.memoizedProps !== newProps &&
4252
+ (requiredContext(contextStackCursor$1.current),
4253
+ (workInProgress.updateQueue = UPDATE_SIGNAL)) &&
4254
+ (workInProgress.flags |= 4);
4255
+ };
4256
+ updateHostText = function(current, workInProgress, oldText, newText) {
4257
+ oldText !== newText && (workInProgress.flags |= 4);
4258
+ };
4259
+ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) {
4260
+ switch (renderState.tailMode) {
4261
+ case "hidden":
4262
+ hasRenderedATailFallback = renderState.tail;
4263
+ for (var lastTailNode = null; null !== hasRenderedATailFallback; )
4264
+ null !== hasRenderedATailFallback.alternate &&
4265
+ (lastTailNode = hasRenderedATailFallback),
4266
+ (hasRenderedATailFallback = hasRenderedATailFallback.sibling);
4267
+ null === lastTailNode
4268
+ ? (renderState.tail = null)
4269
+ : (lastTailNode.sibling = null);
4270
+ break;
4271
+ case "collapsed":
4272
+ lastTailNode = renderState.tail;
4273
+ for (var lastTailNode$35 = null; null !== lastTailNode; )
4274
+ null !== lastTailNode.alternate && (lastTailNode$35 = lastTailNode),
4275
+ (lastTailNode = lastTailNode.sibling);
4276
+ null === lastTailNode$35
4277
+ ? hasRenderedATailFallback || null === renderState.tail
4278
+ ? (renderState.tail = null)
4279
+ : (renderState.tail.sibling = null)
4280
+ : (lastTailNode$35.sibling = null);
4281
+ }
4118
4282
  }
4119
- function updateForwardRef(
4120
- current,
4121
- workInProgress,
4122
- Component,
4123
- nextProps,
4124
- renderLanes
4283
+ function bubbleProperties(completedWork) {
4284
+ var didBailout =
4285
+ null !== completedWork.alternate &&
4286
+ completedWork.alternate.child === completedWork.child,
4287
+ newChildLanes = 0,
4288
+ subtreeFlags = 0;
4289
+ if (didBailout)
4290
+ for (var child$36 = completedWork.child; null !== child$36; )
4291
+ (newChildLanes |= child$36.lanes | child$36.childLanes),
4292
+ (subtreeFlags |= child$36.subtreeFlags & 14680064),
4293
+ (subtreeFlags |= child$36.flags & 14680064),
4294
+ (child$36.return = completedWork),
4295
+ (child$36 = child$36.sibling);
4296
+ else
4297
+ for (child$36 = completedWork.child; null !== child$36; )
4298
+ (newChildLanes |= child$36.lanes | child$36.childLanes),
4299
+ (subtreeFlags |= child$36.subtreeFlags),
4300
+ (subtreeFlags |= child$36.flags),
4301
+ (child$36.return = completedWork),
4302
+ (child$36 = child$36.sibling);
4303
+ completedWork.subtreeFlags |= subtreeFlags;
4304
+ completedWork.childLanes = newChildLanes;
4305
+ return didBailout;
4306
+ }
4307
+ function completeWork(current, workInProgress, renderLanes) {
4308
+ var newProps = workInProgress.pendingProps;
4309
+ popTreeContext(workInProgress);
4310
+ switch (workInProgress.tag) {
4311
+ case 2:
4312
+ case 16:
4313
+ case 15:
4314
+ case 0:
4315
+ case 11:
4316
+ case 7:
4317
+ case 8:
4318
+ case 12:
4319
+ case 9:
4320
+ case 14:
4321
+ return bubbleProperties(workInProgress), null;
4322
+ case 1:
4323
+ return (
4324
+ isContextProvider(workInProgress.type) && popContext(),
4325
+ bubbleProperties(workInProgress),
4326
+ null
4327
+ );
4328
+ case 3:
4329
+ return (
4330
+ (newProps = workInProgress.stateNode),
4331
+ popHostContainer(),
4332
+ pop(didPerformWorkStackCursor),
4333
+ pop(contextStackCursor),
4334
+ resetWorkInProgressVersions(),
4335
+ newProps.pendingContext &&
4336
+ ((newProps.context = newProps.pendingContext),
4337
+ (newProps.pendingContext = null)),
4338
+ (null !== current && null !== current.child) ||
4339
+ null === current ||
4340
+ (current.memoizedState.isDehydrated &&
4341
+ 0 === (workInProgress.flags & 256)) ||
4342
+ (workInProgress.flags |= 1024),
4343
+ updateHostContainer(current, workInProgress),
4344
+ bubbleProperties(workInProgress),
4345
+ null
4346
+ );
4347
+ case 5:
4348
+ popHostContext(workInProgress);
4349
+ renderLanes = requiredContext(rootInstanceStackCursor.current);
4350
+ var type = workInProgress.type;
4351
+ if (null !== current && null != workInProgress.stateNode)
4352
+ updateHostComponent(
4353
+ current,
4354
+ workInProgress,
4355
+ type,
4356
+ newProps,
4357
+ renderLanes
4358
+ ),
4359
+ current.ref !== workInProgress.ref && (workInProgress.flags |= 512);
4360
+ else {
4361
+ if (!newProps) {
4362
+ if (null === workInProgress.stateNode)
4363
+ throw Error(
4364
+ "We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue."
4365
+ );
4366
+ bubbleProperties(workInProgress);
4367
+ return null;
4368
+ }
4369
+ requiredContext(contextStackCursor$1.current);
4370
+ current = allocateTag();
4371
+ type = getViewConfigForType(type);
4372
+ var updatePayload = diffProperties(
4373
+ null,
4374
+ emptyObject,
4375
+ newProps,
4376
+ type.validAttributes
4377
+ );
4378
+ ReactNativePrivateInterface.UIManager.createView(
4379
+ current,
4380
+ type.uiViewClassName,
4381
+ renderLanes,
4382
+ updatePayload
4383
+ );
4384
+ renderLanes = new ReactNativeFiberHostComponent(
4385
+ current,
4386
+ type,
4387
+ workInProgress
4388
+ );
4389
+ instanceCache.set(current, workInProgress);
4390
+ instanceProps.set(current, newProps);
4391
+ appendAllChildren(renderLanes, workInProgress, !1, !1);
4392
+ workInProgress.stateNode = renderLanes;
4393
+ finalizeInitialChildren(renderLanes) && (workInProgress.flags |= 4);
4394
+ null !== workInProgress.ref && (workInProgress.flags |= 512);
4395
+ }
4396
+ bubbleProperties(workInProgress);
4397
+ return null;
4398
+ case 6:
4399
+ if (current && null != workInProgress.stateNode)
4400
+ updateHostText(
4401
+ current,
4402
+ workInProgress,
4403
+ current.memoizedProps,
4404
+ newProps
4405
+ );
4406
+ else {
4407
+ if ("string" !== typeof newProps && null === workInProgress.stateNode)
4408
+ throw Error(
4409
+ "We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue."
4410
+ );
4411
+ current = requiredContext(rootInstanceStackCursor.current);
4412
+ if (!requiredContext(contextStackCursor$1.current).isInAParentText)
4413
+ throw Error(
4414
+ "Text strings must be rendered within a <Text> component."
4415
+ );
4416
+ renderLanes = allocateTag();
4417
+ ReactNativePrivateInterface.UIManager.createView(
4418
+ renderLanes,
4419
+ "RCTRawText",
4420
+ current,
4421
+ { text: newProps }
4422
+ );
4423
+ instanceCache.set(renderLanes, workInProgress);
4424
+ workInProgress.stateNode = renderLanes;
4425
+ }
4426
+ bubbleProperties(workInProgress);
4427
+ return null;
4428
+ case 13:
4429
+ pop(suspenseStackCursor);
4430
+ newProps = workInProgress.memoizedState;
4431
+ if (0 !== (workInProgress.flags & 128))
4432
+ return (workInProgress.lanes = renderLanes), workInProgress;
4433
+ renderLanes = !1;
4434
+ null !== current && (renderLanes = null !== current.memoizedState);
4435
+ null === newProps ||
4436
+ renderLanes ||
4437
+ ((workInProgress.child.flags |= 8192),
4438
+ 0 !== (workInProgress.mode & 1) &&
4439
+ (null === current || 0 !== (suspenseStackCursor.current & 1)
4440
+ ? 0 === workInProgressRootExitStatus &&
4441
+ (workInProgressRootExitStatus = 3)
4442
+ : renderDidSuspendDelayIfPossible()));
4443
+ null !== workInProgress.updateQueue && (workInProgress.flags |= 4);
4444
+ bubbleProperties(workInProgress);
4445
+ return null;
4446
+ case 4:
4447
+ return (
4448
+ popHostContainer(),
4449
+ updateHostContainer(current, workInProgress),
4450
+ bubbleProperties(workInProgress),
4451
+ null
4452
+ );
4453
+ case 10:
4454
+ return (
4455
+ popProvider(workInProgress.type._context),
4456
+ bubbleProperties(workInProgress),
4457
+ null
4458
+ );
4459
+ case 17:
4460
+ return (
4461
+ isContextProvider(workInProgress.type) && popContext(),
4462
+ bubbleProperties(workInProgress),
4463
+ null
4464
+ );
4465
+ case 19:
4466
+ pop(suspenseStackCursor);
4467
+ type = workInProgress.memoizedState;
4468
+ if (null === type) return bubbleProperties(workInProgress), null;
4469
+ newProps = 0 !== (workInProgress.flags & 128);
4470
+ updatePayload = type.rendering;
4471
+ if (null === updatePayload)
4472
+ if (newProps) cutOffTailIfNeeded(type, !1);
4473
+ else {
4474
+ if (
4475
+ 0 !== workInProgressRootExitStatus ||
4476
+ (null !== current && 0 !== (current.flags & 128))
4477
+ )
4478
+ for (current = workInProgress.child; null !== current; ) {
4479
+ updatePayload = findFirstSuspended(current);
4480
+ if (null !== updatePayload) {
4481
+ workInProgress.flags |= 128;
4482
+ cutOffTailIfNeeded(type, !1);
4483
+ current = updatePayload.updateQueue;
4484
+ null !== current &&
4485
+ ((workInProgress.updateQueue = current),
4486
+ (workInProgress.flags |= 4));
4487
+ workInProgress.subtreeFlags = 0;
4488
+ current = renderLanes;
4489
+ for (newProps = workInProgress.child; null !== newProps; )
4490
+ (renderLanes = newProps),
4491
+ (type = current),
4492
+ (renderLanes.flags &= 14680066),
4493
+ (updatePayload = renderLanes.alternate),
4494
+ null === updatePayload
4495
+ ? ((renderLanes.childLanes = 0),
4496
+ (renderLanes.lanes = type),
4497
+ (renderLanes.child = null),
4498
+ (renderLanes.subtreeFlags = 0),
4499
+ (renderLanes.memoizedProps = null),
4500
+ (renderLanes.memoizedState = null),
4501
+ (renderLanes.updateQueue = null),
4502
+ (renderLanes.dependencies = null),
4503
+ (renderLanes.stateNode = null))
4504
+ : ((renderLanes.childLanes = updatePayload.childLanes),
4505
+ (renderLanes.lanes = updatePayload.lanes),
4506
+ (renderLanes.child = updatePayload.child),
4507
+ (renderLanes.subtreeFlags = 0),
4508
+ (renderLanes.deletions = null),
4509
+ (renderLanes.memoizedProps =
4510
+ updatePayload.memoizedProps),
4511
+ (renderLanes.memoizedState =
4512
+ updatePayload.memoizedState),
4513
+ (renderLanes.updateQueue = updatePayload.updateQueue),
4514
+ (renderLanes.type = updatePayload.type),
4515
+ (type = updatePayload.dependencies),
4516
+ (renderLanes.dependencies =
4517
+ null === type
4518
+ ? null
4519
+ : {
4520
+ lanes: type.lanes,
4521
+ firstContext: type.firstContext
4522
+ })),
4523
+ (newProps = newProps.sibling);
4524
+ push(
4525
+ suspenseStackCursor,
4526
+ (suspenseStackCursor.current & 1) | 2
4527
+ );
4528
+ return workInProgress.child;
4529
+ }
4530
+ current = current.sibling;
4531
+ }
4532
+ null !== type.tail &&
4533
+ now() > workInProgressRootRenderTargetTime &&
4534
+ ((workInProgress.flags |= 128),
4535
+ (newProps = !0),
4536
+ cutOffTailIfNeeded(type, !1),
4537
+ (workInProgress.lanes = 4194304));
4538
+ }
4539
+ else {
4540
+ if (!newProps)
4541
+ if (
4542
+ ((current = findFirstSuspended(updatePayload)), null !== current)
4543
+ ) {
4544
+ if (
4545
+ ((workInProgress.flags |= 128),
4546
+ (newProps = !0),
4547
+ (current = current.updateQueue),
4548
+ null !== current &&
4549
+ ((workInProgress.updateQueue = current),
4550
+ (workInProgress.flags |= 4)),
4551
+ cutOffTailIfNeeded(type, !0),
4552
+ null === type.tail &&
4553
+ "hidden" === type.tailMode &&
4554
+ !updatePayload.alternate)
4555
+ )
4556
+ return bubbleProperties(workInProgress), null;
4557
+ } else
4558
+ 2 * now() - type.renderingStartTime >
4559
+ workInProgressRootRenderTargetTime &&
4560
+ 1073741824 !== renderLanes &&
4561
+ ((workInProgress.flags |= 128),
4562
+ (newProps = !0),
4563
+ cutOffTailIfNeeded(type, !1),
4564
+ (workInProgress.lanes = 4194304));
4565
+ type.isBackwards
4566
+ ? ((updatePayload.sibling = workInProgress.child),
4567
+ (workInProgress.child = updatePayload))
4568
+ : ((current = type.last),
4569
+ null !== current
4570
+ ? (current.sibling = updatePayload)
4571
+ : (workInProgress.child = updatePayload),
4572
+ (type.last = updatePayload));
4573
+ }
4574
+ if (null !== type.tail)
4575
+ return (
4576
+ (workInProgress = type.tail),
4577
+ (type.rendering = workInProgress),
4578
+ (type.tail = workInProgress.sibling),
4579
+ (type.renderingStartTime = now()),
4580
+ (workInProgress.sibling = null),
4581
+ (current = suspenseStackCursor.current),
4582
+ push(suspenseStackCursor, newProps ? (current & 1) | 2 : current & 1),
4583
+ workInProgress
4584
+ );
4585
+ bubbleProperties(workInProgress);
4586
+ return null;
4587
+ case 22:
4588
+ case 23:
4589
+ return (
4590
+ popRenderLanes(),
4591
+ (newProps = null !== workInProgress.memoizedState),
4592
+ null !== current &&
4593
+ (null !== current.memoizedState) !== newProps &&
4594
+ (workInProgress.flags |= 8192),
4595
+ newProps && 0 !== (workInProgress.mode & 1)
4596
+ ? 0 !== (subtreeRenderLanes & 1073741824) &&
4597
+ (bubbleProperties(workInProgress),
4598
+ workInProgress.subtreeFlags & 6 && (workInProgress.flags |= 8192))
4599
+ : bubbleProperties(workInProgress),
4600
+ null
4601
+ );
4602
+ case 24:
4603
+ return null;
4604
+ case 25:
4605
+ return null;
4606
+ }
4607
+ throw Error(
4608
+ "Unknown unit of work tag (" +
4609
+ workInProgress.tag +
4610
+ "). This error is likely caused by a bug in React. Please file an issue."
4611
+ );
4612
+ }
4613
+ var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner,
4614
+ didReceiveUpdate = !1;
4615
+ function reconcileChildren(current, workInProgress, nextChildren, renderLanes) {
4616
+ workInProgress.child =
4617
+ null === current
4618
+ ? mountChildFibers(workInProgress, null, nextChildren, renderLanes)
4619
+ : reconcileChildFibers(
4620
+ workInProgress,
4621
+ current.child,
4622
+ nextChildren,
4623
+ renderLanes
4624
+ );
4625
+ }
4626
+ function updateForwardRef(
4627
+ current,
4628
+ workInProgress,
4629
+ Component,
4630
+ nextProps,
4631
+ renderLanes
4125
4632
  ) {
4126
4633
  Component = Component.render;
4127
4634
  var ref = workInProgress.ref;
@@ -4137,7 +4644,7 @@ function updateForwardRef(
4137
4644
  if (null !== current && !didReceiveUpdate)
4138
4645
  return (
4139
4646
  (workInProgress.updateQueue = current.updateQueue),
4140
- (workInProgress.flags &= -1029),
4647
+ (workInProgress.flags &= -2053),
4141
4648
  (current.lanes &= ~renderLanes),
4142
4649
  bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes)
4143
4650
  );
@@ -4150,7 +4657,6 @@ function updateMemoComponent(
4150
4657
  workInProgress,
4151
4658
  Component,
4152
4659
  nextProps,
4153
- updateLanes,
4154
4660
  renderLanes
4155
4661
  ) {
4156
4662
  if (null === current) {
@@ -4170,7 +4676,6 @@ function updateMemoComponent(
4170
4676
  workInProgress,
4171
4677
  type,
4172
4678
  nextProps,
4173
- updateLanes,
4174
4679
  renderLanes
4175
4680
  )
4176
4681
  );
@@ -4187,14 +4692,13 @@ function updateMemoComponent(
4187
4692
  return (workInProgress.child = current);
4188
4693
  }
4189
4694
  type = current.child;
4190
- if (
4191
- 0 === (updateLanes & renderLanes) &&
4192
- ((updateLanes = type.memoizedProps),
4193
- (Component = Component.compare),
4194
- (Component = null !== Component ? Component : shallowEqual),
4195
- Component(updateLanes, nextProps) && current.ref === workInProgress.ref)
4196
- )
4197
- return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);
4695
+ if (0 === (current.lanes & renderLanes)) {
4696
+ var prevProps = type.memoizedProps;
4697
+ Component = Component.compare;
4698
+ Component = null !== Component ? Component : shallowEqual;
4699
+ if (Component(prevProps, nextProps) && current.ref === workInProgress.ref)
4700
+ return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);
4701
+ }
4198
4702
  workInProgress.flags |= 1;
4199
4703
  current = createWorkInProgress(type, nextProps);
4200
4704
  current.ref = workInProgress.ref;
@@ -4206,22 +4710,20 @@ function updateSimpleMemoComponent(
4206
4710
  workInProgress,
4207
4711
  Component,
4208
4712
  nextProps,
4209
- updateLanes,
4210
4713
  renderLanes
4211
4714
  ) {
4212
4715
  if (
4213
4716
  null !== current &&
4214
4717
  shallowEqual(current.memoizedProps, nextProps) &&
4215
4718
  current.ref === workInProgress.ref
4216
- ) {
4217
- didReceiveUpdate = !1;
4218
- if (0 === (renderLanes & updateLanes))
4719
+ )
4720
+ if (((didReceiveUpdate = !1), 0 !== (current.lanes & renderLanes)))
4721
+ 0 !== (current.flags & 131072) && (didReceiveUpdate = !0);
4722
+ else
4219
4723
  return (
4220
4724
  (workInProgress.lanes = current.lanes),
4221
4725
  bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes)
4222
4726
  );
4223
- 0 !== (current.flags & 32768) && (didReceiveUpdate = !0);
4224
- }
4225
4727
  return updateFunctionComponent(
4226
4728
  current,
4227
4729
  workInProgress,
@@ -4234,10 +4736,7 @@ function updateOffscreenComponent(current, workInProgress, renderLanes) {
4234
4736
  var nextProps = workInProgress.pendingProps,
4235
4737
  nextChildren = nextProps.children,
4236
4738
  prevState = null !== current ? current.memoizedState : null;
4237
- if (
4238
- "hidden" === nextProps.mode ||
4239
- "unstable-defer-without-hiding" === nextProps.mode
4240
- )
4739
+ if ("hidden" === nextProps.mode)
4241
4740
  if (0 === (workInProgress.mode & 1))
4242
4741
  (workInProgress.memoizedState = { baseLanes: 0, cachePool: null }),
4243
4742
  push(subtreeRenderLanesCursor, subtreeRenderLanes),
@@ -4274,13 +4773,13 @@ function updateOffscreenComponent(current, workInProgress, renderLanes) {
4274
4773
  reconcileChildren(current, workInProgress, nextChildren, renderLanes);
4275
4774
  return workInProgress.child;
4276
4775
  }
4277
- function markRef(current, workInProgress) {
4776
+ function markRef$1(current, workInProgress) {
4278
4777
  var ref = workInProgress.ref;
4279
4778
  if (
4280
4779
  (null === current && null !== ref) ||
4281
4780
  (null !== current && current.ref !== ref)
4282
4781
  )
4283
- workInProgress.flags |= 256;
4782
+ workInProgress.flags |= 512;
4284
4783
  }
4285
4784
  function updateFunctionComponent(
4286
4785
  current,
@@ -4305,7 +4804,7 @@ function updateFunctionComponent(
4305
4804
  if (null !== current && !didReceiveUpdate)
4306
4805
  return (
4307
4806
  (workInProgress.updateQueue = current.updateQueue),
4308
- (workInProgress.flags &= -1029),
4807
+ (workInProgress.flags &= -2053),
4309
4808
  (current.lanes &= ~renderLanes),
4310
4809
  bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes)
4311
4810
  );
@@ -4481,7 +4980,7 @@ function updateClassComponent(
4481
4980
  "function" === typeof instance.componentDidUpdate &&
4482
4981
  (workInProgress.flags |= 4),
4483
4982
  "function" === typeof instance.getSnapshotBeforeUpdate &&
4484
- (workInProgress.flags |= 512))
4983
+ (workInProgress.flags |= 1024))
4485
4984
  : ("function" !== typeof instance.componentDidUpdate ||
4486
4985
  (oldProps === current.memoizedProps &&
4487
4986
  oldState === current.memoizedState) ||
@@ -4489,7 +4988,7 @@ function updateClassComponent(
4489
4988
  "function" !== typeof instance.getSnapshotBeforeUpdate ||
4490
4989
  (oldProps === current.memoizedProps &&
4491
4990
  oldState === current.memoizedState) ||
4492
- (workInProgress.flags |= 512),
4991
+ (workInProgress.flags |= 1024),
4493
4992
  (workInProgress.memoizedProps = nextProps),
4494
4993
  (workInProgress.memoizedState = newState)),
4495
4994
  (instance.props = nextProps),
@@ -4503,7 +5002,7 @@ function updateClassComponent(
4503
5002
  "function" !== typeof instance.getSnapshotBeforeUpdate ||
4504
5003
  (oldProps === current.memoizedProps &&
4505
5004
  oldState === current.memoizedState) ||
4506
- (workInProgress.flags |= 512),
5005
+ (workInProgress.flags |= 1024),
4507
5006
  (nextProps = !1));
4508
5007
  }
4509
5008
  return finishClassComponent(
@@ -4523,7 +5022,7 @@ function finishClassComponent(
4523
5022
  hasContext,
4524
5023
  renderLanes
4525
5024
  ) {
4526
- markRef(current, workInProgress);
5025
+ markRef$1(current, workInProgress);
4527
5026
  var didCaptureError = 0 !== (workInProgress.flags & 128);
4528
5027
  if (!shouldUpdate && !didCaptureError)
4529
5028
  return (
@@ -4567,7 +5066,7 @@ function pushHostRootContext(workInProgress) {
4567
5066
  pushTopLevelContextObject(workInProgress, root.context, !1);
4568
5067
  pushHostContainer(workInProgress, root.containerInfo);
4569
5068
  }
4570
- var SUSPENDED_MARKER = { dehydrated: null, retryLane: 0 };
5069
+ var SUSPENDED_MARKER = { dehydrated: null, treeContext: null, retryLane: 0 };
4571
5070
  function mountSuspenseOffscreenState(renderLanes) {
4572
5071
  return { baseLanes: renderLanes, cachePool: null };
4573
5072
  }
@@ -4581,49 +5080,47 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) {
4581
5080
  null !== current && null === current.memoizedState
4582
5081
  ? !1
4583
5082
  : 0 !== (suspenseContext & 2));
4584
- JSCompiler_temp
4585
- ? ((showFallback = !0), (workInProgress.flags &= -129))
4586
- : (null !== current && null === current.memoizedState) ||
4587
- void 0 === nextProps.fallback ||
4588
- !0 === nextProps.unstable_avoidThisFallback ||
4589
- (suspenseContext |= 1);
5083
+ if (JSCompiler_temp) (showFallback = !0), (workInProgress.flags &= -129);
5084
+ else if (null === current || null !== current.memoizedState)
5085
+ suspenseContext |= 1;
4590
5086
  push(suspenseStackCursor, suspenseContext & 1);
4591
5087
  if (null === current) {
4592
- current = nextProps.children;
4593
- suspenseContext = nextProps.fallback;
5088
+ suspenseContext = nextProps.children;
5089
+ current = nextProps.fallback;
4594
5090
  if (showFallback)
4595
5091
  return (
4596
- (current = mountSuspenseFallbackChildren(
4597
- workInProgress,
4598
- current,
4599
- suspenseContext,
4600
- renderLanes
4601
- )),
4602
- (workInProgress.child.memoizedState = mountSuspenseOffscreenState(
4603
- renderLanes
4604
- )),
4605
- (workInProgress.memoizedState = SUSPENDED_MARKER),
4606
- current
4607
- );
4608
- if ("number" === typeof nextProps.unstable_expectedLoadTime)
4609
- return (
4610
- (current = mountSuspenseFallbackChildren(
4611
- workInProgress,
5092
+ (showFallback = workInProgress.mode),
5093
+ (nextProps = workInProgress.child),
5094
+ (suspenseContext = { mode: "hidden", children: suspenseContext }),
5095
+ 0 === (showFallback & 1) && null !== nextProps
5096
+ ? ((nextProps.childLanes = 0),
5097
+ (nextProps.pendingProps = suspenseContext))
5098
+ : (nextProps = createFiberFromOffscreen(
5099
+ suspenseContext,
5100
+ showFallback,
5101
+ 0,
5102
+ null
5103
+ )),
5104
+ (current = createFiberFromFragment(
4612
5105
  current,
4613
- suspenseContext,
4614
- renderLanes
5106
+ showFallback,
5107
+ renderLanes,
5108
+ null
4615
5109
  )),
5110
+ (nextProps.return = workInProgress),
5111
+ (current.return = workInProgress),
5112
+ (nextProps.sibling = current),
5113
+ (workInProgress.child = nextProps),
4616
5114
  (workInProgress.child.memoizedState = mountSuspenseOffscreenState(
4617
5115
  renderLanes
4618
5116
  )),
4619
5117
  (workInProgress.memoizedState = SUSPENDED_MARKER),
4620
- (workInProgress.lanes = 4194304),
4621
5118
  current
4622
5119
  );
4623
5120
  renderLanes = createFiberFromOffscreen(
4624
- { mode: "visible", children: current },
5121
+ { mode: "visible", children: suspenseContext },
4625
5122
  workInProgress.mode,
4626
- renderLanes,
5123
+ 0,
4627
5124
  null
4628
5125
  );
4629
5126
  renderLanes.return = workInProgress;
@@ -4632,25 +5129,25 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) {
4632
5129
  if (null !== current.memoizedState) {
4633
5130
  if (showFallback)
4634
5131
  return (
4635
- (nextProps = updateSuspenseFallbackChildren(
5132
+ (showFallback = updateSuspenseFallbackChildren(
4636
5133
  current,
4637
5134
  workInProgress,
4638
5135
  nextProps.children,
4639
5136
  nextProps.fallback,
4640
5137
  renderLanes
4641
5138
  )),
4642
- (showFallback = workInProgress.child),
5139
+ (nextProps = workInProgress.child),
4643
5140
  (suspenseContext = current.child.memoizedState),
4644
- (showFallback.memoizedState =
5141
+ (nextProps.memoizedState =
4645
5142
  null === suspenseContext
4646
5143
  ? mountSuspenseOffscreenState(renderLanes)
4647
5144
  : {
4648
5145
  baseLanes: suspenseContext.baseLanes | renderLanes,
4649
5146
  cachePool: null
4650
5147
  }),
4651
- (showFallback.childLanes = current.childLanes & ~renderLanes),
5148
+ (nextProps.childLanes = current.childLanes & ~renderLanes),
4652
5149
  (workInProgress.memoizedState = SUSPENDED_MARKER),
4653
- nextProps
5150
+ showFallback
4654
5151
  );
4655
5152
  renderLanes = updateSuspensePrimaryChildren(
4656
5153
  current,
@@ -4663,25 +5160,25 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) {
4663
5160
  }
4664
5161
  if (showFallback)
4665
5162
  return (
4666
- (nextProps = updateSuspenseFallbackChildren(
5163
+ (showFallback = updateSuspenseFallbackChildren(
4667
5164
  current,
4668
5165
  workInProgress,
4669
5166
  nextProps.children,
4670
5167
  nextProps.fallback,
4671
5168
  renderLanes
4672
5169
  )),
4673
- (showFallback = workInProgress.child),
5170
+ (nextProps = workInProgress.child),
4674
5171
  (suspenseContext = current.child.memoizedState),
4675
- (showFallback.memoizedState =
5172
+ (nextProps.memoizedState =
4676
5173
  null === suspenseContext
4677
5174
  ? mountSuspenseOffscreenState(renderLanes)
4678
5175
  : {
4679
5176
  baseLanes: suspenseContext.baseLanes | renderLanes,
4680
5177
  cachePool: null
4681
5178
  }),
4682
- (showFallback.childLanes = current.childLanes & ~renderLanes),
5179
+ (nextProps.childLanes = current.childLanes & ~renderLanes),
4683
5180
  (workInProgress.memoizedState = SUSPENDED_MARKER),
4684
- nextProps
5181
+ showFallback
4685
5182
  );
4686
5183
  renderLanes = updateSuspensePrimaryChildren(
4687
5184
  current,
@@ -4692,36 +5189,6 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) {
4692
5189
  workInProgress.memoizedState = null;
4693
5190
  return renderLanes;
4694
5191
  }
4695
- function mountSuspenseFallbackChildren(
4696
- workInProgress,
4697
- primaryChildren,
4698
- fallbackChildren,
4699
- renderLanes
4700
- ) {
4701
- var mode = workInProgress.mode,
4702
- progressedPrimaryFragment = workInProgress.child;
4703
- primaryChildren = { mode: "hidden", children: primaryChildren };
4704
- 0 === (mode & 1) && null !== progressedPrimaryFragment
4705
- ? ((progressedPrimaryFragment.childLanes = 0),
4706
- (progressedPrimaryFragment.pendingProps = primaryChildren))
4707
- : (progressedPrimaryFragment = createFiberFromOffscreen(
4708
- primaryChildren,
4709
- mode,
4710
- 0,
4711
- null
4712
- ));
4713
- fallbackChildren = createFiberFromFragment(
4714
- fallbackChildren,
4715
- mode,
4716
- renderLanes,
4717
- null
4718
- );
4719
- progressedPrimaryFragment.return = workInProgress;
4720
- fallbackChildren.return = workInProgress;
4721
- progressedPrimaryFragment.sibling = fallbackChildren;
4722
- workInProgress.child = progressedPrimaryFragment;
4723
- return fallbackChildren;
4724
- }
4725
5192
  function updateSuspensePrimaryChildren(
4726
5193
  current,
4727
5194
  workInProgress,
@@ -4761,7 +5228,7 @@ function updateSuspenseFallbackChildren(
4761
5228
  (primaryChildren.pendingProps = primaryChildProps),
4762
5229
  (workInProgress.deletions = null))
4763
5230
  : ((primaryChildren = createWorkInProgress(current, primaryChildProps)),
4764
- (primaryChildren.subtreeFlags = current.subtreeFlags & 1835008));
5231
+ (primaryChildren.subtreeFlags = current.subtreeFlags & 14680064));
4765
5232
  null !== currentFallbackChildFragment
4766
5233
  ? (fallbackChildren = createWorkInProgress(
4767
5234
  currentFallbackChildFragment,
@@ -4780,11 +5247,11 @@ function updateSuspenseFallbackChildren(
4780
5247
  workInProgress.child = primaryChildren;
4781
5248
  return fallbackChildren;
4782
5249
  }
4783
- function scheduleWorkOnFiber(fiber, renderLanes) {
5250
+ function scheduleSuspenseWorkOnFiber(fiber, renderLanes, propagationRoot) {
4784
5251
  fiber.lanes |= renderLanes;
4785
5252
  var alternate = fiber.alternate;
4786
5253
  null !== alternate && (alternate.lanes |= renderLanes);
4787
- scheduleWorkOnParentPath(fiber.return, renderLanes);
5254
+ scheduleContextWorkOnParentPath(fiber.return, renderLanes, propagationRoot);
4788
5255
  }
4789
5256
  function initSuspenseListRenderState(
4790
5257
  workInProgress,
@@ -4823,8 +5290,9 @@ function updateSuspenseListComponent(current, workInProgress, renderLanes) {
4823
5290
  a: for (current = workInProgress.child; null !== current; ) {
4824
5291
  if (13 === current.tag)
4825
5292
  null !== current.memoizedState &&
4826
- scheduleWorkOnFiber(current, renderLanes);
4827
- else if (19 === current.tag) scheduleWorkOnFiber(current, renderLanes);
5293
+ scheduleSuspenseWorkOnFiber(current, renderLanes, workInProgress);
5294
+ else if (19 === current.tag)
5295
+ scheduleSuspenseWorkOnFiber(current, renderLanes, workInProgress);
4828
5296
  else if (null !== current.child) {
4829
5297
  current.child.return = current;
4830
5298
  current = current.child;
@@ -4917,427 +5385,103 @@ function bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes) {
4917
5385
  }
4918
5386
  return workInProgress.child;
4919
5387
  }
4920
- var appendAllChildren,
4921
- updateHostContainer,
4922
- updateHostComponent$1,
4923
- updateHostText$1;
4924
- appendAllChildren = function(parent, workInProgress) {
4925
- for (var node = workInProgress.child; null !== node; ) {
4926
- if (5 === node.tag || 6 === node.tag) parent._children.push(node.stateNode);
4927
- else if (4 !== node.tag && null !== node.child) {
4928
- node.child.return = node;
4929
- node = node.child;
4930
- continue;
4931
- }
4932
- if (node === workInProgress) break;
4933
- for (; null === node.sibling; ) {
4934
- if (null === node.return || node.return === workInProgress) return;
4935
- node = node.return;
4936
- }
4937
- node.sibling.return = node.return;
4938
- node = node.sibling;
4939
- }
4940
- };
4941
- updateHostContainer = function() {};
4942
- updateHostComponent$1 = function(current, workInProgress, type, newProps) {
4943
- current.memoizedProps !== newProps &&
4944
- (requiredContext(contextStackCursor$1.current),
4945
- (workInProgress.updateQueue = UPDATE_SIGNAL)) &&
4946
- (workInProgress.flags |= 4);
4947
- };
4948
- updateHostText$1 = function(current, workInProgress, oldText, newText) {
4949
- oldText !== newText && (workInProgress.flags |= 4);
4950
- };
4951
- function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) {
4952
- switch (renderState.tailMode) {
4953
- case "hidden":
4954
- hasRenderedATailFallback = renderState.tail;
4955
- for (var lastTailNode = null; null !== hasRenderedATailFallback; )
4956
- null !== hasRenderedATailFallback.alternate &&
4957
- (lastTailNode = hasRenderedATailFallback),
4958
- (hasRenderedATailFallback = hasRenderedATailFallback.sibling);
4959
- null === lastTailNode
4960
- ? (renderState.tail = null)
4961
- : (lastTailNode.sibling = null);
4962
- break;
4963
- case "collapsed":
4964
- lastTailNode = renderState.tail;
4965
- for (var lastTailNode$69 = null; null !== lastTailNode; )
4966
- null !== lastTailNode.alternate && (lastTailNode$69 = lastTailNode),
4967
- (lastTailNode = lastTailNode.sibling);
4968
- null === lastTailNode$69
4969
- ? hasRenderedATailFallback || null === renderState.tail
4970
- ? (renderState.tail = null)
4971
- : (renderState.tail.sibling = null)
4972
- : (lastTailNode$69.sibling = null);
4973
- }
4974
- }
4975
- function bubbleProperties(completedWork) {
4976
- var didBailout =
4977
- null !== completedWork.alternate &&
4978
- completedWork.alternate.child === completedWork.child,
4979
- newChildLanes = 0,
4980
- subtreeFlags = 0;
4981
- if (didBailout)
4982
- for (var child$70 = completedWork.child; null !== child$70; )
4983
- (newChildLanes |= child$70.lanes | child$70.childLanes),
4984
- (subtreeFlags |= child$70.subtreeFlags & 1835008),
4985
- (subtreeFlags |= child$70.flags & 1835008),
4986
- (child$70.return = completedWork),
4987
- (child$70 = child$70.sibling);
4988
- else
4989
- for (child$70 = completedWork.child; null !== child$70; )
4990
- (newChildLanes |= child$70.lanes | child$70.childLanes),
4991
- (subtreeFlags |= child$70.subtreeFlags),
4992
- (subtreeFlags |= child$70.flags),
4993
- (child$70.return = completedWork),
4994
- (child$70 = child$70.sibling);
4995
- completedWork.subtreeFlags |= subtreeFlags;
4996
- completedWork.childLanes = newChildLanes;
4997
- return didBailout;
4998
- }
4999
- function completeWork(current, workInProgress, renderLanes) {
5000
- var newProps = workInProgress.pendingProps;
5388
+ function attemptEarlyBailoutIfNoScheduledUpdate(
5389
+ current,
5390
+ workInProgress,
5391
+ renderLanes
5392
+ ) {
5001
5393
  switch (workInProgress.tag) {
5002
- case 2:
5003
- case 16:
5004
- case 15:
5005
- case 0:
5006
- case 11:
5007
- case 7:
5008
- case 8:
5009
- case 12:
5010
- case 9:
5011
- case 14:
5012
- return bubbleProperties(workInProgress), null;
5013
- case 1:
5014
- return (
5015
- isContextProvider(workInProgress.type) && popContext(),
5016
- bubbleProperties(workInProgress),
5017
- null
5018
- );
5019
5394
  case 3:
5020
- return (
5021
- (newProps = workInProgress.stateNode),
5022
- popHostContainer(),
5023
- pop(didPerformWorkStackCursor),
5024
- pop(contextStackCursor),
5025
- resetWorkInProgressVersions(),
5026
- newProps.pendingContext &&
5027
- ((newProps.context = newProps.pendingContext),
5028
- (newProps.pendingContext = null)),
5029
- (null !== current && null !== current.child) ||
5030
- newProps.hydrate ||
5031
- (workInProgress.flags |= 512),
5032
- updateHostContainer(current, workInProgress),
5033
- bubbleProperties(workInProgress),
5034
- null
5035
- );
5395
+ pushHostRootContext(workInProgress);
5396
+ break;
5036
5397
  case 5:
5037
- popHostContext(workInProgress);
5038
- renderLanes = requiredContext(rootInstanceStackCursor.current);
5039
- var type = workInProgress.type;
5040
- if (null !== current && null != workInProgress.stateNode)
5041
- updateHostComponent$1(
5398
+ pushHostContext(workInProgress);
5399
+ break;
5400
+ case 1:
5401
+ isContextProvider(workInProgress.type) &&
5402
+ pushContextProvider(workInProgress);
5403
+ break;
5404
+ case 4:
5405
+ pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo);
5406
+ break;
5407
+ case 10:
5408
+ var context = workInProgress.type._context,
5409
+ nextValue = workInProgress.memoizedProps.value;
5410
+ push(valueCursor, context._currentValue);
5411
+ context._currentValue = nextValue;
5412
+ break;
5413
+ case 13:
5414
+ if (null !== workInProgress.memoizedState) {
5415
+ if (0 !== (renderLanes & workInProgress.child.childLanes))
5416
+ return updateSuspenseComponent(current, workInProgress, renderLanes);
5417
+ push(suspenseStackCursor, suspenseStackCursor.current & 1);
5418
+ current = bailoutOnAlreadyFinishedWork(
5042
5419
  current,
5043
5420
  workInProgress,
5044
- type,
5045
- newProps,
5046
5421
  renderLanes
5047
- ),
5048
- current.ref !== workInProgress.ref && (workInProgress.flags |= 256);
5049
- else {
5050
- if (!newProps) {
5051
- if (null === workInProgress.stateNode)
5052
- throw Error(
5053
- "We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue."
5054
- );
5055
- bubbleProperties(workInProgress);
5056
- return null;
5057
- }
5058
- requiredContext(contextStackCursor$1.current);
5059
- current = allocateTag();
5060
- type = getViewConfigForType(type);
5061
- var updatePayload = diffProperties(
5062
- null,
5063
- emptyObject,
5064
- newProps,
5065
- type.validAttributes
5066
- );
5067
- ReactNativePrivateInterface.UIManager.createView(
5068
- current,
5069
- type.uiViewClassName,
5070
- renderLanes,
5071
- updatePayload
5072
- );
5073
- renderLanes = new ReactNativeFiberHostComponent(
5074
- current,
5075
- type,
5076
- workInProgress
5077
- );
5078
- instanceCache.set(current, workInProgress);
5079
- instanceProps.set(current, newProps);
5080
- appendAllChildren(renderLanes, workInProgress, !1, !1);
5081
- workInProgress.stateNode = renderLanes;
5082
- finalizeInitialChildren(renderLanes) && (workInProgress.flags |= 4);
5083
- null !== workInProgress.ref && (workInProgress.flags |= 256);
5084
- }
5085
- bubbleProperties(workInProgress);
5086
- return null;
5087
- case 6:
5088
- if (current && null != workInProgress.stateNode)
5089
- updateHostText$1(
5090
- current,
5091
- workInProgress,
5092
- current.memoizedProps,
5093
- newProps
5094
- );
5095
- else {
5096
- if ("string" !== typeof newProps && null === workInProgress.stateNode)
5097
- throw Error(
5098
- "We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue."
5099
- );
5100
- current = requiredContext(rootInstanceStackCursor.current);
5101
- if (!requiredContext(contextStackCursor$1.current).isInAParentText)
5102
- throw Error(
5103
- "Text strings must be rendered within a <Text> component."
5104
- );
5105
- renderLanes = allocateTag();
5106
- ReactNativePrivateInterface.UIManager.createView(
5107
- renderLanes,
5108
- "RCTRawText",
5109
- current,
5110
- { text: newProps }
5111
5422
  );
5112
- instanceCache.set(renderLanes, workInProgress);
5113
- workInProgress.stateNode = renderLanes;
5423
+ return null !== current ? current.sibling : null;
5114
5424
  }
5115
- bubbleProperties(workInProgress);
5116
- return null;
5117
- case 13:
5118
- pop(suspenseStackCursor);
5119
- newProps = workInProgress.memoizedState;
5120
- if (0 !== (workInProgress.flags & 128))
5121
- return (workInProgress.lanes = renderLanes), workInProgress;
5122
- newProps = null !== newProps;
5123
- renderLanes = !1;
5124
- null !== current && (renderLanes = null !== current.memoizedState);
5125
- if (newProps && !renderLanes && 0 !== (workInProgress.mode & 1))
5126
- if (
5127
- (null === current &&
5128
- !0 !== workInProgress.memoizedProps.unstable_avoidThisFallback) ||
5129
- 0 !== (suspenseStackCursor.current & 1)
5130
- )
5131
- 0 === workInProgressRootExitStatus &&
5132
- (workInProgressRootExitStatus = 3);
5133
- else {
5134
- if (
5135
- 0 === workInProgressRootExitStatus ||
5136
- 3 === workInProgressRootExitStatus
5137
- )
5138
- workInProgressRootExitStatus = 4;
5139
- null === workInProgressRoot ||
5140
- (0 === (workInProgressRootSkippedLanes & 268435455) &&
5141
- 0 === (workInProgressRootUpdatedLanes & 268435455)) ||
5142
- markRootSuspended$1(
5143
- workInProgressRoot,
5144
- workInProgressRootRenderLanes
5145
- );
5146
- }
5147
- if (newProps || renderLanes) workInProgress.flags |= 4;
5148
- bubbleProperties(workInProgress);
5149
- return null;
5150
- case 4:
5151
- return (
5152
- popHostContainer(),
5153
- updateHostContainer(current, workInProgress),
5154
- bubbleProperties(workInProgress),
5155
- null
5156
- );
5157
- case 10:
5158
- return (
5159
- popProvider(workInProgress.type._context),
5160
- bubbleProperties(workInProgress),
5161
- null
5162
- );
5163
- case 17:
5164
- return (
5165
- isContextProvider(workInProgress.type) && popContext(),
5166
- bubbleProperties(workInProgress),
5167
- null
5168
- );
5425
+ push(suspenseStackCursor, suspenseStackCursor.current & 1);
5426
+ break;
5169
5427
  case 19:
5170
- pop(suspenseStackCursor);
5171
- type = workInProgress.memoizedState;
5172
- if (null === type) return bubbleProperties(workInProgress), null;
5173
- newProps = 0 !== (workInProgress.flags & 128);
5174
- updatePayload = type.rendering;
5175
- if (null === updatePayload)
5176
- if (newProps) cutOffTailIfNeeded(type, !1);
5177
- else {
5178
- if (
5179
- 0 !== workInProgressRootExitStatus ||
5180
- (null !== current && 0 !== (current.flags & 128))
5181
- )
5182
- for (current = workInProgress.child; null !== current; ) {
5183
- updatePayload = findFirstSuspended(current);
5184
- if (null !== updatePayload) {
5185
- workInProgress.flags |= 128;
5186
- cutOffTailIfNeeded(type, !1);
5187
- current = updatePayload.updateQueue;
5188
- null !== current &&
5189
- ((workInProgress.updateQueue = current),
5190
- (workInProgress.flags |= 4));
5191
- workInProgress.subtreeFlags = 0;
5192
- current = renderLanes;
5193
- for (newProps = workInProgress.child; null !== newProps; )
5194
- (renderLanes = newProps),
5195
- (type = current),
5196
- (renderLanes.flags &= 1835010),
5197
- (updatePayload = renderLanes.alternate),
5198
- null === updatePayload
5199
- ? ((renderLanes.childLanes = 0),
5200
- (renderLanes.lanes = type),
5201
- (renderLanes.child = null),
5202
- (renderLanes.subtreeFlags = 0),
5203
- (renderLanes.memoizedProps = null),
5204
- (renderLanes.memoizedState = null),
5205
- (renderLanes.updateQueue = null),
5206
- (renderLanes.dependencies = null),
5207
- (renderLanes.stateNode = null))
5208
- : ((renderLanes.childLanes = updatePayload.childLanes),
5209
- (renderLanes.lanes = updatePayload.lanes),
5210
- (renderLanes.child = updatePayload.child),
5211
- (renderLanes.subtreeFlags = 0),
5212
- (renderLanes.deletions = null),
5213
- (renderLanes.memoizedProps =
5214
- updatePayload.memoizedProps),
5215
- (renderLanes.memoizedState =
5216
- updatePayload.memoizedState),
5217
- (renderLanes.updateQueue = updatePayload.updateQueue),
5218
- (renderLanes.type = updatePayload.type),
5219
- (type = updatePayload.dependencies),
5220
- (renderLanes.dependencies =
5221
- null === type
5222
- ? null
5223
- : {
5224
- lanes: type.lanes,
5225
- firstContext: type.firstContext
5226
- })),
5227
- (newProps = newProps.sibling);
5228
- push(
5229
- suspenseStackCursor,
5230
- (suspenseStackCursor.current & 1) | 2
5231
- );
5232
- return workInProgress.child;
5233
- }
5234
- current = current.sibling;
5235
- }
5236
- null !== type.tail &&
5237
- now() > workInProgressRootRenderTargetTime &&
5238
- ((workInProgress.flags |= 128),
5239
- (newProps = !0),
5240
- cutOffTailIfNeeded(type, !1),
5241
- (workInProgress.lanes = 4194304));
5242
- }
5243
- else {
5244
- if (!newProps)
5245
- if (
5246
- ((current = findFirstSuspended(updatePayload)), null !== current)
5247
- ) {
5248
- if (
5249
- ((workInProgress.flags |= 128),
5250
- (newProps = !0),
5251
- (current = current.updateQueue),
5252
- null !== current &&
5253
- ((workInProgress.updateQueue = current),
5254
- (workInProgress.flags |= 4)),
5255
- cutOffTailIfNeeded(type, !0),
5256
- null === type.tail &&
5257
- "hidden" === type.tailMode &&
5258
- !updatePayload.alternate)
5259
- )
5260
- return bubbleProperties(workInProgress), null;
5261
- } else
5262
- 2 * now() - type.renderingStartTime >
5263
- workInProgressRootRenderTargetTime &&
5264
- 1073741824 !== renderLanes &&
5265
- ((workInProgress.flags |= 128),
5266
- (newProps = !0),
5267
- cutOffTailIfNeeded(type, !1),
5268
- (workInProgress.lanes = 4194304));
5269
- type.isBackwards
5270
- ? ((updatePayload.sibling = workInProgress.child),
5271
- (workInProgress.child = updatePayload))
5272
- : ((current = type.last),
5273
- null !== current
5274
- ? (current.sibling = updatePayload)
5275
- : (workInProgress.child = updatePayload),
5276
- (type.last = updatePayload));
5428
+ context = 0 !== (renderLanes & workInProgress.childLanes);
5429
+ if (0 !== (current.flags & 128)) {
5430
+ if (context)
5431
+ return updateSuspenseListComponent(
5432
+ current,
5433
+ workInProgress,
5434
+ renderLanes
5435
+ );
5436
+ workInProgress.flags |= 128;
5277
5437
  }
5278
- if (null !== type.tail)
5279
- return (
5280
- (workInProgress = type.tail),
5281
- (type.rendering = workInProgress),
5282
- (type.tail = workInProgress.sibling),
5283
- (type.renderingStartTime = now()),
5284
- (workInProgress.sibling = null),
5285
- (current = suspenseStackCursor.current),
5286
- push(suspenseStackCursor, newProps ? (current & 1) | 2 : current & 1),
5287
- workInProgress
5288
- );
5289
- bubbleProperties(workInProgress);
5290
- return null;
5438
+ nextValue = workInProgress.memoizedState;
5439
+ null !== nextValue &&
5440
+ ((nextValue.rendering = null),
5441
+ (nextValue.tail = null),
5442
+ (nextValue.lastEffect = null));
5443
+ push(suspenseStackCursor, suspenseStackCursor.current);
5444
+ if (context) break;
5445
+ else return null;
5291
5446
  case 22:
5292
5447
  case 23:
5293
5448
  return (
5294
- popRenderLanes(),
5295
- (renderLanes = null !== workInProgress.memoizedState),
5296
- null !== current &&
5297
- (null !== current.memoizedState) !== renderLanes &&
5298
- "unstable-defer-without-hiding" !== newProps.mode &&
5299
- (workInProgress.flags |= 4),
5300
- (renderLanes &&
5301
- 0 === (subtreeRenderLanes & 1073741824) &&
5302
- 0 !== (workInProgress.mode & 1)) ||
5303
- bubbleProperties(workInProgress),
5304
- null
5449
+ (workInProgress.lanes = 0),
5450
+ updateOffscreenComponent(current, workInProgress, renderLanes)
5305
5451
  );
5306
5452
  }
5307
- throw Error(
5308
- "Unknown unit of work tag (" +
5309
- workInProgress.tag +
5310
- "). This error is likely caused by a bug in React. Please file an issue."
5311
- );
5453
+ return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);
5312
5454
  }
5313
- function unwindWork(workInProgress) {
5455
+ function unwindWork(current, workInProgress) {
5456
+ popTreeContext(workInProgress);
5314
5457
  switch (workInProgress.tag) {
5315
5458
  case 1:
5316
- isContextProvider(workInProgress.type) && popContext();
5317
- var flags = workInProgress.flags;
5318
- return flags & 16384
5319
- ? ((workInProgress.flags = (flags & -16385) | 128), workInProgress)
5320
- : null;
5321
- case 3:
5322
- popHostContainer();
5323
- pop(didPerformWorkStackCursor);
5324
- pop(contextStackCursor);
5325
- resetWorkInProgressVersions();
5326
- flags = workInProgress.flags;
5327
- if (0 !== (flags & 128))
5328
- throw Error(
5329
- "The root failed to unmount after an error. This is likely a bug in React. Please file an issue."
5330
- );
5331
- workInProgress.flags = (flags & -16385) | 128;
5332
- return workInProgress;
5459
+ return (
5460
+ isContextProvider(workInProgress.type) && popContext(),
5461
+ (current = workInProgress.flags),
5462
+ current & 65536
5463
+ ? ((workInProgress.flags = (current & -65537) | 128), workInProgress)
5464
+ : null
5465
+ );
5466
+ case 3:
5467
+ return (
5468
+ popHostContainer(),
5469
+ pop(didPerformWorkStackCursor),
5470
+ pop(contextStackCursor),
5471
+ resetWorkInProgressVersions(),
5472
+ (current = workInProgress.flags),
5473
+ 0 !== (current & 65536) && 0 === (current & 128)
5474
+ ? ((workInProgress.flags = (current & -65537) | 128), workInProgress)
5475
+ : null
5476
+ );
5333
5477
  case 5:
5334
5478
  return popHostContext(workInProgress), null;
5335
5479
  case 13:
5336
5480
  return (
5337
5481
  pop(suspenseStackCursor),
5338
- (flags = workInProgress.flags),
5339
- flags & 16384
5340
- ? ((workInProgress.flags = (flags & -16385) | 128), workInProgress)
5482
+ (current = workInProgress.flags),
5483
+ current & 65536
5484
+ ? ((workInProgress.flags = (current & -65537) | 128), workInProgress)
5341
5485
  : null
5342
5486
  );
5343
5487
  case 19:
@@ -5368,13 +5512,20 @@ function safelyDetachRef(current, nearestMountedAncestor) {
5368
5512
  }
5369
5513
  else ref.current = null;
5370
5514
  }
5515
+ function safelyCallDestroy(current, nearestMountedAncestor, destroy) {
5516
+ try {
5517
+ destroy();
5518
+ } catch (error) {
5519
+ captureCommitPhaseError(current, nearestMountedAncestor, error);
5520
+ }
5521
+ }
5371
5522
  var shouldFireAfterActiveInstanceBlur = !1;
5372
5523
  function commitBeforeMutationEffects(root, firstChild) {
5373
5524
  for (nextEffect = firstChild; null !== nextEffect; )
5374
5525
  if (
5375
5526
  ((root = nextEffect),
5376
5527
  (firstChild = root.child),
5377
- 0 !== (root.subtreeFlags & 516) && null !== firstChild)
5528
+ 0 !== (root.subtreeFlags & 1028) && null !== firstChild)
5378
5529
  )
5379
5530
  (firstChild.return = root), (nextEffect = firstChild);
5380
5531
  else
@@ -5382,7 +5533,7 @@ function commitBeforeMutationEffects(root, firstChild) {
5382
5533
  root = nextEffect;
5383
5534
  try {
5384
5535
  var current = root.alternate;
5385
- if (0 !== (root.flags & 512))
5536
+ if (0 !== (root.flags & 1024))
5386
5537
  switch (root.tag) {
5387
5538
  case 0:
5388
5539
  case 11:
@@ -5432,7 +5583,7 @@ function commitBeforeMutationEffects(root, firstChild) {
5432
5583
  function commitHookEffectListUnmount(
5433
5584
  flags,
5434
5585
  finishedWork,
5435
- nearestMountedAncestor$jscomp$0
5586
+ nearestMountedAncestor
5436
5587
  ) {
5437
5588
  var updateQueue = finishedWork.updateQueue;
5438
5589
  updateQueue = null !== updateQueue ? updateQueue.lastEffect : null;
@@ -5442,97 +5593,28 @@ function commitHookEffectListUnmount(
5442
5593
  if ((effect.tag & flags) === flags) {
5443
5594
  var destroy = effect.destroy;
5444
5595
  effect.destroy = void 0;
5445
- if (void 0 !== destroy) {
5446
- var current = finishedWork,
5447
- nearestMountedAncestor = nearestMountedAncestor$jscomp$0;
5448
- try {
5449
- destroy();
5450
- } catch (error) {
5451
- captureCommitPhaseError(current, nearestMountedAncestor, error);
5452
- }
5453
- }
5596
+ void 0 !== destroy &&
5597
+ safelyCallDestroy(finishedWork, nearestMountedAncestor, destroy);
5454
5598
  }
5455
5599
  effect = effect.next;
5456
5600
  } while (effect !== updateQueue);
5457
5601
  }
5458
5602
  }
5459
- function commitHookEffectListMount(tag, finishedWork) {
5603
+ function commitHookEffectListMount(flags, finishedWork) {
5460
5604
  finishedWork = finishedWork.updateQueue;
5461
5605
  finishedWork = null !== finishedWork ? finishedWork.lastEffect : null;
5462
5606
  if (null !== finishedWork) {
5463
5607
  var effect = (finishedWork = finishedWork.next);
5464
5608
  do {
5465
- if ((effect.tag & tag) === tag) {
5466
- var create$82 = effect.create;
5467
- effect.destroy = create$82();
5609
+ if ((effect.tag & flags) === flags) {
5610
+ var create$77 = effect.create;
5611
+ effect.destroy = create$77();
5468
5612
  }
5469
5613
  effect = effect.next;
5470
5614
  } while (effect !== finishedWork);
5471
5615
  }
5472
5616
  }
5473
- function hideOrUnhideAllChildren(finishedWork, isHidden) {
5474
- for (var hostSubtreeRoot = null, node = finishedWork; ; ) {
5475
- if (5 === node.tag) {
5476
- if (null === hostSubtreeRoot) {
5477
- hostSubtreeRoot = node;
5478
- var instance = node.stateNode;
5479
- if (isHidden) {
5480
- var viewConfig = instance.viewConfig;
5481
- var updatePayload = diffProperties(
5482
- null,
5483
- emptyObject,
5484
- { style: { display: "none" } },
5485
- viewConfig.validAttributes
5486
- );
5487
- ReactNativePrivateInterface.UIManager.updateView(
5488
- instance._nativeTag,
5489
- viewConfig.uiViewClassName,
5490
- updatePayload
5491
- );
5492
- } else {
5493
- instance = node.stateNode;
5494
- updatePayload = node.memoizedProps;
5495
- viewConfig = instance.viewConfig;
5496
- var prevProps = Object.assign({}, updatePayload, {
5497
- style: [updatePayload.style, { display: "none" }]
5498
- });
5499
- updatePayload = diffProperties(
5500
- null,
5501
- prevProps,
5502
- updatePayload,
5503
- viewConfig.validAttributes
5504
- );
5505
- ReactNativePrivateInterface.UIManager.updateView(
5506
- instance._nativeTag,
5507
- viewConfig.uiViewClassName,
5508
- updatePayload
5509
- );
5510
- }
5511
- }
5512
- } else if (6 === node.tag) {
5513
- if (null === hostSubtreeRoot) throw Error("Not yet implemented.");
5514
- } else if (
5515
- ((22 !== node.tag && 23 !== node.tag) ||
5516
- null === node.memoizedState ||
5517
- node === finishedWork) &&
5518
- null !== node.child
5519
- ) {
5520
- node.child.return = node;
5521
- node = node.child;
5522
- continue;
5523
- }
5524
- if (node === finishedWork) break;
5525
- for (; null === node.sibling; ) {
5526
- if (null === node.return || node.return === finishedWork) return;
5527
- hostSubtreeRoot === node && (hostSubtreeRoot = null);
5528
- node = node.return;
5529
- }
5530
- hostSubtreeRoot === node && (hostSubtreeRoot = null);
5531
- node.sibling.return = node.return;
5532
- node = node.sibling;
5533
- }
5534
- }
5535
- function commitUnmount(finishedRoot, current, nearestMountedAncestor$jscomp$0) {
5617
+ function commitUnmount(finishedRoot, current, nearestMountedAncestor) {
5536
5618
  if (injectedHook && "function" === typeof injectedHook.onCommitFiberUnmount)
5537
5619
  try {
5538
5620
  injectedHook.onCommitFiberUnmount(rendererID, current);
@@ -5552,44 +5634,32 @@ function commitUnmount(finishedRoot, current, nearestMountedAncestor$jscomp$0) {
5552
5634
  var _effect = effect,
5553
5635
  destroy = _effect.destroy;
5554
5636
  _effect = _effect.tag;
5555
- if (void 0 !== destroy && 0 !== (_effect & 2)) {
5556
- _effect = current;
5557
- var nearestMountedAncestor = nearestMountedAncestor$jscomp$0;
5558
- try {
5559
- destroy();
5560
- } catch (error) {
5561
- captureCommitPhaseError(_effect, nearestMountedAncestor, error);
5562
- }
5563
- }
5637
+ void 0 !== destroy &&
5638
+ (0 !== (_effect & 2)
5639
+ ? safelyCallDestroy(current, nearestMountedAncestor, destroy)
5640
+ : 0 !== (_effect & 4) &&
5641
+ safelyCallDestroy(current, nearestMountedAncestor, destroy));
5564
5642
  effect = effect.next;
5565
5643
  } while (effect !== finishedRoot);
5566
5644
  }
5567
5645
  break;
5568
5646
  case 1:
5569
- safelyDetachRef(current, nearestMountedAncestor$jscomp$0);
5647
+ safelyDetachRef(current, nearestMountedAncestor);
5570
5648
  finishedRoot = current.stateNode;
5571
5649
  if ("function" === typeof finishedRoot.componentWillUnmount)
5572
5650
  try {
5573
5651
  (finishedRoot.props = current.memoizedProps),
5574
5652
  (finishedRoot.state = current.memoizedState),
5575
5653
  finishedRoot.componentWillUnmount();
5576
- } catch (unmountError) {
5577
- captureCommitPhaseError(
5578
- current,
5579
- nearestMountedAncestor$jscomp$0,
5580
- unmountError
5581
- );
5654
+ } catch (error) {
5655
+ captureCommitPhaseError(current, nearestMountedAncestor, error);
5582
5656
  }
5583
5657
  break;
5584
5658
  case 5:
5585
- safelyDetachRef(current, nearestMountedAncestor$jscomp$0);
5659
+ safelyDetachRef(current, nearestMountedAncestor);
5586
5660
  break;
5587
5661
  case 4:
5588
- unmountHostComponents(
5589
- finishedRoot,
5590
- current,
5591
- nearestMountedAncestor$jscomp$0
5592
- );
5662
+ unmountHostComponents(finishedRoot, current, nearestMountedAncestor);
5593
5663
  }
5594
5664
  }
5595
5665
  function detachFiberAfterEffects(fiber) {
@@ -5611,6 +5681,25 @@ function detachFiberAfterEffects(fiber) {
5611
5681
  function isHostParent(fiber) {
5612
5682
  return 5 === fiber.tag || 3 === fiber.tag || 4 === fiber.tag;
5613
5683
  }
5684
+ function getHostSibling(fiber) {
5685
+ a: for (;;) {
5686
+ for (; null === fiber.sibling; ) {
5687
+ if (null === fiber.return || isHostParent(fiber.return)) return null;
5688
+ fiber = fiber.return;
5689
+ }
5690
+ fiber.sibling.return = fiber.return;
5691
+ for (
5692
+ fiber = fiber.sibling;
5693
+ 5 !== fiber.tag && 6 !== fiber.tag && 18 !== fiber.tag;
5694
+
5695
+ ) {
5696
+ if (fiber.flags & 2) continue a;
5697
+ if (null === fiber.child || 4 === fiber.tag) continue a;
5698
+ else (fiber.child.return = fiber), (fiber = fiber.child);
5699
+ }
5700
+ if (!(fiber.flags & 2)) return fiber.stateNode;
5701
+ }
5702
+ }
5614
5703
  function commitPlacement(finishedWork) {
5615
5704
  a: {
5616
5705
  for (var parent = finishedWork.return; null !== parent; ) {
@@ -5622,57 +5711,28 @@ function commitPlacement(finishedWork) {
5622
5711
  );
5623
5712
  }
5624
5713
  var parentFiber = parent;
5625
- parent = parentFiber.stateNode;
5626
5714
  switch (parentFiber.tag) {
5627
5715
  case 5:
5628
- var isContainer = !1;
5716
+ parent = parentFiber.stateNode;
5717
+ parentFiber.flags & 32 && (parentFiber.flags &= -33);
5718
+ parentFiber = getHostSibling(finishedWork);
5719
+ insertOrAppendPlacementNode(finishedWork, parentFiber, parent);
5629
5720
  break;
5630
5721
  case 3:
5631
- parent = parent.containerInfo;
5632
- isContainer = !0;
5633
- break;
5634
5722
  case 4:
5635
- parent = parent.containerInfo;
5636
- isContainer = !0;
5723
+ parent = parentFiber.stateNode.containerInfo;
5724
+ parentFiber = getHostSibling(finishedWork);
5725
+ insertOrAppendPlacementNodeIntoContainer(
5726
+ finishedWork,
5727
+ parentFiber,
5728
+ parent
5729
+ );
5637
5730
  break;
5638
5731
  default:
5639
5732
  throw Error(
5640
5733
  "Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue."
5641
5734
  );
5642
5735
  }
5643
- parentFiber.flags & 32 && (parentFiber.flags &= -33);
5644
- a: b: for (parentFiber = finishedWork; ; ) {
5645
- for (; null === parentFiber.sibling; ) {
5646
- if (null === parentFiber.return || isHostParent(parentFiber.return)) {
5647
- parentFiber = null;
5648
- break a;
5649
- }
5650
- parentFiber = parentFiber.return;
5651
- }
5652
- parentFiber.sibling.return = parentFiber.return;
5653
- for (
5654
- parentFiber = parentFiber.sibling;
5655
- 5 !== parentFiber.tag && 6 !== parentFiber.tag && 18 !== parentFiber.tag;
5656
-
5657
- ) {
5658
- if (parentFiber.flags & 2) continue b;
5659
- if (null === parentFiber.child || 4 === parentFiber.tag) continue b;
5660
- else
5661
- (parentFiber.child.return = parentFiber),
5662
- (parentFiber = parentFiber.child);
5663
- }
5664
- if (!(parentFiber.flags & 2)) {
5665
- parentFiber = parentFiber.stateNode;
5666
- break a;
5667
- }
5668
- }
5669
- isContainer
5670
- ? insertOrAppendPlacementNodeIntoContainer(
5671
- finishedWork,
5672
- parentFiber,
5673
- parent
5674
- )
5675
- : insertOrAppendPlacementNode(finishedWork, parentFiber, parent);
5676
5736
  }
5677
5737
  function insertOrAppendPlacementNodeIntoContainer(node, before, parent) {
5678
5738
  var tag = node.tag;
@@ -5879,6 +5939,8 @@ function commitWork(current, finishedWork) {
5879
5939
  case 14:
5880
5940
  case 15:
5881
5941
  commitHookEffectListUnmount(3, finishedWork, finishedWork.return);
5942
+ commitHookEffectListMount(3, finishedWork);
5943
+ commitHookEffectListUnmount(5, finishedWork, finishedWork.return);
5882
5944
  return;
5883
5945
  case 1:
5884
5946
  return;
@@ -5922,9 +5984,6 @@ function commitWork(current, finishedWork) {
5922
5984
  case 12:
5923
5985
  return;
5924
5986
  case 13:
5925
- null !== finishedWork.memoizedState &&
5926
- ((globalMostRecentFallbackTime = now()),
5927
- hideOrUnhideAllChildren(finishedWork.child, !0));
5928
5987
  attachSuspenseRetryListeners(finishedWork);
5929
5988
  return;
5930
5989
  case 19:
@@ -5932,13 +5991,6 @@ function commitWork(current, finishedWork) {
5932
5991
  return;
5933
5992
  case 17:
5934
5993
  return;
5935
- case 22:
5936
- case 23:
5937
- hideOrUnhideAllChildren(
5938
- finishedWork,
5939
- null !== finishedWork.memoizedState
5940
- );
5941
- return;
5942
5994
  }
5943
5995
  throw Error(
5944
5996
  "This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue."
@@ -5975,14 +6027,14 @@ function commitMutationEffects(root, firstChild) {
5975
6027
  }
5976
6028
  }
5977
6029
  deletions = firstChild.child;
5978
- if (0 !== (firstChild.subtreeFlags & 6454) && null !== deletions)
6030
+ if (0 !== (firstChild.subtreeFlags & 12854) && null !== deletions)
5979
6031
  (deletions.return = firstChild), (nextEffect = deletions);
5980
6032
  else
5981
6033
  for (; null !== nextEffect; ) {
5982
6034
  firstChild = nextEffect;
5983
6035
  try {
5984
6036
  var flags = firstChild.flags;
5985
- if (flags & 256) {
6037
+ if (flags & 512) {
5986
6038
  var current = firstChild.alternate;
5987
6039
  if (null !== current) {
5988
6040
  var currentRef = current.ref;
@@ -5992,7 +6044,88 @@ function commitMutationEffects(root, firstChild) {
5992
6044
  : (currentRef.current = null));
5993
6045
  }
5994
6046
  }
5995
- switch (flags & 2054) {
6047
+ if (flags & 8192)
6048
+ switch (firstChild.tag) {
6049
+ case 13:
6050
+ if (null !== firstChild.memoizedState) {
6051
+ var current$84 = firstChild.alternate;
6052
+ if (null === current$84 || null === current$84.memoizedState)
6053
+ globalMostRecentFallbackTime = now();
6054
+ }
6055
+ break;
6056
+ case 22:
6057
+ a: {
6058
+ deletions = firstChild;
6059
+ var isHidden = null !== firstChild.memoizedState;
6060
+ i = null;
6061
+ for (childToDelete = deletions; ; ) {
6062
+ if (5 === childToDelete.tag) {
6063
+ if (null === i) {
6064
+ i = childToDelete;
6065
+ var instance = childToDelete.stateNode;
6066
+ if (isHidden) {
6067
+ var instance$jscomp$0 = instance,
6068
+ viewConfig = instance$jscomp$0.viewConfig;
6069
+ var updatePayload = diffProperties(
6070
+ null,
6071
+ emptyObject,
6072
+ { style: { display: "none" } },
6073
+ viewConfig.validAttributes
6074
+ );
6075
+ ReactNativePrivateInterface.UIManager.updateView(
6076
+ instance$jscomp$0._nativeTag,
6077
+ viewConfig.uiViewClassName,
6078
+ updatePayload
6079
+ );
6080
+ } else {
6081
+ var instance$jscomp$1 = childToDelete.stateNode,
6082
+ props = childToDelete.memoizedProps,
6083
+ viewConfig$jscomp$0 = instance$jscomp$1.viewConfig,
6084
+ prevProps = assign({}, props, {
6085
+ style: [props.style, { display: "none" }]
6086
+ });
6087
+ var updatePayload$jscomp$0 = diffProperties(
6088
+ null,
6089
+ prevProps,
6090
+ props,
6091
+ viewConfig$jscomp$0.validAttributes
6092
+ );
6093
+ ReactNativePrivateInterface.UIManager.updateView(
6094
+ instance$jscomp$1._nativeTag,
6095
+ viewConfig$jscomp$0.uiViewClassName,
6096
+ updatePayload$jscomp$0
6097
+ );
6098
+ }
6099
+ }
6100
+ } else if (6 === childToDelete.tag) {
6101
+ if (null === i) throw Error("Not yet implemented.");
6102
+ } else if (
6103
+ ((22 !== childToDelete.tag && 23 !== childToDelete.tag) ||
6104
+ null === childToDelete.memoizedState ||
6105
+ childToDelete === deletions) &&
6106
+ null !== childToDelete.child
6107
+ ) {
6108
+ childToDelete.child.return = childToDelete;
6109
+ childToDelete = childToDelete.child;
6110
+ continue;
6111
+ }
6112
+ if (childToDelete === deletions) break;
6113
+ for (; null === childToDelete.sibling; ) {
6114
+ if (
6115
+ null === childToDelete.return ||
6116
+ childToDelete.return === deletions
6117
+ )
6118
+ break a;
6119
+ i === childToDelete && (i = null);
6120
+ childToDelete = childToDelete.return;
6121
+ }
6122
+ i === childToDelete && (i = null);
6123
+ childToDelete.sibling.return = childToDelete.return;
6124
+ childToDelete = childToDelete.sibling;
6125
+ }
6126
+ }
6127
+ }
6128
+ switch (flags & 4102) {
5996
6129
  case 2:
5997
6130
  commitPlacement(firstChild);
5998
6131
  firstChild.flags &= -3;
@@ -6002,11 +6135,11 @@ function commitMutationEffects(root, firstChild) {
6002
6135
  firstChild.flags &= -3;
6003
6136
  commitWork(firstChild.alternate, firstChild);
6004
6137
  break;
6005
- case 2048:
6006
- firstChild.flags &= -2049;
6138
+ case 4096:
6139
+ firstChild.flags &= -4097;
6007
6140
  break;
6008
- case 2052:
6009
- firstChild.flags &= -2049;
6141
+ case 4100:
6142
+ firstChild.flags &= -4097;
6010
6143
  commitWork(firstChild.alternate, firstChild);
6011
6144
  break;
6012
6145
  case 4:
@@ -6029,20 +6162,20 @@ function commitLayoutEffects(finishedWork) {
6029
6162
  for (nextEffect = finishedWork; null !== nextEffect; ) {
6030
6163
  var fiber = nextEffect,
6031
6164
  firstChild = fiber.child;
6032
- if (0 !== (fiber.subtreeFlags & 324) && null !== firstChild)
6165
+ if (0 !== (fiber.subtreeFlags & 8772) && null !== firstChild)
6033
6166
  (firstChild.return = fiber), (nextEffect = firstChild);
6034
6167
  else
6035
6168
  for (fiber = finishedWork; null !== nextEffect; ) {
6036
6169
  firstChild = nextEffect;
6037
- if (0 !== (firstChild.flags & 324)) {
6170
+ if (0 !== (firstChild.flags & 8772)) {
6038
6171
  var current = firstChild.alternate;
6039
6172
  try {
6040
- if (0 !== (firstChild.flags & 68))
6173
+ if (0 !== (firstChild.flags & 8772))
6041
6174
  switch (firstChild.tag) {
6042
6175
  case 0:
6043
6176
  case 11:
6044
6177
  case 15:
6045
- commitHookEffectListMount(3, firstChild);
6178
+ commitHookEffectListMount(5, firstChild);
6046
6179
  break;
6047
6180
  case 1:
6048
6181
  var instance = firstChild.stateNode;
@@ -6067,8 +6200,8 @@ function commitLayoutEffects(finishedWork) {
6067
6200
  commitUpdateQueue(firstChild, updateQueue, instance);
6068
6201
  break;
6069
6202
  case 3:
6070
- var updateQueue$83 = firstChild.updateQueue;
6071
- if (null !== updateQueue$83) {
6203
+ var updateQueue$78 = firstChild.updateQueue;
6204
+ if (null !== updateQueue$78) {
6072
6205
  current = null;
6073
6206
  if (null !== firstChild.child)
6074
6207
  switch (firstChild.child.tag) {
@@ -6078,7 +6211,7 @@ function commitLayoutEffects(finishedWork) {
6078
6211
  case 1:
6079
6212
  current = firstChild.child.stateNode;
6080
6213
  }
6081
- commitUpdateQueue(firstChild, updateQueue$83, current);
6214
+ commitUpdateQueue(firstChild, updateQueue$78, current);
6082
6215
  }
6083
6216
  break;
6084
6217
  case 5:
@@ -6102,7 +6235,7 @@ function commitLayoutEffects(finishedWork) {
6102
6235
  "This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue."
6103
6236
  );
6104
6237
  }
6105
- if (firstChild.flags & 256) {
6238
+ if (firstChild.flags & 512) {
6106
6239
  current = void 0;
6107
6240
  var ref = firstChild.ref;
6108
6241
  if (null !== ref) {
@@ -6150,8 +6283,10 @@ var ceil = Math.ceil,
6150
6283
  workInProgressRootExitStatus = 0,
6151
6284
  workInProgressRootFatalError = null,
6152
6285
  workInProgressRootSkippedLanes = 0,
6153
- workInProgressRootUpdatedLanes = 0,
6286
+ workInProgressRootInterleavedUpdatedLanes = 0,
6154
6287
  workInProgressRootPingedLanes = 0,
6288
+ workInProgressRootConcurrentErrors = null,
6289
+ workInProgressRootRecoverableErrors = null,
6155
6290
  globalMostRecentFallbackTime = 0,
6156
6291
  workInProgressRootRenderTargetTime = Infinity,
6157
6292
  hasUncaughtError = !1,
@@ -6165,7 +6300,7 @@ var ceil = Math.ceil,
6165
6300
  currentEventTime = -1,
6166
6301
  currentEventTransitionLane = 0;
6167
6302
  function requestEventTime() {
6168
- return 0 !== (executionContext & 24)
6303
+ return 0 !== (executionContext & 6)
6169
6304
  ? now()
6170
6305
  : -1 !== currentEventTime
6171
6306
  ? currentEventTime
@@ -6173,9 +6308,9 @@ function requestEventTime() {
6173
6308
  }
6174
6309
  function requestUpdateLane(fiber) {
6175
6310
  if (0 === (fiber.mode & 1)) return 1;
6176
- if (0 !== (executionContext & 8) && 0 !== workInProgressRootRenderLanes)
6311
+ if (0 !== (executionContext & 2) && 0 !== workInProgressRootRenderLanes)
6177
6312
  return workInProgressRootRenderLanes & -workInProgressRootRenderLanes;
6178
- if (0 !== ReactCurrentBatchConfig.transition)
6313
+ if (null !== ReactCurrentBatchConfig.transition)
6179
6314
  return (
6180
6315
  0 === currentEventTransitionLane &&
6181
6316
  ((fiber = nextTransitionLane),
@@ -6197,19 +6332,18 @@ function scheduleUpdateOnFiber(fiber, lane, eventTime) {
6197
6332
  var root = markUpdateLaneFromFiberToRoot(fiber, lane);
6198
6333
  if (null === root) return null;
6199
6334
  markRootUpdated(root, lane, eventTime);
6200
- root === workInProgressRoot &&
6201
- (0 === (executionContext & 8) && (workInProgressRootUpdatedLanes |= lane),
6202
- 4 === workInProgressRootExitStatus &&
6203
- markRootSuspended$1(root, workInProgressRootRenderLanes));
6204
- 1 === lane
6205
- ? 0 !== (executionContext & 4) && 0 === (executionContext & 24)
6206
- ? performSyncWorkOnRoot(root)
6207
- : (ensureRootIsScheduled(root, eventTime),
6335
+ if (0 === (executionContext & 2) || root !== workInProgressRoot)
6336
+ root === workInProgressRoot &&
6337
+ (0 === (executionContext & 2) &&
6338
+ (workInProgressRootInterleavedUpdatedLanes |= lane),
6339
+ 4 === workInProgressRootExitStatus &&
6340
+ markRootSuspended$1(root, workInProgressRootRenderLanes)),
6341
+ ensureRootIsScheduled(root, eventTime),
6342
+ 1 === lane &&
6208
6343
  0 === executionContext &&
6209
- 0 === (fiber.mode & 1) &&
6210
- ((workInProgressRootRenderTargetTime = now() + 500),
6211
- includesLegacySyncCallbacks && flushSyncCallbacks()))
6212
- : ensureRootIsScheduled(root, eventTime);
6344
+ 0 === (fiber.mode & 1) &&
6345
+ ((workInProgressRootRenderTargetTime = now() + 500),
6346
+ includesLegacySyncCallbacks && flushSyncCallbacks());
6213
6347
  return root;
6214
6348
  }
6215
6349
  function markUpdateLaneFromFiberToRoot(sourceFiber, lane) {
@@ -6287,7 +6421,7 @@ function ensureRootIsScheduled(root, currentTime) {
6287
6421
  default:
6288
6422
  existingCallbackNode = NormalPriority;
6289
6423
  }
6290
- existingCallbackNode = scheduleCallback(
6424
+ existingCallbackNode = scheduleCallback$1(
6291
6425
  existingCallbackNode,
6292
6426
  performConcurrentWorkOnRoot.bind(null, root)
6293
6427
  );
@@ -6299,7 +6433,7 @@ function ensureRootIsScheduled(root, currentTime) {
6299
6433
  function performConcurrentWorkOnRoot(root, didTimeout) {
6300
6434
  currentEventTime = -1;
6301
6435
  currentEventTransitionLane = 0;
6302
- if (0 !== (executionContext & 24))
6436
+ if (0 !== (executionContext & 6))
6303
6437
  throw Error("Should not already be working.");
6304
6438
  var originalCallbackNode = root.callbackNode;
6305
6439
  if (flushPassiveEffects() && root.callbackNode !== originalCallbackNode)
@@ -6309,12 +6443,12 @@ function performConcurrentWorkOnRoot(root, didTimeout) {
6309
6443
  root === workInProgressRoot ? workInProgressRootRenderLanes : 0
6310
6444
  );
6311
6445
  if (0 === lanes) return null;
6312
- var JSCompiler_inline_result =
6313
- 0 !== (lanes & root.expiredLanes) ? !1 : 0 === (lanes & 30);
6314
- if (JSCompiler_inline_result && !didTimeout) {
6446
+ if (0 !== (lanes & 30) || 0 !== (lanes & root.expiredLanes) || didTimeout)
6447
+ didTimeout = renderRootSync(root, lanes);
6448
+ else {
6315
6449
  didTimeout = lanes;
6316
- JSCompiler_inline_result = executionContext;
6317
- executionContext |= 8;
6450
+ var prevExecutionContext = executionContext;
6451
+ executionContext |= 2;
6318
6452
  var prevDispatcher = pushDispatcher();
6319
6453
  if (
6320
6454
  workInProgressRoot !== root ||
@@ -6332,100 +6466,117 @@ function performConcurrentWorkOnRoot(root, didTimeout) {
6332
6466
  while (1);
6333
6467
  resetContextDependencies();
6334
6468
  ReactCurrentDispatcher$2.current = prevDispatcher;
6335
- executionContext = JSCompiler_inline_result;
6469
+ executionContext = prevExecutionContext;
6336
6470
  null !== workInProgress
6337
6471
  ? (didTimeout = 0)
6338
6472
  : ((workInProgressRoot = null),
6339
6473
  (workInProgressRootRenderLanes = 0),
6340
6474
  (didTimeout = workInProgressRootExitStatus));
6341
- } else didTimeout = renderRootSync(root, lanes);
6475
+ }
6342
6476
  if (0 !== didTimeout) {
6343
6477
  2 === didTimeout &&
6344
- ((executionContext |= 32),
6345
- root.hydrate && (root.hydrate = !1),
6346
- (JSCompiler_inline_result = getLanesToRetrySynchronouslyOnError(root)),
6347
- 0 !== JSCompiler_inline_result &&
6348
- ((lanes = JSCompiler_inline_result),
6349
- (didTimeout = renderRootSync(root, JSCompiler_inline_result))));
6478
+ ((prevExecutionContext = getLanesToRetrySynchronouslyOnError(root)),
6479
+ 0 !== prevExecutionContext &&
6480
+ ((lanes = prevExecutionContext),
6481
+ (didTimeout = recoverFromConcurrentError(root, prevExecutionContext))));
6350
6482
  if (1 === didTimeout)
6351
6483
  throw ((originalCallbackNode = workInProgressRootFatalError),
6352
6484
  prepareFreshStack(root, 0),
6353
6485
  markRootSuspended$1(root, lanes),
6354
6486
  ensureRootIsScheduled(root, now()),
6355
6487
  originalCallbackNode);
6356
- root.finishedWork = root.current.alternate;
6357
- root.finishedLanes = lanes;
6358
- switch (didTimeout) {
6359
- case 0:
6360
- case 1:
6361
- throw Error("Root did not complete. This is a bug in React.");
6362
- case 2:
6363
- commitRoot(root);
6364
- break;
6365
- case 3:
6366
- markRootSuspended$1(root, lanes);
6367
- if (
6368
- (lanes & 130023424) === lanes &&
6369
- ((didTimeout = globalMostRecentFallbackTime + 500 - now()),
6370
- 10 < didTimeout)
6371
- ) {
6372
- if (0 !== getNextLanes(root, 0)) break;
6373
- JSCompiler_inline_result = root.suspendedLanes;
6374
- if ((JSCompiler_inline_result & lanes) !== lanes) {
6375
- requestEventTime();
6376
- root.pingedLanes |= root.suspendedLanes & JSCompiler_inline_result;
6488
+ if (6 === didTimeout) markRootSuspended$1(root, lanes);
6489
+ else {
6490
+ prevExecutionContext = root.current.alternate;
6491
+ if (
6492
+ 0 === (lanes & 30) &&
6493
+ !isRenderConsistentWithExternalStores(prevExecutionContext) &&
6494
+ ((didTimeout = renderRootSync(root, lanes)),
6495
+ 2 === didTimeout &&
6496
+ ((prevDispatcher = getLanesToRetrySynchronouslyOnError(root)),
6497
+ 0 !== prevDispatcher &&
6498
+ ((lanes = prevDispatcher),
6499
+ (didTimeout = recoverFromConcurrentError(root, prevDispatcher)))),
6500
+ 1 === didTimeout)
6501
+ )
6502
+ throw ((originalCallbackNode = workInProgressRootFatalError),
6503
+ prepareFreshStack(root, 0),
6504
+ markRootSuspended$1(root, lanes),
6505
+ ensureRootIsScheduled(root, now()),
6506
+ originalCallbackNode);
6507
+ root.finishedWork = prevExecutionContext;
6508
+ root.finishedLanes = lanes;
6509
+ switch (didTimeout) {
6510
+ case 0:
6511
+ case 1:
6512
+ throw Error("Root did not complete. This is a bug in React.");
6513
+ case 2:
6514
+ commitRoot(root, workInProgressRootRecoverableErrors);
6515
+ break;
6516
+ case 3:
6517
+ markRootSuspended$1(root, lanes);
6518
+ if (
6519
+ (lanes & 130023424) === lanes &&
6520
+ ((didTimeout = globalMostRecentFallbackTime + 500 - now()),
6521
+ 10 < didTimeout)
6522
+ ) {
6523
+ if (0 !== getNextLanes(root, 0)) break;
6524
+ prevExecutionContext = root.suspendedLanes;
6525
+ if ((prevExecutionContext & lanes) !== lanes) {
6526
+ requestEventTime();
6527
+ root.pingedLanes |= root.suspendedLanes & prevExecutionContext;
6528
+ break;
6529
+ }
6530
+ root.timeoutHandle = scheduleTimeout(
6531
+ commitRoot.bind(null, root, workInProgressRootRecoverableErrors),
6532
+ didTimeout
6533
+ );
6377
6534
  break;
6378
6535
  }
6379
- root.timeoutHandle = scheduleTimeout(
6380
- commitRoot.bind(null, root),
6381
- didTimeout
6382
- );
6536
+ commitRoot(root, workInProgressRootRecoverableErrors);
6383
6537
  break;
6384
- }
6385
- commitRoot(root);
6386
- break;
6387
- case 4:
6388
- markRootSuspended$1(root, lanes);
6389
- if ((lanes & 4194240) === lanes) break;
6390
- didTimeout = root.eventTimes;
6391
- for (JSCompiler_inline_result = -1; 0 < lanes; ) {
6392
- var index$5 = 31 - clz32(lanes);
6393
- prevDispatcher = 1 << index$5;
6394
- index$5 = didTimeout[index$5];
6395
- index$5 > JSCompiler_inline_result &&
6396
- (JSCompiler_inline_result = index$5);
6397
- lanes &= ~prevDispatcher;
6398
- }
6399
- lanes = JSCompiler_inline_result;
6400
- lanes = now() - lanes;
6401
- lanes =
6402
- (120 > lanes
6403
- ? 120
6404
- : 480 > lanes
6405
- ? 480
6406
- : 1080 > lanes
6407
- ? 1080
6408
- : 1920 > lanes
6409
- ? 1920
6410
- : 3e3 > lanes
6411
- ? 3e3
6412
- : 4320 > lanes
6413
- ? 4320
6414
- : 1960 * ceil(lanes / 1960)) - lanes;
6415
- if (10 < lanes) {
6416
- root.timeoutHandle = scheduleTimeout(
6417
- commitRoot.bind(null, root),
6418
- lanes
6419
- );
6538
+ case 4:
6539
+ markRootSuspended$1(root, lanes);
6540
+ if ((lanes & 4194240) === lanes) break;
6541
+ didTimeout = root.eventTimes;
6542
+ for (prevExecutionContext = -1; 0 < lanes; ) {
6543
+ var index$5 = 31 - clz32(lanes);
6544
+ prevDispatcher = 1 << index$5;
6545
+ index$5 = didTimeout[index$5];
6546
+ index$5 > prevExecutionContext && (prevExecutionContext = index$5);
6547
+ lanes &= ~prevDispatcher;
6548
+ }
6549
+ lanes = prevExecutionContext;
6550
+ lanes = now() - lanes;
6551
+ lanes =
6552
+ (120 > lanes
6553
+ ? 120
6554
+ : 480 > lanes
6555
+ ? 480
6556
+ : 1080 > lanes
6557
+ ? 1080
6558
+ : 1920 > lanes
6559
+ ? 1920
6560
+ : 3e3 > lanes
6561
+ ? 3e3
6562
+ : 4320 > lanes
6563
+ ? 4320
6564
+ : 1960 * ceil(lanes / 1960)) - lanes;
6565
+ if (10 < lanes) {
6566
+ root.timeoutHandle = scheduleTimeout(
6567
+ commitRoot.bind(null, root, workInProgressRootRecoverableErrors),
6568
+ lanes
6569
+ );
6570
+ break;
6571
+ }
6572
+ commitRoot(root, workInProgressRootRecoverableErrors);
6420
6573
  break;
6421
- }
6422
- commitRoot(root);
6423
- break;
6424
- case 5:
6425
- commitRoot(root);
6426
- break;
6427
- default:
6428
- throw Error("Unknown root exit status.");
6574
+ case 5:
6575
+ commitRoot(root, workInProgressRootRecoverableErrors);
6576
+ break;
6577
+ default:
6578
+ throw Error("Unknown root exit status.");
6579
+ }
6429
6580
  }
6430
6581
  }
6431
6582
  ensureRootIsScheduled(root, now());
@@ -6433,9 +6584,60 @@ function performConcurrentWorkOnRoot(root, didTimeout) {
6433
6584
  ? performConcurrentWorkOnRoot.bind(null, root)
6434
6585
  : null;
6435
6586
  }
6587
+ function recoverFromConcurrentError(root, errorRetryLanes) {
6588
+ var errorsFromFirstAttempt = workInProgressRootConcurrentErrors;
6589
+ root.current.memoizedState.isDehydrated &&
6590
+ (prepareFreshStack(root, errorRetryLanes).flags |= 256);
6591
+ root = renderRootSync(root, errorRetryLanes);
6592
+ 2 !== root &&
6593
+ ((errorRetryLanes = workInProgressRootRecoverableErrors),
6594
+ (workInProgressRootRecoverableErrors = errorsFromFirstAttempt),
6595
+ null !== errorRetryLanes &&
6596
+ (null === workInProgressRootRecoverableErrors
6597
+ ? (workInProgressRootRecoverableErrors = errorRetryLanes)
6598
+ : workInProgressRootRecoverableErrors.push.apply(
6599
+ workInProgressRootRecoverableErrors,
6600
+ errorRetryLanes
6601
+ )));
6602
+ return root;
6603
+ }
6604
+ function isRenderConsistentWithExternalStores(finishedWork) {
6605
+ for (var node = finishedWork; ; ) {
6606
+ if (node.flags & 16384) {
6607
+ var updateQueue = node.updateQueue;
6608
+ if (
6609
+ null !== updateQueue &&
6610
+ ((updateQueue = updateQueue.stores), null !== updateQueue)
6611
+ )
6612
+ for (var i = 0; i < updateQueue.length; i++) {
6613
+ var check = updateQueue[i],
6614
+ getSnapshot = check.getSnapshot;
6615
+ check = check.value;
6616
+ try {
6617
+ if (!objectIs(getSnapshot(), check)) return !1;
6618
+ } catch (error) {
6619
+ return !1;
6620
+ }
6621
+ }
6622
+ }
6623
+ updateQueue = node.child;
6624
+ if (node.subtreeFlags & 16384 && null !== updateQueue)
6625
+ (updateQueue.return = node), (node = updateQueue);
6626
+ else {
6627
+ if (node === finishedWork) break;
6628
+ for (; null === node.sibling; ) {
6629
+ if (null === node.return || node.return === finishedWork) return !0;
6630
+ node = node.return;
6631
+ }
6632
+ node.sibling.return = node.return;
6633
+ node = node.sibling;
6634
+ }
6635
+ }
6636
+ return !0;
6637
+ }
6436
6638
  function markRootSuspended$1(root, suspendedLanes) {
6437
6639
  suspendedLanes &= ~workInProgressRootPingedLanes;
6438
- suspendedLanes &= ~workInProgressRootUpdatedLanes;
6640
+ suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes;
6439
6641
  root.suspendedLanes |= suspendedLanes;
6440
6642
  root.pingedLanes &= ~suspendedLanes;
6441
6643
  for (root = root.expirationTimes; 0 < suspendedLanes; ) {
@@ -6446,18 +6648,17 @@ function markRootSuspended$1(root, suspendedLanes) {
6446
6648
  }
6447
6649
  }
6448
6650
  function performSyncWorkOnRoot(root) {
6449
- if (0 !== (executionContext & 24))
6651
+ if (0 !== (executionContext & 6))
6450
6652
  throw Error("Should not already be working.");
6451
6653
  flushPassiveEffects();
6452
6654
  var lanes = getNextLanes(root, 0);
6453
6655
  if (0 === (lanes & 1)) return ensureRootIsScheduled(root, now()), null;
6454
6656
  var exitStatus = renderRootSync(root, lanes);
6455
6657
  if (0 !== root.tag && 2 === exitStatus) {
6456
- executionContext |= 32;
6457
- root.hydrate && (root.hydrate = !1);
6458
6658
  var errorRetryLanes = getLanesToRetrySynchronouslyOnError(root);
6459
6659
  0 !== errorRetryLanes &&
6460
- ((lanes = errorRetryLanes), (exitStatus = renderRootSync(root, lanes)));
6660
+ ((lanes = errorRetryLanes),
6661
+ (exitStatus = recoverFromConcurrentError(root, errorRetryLanes)));
6461
6662
  }
6462
6663
  if (1 === exitStatus)
6463
6664
  throw ((exitStatus = workInProgressRootFatalError),
@@ -6465,9 +6666,11 @@ function performSyncWorkOnRoot(root) {
6465
6666
  markRootSuspended$1(root, lanes),
6466
6667
  ensureRootIsScheduled(root, now()),
6467
6668
  exitStatus);
6669
+ if (6 === exitStatus)
6670
+ throw Error("Root did not complete. This is a bug in React.");
6468
6671
  root.finishedWork = root.current.alternate;
6469
6672
  root.finishedLanes = lanes;
6470
- commitRoot(root);
6673
+ commitRoot(root, workInProgressRootRecoverableErrors);
6471
6674
  ensureRootIsScheduled(root, now());
6472
6675
  return null;
6473
6676
  }
@@ -6484,6 +6687,7 @@ function prepareFreshStack(root, lanes) {
6484
6687
  if (null !== workInProgress)
6485
6688
  for (timeoutHandle = workInProgress.return; null !== timeoutHandle; ) {
6486
6689
  var interruptedWork = timeoutHandle;
6690
+ popTreeContext(interruptedWork);
6487
6691
  switch (interruptedWork.tag) {
6488
6692
  case 1:
6489
6693
  interruptedWork = interruptedWork.type.childContextTypes;
@@ -6519,30 +6723,32 @@ function prepareFreshStack(root, lanes) {
6519
6723
  timeoutHandle = timeoutHandle.return;
6520
6724
  }
6521
6725
  workInProgressRoot = root;
6522
- workInProgress = createWorkInProgress(root.current, null);
6726
+ workInProgress = root = createWorkInProgress(root.current, null);
6523
6727
  workInProgressRootRenderLanes = subtreeRenderLanes = lanes;
6524
6728
  workInProgressRootExitStatus = 0;
6525
6729
  workInProgressRootFatalError = null;
6526
- workInProgressRootPingedLanes = workInProgressRootUpdatedLanes = workInProgressRootSkippedLanes = 0;
6730
+ workInProgressRootPingedLanes = workInProgressRootInterleavedUpdatedLanes = workInProgressRootSkippedLanes = 0;
6731
+ workInProgressRootRecoverableErrors = workInProgressRootConcurrentErrors = null;
6527
6732
  if (null !== interleavedQueues) {
6528
- for (root = 0; root < interleavedQueues.length; root++)
6733
+ for (lanes = 0; lanes < interleavedQueues.length; lanes++)
6529
6734
  if (
6530
- ((lanes = interleavedQueues[root]),
6531
- (timeoutHandle = lanes.interleaved),
6532
- null !== timeoutHandle)
6735
+ ((timeoutHandle = interleavedQueues[lanes]),
6736
+ (interruptedWork = timeoutHandle.interleaved),
6737
+ null !== interruptedWork)
6533
6738
  ) {
6534
- lanes.interleaved = null;
6535
- interruptedWork = timeoutHandle.next;
6536
- var lastPendingUpdate = lanes.pending;
6739
+ timeoutHandle.interleaved = null;
6740
+ var firstInterleavedUpdate = interruptedWork.next,
6741
+ lastPendingUpdate = timeoutHandle.pending;
6537
6742
  if (null !== lastPendingUpdate) {
6538
6743
  var firstPendingUpdate = lastPendingUpdate.next;
6539
- lastPendingUpdate.next = interruptedWork;
6540
- timeoutHandle.next = firstPendingUpdate;
6744
+ lastPendingUpdate.next = firstInterleavedUpdate;
6745
+ interruptedWork.next = firstPendingUpdate;
6541
6746
  }
6542
- lanes.pending = timeoutHandle;
6747
+ timeoutHandle.pending = interruptedWork;
6543
6748
  }
6544
6749
  interleavedQueues = null;
6545
6750
  }
6751
+ return root;
6546
6752
  }
6547
6753
  function handleError(root$jscomp$0, thrownValue) {
6548
6754
  do {
@@ -6578,61 +6784,59 @@ function handleError(root$jscomp$0, thrownValue) {
6578
6784
  sourceFiber = erroredWork,
6579
6785
  value = thrownValue;
6580
6786
  thrownValue = workInProgressRootRenderLanes;
6581
- sourceFiber.flags |= 8192;
6787
+ sourceFiber.flags |= 32768;
6582
6788
  if (
6583
6789
  null !== value &&
6584
6790
  "object" === typeof value &&
6585
6791
  "function" === typeof value.then
6586
6792
  ) {
6587
6793
  var wakeable = value,
6588
- tag = sourceFiber.tag;
6794
+ sourceFiber$jscomp$0 = sourceFiber,
6795
+ tag = sourceFiber$jscomp$0.tag;
6589
6796
  if (
6590
- 0 === (sourceFiber.mode & 1) &&
6797
+ 0 === (sourceFiber$jscomp$0.mode & 1) &&
6591
6798
  (0 === tag || 11 === tag || 15 === tag)
6592
6799
  ) {
6593
- var currentSource = sourceFiber.alternate;
6800
+ var currentSource = sourceFiber$jscomp$0.alternate;
6594
6801
  currentSource
6595
- ? ((sourceFiber.updateQueue = currentSource.updateQueue),
6596
- (sourceFiber.memoizedState = currentSource.memoizedState),
6597
- (sourceFiber.lanes = currentSource.lanes))
6598
- : ((sourceFiber.updateQueue = null),
6599
- (sourceFiber.memoizedState = null));
6802
+ ? ((sourceFiber$jscomp$0.updateQueue = currentSource.updateQueue),
6803
+ (sourceFiber$jscomp$0.memoizedState =
6804
+ currentSource.memoizedState),
6805
+ (sourceFiber$jscomp$0.lanes = currentSource.lanes))
6806
+ : ((sourceFiber$jscomp$0.updateQueue = null),
6807
+ (sourceFiber$jscomp$0.memoizedState = null));
6600
6808
  }
6601
- var hasInvisibleParentBoundary =
6602
- 0 !== (suspenseStackCursor.current & 1),
6603
- workInProgress$32 = returnFiber;
6604
- do {
6605
- var JSCompiler_temp;
6606
- if ((JSCompiler_temp = 13 === workInProgress$32.tag)) {
6607
- var nextState = workInProgress$32.memoizedState;
6608
- if (null !== nextState)
6609
- JSCompiler_temp = null !== nextState.dehydrated ? !0 : !1;
6610
- else {
6611
- var props = workInProgress$32.memoizedProps;
6809
+ b: {
6810
+ sourceFiber$jscomp$0 = returnFiber;
6811
+ do {
6812
+ var JSCompiler_temp;
6813
+ if ((JSCompiler_temp = 13 === sourceFiber$jscomp$0.tag)) {
6814
+ var nextState = sourceFiber$jscomp$0.memoizedState;
6612
6815
  JSCompiler_temp =
6613
- void 0 === props.fallback
6614
- ? !1
6615
- : !0 !== props.unstable_avoidThisFallback
6616
- ? !0
6617
- : hasInvisibleParentBoundary
6618
- ? !1
6816
+ null !== nextState
6817
+ ? null !== nextState.dehydrated
6818
+ ? !0
6819
+ : !1
6619
6820
  : !0;
6620
6821
  }
6621
- }
6622
- if (JSCompiler_temp) {
6623
- var wakeables = workInProgress$32.updateQueue;
6624
- if (null === wakeables) {
6625
- var updateQueue = new Set();
6626
- updateQueue.add(wakeable);
6627
- workInProgress$32.updateQueue = updateQueue;
6628
- } else wakeables.add(wakeable);
6629
- if (
6630
- 0 === (workInProgress$32.mode & 1) &&
6631
- workInProgress$32 !== returnFiber
6632
- ) {
6633
- workInProgress$32.flags |= 128;
6634
- sourceFiber.flags |= 32768;
6635
- sourceFiber.flags &= -10053;
6822
+ if (JSCompiler_temp) {
6823
+ var suspenseBoundary = sourceFiber$jscomp$0;
6824
+ break b;
6825
+ }
6826
+ sourceFiber$jscomp$0 = sourceFiber$jscomp$0.return;
6827
+ } while (null !== sourceFiber$jscomp$0);
6828
+ suspenseBoundary = null;
6829
+ }
6830
+ if (null !== suspenseBoundary) {
6831
+ suspenseBoundary.flags &= -257;
6832
+ value = suspenseBoundary;
6833
+ sourceFiber$jscomp$0 = thrownValue;
6834
+ if (0 === (value.mode & 1))
6835
+ if (value === returnFiber) value.flags |= 65536;
6836
+ else {
6837
+ value.flags |= 128;
6838
+ sourceFiber.flags |= 131072;
6839
+ sourceFiber.flags &= -52805;
6636
6840
  if (1 === sourceFiber.tag)
6637
6841
  if (null === sourceFiber.alternate) sourceFiber.tag = 17;
6638
6842
  else {
@@ -6641,83 +6845,78 @@ function handleError(root$jscomp$0, thrownValue) {
6641
6845
  enqueueUpdate(sourceFiber, update);
6642
6846
  }
6643
6847
  sourceFiber.lanes |= 1;
6644
- break a;
6645
- }
6646
- value = void 0;
6647
- sourceFiber = thrownValue;
6648
- var pingCache = root.pingCache;
6649
- null === pingCache
6650
- ? ((pingCache = root.pingCache = new PossiblyWeakMap()),
6651
- (value = new Set()),
6652
- pingCache.set(wakeable, value))
6653
- : ((value = pingCache.get(wakeable)),
6654
- void 0 === value &&
6655
- ((value = new Set()), pingCache.set(wakeable, value)));
6656
- if (!value.has(sourceFiber)) {
6657
- value.add(sourceFiber);
6658
- var ping = pingSuspendedRoot.bind(
6659
- null,
6660
- root,
6661
- wakeable,
6662
- sourceFiber
6663
- );
6664
- wakeable.then(ping, ping);
6665
6848
  }
6666
- workInProgress$32.flags |= 16384;
6667
- workInProgress$32.lanes = thrownValue;
6849
+ else (value.flags |= 65536), (value.lanes = sourceFiber$jscomp$0);
6850
+ suspenseBoundary.mode & 1 &&
6851
+ attachPingListener(root, wakeable, thrownValue);
6852
+ thrownValue = suspenseBoundary;
6853
+ root = wakeable;
6854
+ var wakeables = thrownValue.updateQueue;
6855
+ if (null === wakeables) {
6856
+ var updateQueue = new Set();
6857
+ updateQueue.add(root);
6858
+ thrownValue.updateQueue = updateQueue;
6859
+ } else wakeables.add(root);
6860
+ break a;
6861
+ } else {
6862
+ if (0 === (thrownValue & 1)) {
6863
+ attachPingListener(root, wakeable, thrownValue);
6864
+ renderDidSuspendDelayIfPossible();
6668
6865
  break a;
6669
6866
  }
6670
- workInProgress$32 = workInProgress$32.return;
6671
- } while (null !== workInProgress$32);
6672
- value = Error(
6673
- (getComponentNameFromFiber(sourceFiber) || "A React component") +
6674
- " 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."
6675
- );
6867
+ value = Error(
6868
+ "A component suspended while responding to synchronous input. This will cause the UI to be replaced with a loading indicator. To fix, updates that suspend should be wrapped with startTransition."
6869
+ );
6870
+ }
6676
6871
  }
6677
- 5 !== workInProgressRootExitStatus &&
6872
+ root = value;
6873
+ 4 !== workInProgressRootExitStatus &&
6678
6874
  (workInProgressRootExitStatus = 2);
6875
+ null === workInProgressRootConcurrentErrors
6876
+ ? (workInProgressRootConcurrentErrors = [root])
6877
+ : workInProgressRootConcurrentErrors.push(root);
6679
6878
  value = createCapturedValue(value, sourceFiber);
6680
- workInProgress$32 = returnFiber;
6879
+ root = returnFiber;
6681
6880
  do {
6682
- switch (workInProgress$32.tag) {
6881
+ switch (root.tag) {
6683
6882
  case 3:
6684
- root = value;
6685
- workInProgress$32.flags |= 16384;
6883
+ wakeable = value;
6884
+ root.flags |= 65536;
6686
6885
  thrownValue &= -thrownValue;
6687
- workInProgress$32.lanes |= thrownValue;
6688
- var update$33 = createRootErrorUpdate(
6689
- workInProgress$32,
6886
+ root.lanes |= thrownValue;
6887
+ var update$jscomp$0 = createRootErrorUpdate(
6690
6888
  root,
6889
+ wakeable,
6691
6890
  thrownValue
6692
6891
  );
6693
- enqueueCapturedUpdate(workInProgress$32, update$33);
6892
+ enqueueCapturedUpdate(root, update$jscomp$0);
6694
6893
  break a;
6695
6894
  case 1:
6696
- root = value;
6697
- var ctor = workInProgress$32.type,
6698
- instance = workInProgress$32.stateNode;
6895
+ wakeable = value;
6896
+ var ctor = root.type,
6897
+ instance = root.stateNode;
6699
6898
  if (
6700
- 0 === (workInProgress$32.flags & 128) &&
6899
+ 0 === (root.flags & 128) &&
6701
6900
  ("function" === typeof ctor.getDerivedStateFromError ||
6702
6901
  (null !== instance &&
6703
6902
  "function" === typeof instance.componentDidCatch &&
6704
6903
  (null === legacyErrorBoundariesThatAlreadyFailed ||
6705
6904
  !legacyErrorBoundariesThatAlreadyFailed.has(instance))))
6706
6905
  ) {
6707
- workInProgress$32.flags |= 16384;
6906
+ root.flags |= 65536;
6708
6907
  thrownValue &= -thrownValue;
6709
- workInProgress$32.lanes |= thrownValue;
6710
- var update$36 = createClassErrorUpdate(
6711
- workInProgress$32,
6908
+ root.lanes |= thrownValue;
6909
+ var update$33 = createClassErrorUpdate(
6712
6910
  root,
6911
+ wakeable,
6713
6912
  thrownValue
6714
6913
  );
6715
- enqueueCapturedUpdate(workInProgress$32, update$36);
6914
+ enqueueCapturedUpdate(root, update$33);
6716
6915
  break a;
6717
6916
  }
6718
6917
  }
6719
- workInProgress$32 = workInProgress$32.return;
6720
- } while (null !== workInProgress$32);
6918
+ root = root.return;
6919
+ } while (null !== root);
6721
6920
  }
6722
6921
  completeUnitOfWork(erroredWork);
6723
6922
  } catch (yetAnotherThrownValue) {
@@ -6735,9 +6934,21 @@ function pushDispatcher() {
6735
6934
  ReactCurrentDispatcher$2.current = ContextOnlyDispatcher;
6736
6935
  return null === prevDispatcher ? ContextOnlyDispatcher : prevDispatcher;
6737
6936
  }
6937
+ function renderDidSuspendDelayIfPossible() {
6938
+ if (
6939
+ 0 === workInProgressRootExitStatus ||
6940
+ 3 === workInProgressRootExitStatus ||
6941
+ 2 === workInProgressRootExitStatus
6942
+ )
6943
+ workInProgressRootExitStatus = 4;
6944
+ null === workInProgressRoot ||
6945
+ (0 === (workInProgressRootSkippedLanes & 268435455) &&
6946
+ 0 === (workInProgressRootInterleavedUpdatedLanes & 268435455)) ||
6947
+ markRootSuspended$1(workInProgressRoot, workInProgressRootRenderLanes);
6948
+ }
6738
6949
  function renderRootSync(root, lanes) {
6739
6950
  var prevExecutionContext = executionContext;
6740
- executionContext |= 8;
6951
+ executionContext |= 2;
6741
6952
  var prevDispatcher = pushDispatcher();
6742
6953
  (workInProgressRoot === root && workInProgressRootRenderLanes === lanes) ||
6743
6954
  prepareFreshStack(root, lanes);
@@ -6778,7 +6989,7 @@ function completeUnitOfWork(unitOfWork) {
6778
6989
  do {
6779
6990
  var current = completedWork.alternate;
6780
6991
  unitOfWork = completedWork.return;
6781
- if (0 === (completedWork.flags & 8192)) {
6992
+ if (0 === (completedWork.flags & 32768)) {
6782
6993
  if (
6783
6994
  ((current = completeWork(current, completedWork, subtreeRenderLanes)),
6784
6995
  null !== current)
@@ -6787,16 +6998,21 @@ function completeUnitOfWork(unitOfWork) {
6787
6998
  return;
6788
6999
  }
6789
7000
  } else {
6790
- current = unwindWork(completedWork);
7001
+ current = unwindWork(current, completedWork);
6791
7002
  if (null !== current) {
6792
- current.flags &= 8191;
7003
+ current.flags &= 32767;
6793
7004
  workInProgress = current;
6794
7005
  return;
6795
7006
  }
6796
- null !== unitOfWork &&
6797
- ((unitOfWork.flags |= 8192),
6798
- (unitOfWork.subtreeFlags = 0),
6799
- (unitOfWork.deletions = null));
7007
+ if (null !== unitOfWork)
7008
+ (unitOfWork.flags |= 32768),
7009
+ (unitOfWork.subtreeFlags = 0),
7010
+ (unitOfWork.deletions = null);
7011
+ else {
7012
+ workInProgressRootExitStatus = 6;
7013
+ workInProgress = null;
7014
+ return;
7015
+ }
6800
7016
  }
6801
7017
  completedWork = completedWork.sibling;
6802
7018
  if (null !== completedWork) {
@@ -6807,23 +7023,23 @@ function completeUnitOfWork(unitOfWork) {
6807
7023
  } while (null !== completedWork);
6808
7024
  0 === workInProgressRootExitStatus && (workInProgressRootExitStatus = 5);
6809
7025
  }
6810
- function commitRoot(root) {
7026
+ function commitRoot(root, recoverableErrors) {
6811
7027
  var previousUpdateLanePriority = currentUpdatePriority,
6812
7028
  prevTransition = ReactCurrentBatchConfig$2.transition;
6813
7029
  try {
6814
- (ReactCurrentBatchConfig$2.transition = 0),
7030
+ (ReactCurrentBatchConfig$2.transition = null),
6815
7031
  (currentUpdatePriority = 1),
6816
- commitRootImpl(root, previousUpdateLanePriority);
7032
+ commitRootImpl(root, recoverableErrors, previousUpdateLanePriority);
6817
7033
  } finally {
6818
7034
  (ReactCurrentBatchConfig$2.transition = prevTransition),
6819
7035
  (currentUpdatePriority = previousUpdateLanePriority);
6820
7036
  }
6821
7037
  return null;
6822
7038
  }
6823
- function commitRootImpl(root, renderPriorityLevel) {
7039
+ function commitRootImpl(root, recoverableErrors, renderPriorityLevel) {
6824
7040
  do flushPassiveEffects();
6825
7041
  while (null !== rootWithPendingPassiveEffects);
6826
- if (0 !== (executionContext & 24))
7042
+ if (0 !== (executionContext & 6))
6827
7043
  throw Error("Should not already be working.");
6828
7044
  var finishedWork = root.finishedWork,
6829
7045
  lanes = root.finishedLanes;
@@ -6841,25 +7057,25 @@ function commitRootImpl(root, renderPriorityLevel) {
6841
7057
  root === workInProgressRoot &&
6842
7058
  ((workInProgress = workInProgressRoot = null),
6843
7059
  (workInProgressRootRenderLanes = 0));
6844
- (0 === (finishedWork.subtreeFlags & 1040) &&
6845
- 0 === (finishedWork.flags & 1040)) ||
7060
+ (0 === (finishedWork.subtreeFlags & 2064) &&
7061
+ 0 === (finishedWork.flags & 2064)) ||
6846
7062
  rootDoesHavePassiveEffects ||
6847
7063
  ((rootDoesHavePassiveEffects = !0),
6848
- scheduleCallback(NormalPriority, function() {
7064
+ scheduleCallback$1(NormalPriority, function() {
6849
7065
  flushPassiveEffects();
6850
7066
  return null;
6851
7067
  }));
6852
- remainingLanes = 0 !== (finishedWork.flags & 8054);
6853
- if (0 !== (finishedWork.subtreeFlags & 8054) || remainingLanes) {
7068
+ remainingLanes = 0 !== (finishedWork.flags & 15990);
7069
+ if (0 !== (finishedWork.subtreeFlags & 15990) || remainingLanes) {
6854
7070
  remainingLanes = ReactCurrentBatchConfig$2.transition;
6855
- ReactCurrentBatchConfig$2.transition = 0;
7071
+ ReactCurrentBatchConfig$2.transition = null;
6856
7072
  var previousPriority = currentUpdatePriority;
6857
7073
  currentUpdatePriority = 1;
6858
7074
  var prevExecutionContext = executionContext;
6859
- executionContext |= 16;
7075
+ executionContext |= 4;
6860
7076
  ReactCurrentOwner$2.current = null;
6861
7077
  commitBeforeMutationEffects(root, finishedWork);
6862
- commitMutationEffects(root, finishedWork);
7078
+ commitMutationEffects(root, finishedWork, lanes);
6863
7079
  root.current = finishedWork;
6864
7080
  commitLayoutEffects(finishedWork, root, lanes);
6865
7081
  requestPaint();
@@ -6873,22 +7089,29 @@ function commitRootImpl(root, renderPriorityLevel) {
6873
7089
  (pendingPassiveEffectsLanes = lanes));
6874
7090
  remainingLanes = root.pendingLanes;
6875
7091
  0 === remainingLanes && (legacyErrorBoundariesThatAlreadyFailed = null);
6876
- 0 !== (remainingLanes & 1)
6877
- ? root === rootWithNestedUpdates
6878
- ? nestedUpdateCount++
6879
- : ((nestedUpdateCount = 0), (rootWithNestedUpdates = root))
6880
- : (nestedUpdateCount = 0);
6881
7092
  onCommitRoot(finishedWork.stateNode, renderPriorityLevel);
6882
7093
  ensureRootIsScheduled(root, now());
7094
+ if (null !== recoverableErrors)
7095
+ for (
7096
+ renderPriorityLevel = root.onRecoverableError, finishedWork = 0;
7097
+ finishedWork < recoverableErrors.length;
7098
+ finishedWork++
7099
+ )
7100
+ renderPriorityLevel(recoverableErrors[finishedWork]);
6883
7101
  if (hasUncaughtError)
6884
7102
  throw ((hasUncaughtError = !1),
6885
7103
  (root = firstUncaughtError),
6886
7104
  (firstUncaughtError = null),
6887
7105
  root);
6888
- if (0 !== (executionContext & 4)) return null;
6889
7106
  0 !== (pendingPassiveEffectsLanes & 1) &&
6890
7107
  0 !== root.tag &&
6891
7108
  flushPassiveEffects();
7109
+ remainingLanes = root.pendingLanes;
7110
+ 0 !== (remainingLanes & 1)
7111
+ ? root === rootWithNestedUpdates
7112
+ ? nestedUpdateCount++
7113
+ : ((nestedUpdateCount = 0), (rootWithNestedUpdates = root))
7114
+ : (nestedUpdateCount = 0);
6892
7115
  flushSyncCallbacks();
6893
7116
  return null;
6894
7117
  }
@@ -6898,7 +7121,7 @@ function flushPassiveEffects() {
6898
7121
  prevTransition = ReactCurrentBatchConfig$2.transition,
6899
7122
  previousPriority = currentUpdatePriority;
6900
7123
  try {
6901
- ReactCurrentBatchConfig$2.transition = 0;
7124
+ ReactCurrentBatchConfig$2.transition = null;
6902
7125
  currentUpdatePriority = 16 > renderPriority ? 16 : renderPriority;
6903
7126
  if (null === rootWithPendingPassiveEffects)
6904
7127
  var JSCompiler_inline_result = !1;
@@ -6906,10 +7129,10 @@ function flushPassiveEffects() {
6906
7129
  renderPriority = rootWithPendingPassiveEffects;
6907
7130
  rootWithPendingPassiveEffects = null;
6908
7131
  pendingPassiveEffectsLanes = 0;
6909
- if (0 !== (executionContext & 24))
7132
+ if (0 !== (executionContext & 6))
6910
7133
  throw Error("Cannot flush passive effects while already rendering.");
6911
7134
  var prevExecutionContext = executionContext;
6912
- executionContext |= 16;
7135
+ executionContext |= 4;
6913
7136
  for (nextEffect = renderPriority.current; null !== nextEffect; ) {
6914
7137
  var fiber = nextEffect,
6915
7138
  child = fiber.child;
@@ -6924,7 +7147,7 @@ function flushPassiveEffects() {
6924
7147
  case 0:
6925
7148
  case 11:
6926
7149
  case 15:
6927
- commitHookEffectListUnmount(4, fiber$jscomp$0, fiber);
7150
+ commitHookEffectListUnmount(8, fiber$jscomp$0, fiber);
6928
7151
  }
6929
7152
  var child$jscomp$0 = fiber$jscomp$0.child;
6930
7153
  if (null !== child$jscomp$0)
@@ -6964,17 +7187,17 @@ function flushPassiveEffects() {
6964
7187
  nextEffect = fiber;
6965
7188
  }
6966
7189
  }
6967
- if (0 !== (fiber.subtreeFlags & 1040) && null !== child)
7190
+ if (0 !== (fiber.subtreeFlags & 2064) && null !== child)
6968
7191
  (child.return = fiber), (nextEffect = child);
6969
7192
  else
6970
7193
  b: for (; null !== nextEffect; ) {
6971
7194
  fiber = nextEffect;
6972
- if (0 !== (fiber.flags & 1024))
7195
+ if (0 !== (fiber.flags & 2048))
6973
7196
  switch (fiber.tag) {
6974
7197
  case 0:
6975
7198
  case 11:
6976
7199
  case 15:
6977
- commitHookEffectListUnmount(5, fiber, fiber.return);
7200
+ commitHookEffectListUnmount(9, fiber, fiber.return);
6978
7201
  }
6979
7202
  var sibling$jscomp$0 = fiber.sibling;
6980
7203
  if (null !== sibling$jscomp$0) {
@@ -6989,18 +7212,18 @@ function flushPassiveEffects() {
6989
7212
  for (nextEffect = finishedWork; null !== nextEffect; ) {
6990
7213
  child = nextEffect;
6991
7214
  var firstChild = child.child;
6992
- if (0 !== (child.subtreeFlags & 1040) && null !== firstChild)
7215
+ if (0 !== (child.subtreeFlags & 2064) && null !== firstChild)
6993
7216
  (firstChild.return = child), (nextEffect = firstChild);
6994
7217
  else
6995
7218
  b: for (child = finishedWork; null !== nextEffect; ) {
6996
7219
  deletions = nextEffect;
6997
- if (0 !== (deletions.flags & 1024))
7220
+ if (0 !== (deletions.flags & 2048))
6998
7221
  try {
6999
7222
  switch (deletions.tag) {
7000
7223
  case 0:
7001
7224
  case 11:
7002
7225
  case 15:
7003
- commitHookEffectListMount(5, deletions);
7226
+ commitHookEffectListMount(9, deletions);
7004
7227
  }
7005
7228
  } catch (error) {
7006
7229
  captureCommitPhaseError(deletions, deletions.return, error);
@@ -7127,7 +7350,6 @@ function resolveRetryWakeable(boundaryFiber, wakeable) {
7127
7350
  }
7128
7351
  var beginWork$1;
7129
7352
  beginWork$1 = function(current, workInProgress, renderLanes) {
7130
- var updateLanes = workInProgress.lanes;
7131
7353
  if (null !== current)
7132
7354
  if (
7133
7355
  current.memoizedProps !== workInProgress.pendingProps ||
@@ -7135,158 +7357,98 @@ beginWork$1 = function(current, workInProgress, renderLanes) {
7135
7357
  )
7136
7358
  didReceiveUpdate = !0;
7137
7359
  else {
7138
- if (0 === (renderLanes & updateLanes)) {
7139
- didReceiveUpdate = !1;
7140
- switch (workInProgress.tag) {
7141
- case 3:
7142
- pushHostRootContext(workInProgress);
7143
- break;
7144
- case 5:
7145
- pushHostContext(workInProgress);
7146
- break;
7147
- case 1:
7148
- isContextProvider(workInProgress.type) &&
7149
- pushContextProvider(workInProgress);
7150
- break;
7151
- case 4:
7152
- pushHostContainer(
7153
- workInProgress,
7154
- workInProgress.stateNode.containerInfo
7155
- );
7156
- break;
7157
- case 10:
7158
- updateLanes = workInProgress.type._context;
7159
- var nextValue = workInProgress.memoizedProps.value;
7160
- push(valueCursor, updateLanes._currentValue);
7161
- updateLanes._currentValue = nextValue;
7162
- break;
7163
- case 13:
7164
- if (null !== workInProgress.memoizedState) {
7165
- if (0 !== (renderLanes & workInProgress.child.childLanes))
7166
- return updateSuspenseComponent(
7167
- current,
7168
- workInProgress,
7169
- renderLanes
7170
- );
7171
- push(suspenseStackCursor, suspenseStackCursor.current & 1);
7172
- workInProgress = bailoutOnAlreadyFinishedWork(
7173
- current,
7174
- workInProgress,
7175
- renderLanes
7176
- );
7177
- return null !== workInProgress ? workInProgress.sibling : null;
7178
- }
7179
- push(suspenseStackCursor, suspenseStackCursor.current & 1);
7180
- break;
7181
- case 19:
7182
- updateLanes = 0 !== (renderLanes & workInProgress.childLanes);
7183
- if (0 !== (current.flags & 128)) {
7184
- if (updateLanes)
7185
- return updateSuspenseListComponent(
7186
- current,
7187
- workInProgress,
7188
- renderLanes
7189
- );
7190
- workInProgress.flags |= 128;
7191
- }
7192
- nextValue = workInProgress.memoizedState;
7193
- null !== nextValue &&
7194
- ((nextValue.rendering = null),
7195
- (nextValue.tail = null),
7196
- (nextValue.lastEffect = null));
7197
- push(suspenseStackCursor, suspenseStackCursor.current);
7198
- if (updateLanes) break;
7199
- else return null;
7200
- case 22:
7201
- case 23:
7202
- return (
7203
- (workInProgress.lanes = 0),
7204
- updateOffscreenComponent(current, workInProgress, renderLanes)
7205
- );
7206
- }
7207
- return bailoutOnAlreadyFinishedWork(
7208
- current,
7209
- workInProgress,
7210
- renderLanes
7360
+ if (
7361
+ 0 === (current.lanes & renderLanes) &&
7362
+ 0 === (workInProgress.flags & 128)
7363
+ )
7364
+ return (
7365
+ (didReceiveUpdate = !1),
7366
+ attemptEarlyBailoutIfNoScheduledUpdate(
7367
+ current,
7368
+ workInProgress,
7369
+ renderLanes
7370
+ )
7211
7371
  );
7212
- }
7213
- didReceiveUpdate = 0 !== (current.flags & 32768) ? !0 : !1;
7372
+ didReceiveUpdate = 0 !== (current.flags & 131072) ? !0 : !1;
7214
7373
  }
7215
7374
  else didReceiveUpdate = !1;
7216
7375
  workInProgress.lanes = 0;
7217
7376
  switch (workInProgress.tag) {
7218
7377
  case 2:
7219
- updateLanes = workInProgress.type;
7378
+ var Component = workInProgress.type;
7220
7379
  null !== current &&
7221
7380
  ((current.alternate = null),
7222
7381
  (workInProgress.alternate = null),
7223
7382
  (workInProgress.flags |= 2));
7224
7383
  current = workInProgress.pendingProps;
7225
- nextValue = getMaskedContext(workInProgress, contextStackCursor.current);
7384
+ var context = getMaskedContext(
7385
+ workInProgress,
7386
+ contextStackCursor.current
7387
+ );
7226
7388
  prepareToReadContext(workInProgress, renderLanes);
7227
- nextValue = renderWithHooks(
7389
+ context = renderWithHooks(
7228
7390
  null,
7229
7391
  workInProgress,
7230
- updateLanes,
7392
+ Component,
7231
7393
  current,
7232
- nextValue,
7394
+ context,
7233
7395
  renderLanes
7234
7396
  );
7235
7397
  workInProgress.flags |= 1;
7236
7398
  if (
7237
- "object" === typeof nextValue &&
7238
- null !== nextValue &&
7239
- "function" === typeof nextValue.render &&
7240
- void 0 === nextValue.$$typeof
7399
+ "object" === typeof context &&
7400
+ null !== context &&
7401
+ "function" === typeof context.render &&
7402
+ void 0 === context.$$typeof
7241
7403
  ) {
7242
7404
  workInProgress.tag = 1;
7243
7405
  workInProgress.memoizedState = null;
7244
7406
  workInProgress.updateQueue = null;
7245
- if (isContextProvider(updateLanes)) {
7407
+ if (isContextProvider(Component)) {
7246
7408
  var hasContext = !0;
7247
7409
  pushContextProvider(workInProgress);
7248
7410
  } else hasContext = !1;
7249
7411
  workInProgress.memoizedState =
7250
- null !== nextValue.state && void 0 !== nextValue.state
7251
- ? nextValue.state
7412
+ null !== context.state && void 0 !== context.state
7413
+ ? context.state
7252
7414
  : null;
7253
7415
  initializeUpdateQueue(workInProgress);
7254
- nextValue.updater = classComponentUpdater;
7255
- workInProgress.stateNode = nextValue;
7256
- nextValue._reactInternals = workInProgress;
7257
- mountClassInstance(workInProgress, updateLanes, current, renderLanes);
7416
+ context.updater = classComponentUpdater;
7417
+ workInProgress.stateNode = context;
7418
+ context._reactInternals = workInProgress;
7419
+ mountClassInstance(workInProgress, Component, current, renderLanes);
7258
7420
  workInProgress = finishClassComponent(
7259
7421
  null,
7260
7422
  workInProgress,
7261
- updateLanes,
7423
+ Component,
7262
7424
  !0,
7263
7425
  hasContext,
7264
7426
  renderLanes
7265
7427
  );
7266
7428
  } else
7267
7429
  (workInProgress.tag = 0),
7268
- reconcileChildren(null, workInProgress, nextValue, renderLanes),
7430
+ reconcileChildren(null, workInProgress, context, renderLanes),
7269
7431
  (workInProgress = workInProgress.child);
7270
7432
  return workInProgress;
7271
7433
  case 16:
7272
- nextValue = workInProgress.elementType;
7434
+ Component = workInProgress.elementType;
7273
7435
  a: {
7274
7436
  null !== current &&
7275
7437
  ((current.alternate = null),
7276
7438
  (workInProgress.alternate = null),
7277
7439
  (workInProgress.flags |= 2));
7278
7440
  current = workInProgress.pendingProps;
7279
- hasContext = nextValue._init;
7280
- nextValue = hasContext(nextValue._payload);
7281
- workInProgress.type = nextValue;
7282
- hasContext = workInProgress.tag = resolveLazyComponentTag(nextValue);
7283
- current = resolveDefaultProps(nextValue, current);
7284
- switch (hasContext) {
7441
+ context = Component._init;
7442
+ Component = context(Component._payload);
7443
+ workInProgress.type = Component;
7444
+ context = workInProgress.tag = resolveLazyComponentTag(Component);
7445
+ current = resolveDefaultProps(Component, current);
7446
+ switch (context) {
7285
7447
  case 0:
7286
7448
  workInProgress = updateFunctionComponent(
7287
7449
  null,
7288
7450
  workInProgress,
7289
- nextValue,
7451
+ Component,
7290
7452
  current,
7291
7453
  renderLanes
7292
7454
  );
@@ -7295,7 +7457,7 @@ beginWork$1 = function(current, workInProgress, renderLanes) {
7295
7457
  workInProgress = updateClassComponent(
7296
7458
  null,
7297
7459
  workInProgress,
7298
- nextValue,
7460
+ Component,
7299
7461
  current,
7300
7462
  renderLanes
7301
7463
  );
@@ -7304,7 +7466,7 @@ beginWork$1 = function(current, workInProgress, renderLanes) {
7304
7466
  workInProgress = updateForwardRef(
7305
7467
  null,
7306
7468
  workInProgress,
7307
- nextValue,
7469
+ Component,
7308
7470
  current,
7309
7471
  renderLanes
7310
7472
  );
@@ -7313,79 +7475,75 @@ beginWork$1 = function(current, workInProgress, renderLanes) {
7313
7475
  workInProgress = updateMemoComponent(
7314
7476
  null,
7315
7477
  workInProgress,
7316
- nextValue,
7317
- resolveDefaultProps(nextValue.type, current),
7318
- updateLanes,
7478
+ Component,
7479
+ resolveDefaultProps(Component.type, current),
7319
7480
  renderLanes
7320
7481
  );
7321
7482
  break a;
7322
7483
  }
7323
7484
  throw Error(
7324
7485
  "Element type is invalid. Received a promise that resolves to: " +
7325
- nextValue +
7486
+ Component +
7326
7487
  ". Lazy element type must resolve to a class or function."
7327
7488
  );
7328
7489
  }
7329
7490
  return workInProgress;
7330
7491
  case 0:
7331
7492
  return (
7332
- (updateLanes = workInProgress.type),
7333
- (nextValue = workInProgress.pendingProps),
7334
- (nextValue =
7335
- workInProgress.elementType === updateLanes
7336
- ? nextValue
7337
- : resolveDefaultProps(updateLanes, nextValue)),
7493
+ (Component = workInProgress.type),
7494
+ (context = workInProgress.pendingProps),
7495
+ (context =
7496
+ workInProgress.elementType === Component
7497
+ ? context
7498
+ : resolveDefaultProps(Component, context)),
7338
7499
  updateFunctionComponent(
7339
7500
  current,
7340
7501
  workInProgress,
7341
- updateLanes,
7342
- nextValue,
7502
+ Component,
7503
+ context,
7343
7504
  renderLanes
7344
7505
  )
7345
7506
  );
7346
7507
  case 1:
7347
7508
  return (
7348
- (updateLanes = workInProgress.type),
7349
- (nextValue = workInProgress.pendingProps),
7350
- (nextValue =
7351
- workInProgress.elementType === updateLanes
7352
- ? nextValue
7353
- : resolveDefaultProps(updateLanes, nextValue)),
7509
+ (Component = workInProgress.type),
7510
+ (context = workInProgress.pendingProps),
7511
+ (context =
7512
+ workInProgress.elementType === Component
7513
+ ? context
7514
+ : resolveDefaultProps(Component, context)),
7354
7515
  updateClassComponent(
7355
7516
  current,
7356
7517
  workInProgress,
7357
- updateLanes,
7358
- nextValue,
7518
+ Component,
7519
+ context,
7359
7520
  renderLanes
7360
7521
  )
7361
7522
  );
7362
7523
  case 3:
7363
7524
  pushHostRootContext(workInProgress);
7364
- updateLanes = workInProgress.updateQueue;
7365
- if (null === current || null === updateLanes)
7366
- throw Error(
7367
- "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."
7368
- );
7369
- nextValue = workInProgress.pendingProps;
7370
- updateLanes = workInProgress.memoizedState.element;
7525
+ if (null === current)
7526
+ throw Error("Should have a current fiber. This is a bug in React.");
7527
+ context = workInProgress.pendingProps;
7528
+ Component = workInProgress.memoizedState.element;
7371
7529
  cloneUpdateQueue(current, workInProgress);
7372
- processUpdateQueue(workInProgress, nextValue, null, renderLanes);
7373
- nextValue = workInProgress.memoizedState.element;
7374
- nextValue === updateLanes
7530
+ processUpdateQueue(workInProgress, context, null, renderLanes);
7531
+ context = workInProgress.memoizedState.element;
7532
+ context === Component
7375
7533
  ? (workInProgress = bailoutOnAlreadyFinishedWork(
7376
7534
  current,
7377
7535
  workInProgress,
7378
7536
  renderLanes
7379
7537
  ))
7380
- : (reconcileChildren(current, workInProgress, nextValue, renderLanes),
7538
+ : (reconcileChildren(current, workInProgress, context, renderLanes),
7381
7539
  (workInProgress = workInProgress.child));
7382
7540
  return workInProgress;
7383
7541
  case 5:
7384
7542
  return (
7385
7543
  pushHostContext(workInProgress),
7386
- (updateLanes = workInProgress.pendingProps.children),
7387
- markRef(current, workInProgress),
7388
- reconcileChildren(current, workInProgress, updateLanes, renderLanes),
7544
+ (Component = workInProgress.pendingProps.children),
7545
+ markRef$1(current, workInProgress),
7546
+ reconcileChildren(current, workInProgress, Component, renderLanes),
7389
7547
  workInProgress.child
7390
7548
  );
7391
7549
  case 6:
@@ -7398,35 +7556,30 @@ beginWork$1 = function(current, workInProgress, renderLanes) {
7398
7556
  workInProgress,
7399
7557
  workInProgress.stateNode.containerInfo
7400
7558
  ),
7401
- (updateLanes = workInProgress.pendingProps),
7559
+ (Component = workInProgress.pendingProps),
7402
7560
  null === current
7403
7561
  ? (workInProgress.child = reconcileChildFibers(
7404
7562
  workInProgress,
7405
7563
  null,
7406
- updateLanes,
7564
+ Component,
7407
7565
  renderLanes
7408
7566
  ))
7409
- : reconcileChildren(
7410
- current,
7411
- workInProgress,
7412
- updateLanes,
7413
- renderLanes
7414
- ),
7567
+ : reconcileChildren(current, workInProgress, Component, renderLanes),
7415
7568
  workInProgress.child
7416
7569
  );
7417
7570
  case 11:
7418
7571
  return (
7419
- (updateLanes = workInProgress.type),
7420
- (nextValue = workInProgress.pendingProps),
7421
- (nextValue =
7422
- workInProgress.elementType === updateLanes
7423
- ? nextValue
7424
- : resolveDefaultProps(updateLanes, nextValue)),
7572
+ (Component = workInProgress.type),
7573
+ (context = workInProgress.pendingProps),
7574
+ (context =
7575
+ workInProgress.elementType === Component
7576
+ ? context
7577
+ : resolveDefaultProps(Component, context)),
7425
7578
  updateForwardRef(
7426
7579
  current,
7427
7580
  workInProgress,
7428
- updateLanes,
7429
- nextValue,
7581
+ Component,
7582
+ context,
7430
7583
  renderLanes
7431
7584
  )
7432
7585
  );
@@ -7462,16 +7615,16 @@ beginWork$1 = function(current, workInProgress, renderLanes) {
7462
7615
  );
7463
7616
  case 10:
7464
7617
  a: {
7465
- updateLanes = workInProgress.type._context;
7466
- nextValue = workInProgress.pendingProps;
7618
+ Component = workInProgress.type._context;
7619
+ context = workInProgress.pendingProps;
7467
7620
  hasContext = workInProgress.memoizedProps;
7468
- var newValue = nextValue.value;
7469
- push(valueCursor, updateLanes._currentValue);
7470
- updateLanes._currentValue = newValue;
7621
+ var newValue = context.value;
7622
+ push(valueCursor, Component._currentValue);
7623
+ Component._currentValue = newValue;
7471
7624
  if (null !== hasContext)
7472
7625
  if (objectIs(hasContext.value, newValue)) {
7473
7626
  if (
7474
- hasContext.children === nextValue.children &&
7627
+ hasContext.children === context.children &&
7475
7628
  !didPerformWorkStackCursor.current
7476
7629
  ) {
7477
7630
  workInProgress = bailoutOnAlreadyFinishedWork(
@@ -7496,7 +7649,7 @@ beginWork$1 = function(current, workInProgress, renderLanes) {
7496
7649
  null !== dependency;
7497
7650
 
7498
7651
  ) {
7499
- if (dependency.context === updateLanes) {
7652
+ if (dependency.context === Component) {
7500
7653
  if (1 === newValue.tag) {
7501
7654
  dependency = createUpdate(-1, renderLanes & -renderLanes);
7502
7655
  dependency.tag = 2;
@@ -7514,7 +7667,11 @@ beginWork$1 = function(current, workInProgress, renderLanes) {
7514
7667
  newValue.lanes |= renderLanes;
7515
7668
  dependency = newValue.alternate;
7516
7669
  null !== dependency && (dependency.lanes |= renderLanes);
7517
- scheduleWorkOnParentPath(newValue.return, renderLanes);
7670
+ scheduleContextWorkOnParentPath(
7671
+ newValue.return,
7672
+ renderLanes,
7673
+ workInProgress
7674
+ );
7518
7675
  list.lanes |= renderLanes;
7519
7676
  break;
7520
7677
  }
@@ -7547,7 +7704,7 @@ beginWork$1 = function(current, workInProgress, renderLanes) {
7547
7704
  reconcileChildren(
7548
7705
  current,
7549
7706
  workInProgress,
7550
- nextValue.children,
7707
+ context.children,
7551
7708
  renderLanes
7552
7709
  );
7553
7710
  workInProgress = workInProgress.child;
@@ -7555,29 +7712,25 @@ beginWork$1 = function(current, workInProgress, renderLanes) {
7555
7712
  return workInProgress;
7556
7713
  case 9:
7557
7714
  return (
7558
- (nextValue = workInProgress.type),
7559
- (updateLanes = workInProgress.pendingProps.children),
7715
+ (context = workInProgress.type),
7716
+ (Component = workInProgress.pendingProps.children),
7560
7717
  prepareToReadContext(workInProgress, renderLanes),
7561
- (nextValue = readContext(nextValue)),
7562
- (updateLanes = updateLanes(nextValue)),
7718
+ (context = readContext(context)),
7719
+ (Component = Component(context)),
7563
7720
  (workInProgress.flags |= 1),
7564
- reconcileChildren(current, workInProgress, updateLanes, renderLanes),
7721
+ reconcileChildren(current, workInProgress, Component, renderLanes),
7565
7722
  workInProgress.child
7566
7723
  );
7567
7724
  case 14:
7568
7725
  return (
7569
- (nextValue = workInProgress.type),
7570
- (hasContext = resolveDefaultProps(
7571
- nextValue,
7572
- workInProgress.pendingProps
7573
- )),
7574
- (hasContext = resolveDefaultProps(nextValue.type, hasContext)),
7726
+ (Component = workInProgress.type),
7727
+ (context = resolveDefaultProps(Component, workInProgress.pendingProps)),
7728
+ (context = resolveDefaultProps(Component.type, context)),
7575
7729
  updateMemoComponent(
7576
7730
  current,
7577
7731
  workInProgress,
7578
- nextValue,
7579
- hasContext,
7580
- updateLanes,
7732
+ Component,
7733
+ context,
7581
7734
  renderLanes
7582
7735
  )
7583
7736
  );
@@ -7587,32 +7740,31 @@ beginWork$1 = function(current, workInProgress, renderLanes) {
7587
7740
  workInProgress,
7588
7741
  workInProgress.type,
7589
7742
  workInProgress.pendingProps,
7590
- updateLanes,
7591
7743
  renderLanes
7592
7744
  );
7593
7745
  case 17:
7594
7746
  return (
7595
- (updateLanes = workInProgress.type),
7596
- (nextValue = workInProgress.pendingProps),
7597
- (nextValue =
7598
- workInProgress.elementType === updateLanes
7599
- ? nextValue
7600
- : resolveDefaultProps(updateLanes, nextValue)),
7747
+ (Component = workInProgress.type),
7748
+ (context = workInProgress.pendingProps),
7749
+ (context =
7750
+ workInProgress.elementType === Component
7751
+ ? context
7752
+ : resolveDefaultProps(Component, context)),
7601
7753
  null !== current &&
7602
7754
  ((current.alternate = null),
7603
7755
  (workInProgress.alternate = null),
7604
7756
  (workInProgress.flags |= 2)),
7605
7757
  (workInProgress.tag = 1),
7606
- isContextProvider(updateLanes)
7758
+ isContextProvider(Component)
7607
7759
  ? ((current = !0), pushContextProvider(workInProgress))
7608
7760
  : (current = !1),
7609
7761
  prepareToReadContext(workInProgress, renderLanes),
7610
- constructClassInstance(workInProgress, updateLanes, nextValue),
7611
- mountClassInstance(workInProgress, updateLanes, nextValue, renderLanes),
7762
+ constructClassInstance(workInProgress, Component, context),
7763
+ mountClassInstance(workInProgress, Component, context, renderLanes),
7612
7764
  finishClassComponent(
7613
7765
  null,
7614
7766
  workInProgress,
7615
- updateLanes,
7767
+ Component,
7616
7768
  !0,
7617
7769
  current,
7618
7770
  renderLanes
@@ -7622,8 +7774,6 @@ beginWork$1 = function(current, workInProgress, renderLanes) {
7622
7774
  return updateSuspenseListComponent(current, workInProgress, renderLanes);
7623
7775
  case 22:
7624
7776
  return updateOffscreenComponent(current, workInProgress, renderLanes);
7625
- case 23:
7626
- return updateOffscreenComponent(current, workInProgress, renderLanes);
7627
7777
  }
7628
7778
  throw Error(
7629
7779
  "Unknown unit of work tag (" +
@@ -7631,6 +7781,9 @@ beginWork$1 = function(current, workInProgress, renderLanes) {
7631
7781
  "). This error is likely caused by a bug in React. Please file an issue."
7632
7782
  );
7633
7783
  };
7784
+ function scheduleCallback$1(priorityLevel, callback) {
7785
+ return scheduleCallback(priorityLevel, callback);
7786
+ }
7634
7787
  function FiberNode(tag, pendingProps, key, mode) {
7635
7788
  this.tag = tag;
7636
7789
  this.key = key;
@@ -7681,7 +7834,7 @@ function createWorkInProgress(current, pendingProps) {
7681
7834
  (workInProgress.flags = 0),
7682
7835
  (workInProgress.subtreeFlags = 0),
7683
7836
  (workInProgress.deletions = null));
7684
- workInProgress.flags = current.flags & 1835008;
7837
+ workInProgress.flags = current.flags & 14680064;
7685
7838
  workInProgress.childLanes = current.childLanes;
7686
7839
  workInProgress.lanes = current.lanes;
7687
7840
  workInProgress.child = current.child;
@@ -7714,10 +7867,6 @@ function createFiberFromTypeAndProps(
7714
7867
  a: switch (type) {
7715
7868
  case REACT_FRAGMENT_TYPE:
7716
7869
  return createFiberFromFragment(pendingProps.children, mode, lanes, key);
7717
- case REACT_DEBUG_TRACING_MODE_TYPE:
7718
- fiberTag = 8;
7719
- mode |= 4;
7720
- break;
7721
7870
  case REACT_STRICT_MODE_TYPE:
7722
7871
  fiberTag = 8;
7723
7872
  mode |= 8;
@@ -7745,13 +7894,6 @@ function createFiberFromTypeAndProps(
7745
7894
  );
7746
7895
  case REACT_OFFSCREEN_TYPE:
7747
7896
  return createFiberFromOffscreen(pendingProps, mode, lanes, key);
7748
- case REACT_LEGACY_HIDDEN_TYPE:
7749
- return (
7750
- (type = createFiber(23, pendingProps, key, mode)),
7751
- (type.elementType = REACT_LEGACY_HIDDEN_TYPE),
7752
- (type.lanes = lanes),
7753
- type
7754
- );
7755
7897
  default:
7756
7898
  if ("object" === typeof type && null !== type)
7757
7899
  switch (type.$$typeof) {
@@ -7774,8 +7916,7 @@ function createFiberFromTypeAndProps(
7774
7916
  }
7775
7917
  throw Error(
7776
7918
  "Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: " +
7777
- (null == type ? type : typeof type) +
7778
- "."
7919
+ ((null == type ? type : typeof type) + ".")
7779
7920
  );
7780
7921
  }
7781
7922
  key = createFiber(fiberTag, pendingProps, key, mode);
@@ -7793,6 +7934,7 @@ function createFiberFromOffscreen(pendingProps, mode, lanes, key) {
7793
7934
  pendingProps = createFiber(22, pendingProps, key, mode);
7794
7935
  pendingProps.elementType = REACT_OFFSCREEN_TYPE;
7795
7936
  pendingProps.lanes = lanes;
7937
+ pendingProps.stateNode = {};
7796
7938
  return pendingProps;
7797
7939
  }
7798
7940
  function createFiberFromText(content, mode, lanes) {
@@ -7815,19 +7957,25 @@ function createFiberFromPortal(portal, mode, lanes) {
7815
7957
  };
7816
7958
  return mode;
7817
7959
  }
7818
- function FiberRootNode(containerInfo, tag, hydrate) {
7960
+ function FiberRootNode(
7961
+ containerInfo,
7962
+ tag,
7963
+ hydrate,
7964
+ identifierPrefix,
7965
+ onRecoverableError
7966
+ ) {
7819
7967
  this.tag = tag;
7820
7968
  this.containerInfo = containerInfo;
7821
7969
  this.finishedWork = this.pingCache = this.current = this.pendingChildren = null;
7822
7970
  this.timeoutHandle = -1;
7823
- this.pendingContext = this.context = null;
7824
- this.hydrate = hydrate;
7825
- this.callbackNode = null;
7971
+ this.callbackNode = this.pendingContext = this.context = null;
7826
7972
  this.callbackPriority = 0;
7827
7973
  this.eventTimes = createLaneMap(0);
7828
7974
  this.expirationTimes = createLaneMap(-1);
7829
7975
  this.entangledLanes = this.finishedLanes = this.mutableReadLanes = this.expiredLanes = this.pingedLanes = this.suspendedLanes = this.pendingLanes = 0;
7830
7976
  this.entanglements = createLaneMap(0);
7977
+ this.identifierPrefix = identifierPrefix;
7978
+ this.onRecoverableError = onRecoverableError;
7831
7979
  }
7832
7980
  function createPortal(children, containerInfo, implementation) {
7833
7981
  var key =
@@ -7845,9 +7993,9 @@ function findHostInstance(component) {
7845
7993
  if (void 0 === fiber) {
7846
7994
  if ("function" === typeof component.render)
7847
7995
  throw Error("Unable to find node on an unmounted component.");
7996
+ component = Object.keys(component).join(",");
7848
7997
  throw Error(
7849
- "Argument appears to not be a ReactComponent. Keys: " +
7850
- Object.keys(component)
7998
+ "Argument appears to not be a ReactComponent. Keys: " + component
7851
7999
  );
7852
8000
  }
7853
8001
  component = findCurrentHostFiber(fiber);
@@ -7929,6 +8077,9 @@ function findNodeHandle(componentOrHandle) {
7929
8077
  ? componentOrHandle.canonical._nativeTag
7930
8078
  : componentOrHandle._nativeTag;
7931
8079
  }
8080
+ function onRecoverableError(error) {
8081
+ console.error(error);
8082
+ }
7932
8083
  function unmountComponentAtNode(containerTag) {
7933
8084
  var root = roots.get(containerTag);
7934
8085
  root &&
@@ -7949,10 +8100,10 @@ batchedUpdatesImpl = function(fn, a) {
7949
8100
  }
7950
8101
  };
7951
8102
  var roots = new Map(),
7952
- devToolsConfig$jscomp$inline_983 = {
8103
+ devToolsConfig$jscomp$inline_963 = {
7953
8104
  findFiberByHostInstance: getInstanceFromTag,
7954
8105
  bundleType: 0,
7955
- version: "18.0.0-experimental-568dc3532",
8106
+ version: "18.0.0-experimental-34aa5cfe0-20220329",
7956
8107
  rendererPackageName: "react-native-renderer",
7957
8108
  rendererConfig: {
7958
8109
  getInspectorDataForViewTag: function() {
@@ -7967,11 +8118,11 @@ var roots = new Map(),
7967
8118
  }.bind(null, findNodeHandle)
7968
8119
  }
7969
8120
  };
7970
- var internals$jscomp$inline_1237 = {
7971
- bundleType: devToolsConfig$jscomp$inline_983.bundleType,
7972
- version: devToolsConfig$jscomp$inline_983.version,
7973
- rendererPackageName: devToolsConfig$jscomp$inline_983.rendererPackageName,
7974
- rendererConfig: devToolsConfig$jscomp$inline_983.rendererConfig,
8121
+ var internals$jscomp$inline_1217 = {
8122
+ bundleType: devToolsConfig$jscomp$inline_963.bundleType,
8123
+ version: devToolsConfig$jscomp$inline_963.version,
8124
+ rendererPackageName: devToolsConfig$jscomp$inline_963.rendererPackageName,
8125
+ rendererConfig: devToolsConfig$jscomp$inline_963.rendererConfig,
7975
8126
  overrideHookState: null,
7976
8127
  overrideHookStateDeletePath: null,
7977
8128
  overrideHookStateRenamePath: null,
@@ -7987,26 +8138,26 @@ var internals$jscomp$inline_1237 = {
7987
8138
  return null === fiber ? null : fiber.stateNode;
7988
8139
  },
7989
8140
  findFiberByHostInstance:
7990
- devToolsConfig$jscomp$inline_983.findFiberByHostInstance ||
8141
+ devToolsConfig$jscomp$inline_963.findFiberByHostInstance ||
7991
8142
  emptyFindFiberByHostInstance,
7992
8143
  findHostInstancesForRefresh: null,
7993
8144
  scheduleRefresh: null,
7994
8145
  scheduleRoot: null,
7995
8146
  setRefreshHandler: null,
7996
8147
  getCurrentFiber: null,
7997
- reconcilerVersion: "18.0.0-experimental-568dc3532"
8148
+ reconcilerVersion: "18.0.0-experimental-34aa5cfe0-20220329"
7998
8149
  };
7999
8150
  if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
8000
- var hook$jscomp$inline_1238 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
8151
+ var hook$jscomp$inline_1218 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
8001
8152
  if (
8002
- !hook$jscomp$inline_1238.isDisabled &&
8003
- hook$jscomp$inline_1238.supportsFiber
8153
+ !hook$jscomp$inline_1218.isDisabled &&
8154
+ hook$jscomp$inline_1218.supportsFiber
8004
8155
  )
8005
8156
  try {
8006
- (rendererID = hook$jscomp$inline_1238.inject(
8007
- internals$jscomp$inline_1237
8157
+ (rendererID = hook$jscomp$inline_1218.inject(
8158
+ internals$jscomp$inline_1217
8008
8159
  )),
8009
- (injectedHook = hook$jscomp$inline_1238);
8160
+ (injectedHook = hook$jscomp$inline_1218);
8010
8161
  } catch (err) {}
8011
8162
  }
8012
8163
  exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = {
@@ -8026,12 +8177,10 @@ exports.createPortal = function(children, containerTag) {
8026
8177
  };
8027
8178
  exports.dispatchCommand = function(handle, command, args) {
8028
8179
  null != handle._nativeTag &&
8029
- (handle._internalInstanceHandle
8030
- ? nativeFabricUIManager.dispatchCommand(
8031
- handle._internalInstanceHandle.stateNode.node,
8032
- command,
8033
- args
8034
- )
8180
+ (null != handle._internalInstanceHandle
8181
+ ? ((handle = handle._internalInstanceHandle.stateNode),
8182
+ null != handle &&
8183
+ nativeFabricUIManager.dispatchCommand(handle.node, command, args))
8035
8184
  : ReactNativePrivateInterface.UIManager.dispatchViewManagerCommand(
8036
8185
  handle._nativeTag,
8037
8186
  command,
@@ -8051,14 +8200,20 @@ exports.findHostInstance_DEPRECATED = function(componentOrHandle) {
8051
8200
  : componentOrHandle;
8052
8201
  };
8053
8202
  exports.findNodeHandle = findNodeHandle;
8203
+ exports.getInspectorDataForInstance = void 0;
8054
8204
  exports.render = function(element, containerTag, callback) {
8055
8205
  var root = roots.get(containerTag);
8056
8206
  if (!root) {
8057
- root = new FiberRootNode(containerTag, 0, !1);
8207
+ root = new FiberRootNode(containerTag, 0, !1, "", onRecoverableError);
8058
8208
  var JSCompiler_inline_result = createFiber(3, null, null, 0);
8059
8209
  root.current = JSCompiler_inline_result;
8060
8210
  JSCompiler_inline_result.stateNode = root;
8061
- JSCompiler_inline_result.memoizedState = { element: null };
8211
+ JSCompiler_inline_result.memoizedState = {
8212
+ element: null,
8213
+ isDehydrated: !1,
8214
+ cache: null,
8215
+ transitions: null
8216
+ };
8062
8217
  initializeUpdateQueue(JSCompiler_inline_result);
8063
8218
  roots.set(containerTag, root);
8064
8219
  }
@@ -8076,11 +8231,10 @@ exports.render = function(element, containerTag, callback) {
8076
8231
  };
8077
8232
  exports.sendAccessibilityEvent = function(handle, eventType) {
8078
8233
  null != handle._nativeTag &&
8079
- (handle._internalInstanceHandle
8080
- ? nativeFabricUIManager.sendAccessibilityEvent(
8081
- handle._internalInstanceHandle.stateNode.node,
8082
- eventType
8083
- )
8234
+ (null != handle._internalInstanceHandle
8235
+ ? ((handle = handle._internalInstanceHandle.stateNode),
8236
+ null != handle &&
8237
+ nativeFabricUIManager.sendAccessibilityEvent(handle.node, eventType))
8084
8238
  : ReactNativePrivateInterface.legacySendAccessibilityEvent(
8085
8239
  handle._nativeTag,
8086
8240
  eventType